@composio/client 0.1.0-alpha.1 → 0.1.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +157 -0
- package/LICENSE +1 -1
- package/README.md +31 -31
- package/api-promise.js +2 -15
- package/api-promise.js.map +1 -1
- package/client.d.mts +32 -29
- package/client.d.mts.map +1 -1
- package/client.d.ts +32 -29
- package/client.d.ts.map +1 -1
- package/client.js +95 -113
- package/client.js.map +1 -1
- package/client.mjs +88 -83
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts +2 -3
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts +2 -3
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.js +4 -14
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs +1 -11
- package/core/api-promise.mjs.map +1 -1
- package/core/error.d.mts +2 -3
- package/core/error.d.mts.map +1 -1
- package/core/error.d.ts +2 -3
- package/core/error.d.ts.map +1 -1
- package/core/error.js +4 -4
- package/core/error.js.map +1 -1
- package/core/error.mjs +2 -2
- package/core/error.mjs.map +1 -1
- package/core/resource.d.mts +3 -3
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts +3 -3
- package/core/resource.d.ts.map +1 -1
- package/core/resource.js.map +1 -1
- package/core/resource.mjs.map +1 -1
- package/error.js +2 -15
- package/error.js.map +1 -1
- package/index.d.mts +3 -3
- package/index.d.mts.map +1 -1
- package/index.d.ts +3 -3
- package/index.d.ts.map +1 -1
- package/index.js +4 -4
- package/index.js.map +1 -1
- package/index.mjs +3 -3
- package/index.mjs.map +1 -1
- package/internal/builtin-types.d.mts +0 -2
- package/internal/builtin-types.d.mts.map +1 -1
- package/internal/builtin-types.d.ts +0 -2
- package/internal/builtin-types.d.ts.map +1 -1
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/errors.d.mts.map +1 -1
- package/internal/errors.d.ts.map +1 -1
- package/internal/errors.js +2 -2
- package/internal/errors.js.map +1 -1
- package/internal/errors.mjs.map +1 -1
- package/internal/headers.d.mts +1 -2
- package/internal/headers.d.mts.map +1 -1
- package/internal/headers.d.ts +1 -2
- package/internal/headers.d.ts.map +1 -1
- package/internal/headers.js +3 -1
- package/internal/headers.js.map +1 -1
- package/internal/headers.mjs +3 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts +2 -3
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts +2 -3
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +1 -2
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/qs/formats.d.mts +6 -0
- package/internal/qs/formats.d.mts.map +1 -0
- package/internal/qs/formats.d.ts +6 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +11 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +8 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.mts +10 -0
- package/internal/qs/index.d.mts.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.mts +3 -0
- package/internal/qs/stringify.d.mts.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +279 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +276 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.mts +57 -0
- package/internal/qs/types.d.mts.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/internal/qs/types.js +3 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.mts +14 -0
- package/internal/qs/utils.d.mts.map +1 -0
- package/internal/qs/utils.d.ts +14 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +229 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.mjs.map +1 -0
- package/internal/request-options.d.mts +0 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +0 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.js +6 -7
- package/internal/shims.js.map +1 -1
- package/internal/shims.mjs +1 -1
- package/internal/shims.mjs.map +1 -1
- package/internal/to-file.d.mts +0 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts +0 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.js +4 -4
- package/internal/to-file.js.map +1 -1
- package/internal/to-file.mjs +3 -2
- package/internal/to-file.mjs.map +1 -1
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +0 -1
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +0 -1
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts +5 -7
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts +5 -7
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.js +16 -6
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +12 -3
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.d.mts.map +1 -1
- package/internal/utils/base64.d.ts.map +1 -1
- package/internal/utils/base64.js +14 -9
- package/internal/utils/base64.js.map +1 -1
- package/internal/utils/base64.mjs +15 -10
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts.map +1 -1
- package/internal/utils/env.d.ts.map +1 -1
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs.map +1 -1
- package/internal/utils/log.d.mts +3 -4
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts +3 -4
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +2 -2
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.d.mts.map +1 -1
- package/internal/utils/path.d.ts.map +1 -1
- package/internal/utils/path.js +3 -3
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs +2 -2
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/sleep.d.mts.map +1 -1
- package/internal/utils/sleep.d.ts.map +1 -1
- package/internal/utils/uuid.d.mts +1 -1
- package/internal/utils/uuid.d.mts.map +1 -1
- package/internal/utils/uuid.d.ts +1 -1
- package/internal/utils/uuid.d.ts.map +1 -1
- package/internal/utils/uuid.js +1 -2
- package/internal/utils/uuid.js.map +1 -1
- package/internal/utils/uuid.mjs +1 -2
- package/internal/utils/uuid.mjs.map +1 -1
- package/internal/utils/values.d.mts.map +1 -1
- package/internal/utils/values.d.ts.map +1 -1
- package/internal/utils/values.js +10 -10
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +6 -6
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.js +7 -20
- package/internal/utils.js.map +1 -1
- package/package.json +5 -9
- package/resource.js +2 -15
- package/resource.js.map +1 -1
- package/resources/auth-configs.d.mts +232 -41
- package/resources/auth-configs.d.mts.map +1 -1
- package/resources/auth-configs.d.ts +232 -41
- package/resources/auth-configs.d.ts.map +1 -1
- package/resources/auth-configs.js +64 -0
- package/resources/auth-configs.js.map +1 -1
- package/resources/auth-configs.mjs +64 -0
- package/resources/auth-configs.mjs.map +1 -1
- package/resources/connected-accounts.d.mts +176 -216
- package/resources/connected-accounts.d.mts.map +1 -1
- package/resources/connected-accounts.d.ts +176 -216
- package/resources/connected-accounts.d.ts.map +1 -1
- package/resources/connected-accounts.js +70 -0
- package/resources/connected-accounts.js.map +1 -1
- package/resources/connected-accounts.mjs +70 -0
- package/resources/connected-accounts.mjs.map +1 -1
- package/resources/files.d.mts +159 -0
- package/resources/files.d.mts.map +1 -0
- package/resources/files.d.ts +159 -0
- package/resources/files.d.ts.map +1 -0
- package/resources/files.js +39 -0
- package/resources/files.js.map +1 -0
- package/resources/files.mjs +35 -0
- package/resources/files.mjs.map +1 -0
- package/resources/index.d.mts +5 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -2
- package/resources/index.mjs.map +1 -1
- package/resources/mcp/command.d.mts +4 -0
- package/resources/mcp/command.d.mts.map +1 -0
- package/resources/mcp/command.d.ts +4 -0
- package/resources/mcp/command.d.ts.map +1 -0
- package/resources/mcp/command.js +9 -0
- package/resources/mcp/command.js.map +1 -0
- package/resources/mcp/command.mjs +5 -0
- package/resources/mcp/command.mjs.map +1 -0
- package/resources/mcp/index.d.mts +3 -0
- package/resources/mcp/index.d.mts.map +1 -0
- package/resources/mcp/index.d.ts +3 -0
- package/resources/mcp/index.d.ts.map +1 -0
- package/resources/mcp/index.js +9 -0
- package/resources/mcp/index.js.map +1 -0
- package/resources/mcp/index.mjs +4 -0
- package/resources/mcp/index.mjs.map +1 -0
- package/resources/mcp/mcp.d.mts +411 -0
- package/resources/mcp/mcp.d.mts.map +1 -0
- package/resources/mcp/mcp.d.ts +411 -0
- package/resources/mcp/mcp.d.ts.map +1 -0
- package/resources/mcp/mcp.js +101 -0
- package/resources/mcp/mcp.js.map +1 -0
- package/resources/mcp/mcp.mjs +96 -0
- package/resources/mcp/mcp.mjs.map +1 -0
- package/resources/mcp.d.mts +2 -0
- package/resources/mcp.d.mts.map +1 -0
- package/resources/mcp.d.ts +2 -0
- package/resources/mcp.d.ts.map +1 -0
- package/resources/mcp.js +6 -0
- package/resources/mcp.js.map +1 -0
- package/resources/mcp.mjs +3 -0
- package/resources/mcp.mjs.map +1 -0
- package/resources/migration.d.mts +32 -0
- package/resources/migration.d.mts.map +1 -0
- package/resources/migration.d.ts +32 -0
- package/resources/migration.d.ts.map +1 -0
- package/resources/migration.js +17 -0
- package/resources/migration.js.map +1 -0
- package/resources/migration.mjs +13 -0
- package/resources/migration.mjs.map +1 -0
- package/resources/org/api-key.d.mts +28 -0
- package/resources/org/api-key.d.mts.map +1 -1
- package/resources/org/api-key.d.ts +28 -0
- package/resources/org/api-key.d.ts.map +1 -1
- package/resources/org/api-key.js +20 -0
- package/resources/org/api-key.js.map +1 -1
- package/resources/org/api-key.mjs +20 -0
- package/resources/org/api-key.mjs.map +1 -1
- package/resources/org/org.js +3 -25
- package/resources/org/org.js.map +1 -1
- package/resources/org/project/api-keys.d.mts +97 -20
- package/resources/org/project/api-keys.d.mts.map +1 -1
- package/resources/org/project/api-keys.d.ts +97 -20
- package/resources/org/project/api-keys.d.ts.map +1 -1
- package/resources/org/project/api-keys.js +57 -0
- package/resources/org/project/api-keys.js.map +1 -1
- package/resources/org/project/api-keys.mjs +57 -0
- package/resources/org/project/api-keys.mjs.map +1 -1
- package/resources/org/project/project.d.mts +182 -7
- package/resources/org/project/project.d.mts.map +1 -1
- package/resources/org/project/project.d.ts +182 -7
- package/resources/org/project/project.d.ts.map +1 -1
- package/resources/org/project/project.js +56 -26
- package/resources/org/project/project.js.map +1 -1
- package/resources/org/project/project.mjs +52 -0
- package/resources/org/project/project.mjs.map +1 -1
- package/resources/org/project/trigger.d.mts +101 -5
- package/resources/org/project/trigger.d.mts.map +1 -1
- package/resources/org/project/trigger.d.ts +101 -5
- package/resources/org/project/trigger.d.ts.map +1 -1
- package/resources/org/project/trigger.js +21 -0
- package/resources/org/project/trigger.js.map +1 -1
- package/resources/org/project/trigger.mjs +21 -0
- package/resources/org/project/trigger.mjs.map +1 -1
- package/resources/org/project/webhook.d.mts +88 -14
- package/resources/org/project/webhook.d.mts.map +1 -1
- package/resources/org/project/webhook.d.ts +88 -14
- package/resources/org/project/webhook.d.ts.map +1 -1
- package/resources/org/project/webhook.js +51 -1
- package/resources/org/project/webhook.js.map +1 -1
- package/resources/org/project/webhook.mjs +51 -1
- package/resources/org/project/webhook.mjs.map +1 -1
- package/resources/org/project.js +2 -15
- package/resources/org/project.js.map +1 -1
- package/resources/org.js +2 -15
- package/resources/org.js.map +1 -1
- package/resources/team-members.d.mts +12 -0
- package/resources/team-members.d.mts.map +1 -1
- package/resources/team-members.d.ts +12 -0
- package/resources/team-members.d.ts.map +1 -1
- package/resources/team-members.js +12 -0
- package/resources/team-members.js.map +1 -1
- package/resources/team-members.mjs +12 -0
- package/resources/team-members.mjs.map +1 -1
- package/resources/toolkits.d.mts +215 -4
- package/resources/toolkits.d.mts.map +1 -1
- package/resources/toolkits.d.ts +215 -4
- package/resources/toolkits.d.ts.map +1 -1
- package/resources/toolkits.js +20 -2
- package/resources/toolkits.js.map +1 -1
- package/resources/toolkits.mjs +20 -2
- package/resources/toolkits.mjs.map +1 -1
- package/resources/tools.d.mts +295 -21
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +295 -21
- package/resources/tools.d.ts.map +1 -1
- package/resources/tools.js +67 -0
- package/resources/tools.js.map +1 -1
- package/resources/tools.mjs +67 -0
- package/resources/tools.mjs.map +1 -1
- package/resources/trigger-instances/handle.d.mts +2 -2
- package/resources/trigger-instances/handle.d.mts.map +1 -1
- package/resources/trigger-instances/handle.d.ts +2 -2
- package/resources/trigger-instances/handle.d.ts.map +1 -1
- package/resources/trigger-instances/handle.js.map +1 -1
- package/resources/trigger-instances/handle.mjs.map +1 -1
- package/resources/trigger-instances/index.d.mts +1 -1
- package/resources/trigger-instances/index.d.mts.map +1 -1
- package/resources/trigger-instances/index.d.ts +1 -1
- package/resources/trigger-instances/index.d.ts.map +1 -1
- package/resources/trigger-instances/index.js.map +1 -1
- package/resources/trigger-instances/index.mjs.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.mts +51 -31
- package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.ts +51 -31
- package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
- package/resources/trigger-instances/trigger-instances.js +3 -32
- package/resources/trigger-instances/trigger-instances.js.map +1 -1
- package/resources/trigger-instances/trigger-instances.mjs +1 -8
- package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
- package/resources/trigger-instances.js +2 -15
- package/resources/trigger-instances.js.map +1 -1
- package/resources/triggers-types.d.mts +105 -4
- package/resources/triggers-types.d.mts.map +1 -1
- package/resources/triggers-types.d.ts +105 -4
- package/resources/triggers-types.d.ts.map +1 -1
- package/resources/triggers-types.js +29 -0
- package/resources/triggers-types.js.map +1 -1
- package/resources/triggers-types.mjs +29 -0
- package/resources/triggers-types.mjs.map +1 -1
- package/resources.js +2 -15
- package/resources.js.map +1 -1
- package/src/client.ts +128 -94
- package/src/core/api-promise.ts +4 -4
- package/src/core/error.ts +2 -2
- package/src/core/resource.ts +3 -3
- package/src/index.ts +3 -3
- package/src/internal/headers.ts +4 -3
- package/src/internal/parse.ts +2 -2
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +9 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +388 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -0
- package/src/internal/shims.ts +1 -1
- package/src/internal/to-file.ts +4 -2
- package/src/internal/uploads.ts +21 -9
- package/src/internal/utils/base64.ts +16 -13
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/log.ts +3 -3
- package/src/internal/utils/path.ts +2 -4
- package/src/internal/utils/uuid.ts +1 -3
- package/src/internal/utils/values.ts +6 -6
- package/src/resources/auth-configs.ts +258 -49
- package/src/resources/connected-accounts.ts +192 -302
- package/src/resources/files.ts +209 -0
- package/src/resources/index.ts +24 -11
- package/src/resources/mcp/command.ts +5 -0
- package/src/resources/mcp/index.ts +14 -0
- package/src/resources/mcp/mcp.ts +522 -0
- package/src/resources/mcp.ts +3 -0
- package/src/resources/migration.ts +46 -0
- package/src/resources/org/api-key.ts +28 -0
- package/src/resources/org/project/api-keys.ts +97 -20
- package/src/resources/org/project/project.ts +182 -13
- package/src/resources/org/project/trigger.ts +101 -9
- package/src/resources/org/project/webhook.ts +88 -14
- package/src/resources/team-members.ts +12 -0
- package/src/resources/toolkits.ts +230 -4
- package/src/resources/tools.ts +316 -21
- package/src/resources/trigger-instances/handle.ts +10 -2
- package/src/resources/trigger-instances/index.ts +0 -3
- package/src/resources/trigger-instances/trigger-instances.ts +55 -44
- package/src/resources/triggers-types.ts +107 -6
- package/src/version.ts +1 -1
- package/uploads.js +2 -15
- package/uploads.js.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/internal/shims/crypto.d.mts +0 -13
- package/internal/shims/crypto.d.mts.map +0 -1
- package/internal/shims/crypto.d.ts +0 -13
- package/internal/shims/crypto.d.ts.map +0 -1
- package/internal/shims/crypto.js +0 -13
- package/internal/shims/crypto.js.map +0 -1
- package/internal/shims/crypto.mjs +0 -9
- package/internal/shims/crypto.mjs.map +0 -1
- package/internal/shims/file.d.mts +0 -23
- package/internal/shims/file.d.mts.map +0 -1
- package/internal/shims/file.d.ts +0 -23
- package/internal/shims/file.d.ts.map +0 -1
- package/internal/shims/file.js +0 -16
- package/internal/shims/file.js.map +0 -1
- package/internal/shims/file.mjs +0 -12
- package/internal/shims/file.mjs.map +0 -1
- package/internal/shims/getBuiltinModule.d.mts +0 -11
- package/internal/shims/getBuiltinModule.d.mts.map +0 -1
- package/internal/shims/getBuiltinModule.d.ts +0 -11
- package/internal/shims/getBuiltinModule.d.ts.map +0 -1
- package/internal/shims/getBuiltinModule.js +0 -68
- package/internal/shims/getBuiltinModule.js.map +0 -1
- package/internal/shims/getBuiltinModule.mjs +0 -64
- package/internal/shims/getBuiltinModule.mjs.map +0 -1
- package/internal/shims/nullGetBuiltinModule.d.mts +0 -2
- package/internal/shims/nullGetBuiltinModule.d.mts.map +0 -1
- package/internal/shims/nullGetBuiltinModule.d.ts +0 -2
- package/internal/shims/nullGetBuiltinModule.d.ts.map +0 -1
- package/internal/shims/nullGetBuiltinModule.js +0 -5
- package/internal/shims/nullGetBuiltinModule.js.map +0 -1
- package/internal/shims/nullGetBuiltinModule.mjs +0 -2
- package/internal/shims/nullGetBuiltinModule.mjs.map +0 -1
- package/resources/action-execution.d.mts +0 -155
- package/resources/action-execution.d.mts.map +0 -1
- package/resources/action-execution.d.ts +0 -155
- package/resources/action-execution.d.ts.map +0 -1
- package/resources/action-execution.js +0 -19
- package/resources/action-execution.js.map +0 -1
- package/resources/action-execution.mjs +0 -15
- package/resources/action-execution.mjs.map +0 -1
- package/resources/trigger.d.mts +0 -73
- package/resources/trigger.d.mts.map +0 -1
- package/resources/trigger.d.ts +0 -73
- package/resources/trigger.d.ts.map +0 -1
- package/resources/trigger.js +0 -12
- package/resources/trigger.js.map +0 -1
- package/resources/trigger.mjs +0 -8
- package/resources/trigger.mjs.map +0 -1
- package/src/internal/shims/crypto.ts +0 -18
- package/src/internal/shims/file.ts +0 -32
- package/src/internal/shims/getBuiltinModule.ts +0 -64
- package/src/internal/shims/nullGetBuiltinModule.ts +0 -1
- package/src/resources/action-execution.ts +0 -244
- package/src/resources/trigger.ts +0 -108
|
@@ -6,6 +6,21 @@ import { RequestOptions } from '../../../internal/request-options';
|
|
|
6
6
|
import { path } from '../../../internal/utils/path';
|
|
7
7
|
|
|
8
8
|
export class APIKeys extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Creates a new API key for the specified project. API keys are used for
|
|
11
|
+
* authenticating requests to the API. This endpoint generates a new key with the
|
|
12
|
+
* provided name and returns the complete key details including the actual key
|
|
13
|
+
* value. Note that the full API key value is only returned once at creation time
|
|
14
|
+
* and cannot be retrieved later, so it should be securely stored immediately.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const apiKey = await client.org.project.apiKeys.create(
|
|
19
|
+
* 'proj_abc123xyz456',
|
|
20
|
+
* { name: 'Production API Key' },
|
|
21
|
+
* );
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
9
24
|
create(
|
|
10
25
|
projectID: string,
|
|
11
26
|
body: APIKeyCreateParams,
|
|
@@ -14,50 +29,101 @@ export class APIKeys extends APIResource {
|
|
|
14
29
|
return this._client.post(path`/api/v3/org/project/${projectID}/api_keys/create`, { body, ...options });
|
|
15
30
|
}
|
|
16
31
|
|
|
32
|
+
/**
|
|
33
|
+
* Retrieves all API keys associated with the specified project. This endpoint
|
|
34
|
+
* returns details about each API key including its name, creation date, and last
|
|
35
|
+
* used information. Use this endpoint to audit which keys exist for a project or
|
|
36
|
+
* to manage key rotation policies.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* const apiKeys = await client.org.project.apiKeys.list(
|
|
41
|
+
* 'proj_abc123xyz456',
|
|
42
|
+
* );
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
17
45
|
list(projectID: string, options?: RequestOptions): APIPromise<APIKeyListResponse> {
|
|
18
46
|
return this._client.get(path`/api/v3/org/project/${projectID}/api_keys/list`, options);
|
|
19
47
|
}
|
|
20
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Permanently deletes an API key from the specified project. Once deleted, the API
|
|
51
|
+
* key can no longer be used for authentication and any services using it will need
|
|
52
|
+
* to be updated with a new key. This operation cannot be undone, so it should be
|
|
53
|
+
* used with caution.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const apiKey = await client.org.project.apiKeys.delete(
|
|
58
|
+
* '01H4DKRF5SMP7NQCA3BWT0JYB6',
|
|
59
|
+
* { projectId: 'proj_abc123xyz456' },
|
|
60
|
+
* );
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
21
63
|
delete(id: string, params: APIKeyDeleteParams, options?: RequestOptions): APIPromise<APIKeyDeleteResponse> {
|
|
22
64
|
const { projectId } = params;
|
|
23
65
|
return this._client.delete(path`/api/v3/org/project/${projectId}/api_keys/remove/${id}`, options);
|
|
24
66
|
}
|
|
25
67
|
|
|
68
|
+
/**
|
|
69
|
+
* Retrieves an existing API key for the project or creates a new one if none
|
|
70
|
+
* exists. This endpoint is useful for ensuring a project always has at least one
|
|
71
|
+
* API key without the risk of creating duplicates. If an API key already exists,
|
|
72
|
+
* it returns the existing key. If no API keys exist for the project, it creates a
|
|
73
|
+
* new one with an automatically generated name.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```ts
|
|
77
|
+
* const response =
|
|
78
|
+
* await client.org.project.apiKeys.createAPIKey(
|
|
79
|
+
* 'proj_abc123xyz456',
|
|
80
|
+
* );
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
26
83
|
createAPIKey(projectID: string, options?: RequestOptions): APIPromise<APIKeyCreateAPIKeyResponse> {
|
|
27
84
|
return this._client.post(path`/api/v3/org/project/${projectID}/api_keys/create-api-key`, options);
|
|
28
85
|
}
|
|
29
86
|
}
|
|
30
87
|
|
|
88
|
+
/**
|
|
89
|
+
* API key object containing the key details
|
|
90
|
+
*/
|
|
31
91
|
export interface APIKeyCreateResponse {
|
|
32
92
|
/**
|
|
33
|
-
* API key
|
|
93
|
+
* Database record identifier for the API key
|
|
34
94
|
*/
|
|
35
95
|
id: string;
|
|
36
96
|
|
|
37
97
|
/**
|
|
38
|
-
*
|
|
98
|
+
* UTC timestamp indicating when the API key was created
|
|
39
99
|
*/
|
|
40
100
|
createdAt: string;
|
|
41
101
|
|
|
42
102
|
/**
|
|
43
|
-
* API key value
|
|
103
|
+
* The API key string value that should be included in API requests. This value is
|
|
104
|
+
* only shown once at creation time.
|
|
44
105
|
*/
|
|
45
106
|
key: string;
|
|
46
107
|
|
|
47
108
|
/**
|
|
48
|
-
*
|
|
109
|
+
* Descriptive name assigned to help identify the key's purpose
|
|
49
110
|
*/
|
|
50
111
|
name: string;
|
|
51
112
|
|
|
52
113
|
/**
|
|
53
|
-
*
|
|
114
|
+
* UTC timestamp indicating when the API key was last used for authentication. Will
|
|
115
|
+
* be null for newly created keys.
|
|
54
116
|
*/
|
|
55
117
|
lastUsed?: string;
|
|
56
118
|
}
|
|
57
119
|
|
|
120
|
+
/**
|
|
121
|
+
* Response containing the list of API keys for a project
|
|
122
|
+
*/
|
|
58
123
|
export interface APIKeyListResponse {
|
|
59
124
|
/**
|
|
60
|
-
* List of API keys
|
|
125
|
+
* List of all API keys for the specified project, including their properties and
|
|
126
|
+
* usage information
|
|
61
127
|
*/
|
|
62
128
|
items: Array<APIKeyListResponse.Item>;
|
|
63
129
|
}
|
|
@@ -65,81 +131,92 @@ export interface APIKeyListResponse {
|
|
|
65
131
|
export namespace APIKeyListResponse {
|
|
66
132
|
export interface Item {
|
|
67
133
|
/**
|
|
68
|
-
* API key
|
|
134
|
+
* Unique identifier for the API key record
|
|
69
135
|
*/
|
|
70
136
|
id: string;
|
|
71
137
|
|
|
72
138
|
/**
|
|
73
|
-
*
|
|
139
|
+
* UTC timestamp indicating when the API key was created
|
|
74
140
|
*/
|
|
75
141
|
created_at: string;
|
|
76
142
|
|
|
77
143
|
/**
|
|
78
|
-
* API key
|
|
144
|
+
* The API key string that should be included in API requests for authentication
|
|
79
145
|
*/
|
|
80
146
|
key: string;
|
|
81
147
|
|
|
82
148
|
/**
|
|
83
|
-
* API key
|
|
149
|
+
* Descriptive name assigned to the API key for identification purposes
|
|
84
150
|
*/
|
|
85
151
|
name: string;
|
|
86
152
|
|
|
87
153
|
/**
|
|
88
|
-
*
|
|
154
|
+
* UTC timestamp indicating when the API key was last used for authentication. Will
|
|
155
|
+
* be null if the key has never been used.
|
|
89
156
|
*/
|
|
90
157
|
last_used?: string;
|
|
91
158
|
}
|
|
92
159
|
}
|
|
93
160
|
|
|
161
|
+
/**
|
|
162
|
+
* Response indicating the status of the API key deletion operation
|
|
163
|
+
*/
|
|
94
164
|
export interface APIKeyDeleteResponse {
|
|
95
165
|
/**
|
|
96
|
-
* Status message
|
|
166
|
+
* Status message providing details about the deletion operation
|
|
97
167
|
*/
|
|
98
168
|
message: string;
|
|
99
169
|
|
|
100
170
|
/**
|
|
101
|
-
*
|
|
171
|
+
* Boolean flag indicating if the deletion operation was successful
|
|
102
172
|
*/
|
|
103
173
|
success: boolean;
|
|
104
174
|
}
|
|
105
175
|
|
|
176
|
+
/**
|
|
177
|
+
* API key object containing the key details
|
|
178
|
+
*/
|
|
106
179
|
export interface APIKeyCreateAPIKeyResponse {
|
|
107
180
|
/**
|
|
108
|
-
* API key
|
|
181
|
+
* Database record identifier for the API key
|
|
109
182
|
*/
|
|
110
183
|
id: string;
|
|
111
184
|
|
|
112
185
|
/**
|
|
113
|
-
*
|
|
186
|
+
* UTC timestamp indicating when the API key was created
|
|
114
187
|
*/
|
|
115
188
|
createdAt: string;
|
|
116
189
|
|
|
117
190
|
/**
|
|
118
|
-
* API key value
|
|
191
|
+
* The API key string value that should be included in API requests. This value is
|
|
192
|
+
* only shown once.
|
|
119
193
|
*/
|
|
120
194
|
key: string;
|
|
121
195
|
|
|
122
196
|
/**
|
|
123
|
-
*
|
|
197
|
+
* Name assigned to help identify the key's purpose. For auto-generated keys, this
|
|
198
|
+
* will be a random name.
|
|
124
199
|
*/
|
|
125
200
|
name: string;
|
|
126
201
|
|
|
127
202
|
/**
|
|
128
|
-
*
|
|
203
|
+
* UTC timestamp indicating when the API key was last used for authentication. Will
|
|
204
|
+
* be null for newly created keys.
|
|
129
205
|
*/
|
|
130
206
|
lastUsed?: string;
|
|
131
207
|
}
|
|
132
208
|
|
|
133
209
|
export interface APIKeyCreateParams {
|
|
134
210
|
/**
|
|
135
|
-
* API key
|
|
211
|
+
* A user-friendly name to identify the API key's purpose (e.g., "Production
|
|
212
|
+
* Server", "Test Environment")
|
|
136
213
|
*/
|
|
137
214
|
name: string;
|
|
138
215
|
}
|
|
139
216
|
|
|
140
217
|
export interface APIKeyDeleteParams {
|
|
141
218
|
/**
|
|
142
|
-
*
|
|
219
|
+
* The project Nano ID that owns the API key to be deleted
|
|
143
220
|
*/
|
|
144
221
|
projectId: string;
|
|
145
222
|
}
|
|
@@ -33,132 +33,301 @@ export class Project extends APIResource {
|
|
|
33
33
|
webhook: WebhookAPI.Webhook = new WebhookAPI.Webhook(this._client);
|
|
34
34
|
trigger: TriggerAPI.Trigger = new TriggerAPI.Trigger(this._client);
|
|
35
35
|
|
|
36
|
+
/**
|
|
37
|
+
* Creates a new project within the authenticated user's organization using the
|
|
38
|
+
* specified name. Projects are isolated environments within your organization,
|
|
39
|
+
* each with their own API keys, webhook configurations, and resources. Use this
|
|
40
|
+
* endpoint to create additional projects for different environments (e.g.,
|
|
41
|
+
* development, staging, production) or for separate applications.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const project = await client.org.project.create({
|
|
46
|
+
* name: 'my-production-api',
|
|
47
|
+
* });
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
36
50
|
create(body: ProjectCreateParams, options?: RequestOptions): APIPromise<ProjectCreateResponse> {
|
|
37
51
|
return this._client.post('/api/v3/org/project/new', { body, ...options });
|
|
38
52
|
}
|
|
39
53
|
|
|
54
|
+
/**
|
|
55
|
+
* Retrieves detailed information about a specific project using its unique
|
|
56
|
+
* identifier. This endpoint provides complete project configuration including
|
|
57
|
+
* webhook URLs, creation and update timestamps, and webhook secrets. Use this
|
|
58
|
+
* endpoint to inspect project settings or verify project configuration.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* const project = await client.org.project.retrieve(
|
|
63
|
+
* 'proj_abc123xyz456',
|
|
64
|
+
* );
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
40
67
|
retrieve(projectID: string, options?: RequestOptions): APIPromise<ProjectRetrieveResponse> {
|
|
41
68
|
return this._client.get(path`/api/v3/org/project/${projectID}`, options);
|
|
42
69
|
}
|
|
43
70
|
|
|
71
|
+
/**
|
|
72
|
+
* Retrieves all projects belonging to the authenticated user's organization.
|
|
73
|
+
* Projects are returned in descending order of creation date (newest first). This
|
|
74
|
+
* endpoint is useful for displaying project selection in dashboards or for
|
|
75
|
+
* integrations that need to list all available projects.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```ts
|
|
79
|
+
* const projects = await client.org.project.list();
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
44
82
|
list(options?: RequestOptions): APIPromise<ProjectListResponse> {
|
|
45
83
|
return this._client.get('/api/v3/org/project/list', options);
|
|
46
84
|
}
|
|
47
85
|
|
|
86
|
+
/**
|
|
87
|
+
* Soft-deletes a project within the organization by its unique identifier. When a
|
|
88
|
+
* project is deleted, it is marked as deleted but not immediately removed from the
|
|
89
|
+
* database. This operation affects all resources associated with the project
|
|
90
|
+
* including API keys, webhook configurations, and connected services. This action
|
|
91
|
+
* cannot be undone through the API.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```ts
|
|
95
|
+
* const project = await client.org.project.delete(
|
|
96
|
+
* 'proj_abc123xyz456',
|
|
97
|
+
* );
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
48
100
|
delete(projectID: string, options?: RequestOptions): APIPromise<ProjectDeleteResponse> {
|
|
49
101
|
return this._client.delete(path`/api/v3/org/project/delete/${projectID}`, options);
|
|
50
102
|
}
|
|
51
103
|
}
|
|
52
104
|
|
|
53
105
|
export interface ProjectCreateResponse {
|
|
106
|
+
/**
|
|
107
|
+
* Unique identifier for the project
|
|
108
|
+
*/
|
|
54
109
|
id: string;
|
|
55
110
|
|
|
56
|
-
|
|
57
|
-
|
|
111
|
+
/**
|
|
112
|
+
* ISO timestamp when the project was created
|
|
113
|
+
*/
|
|
58
114
|
created_at: string;
|
|
59
115
|
|
|
116
|
+
/**
|
|
117
|
+
* Whether this project has been soft-deleted
|
|
118
|
+
*/
|
|
60
119
|
deleted: boolean;
|
|
61
120
|
|
|
121
|
+
/**
|
|
122
|
+
* Email address associated with the project
|
|
123
|
+
*/
|
|
62
124
|
email: string;
|
|
63
125
|
|
|
126
|
+
/**
|
|
127
|
+
* URL where event webhook notifications will be sent (can be null)
|
|
128
|
+
*/
|
|
64
129
|
event_webhook_url: string | null;
|
|
65
130
|
|
|
131
|
+
/**
|
|
132
|
+
* Name of the project
|
|
133
|
+
*/
|
|
66
134
|
name: string;
|
|
67
135
|
|
|
68
|
-
|
|
69
|
-
|
|
136
|
+
/**
|
|
137
|
+
* Identifier of the organization that owns this project
|
|
138
|
+
*/
|
|
70
139
|
org_id: string;
|
|
71
140
|
|
|
141
|
+
/**
|
|
142
|
+
* ISO timestamp when the project was last updated
|
|
143
|
+
*/
|
|
72
144
|
updated_at: string;
|
|
73
145
|
|
|
146
|
+
/**
|
|
147
|
+
* Secret key used to sign webhook payloads for verification
|
|
148
|
+
*/
|
|
74
149
|
webhook_secret: string | null;
|
|
75
150
|
|
|
151
|
+
/**
|
|
152
|
+
* URL where webhook events will be sent (can be null)
|
|
153
|
+
*/
|
|
76
154
|
webhook_url: string | null;
|
|
77
155
|
|
|
156
|
+
/**
|
|
157
|
+
* Indicates if the webhook configuration is using the new format
|
|
158
|
+
*/
|
|
78
159
|
is_new_webhook?: boolean;
|
|
79
160
|
|
|
161
|
+
/**
|
|
162
|
+
* ISO timestamp when the project last subscribed to updates
|
|
163
|
+
*/
|
|
80
164
|
last_subscribed_at?: string | null;
|
|
81
165
|
|
|
166
|
+
/**
|
|
167
|
+
* Whether triggers are enabled for this project
|
|
168
|
+
*/
|
|
82
169
|
triggers_enabled?: boolean;
|
|
83
170
|
}
|
|
84
171
|
|
|
85
172
|
export interface ProjectRetrieveResponse {
|
|
173
|
+
/**
|
|
174
|
+
* Unique identifier for the project
|
|
175
|
+
*/
|
|
86
176
|
id: string;
|
|
87
177
|
|
|
88
|
-
|
|
89
|
-
|
|
178
|
+
/**
|
|
179
|
+
* ISO timestamp when the project was created
|
|
180
|
+
*/
|
|
90
181
|
created_at: string;
|
|
91
182
|
|
|
183
|
+
/**
|
|
184
|
+
* Whether this project has been soft-deleted
|
|
185
|
+
*/
|
|
92
186
|
deleted: boolean;
|
|
93
187
|
|
|
188
|
+
/**
|
|
189
|
+
* Email address associated with the project
|
|
190
|
+
*/
|
|
94
191
|
email: string;
|
|
95
192
|
|
|
193
|
+
/**
|
|
194
|
+
* URL where event webhook notifications will be sent (can be null)
|
|
195
|
+
*/
|
|
96
196
|
event_webhook_url: string | null;
|
|
97
197
|
|
|
198
|
+
/**
|
|
199
|
+
* Name of the project
|
|
200
|
+
*/
|
|
98
201
|
name: string;
|
|
99
202
|
|
|
100
|
-
|
|
101
|
-
|
|
203
|
+
/**
|
|
204
|
+
* Identifier of the organization that owns this project
|
|
205
|
+
*/
|
|
102
206
|
org_id: string;
|
|
103
207
|
|
|
208
|
+
/**
|
|
209
|
+
* ISO timestamp when the project was last updated
|
|
210
|
+
*/
|
|
104
211
|
updated_at: string;
|
|
105
212
|
|
|
213
|
+
/**
|
|
214
|
+
* Secret key used to sign webhook payloads for verification
|
|
215
|
+
*/
|
|
106
216
|
webhook_secret: string | null;
|
|
107
217
|
|
|
218
|
+
/**
|
|
219
|
+
* URL where webhook events will be sent (can be null)
|
|
220
|
+
*/
|
|
108
221
|
webhook_url: string | null;
|
|
109
222
|
|
|
223
|
+
/**
|
|
224
|
+
* Indicates if the webhook configuration is using the new format
|
|
225
|
+
*/
|
|
110
226
|
is_new_webhook?: boolean;
|
|
111
227
|
|
|
228
|
+
/**
|
|
229
|
+
* ISO timestamp when the project last subscribed to updates
|
|
230
|
+
*/
|
|
112
231
|
last_subscribed_at?: string | null;
|
|
113
232
|
|
|
233
|
+
/**
|
|
234
|
+
* Whether triggers are enabled for this project
|
|
235
|
+
*/
|
|
114
236
|
triggers_enabled?: boolean;
|
|
115
237
|
}
|
|
116
238
|
|
|
239
|
+
/**
|
|
240
|
+
* Response containing a list of projects
|
|
241
|
+
*/
|
|
117
242
|
export interface ProjectListResponse {
|
|
243
|
+
/**
|
|
244
|
+
* Array of projects belonging to the organization
|
|
245
|
+
*/
|
|
118
246
|
data: Array<ProjectListResponse.Data>;
|
|
119
247
|
}
|
|
120
248
|
|
|
121
249
|
export namespace ProjectListResponse {
|
|
122
250
|
export interface Data {
|
|
251
|
+
/**
|
|
252
|
+
* Unique identifier for the project
|
|
253
|
+
*/
|
|
123
254
|
id: string;
|
|
124
255
|
|
|
125
|
-
|
|
126
|
-
|
|
256
|
+
/**
|
|
257
|
+
* ISO timestamp when the project was created
|
|
258
|
+
*/
|
|
127
259
|
created_at: string;
|
|
128
260
|
|
|
261
|
+
/**
|
|
262
|
+
* Whether this project has been soft-deleted
|
|
263
|
+
*/
|
|
129
264
|
deleted: boolean;
|
|
130
265
|
|
|
266
|
+
/**
|
|
267
|
+
* Email address associated with the project
|
|
268
|
+
*/
|
|
131
269
|
email: string;
|
|
132
270
|
|
|
271
|
+
/**
|
|
272
|
+
* URL where event webhook notifications will be sent (can be null)
|
|
273
|
+
*/
|
|
133
274
|
event_webhook_url: string | null;
|
|
134
275
|
|
|
276
|
+
/**
|
|
277
|
+
* Name of the project
|
|
278
|
+
*/
|
|
135
279
|
name: string;
|
|
136
280
|
|
|
137
|
-
|
|
138
|
-
|
|
281
|
+
/**
|
|
282
|
+
* Identifier of the organization that owns this project
|
|
283
|
+
*/
|
|
139
284
|
org_id: string;
|
|
140
285
|
|
|
286
|
+
/**
|
|
287
|
+
* ISO timestamp when the project was last updated
|
|
288
|
+
*/
|
|
141
289
|
updated_at: string;
|
|
142
290
|
|
|
291
|
+
/**
|
|
292
|
+
* Secret key used to sign webhook payloads for verification
|
|
293
|
+
*/
|
|
143
294
|
webhook_secret: string | null;
|
|
144
295
|
|
|
296
|
+
/**
|
|
297
|
+
* URL where webhook events will be sent (can be null)
|
|
298
|
+
*/
|
|
145
299
|
webhook_url: string | null;
|
|
146
300
|
|
|
301
|
+
/**
|
|
302
|
+
* Indicates if the webhook configuration is using the new format
|
|
303
|
+
*/
|
|
147
304
|
is_new_webhook?: boolean;
|
|
148
305
|
|
|
306
|
+
/**
|
|
307
|
+
* ISO timestamp when the project last subscribed to updates
|
|
308
|
+
*/
|
|
149
309
|
last_subscribed_at?: string | null;
|
|
150
310
|
|
|
311
|
+
/**
|
|
312
|
+
* Whether triggers are enabled for this project
|
|
313
|
+
*/
|
|
151
314
|
triggers_enabled?: boolean;
|
|
152
315
|
}
|
|
153
316
|
}
|
|
154
317
|
|
|
318
|
+
/**
|
|
319
|
+
* Response indicating the result of a project deletion operation
|
|
320
|
+
*/
|
|
155
321
|
export interface ProjectDeleteResponse {
|
|
322
|
+
/**
|
|
323
|
+
* Status of the delete operation
|
|
324
|
+
*/
|
|
156
325
|
status: string;
|
|
157
326
|
}
|
|
158
327
|
|
|
159
328
|
export interface ProjectCreateParams {
|
|
160
329
|
/**
|
|
161
|
-
*
|
|
330
|
+
* A unique name for your project that follows the required format rules
|
|
162
331
|
*/
|
|
163
332
|
name: string;
|
|
164
333
|
}
|