@anthropic-ai/sdk 0.125.0 → 0.127.0
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 +88 -0
- package/client.d.mts +12 -11
- package/client.d.mts.map +1 -1
- package/client.d.ts +12 -11
- package/client.d.ts.map +1 -1
- package/client.js +865 -845
- package/client.js.map +1 -1
- package/client.mjs +866 -840
- package/client.mjs.map +1 -1
- package/core/api-promise.js +71 -68
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs +71 -64
- package/core/api-promise.mjs.map +1 -1
- package/core/error.js +5 -2
- package/core/error.js.map +1 -1
- package/core/error.mjs +5 -2
- package/core/error.mjs.map +1 -1
- package/core/pagination.js +56 -50
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +56 -41
- package/core/pagination.mjs.map +1 -1
- package/core/streaming.js +212 -209
- package/core/streaming.js.map +1 -1
- package/core/streaming.mjs +212 -209
- package/core/streaming.mjs.map +1 -1
- package/helpers/beta/mcp.js +14 -19
- package/helpers/beta/mcp.js.map +1 -1
- package/helpers/beta/mcp.mjs +14 -13
- package/helpers/beta/mcp.mjs.map +1 -1
- package/internal/constants.js +1 -1
- package/internal/constants.js.map +1 -1
- package/internal/decoders/jsonl.js +27 -24
- package/internal/decoders/jsonl.js.map +1 -1
- package/internal/decoders/jsonl.mjs +27 -24
- package/internal/decoders/jsonl.mjs.map +1 -1
- package/internal/decoders/line.js +52 -49
- package/internal/decoders/line.js.map +1 -1
- package/internal/decoders/line.mjs +52 -43
- package/internal/decoders/line.mjs.map +1 -1
- package/internal/file-store.js +256 -258
- package/internal/file-store.js.map +1 -1
- package/internal/file-store.mjs +256 -243
- package/internal/file-store.mjs.map +1 -1
- package/internal/node.browser.d.mts.map +1 -1
- package/internal/node.browser.d.ts.map +1 -1
- package/internal/node.browser.js.map +1 -1
- package/internal/node.browser.mjs +7 -7
- package/internal/node.browser.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +2 -2
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +3 -3
- package/internal/parse.mjs.map +1 -1
- package/internal/shim-types.js +0 -6
- package/internal/shim-types.js.map +1 -1
- package/internal/shim-types.mjs +0 -6
- package/internal/shim-types.mjs.map +1 -1
- package/internal/shims.d.mts +3 -3
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +3 -3
- package/internal/shims.d.ts.map +1 -1
- package/internal/shims.js +0 -6
- package/internal/shims.js.map +1 -1
- package/internal/shims.mjs +0 -6
- package/internal/shims.mjs.map +1 -1
- package/internal/stainless-helper-header.js +6 -6
- package/internal/stainless-helper-header.js.map +1 -1
- package/internal/utils/async-queue.js +66 -63
- package/internal/utils/async-queue.js.map +1 -1
- package/internal/utils/async-queue.mjs +66 -56
- package/internal/utils/async-queue.mjs.map +1 -1
- package/internal/utils/bytes.d.mts +1 -1
- package/internal/utils/bytes.d.mts.map +1 -1
- package/internal/utils/bytes.d.ts +1 -1
- package/internal/utils/bytes.d.ts.map +1 -1
- package/internal/utils/log.d.mts +7 -12
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts +7 -12
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +12 -0
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +11 -0
- package/internal/utils/log.mjs.map +1 -1
- package/lib/BetaMessageStream.d.mts.map +1 -1
- package/lib/BetaMessageStream.d.ts.map +1 -1
- package/lib/BetaMessageStream.js +595 -590
- package/lib/BetaMessageStream.js.map +1 -1
- package/lib/BetaMessageStream.mjs +595 -590
- package/lib/BetaMessageStream.mjs.map +1 -1
- package/lib/MessageStream.js +544 -541
- package/lib/MessageStream.js.map +1 -1
- package/lib/MessageStream.mjs +544 -541
- package/lib/MessageStream.mjs.map +1 -1
- package/lib/beta-parser.d.mts +1 -3
- package/lib/beta-parser.d.mts.map +1 -1
- package/lib/beta-parser.d.ts +1 -3
- package/lib/beta-parser.d.ts.map +1 -1
- package/lib/beta-parser.js.map +1 -1
- package/lib/beta-parser.mjs.map +1 -1
- package/lib/environments/poller.js +180 -174
- package/lib/environments/poller.js.map +1 -1
- package/lib/environments/poller.mjs +180 -153
- package/lib/environments/poller.mjs.map +1 -1
- package/lib/environments/worker.js +375 -369
- package/lib/environments/worker.js.map +1 -1
- package/lib/environments/worker.mjs +374 -329
- package/lib/environments/worker.mjs.map +1 -1
- package/lib/internal/stub.d.mts +2 -0
- package/lib/internal/stub.d.mts.map +1 -0
- package/lib/internal/stub.d.ts +2 -0
- package/lib/internal/stub.d.ts.map +1 -0
- package/lib/internal/stub.js +6 -0
- package/lib/internal/stub.js.map +1 -0
- package/lib/internal/stub.mjs +3 -0
- package/lib/internal/stub.mjs.map +1 -0
- package/lib/internal/types.d.mts +5 -0
- package/lib/internal/types.d.mts.map +1 -0
- package/lib/internal/types.d.ts +5 -0
- package/lib/internal/types.d.ts.map +1 -0
- package/lib/internal/types.js +3 -0
- package/lib/internal/types.js.map +1 -0
- package/lib/internal/types.mjs +2 -0
- package/lib/internal/types.mjs.map +1 -0
- package/lib/middleware.js +6 -1
- package/lib/middleware.js.map +1 -1
- package/lib/middleware.mjs +6 -1
- package/lib/middleware.mjs.map +1 -1
- package/lib/parser.d.mts +1 -3
- package/lib/parser.d.mts.map +1 -1
- package/lib/parser.d.ts +1 -3
- package/lib/parser.d.ts.map +1 -1
- package/lib/parser.js.map +1 -1
- package/lib/parser.mjs.map +1 -1
- package/lib/tools/BetaToolRunner.d.mts +21 -6
- package/lib/tools/BetaToolRunner.d.mts.map +1 -1
- package/lib/tools/BetaToolRunner.d.ts +21 -6
- package/lib/tools/BetaToolRunner.d.ts.map +1 -1
- package/lib/tools/BetaToolRunner.js +415 -310
- package/lib/tools/BetaToolRunner.js.map +1 -1
- package/lib/tools/BetaToolRunner.mjs +414 -303
- package/lib/tools/BetaToolRunner.mjs.map +1 -1
- package/lib/tools/SessionToolRunner.js +241 -235
- package/lib/tools/SessionToolRunner.js.map +1 -1
- package/lib/tools/SessionToolRunner.mjs +241 -192
- package/lib/tools/SessionToolRunner.mjs.map +1 -1
- package/lib/tools/ToolError.js +39 -36
- package/lib/tools/ToolError.js.map +1 -1
- package/lib/tools/ToolError.mjs +39 -13
- package/lib/tools/ToolError.mjs.map +1 -1
- package/lib/transform-json-schema.js +7 -5
- package/lib/transform-json-schema.js.map +1 -1
- package/lib/transform-json-schema.mjs +7 -5
- package/lib/transform-json-schema.mjs.map +1 -1
- package/package.json +4 -3
- package/resources/beta/agents/agents.js +135 -132
- package/resources/beta/agents/agents.js.map +1 -1
- package/resources/beta/agents/agents.mjs +135 -132
- package/resources/beta/agents/agents.mjs.map +1 -1
- package/resources/beta/beta.d.mts +5 -5
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +5 -5
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js +39 -36
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +39 -36
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/deployment-runs.d.mts +4 -0
- package/resources/beta/deployment-runs.d.mts.map +1 -1
- package/resources/beta/deployment-runs.d.ts +4 -0
- package/resources/beta/deployment-runs.d.ts.map +1 -1
- package/resources/beta/deployments.d.mts +5 -0
- package/resources/beta/deployments.d.mts.map +1 -1
- package/resources/beta/deployments.d.ts +5 -0
- package/resources/beta/deployments.d.ts.map +1 -1
- package/resources/beta/dreams.d.mts +19 -28
- package/resources/beta/dreams.d.mts.map +1 -1
- package/resources/beta/dreams.d.ts +19 -28
- package/resources/beta/dreams.d.ts.map +1 -1
- package/resources/beta/environments/environments.js +157 -154
- package/resources/beta/environments/environments.js.map +1 -1
- package/resources/beta/environments/environments.mjs +157 -154
- package/resources/beta/environments/environments.mjs.map +1 -1
- package/resources/beta/environments/work.js +255 -252
- package/resources/beta/environments/work.js.map +1 -1
- package/resources/beta/environments/work.mjs +255 -252
- package/resources/beta/environments/work.mjs.map +1 -1
- package/resources/beta/index.d.mts +2 -2
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +2 -2
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/memory-stores/memories.d.mts +6 -0
- package/resources/beta/memory-stores/memories.d.mts.map +1 -1
- package/resources/beta/memory-stores/memories.d.ts +6 -0
- package/resources/beta/memory-stores/memories.d.ts.map +1 -1
- package/resources/beta/memory-stores/memory-stores.js +150 -147
- package/resources/beta/memory-stores/memory-stores.js.map +1 -1
- package/resources/beta/memory-stores/memory-stores.mjs +150 -147
- package/resources/beta/memory-stores/memory-stores.mjs.map +1 -1
- package/resources/beta/memory-stores/memory-versions.d.mts +7 -0
- package/resources/beta/memory-stores/memory-versions.d.mts.map +1 -1
- package/resources/beta/memory-stores/memory-versions.d.ts +7 -0
- package/resources/beta/memory-stores/memory-versions.d.ts.map +1 -1
- package/resources/beta/messages/batches.d.mts +12 -1
- package/resources/beta/messages/batches.d.mts.map +1 -1
- package/resources/beta/messages/batches.d.ts +12 -1
- package/resources/beta/messages/batches.d.ts.map +1 -1
- package/resources/beta/messages/index.d.mts +1 -1
- package/resources/beta/messages/index.d.mts.map +1 -1
- package/resources/beta/messages/index.d.ts +1 -1
- package/resources/beta/messages/index.d.ts.map +1 -1
- package/resources/beta/messages/index.js.map +1 -1
- package/resources/beta/messages/index.mjs.map +1 -1
- package/resources/beta/messages/messages.d.mts +239 -101
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +239 -101
- package/resources/beta/messages/messages.d.ts.map +1 -1
- package/resources/beta/messages/messages.js +113 -110
- package/resources/beta/messages/messages.js.map +1 -1
- package/resources/beta/messages/messages.mjs +113 -110
- package/resources/beta/messages/messages.mjs.map +1 -1
- package/resources/beta/models.d.mts +22 -1
- package/resources/beta/models.d.mts.map +1 -1
- package/resources/beta/models.d.ts +22 -1
- package/resources/beta/models.d.ts.map +1 -1
- package/resources/beta/organization/federation/federation.js +11 -8
- package/resources/beta/organization/federation/federation.js.map +1 -1
- package/resources/beta/organization/federation/federation.mjs +11 -8
- package/resources/beta/organization/federation/federation.mjs.map +1 -1
- package/resources/beta/organization/federation/rules/rules.js +187 -184
- package/resources/beta/organization/federation/rules/rules.js.map +1 -1
- package/resources/beta/organization/federation/rules/rules.mjs +187 -184
- package/resources/beta/organization/federation/rules/rules.mjs.map +1 -1
- package/resources/beta/organization/index.d.mts +1 -1
- package/resources/beta/organization/index.d.mts.map +1 -1
- package/resources/beta/organization/index.d.ts +1 -1
- package/resources/beta/organization/index.d.ts.map +1 -1
- package/resources/beta/organization/index.js.map +1 -1
- package/resources/beta/organization/index.mjs.map +1 -1
- package/resources/beta/organization/organization.d.mts +2 -2
- package/resources/beta/organization/organization.d.mts.map +1 -1
- package/resources/beta/organization/organization.d.ts +2 -2
- package/resources/beta/organization/organization.d.ts.map +1 -1
- package/resources/beta/organization/organization.js +38 -35
- package/resources/beta/organization/organization.js.map +1 -1
- package/resources/beta/organization/organization.mjs +38 -35
- package/resources/beta/organization/organization.mjs.map +1 -1
- package/resources/beta/organization/rate-limits.d.mts +87 -5
- package/resources/beta/organization/rate-limits.d.mts.map +1 -1
- package/resources/beta/organization/rate-limits.d.ts +87 -5
- package/resources/beta/organization/rate-limits.d.ts.map +1 -1
- package/resources/beta/organization/service-accounts/service-accounts.js +163 -160
- package/resources/beta/organization/service-accounts/service-accounts.js.map +1 -1
- package/resources/beta/organization/service-accounts/service-accounts.mjs +163 -160
- package/resources/beta/organization/service-accounts/service-accounts.mjs.map +1 -1
- package/resources/beta/organization/workspaces/rate-limits.d.mts +9 -4
- package/resources/beta/organization/workspaces/rate-limits.d.mts.map +1 -1
- package/resources/beta/organization/workspaces/rate-limits.d.ts +9 -4
- package/resources/beta/organization/workspaces/rate-limits.d.ts.map +1 -1
- package/resources/beta/organization/workspaces/rate-limits.js.map +1 -1
- package/resources/beta/organization/workspaces/rate-limits.mjs.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.d.mts +3 -3
- package/resources/beta/organization/workspaces/workspaces.d.mts.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.d.ts +3 -3
- package/resources/beta/organization/workspaces/workspaces.d.ts.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.js +97 -94
- package/resources/beta/organization/workspaces/workspaces.js.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.mjs +97 -94
- package/resources/beta/organization/workspaces/workspaces.mjs.map +1 -1
- package/resources/beta/sessions/events.d.mts +12 -21
- package/resources/beta/sessions/events.d.mts.map +1 -1
- package/resources/beta/sessions/events.d.ts +12 -21
- package/resources/beta/sessions/events.d.ts.map +1 -1
- package/resources/beta/sessions/events.js +118 -115
- package/resources/beta/sessions/events.js.map +1 -1
- package/resources/beta/sessions/events.mjs +118 -115
- package/resources/beta/sessions/events.mjs.map +1 -1
- package/resources/beta/sessions/resources.d.mts +0 -3
- package/resources/beta/sessions/resources.d.mts.map +1 -1
- package/resources/beta/sessions/resources.d.ts +0 -3
- package/resources/beta/sessions/resources.d.ts.map +1 -1
- package/resources/beta/sessions/sessions.d.mts +8 -2
- package/resources/beta/sessions/sessions.d.mts.map +1 -1
- package/resources/beta/sessions/sessions.d.ts +8 -2
- package/resources/beta/sessions/sessions.d.ts.map +1 -1
- package/resources/beta/sessions/sessions.js +161 -158
- package/resources/beta/sessions/sessions.js.map +1 -1
- package/resources/beta/sessions/sessions.mjs +161 -158
- package/resources/beta/sessions/sessions.mjs.map +1 -1
- package/resources/beta/sessions/threads/threads.js +86 -83
- package/resources/beta/sessions/threads/threads.js.map +1 -1
- package/resources/beta/sessions/threads/threads.mjs +86 -83
- package/resources/beta/sessions/threads/threads.mjs.map +1 -1
- package/resources/beta/skills/skills.js +104 -101
- package/resources/beta/skills/skills.js.map +1 -1
- package/resources/beta/skills/skills.mjs +104 -101
- package/resources/beta/skills/skills.mjs.map +1 -1
- package/resources/beta/tunnels/certificates.d.mts +2 -2
- package/resources/beta/tunnels/certificates.d.ts +2 -2
- package/resources/beta/tunnels/tunnels.js +188 -185
- package/resources/beta/tunnels/tunnels.js.map +1 -1
- package/resources/beta/tunnels/tunnels.mjs +188 -185
- package/resources/beta/tunnels/tunnels.mjs.map +1 -1
- package/resources/beta/user-profiles.d.mts +45 -0
- package/resources/beta/user-profiles.d.mts.map +1 -1
- package/resources/beta/user-profiles.d.ts +45 -0
- package/resources/beta/user-profiles.d.ts.map +1 -1
- package/resources/beta/user-profiles.js +25 -10
- package/resources/beta/user-profiles.js.map +1 -1
- package/resources/beta/user-profiles.mjs +25 -10
- package/resources/beta/user-profiles.mjs.map +1 -1
- package/resources/beta/vaults/credentials.d.mts +19 -19
- package/resources/beta/vaults/credentials.d.mts.map +1 -1
- package/resources/beta/vaults/credentials.d.ts +19 -19
- package/resources/beta/vaults/credentials.d.ts.map +1 -1
- package/resources/beta/vaults/vaults.js +156 -153
- package/resources/beta/vaults/vaults.js.map +1 -1
- package/resources/beta/vaults/vaults.mjs +156 -153
- package/resources/beta/vaults/vaults.mjs.map +1 -1
- package/resources/completions.d.mts +1 -1
- package/resources/completions.d.ts +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/messages/index.d.mts +1 -1
- package/resources/messages/index.d.mts.map +1 -1
- package/resources/messages/index.d.ts +1 -1
- package/resources/messages/index.d.ts.map +1 -1
- package/resources/messages/index.js.map +1 -1
- package/resources/messages/index.mjs.map +1 -1
- package/resources/messages/messages.d.mts +100 -63
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +100 -63
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js +115 -112
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs +115 -112
- package/resources/messages/messages.mjs.map +1 -1
- package/resources/skills/skills.js +88 -85
- package/resources/skills/skills.js.map +1 -1
- package/resources/skills/skills.mjs +88 -85
- package/resources/skills/skills.mjs.map +1 -1
- package/resources/top-level.js +0 -1
- package/resources/top-level.js.map +1 -1
- package/resources/top-level.mjs +0 -1
- package/resources/top-level.mjs.map +1 -1
- package/src/client.ts +95 -72
- package/src/internal/node.browser.ts +7 -7
- package/src/internal/parse.ts +8 -11
- package/src/internal/shims.ts +4 -3
- package/src/internal/utils/bytes.ts +1 -1
- package/src/internal/utils/log.ts +16 -2
- package/src/lib/BetaMessageStream.ts +7 -5
- package/src/lib/beta-parser.ts +1 -3
- package/src/lib/internal/stub.ts +2 -0
- package/src/lib/internal/types.ts +2 -0
- package/src/lib/middleware.ts +6 -1
- package/src/lib/parser.ts +1 -3
- package/src/lib/tools/BetaToolRunner.ts +157 -24
- package/src/lib/transform-json-schema.ts +8 -6
- package/src/resources/beta/beta.ts +24 -1
- package/src/resources/beta/deployment-runs.ts +4 -0
- package/src/resources/beta/deployments.ts +5 -0
- package/src/resources/beta/dreams.ts +19 -28
- package/src/resources/beta/index.ts +11 -0
- package/src/resources/beta/memory-stores/memories.ts +6 -0
- package/src/resources/beta/memory-stores/memory-versions.ts +7 -0
- package/src/resources/beta/messages/batches.ts +13 -1
- package/src/resources/beta/messages/index.ts +10 -0
- package/src/resources/beta/messages/messages.ts +289 -100
- package/src/resources/beta/models.ts +25 -0
- package/src/resources/beta/organization/index.ts +6 -0
- package/src/resources/beta/organization/organization.ts +12 -0
- package/src/resources/beta/organization/rate-limits.ts +112 -4
- package/src/resources/beta/organization/workspaces/rate-limits.ts +16 -4
- package/src/resources/beta/organization/workspaces/workspaces.ts +3 -3
- package/src/resources/beta/sessions/events.ts +12 -21
- package/src/resources/beta/sessions/resources.ts +0 -3
- package/src/resources/beta/sessions/sessions.ts +8 -2
- package/src/resources/beta/tunnels/certificates.ts +2 -2
- package/src/resources/beta/user-profiles.ts +75 -10
- package/src/resources/beta/vaults/credentials.ts +19 -19
- package/src/resources/completions.ts +1 -1
- package/src/resources/index.ts +6 -0
- package/src/resources/messages/index.ts +6 -0
- package/src/resources/messages/messages.ts +128 -62
- package/src/tsconfig.json +13 -3
- package/src/version.ts +1 -1
- package/tools/agent-toolset/fs-util.js +0 -6
- package/tools/agent-toolset/fs-util.js.map +1 -1
- package/tools/agent-toolset/fs-util.mjs +0 -6
- package/tools/agent-toolset/fs-util.mjs.map +1 -1
- package/tools/agent-toolset/memories.js +4 -4
- package/tools/agent-toolset/memories.js.map +1 -1
- package/tools/agent-toolset/memories.mjs +2 -2
- package/tools/agent-toolset/memories.mjs.map +1 -1
- package/tools/agent-toolset/node.browser.js +12 -12
- package/tools/agent-toolset/node.browser.js.map +1 -1
- package/tools/agent-toolset/node.js +142 -139
- package/tools/agent-toolset/node.js.map +1 -1
- package/tools/agent-toolset/node.mjs +132 -125
- package/tools/agent-toolset/node.mjs.map +1 -1
- package/tools/agent-toolset/skills.js +5 -5
- package/tools/agent-toolset/skills.js.map +1 -1
- package/tools/agent-toolset/sync-interval.js +3 -3
- package/tools/agent-toolset/sync-interval.js.map +1 -1
- package/tools/memory/node.browser.js +2 -2
- package/tools/memory/node.browser.js.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -83,6 +83,23 @@ export interface BetaCapabilitySupport {
|
|
|
83
83
|
supported: boolean;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
/**
|
|
87
|
+
* Compaction capability details: whether the model accepts the top-level
|
|
88
|
+
* `compaction` request parameter, with one entry per supported `compaction.type`
|
|
89
|
+
* value.
|
|
90
|
+
*/
|
|
91
|
+
export interface BetaCompactionCapability {
|
|
92
|
+
/**
|
|
93
|
+
* Whether the summarize compaction type is supported.
|
|
94
|
+
*/
|
|
95
|
+
summarize: BetaCapabilitySupport;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Whether this capability is supported by the model.
|
|
99
|
+
*/
|
|
100
|
+
supported: boolean;
|
|
101
|
+
}
|
|
102
|
+
|
|
86
103
|
/**
|
|
87
104
|
* Context management capability details.
|
|
88
105
|
*/
|
|
@@ -162,6 +179,13 @@ export interface BetaModelCapabilities {
|
|
|
162
179
|
*/
|
|
163
180
|
code_execution: BetaCapabilitySupport;
|
|
164
181
|
|
|
182
|
+
/**
|
|
183
|
+
* Compaction capability details: whether the model accepts the top-level
|
|
184
|
+
* `compaction` request parameter, with one entry per supported `compaction.type`
|
|
185
|
+
* value.
|
|
186
|
+
*/
|
|
187
|
+
compaction: BetaCompactionCapability | null;
|
|
188
|
+
|
|
165
189
|
/**
|
|
166
190
|
* Context management support and available strategies.
|
|
167
191
|
*/
|
|
@@ -307,6 +331,7 @@ export interface ModelListParams extends PageParams {
|
|
|
307
331
|
export declare namespace Models {
|
|
308
332
|
export {
|
|
309
333
|
type BetaCapabilitySupport as BetaCapabilitySupport,
|
|
334
|
+
type BetaCompactionCapability as BetaCompactionCapability,
|
|
310
335
|
type BetaContextManagementCapability as BetaContextManagementCapability,
|
|
311
336
|
type BetaEffortCapability as BetaEffortCapability,
|
|
312
337
|
type BetaModelCapabilities as BetaModelCapabilities,
|
|
@@ -50,7 +50,13 @@ export { Organization, type BetaOrganization, type BetaOrganizationRole } from '
|
|
|
50
50
|
export {
|
|
51
51
|
RateLimits,
|
|
52
52
|
type BetaOrganizationRateLimit,
|
|
53
|
+
type BetaOrganizationRateLimitBatchGroup,
|
|
54
|
+
type BetaOrganizationRateLimitFilesGroup,
|
|
55
|
+
type BetaOrganizationRateLimitModelGroup,
|
|
56
|
+
type BetaOrganizationRateLimitSkillsGroup,
|
|
57
|
+
type BetaOrganizationRateLimitTokenCountGroup,
|
|
53
58
|
type BetaOrganizationRateLimitValue,
|
|
59
|
+
type BetaOrganizationRateLimitWebSearchGroup,
|
|
54
60
|
type RateLimitListParams,
|
|
55
61
|
type BetaOrganizationRateLimitsPageCursor,
|
|
56
62
|
} from './rate-limits';
|
|
@@ -53,7 +53,13 @@ import {
|
|
|
53
53
|
import * as RateLimitsAPI from './rate-limits';
|
|
54
54
|
import {
|
|
55
55
|
BetaOrganizationRateLimit,
|
|
56
|
+
BetaOrganizationRateLimitBatchGroup,
|
|
57
|
+
BetaOrganizationRateLimitFilesGroup,
|
|
58
|
+
BetaOrganizationRateLimitModelGroup,
|
|
59
|
+
BetaOrganizationRateLimitSkillsGroup,
|
|
60
|
+
BetaOrganizationRateLimitTokenCountGroup,
|
|
56
61
|
BetaOrganizationRateLimitValue,
|
|
62
|
+
BetaOrganizationRateLimitWebSearchGroup,
|
|
57
63
|
BetaOrganizationRateLimitsPageCursor,
|
|
58
64
|
RateLimitListParams,
|
|
59
65
|
RateLimits,
|
|
@@ -252,7 +258,13 @@ export declare namespace Organization {
|
|
|
252
258
|
export {
|
|
253
259
|
RateLimits as RateLimits,
|
|
254
260
|
type BetaOrganizationRateLimit as BetaOrganizationRateLimit,
|
|
261
|
+
type BetaOrganizationRateLimitBatchGroup as BetaOrganizationRateLimitBatchGroup,
|
|
262
|
+
type BetaOrganizationRateLimitFilesGroup as BetaOrganizationRateLimitFilesGroup,
|
|
263
|
+
type BetaOrganizationRateLimitModelGroup as BetaOrganizationRateLimitModelGroup,
|
|
264
|
+
type BetaOrganizationRateLimitSkillsGroup as BetaOrganizationRateLimitSkillsGroup,
|
|
265
|
+
type BetaOrganizationRateLimitTokenCountGroup as BetaOrganizationRateLimitTokenCountGroup,
|
|
255
266
|
type BetaOrganizationRateLimitValue as BetaOrganizationRateLimitValue,
|
|
267
|
+
type BetaOrganizationRateLimitWebSearchGroup as BetaOrganizationRateLimitWebSearchGroup,
|
|
256
268
|
type BetaOrganizationRateLimitsPageCursor as BetaOrganizationRateLimitsPageCursor,
|
|
257
269
|
type RateLimitListParams as RateLimitListParams,
|
|
258
270
|
};
|
|
@@ -37,14 +37,26 @@ export type BetaOrganizationRateLimitsPageCursor = PageCursor<BetaOrganizationRa
|
|
|
37
37
|
|
|
38
38
|
export interface BetaOrganizationRateLimit {
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Identifier of this rate-limit entry. It is stable within the organization and
|
|
41
|
+
* differs between organizations; the group's own identifier is `group.id`.
|
|
41
42
|
*/
|
|
42
43
|
id: string;
|
|
43
44
|
|
|
44
45
|
/**
|
|
45
|
-
* The
|
|
46
|
-
*
|
|
47
|
-
|
|
46
|
+
* The rate-limit group this entry's limits apply to. Its `type` equals
|
|
47
|
+
* `group_type`.
|
|
48
|
+
*/
|
|
49
|
+
group:
|
|
50
|
+
| BetaOrganizationRateLimitModelGroup
|
|
51
|
+
| BetaOrganizationRateLimitBatchGroup
|
|
52
|
+
| BetaOrganizationRateLimitTokenCountGroup
|
|
53
|
+
| BetaOrganizationRateLimitFilesGroup
|
|
54
|
+
| BetaOrganizationRateLimitSkillsGroup
|
|
55
|
+
| BetaOrganizationRateLimitWebSearchGroup;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @deprecated Use `group.type` instead. `group_type` is still returned and always
|
|
59
|
+
* equals `group.type`.
|
|
48
60
|
*/
|
|
49
61
|
group_type: 'batch' | 'files' | 'model_group' | 'skills' | 'token_count' | 'web_search';
|
|
50
62
|
|
|
@@ -65,6 +77,82 @@ export interface BetaOrganizationRateLimit {
|
|
|
65
77
|
type: 'rate_limit';
|
|
66
78
|
}
|
|
67
79
|
|
|
80
|
+
export interface BetaOrganizationRateLimitBatchGroup {
|
|
81
|
+
/**
|
|
82
|
+
* Opaque identifier of the rate-limit group (for example,
|
|
83
|
+
* `rlg_01VPTCmyiu5ZLsWkcxYG2pY8`). It is the same in every organization and never
|
|
84
|
+
* changes, unlike the entry's own identifier, which differs per organization.
|
|
85
|
+
*/
|
|
86
|
+
id: string;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Always `batch`: the Message Batches API.
|
|
90
|
+
*/
|
|
91
|
+
type: 'batch';
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface BetaOrganizationRateLimitFilesGroup {
|
|
95
|
+
/**
|
|
96
|
+
* Opaque identifier of the rate-limit group (for example,
|
|
97
|
+
* `rlg_01VPTCmyiu5ZLsWkcxYG2pY8`). It is the same in every organization and never
|
|
98
|
+
* changes, unlike the entry's own identifier, which differs per organization.
|
|
99
|
+
*/
|
|
100
|
+
id: string;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Always `files`: the Files API.
|
|
104
|
+
*/
|
|
105
|
+
type: 'files';
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export interface BetaOrganizationRateLimitModelGroup {
|
|
109
|
+
/**
|
|
110
|
+
* Opaque identifier of the rate-limit group (for example,
|
|
111
|
+
* `rlg_01VPTCmyiu5ZLsWkcxYG2pY8`). It is the same in every organization and never
|
|
112
|
+
* changes, unlike the entry's own identifier, which differs per organization.
|
|
113
|
+
*/
|
|
114
|
+
id: string;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Human-readable name of the model group (for example, `Claude Sonnet 4.x`). For
|
|
118
|
+
* display only; it may change.
|
|
119
|
+
*/
|
|
120
|
+
display_name: string;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Always `model_group`: a family of models.
|
|
124
|
+
*/
|
|
125
|
+
type: 'model_group';
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export interface BetaOrganizationRateLimitSkillsGroup {
|
|
129
|
+
/**
|
|
130
|
+
* Opaque identifier of the rate-limit group (for example,
|
|
131
|
+
* `rlg_01VPTCmyiu5ZLsWkcxYG2pY8`). It is the same in every organization and never
|
|
132
|
+
* changes, unlike the entry's own identifier, which differs per organization.
|
|
133
|
+
*/
|
|
134
|
+
id: string;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Always `skills`: the Skills API.
|
|
138
|
+
*/
|
|
139
|
+
type: 'skills';
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export interface BetaOrganizationRateLimitTokenCountGroup {
|
|
143
|
+
/**
|
|
144
|
+
* Opaque identifier of the rate-limit group (for example,
|
|
145
|
+
* `rlg_01VPTCmyiu5ZLsWkcxYG2pY8`). It is the same in every organization and never
|
|
146
|
+
* changes, unlike the entry's own identifier, which differs per organization.
|
|
147
|
+
*/
|
|
148
|
+
id: string;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Always `token_count`: the Token Count API.
|
|
152
|
+
*/
|
|
153
|
+
type: 'token_count';
|
|
154
|
+
}
|
|
155
|
+
|
|
68
156
|
export interface BetaOrganizationRateLimitValue {
|
|
69
157
|
/**
|
|
70
158
|
* The limiter type (for example, `requests_per_minute` or
|
|
@@ -78,6 +166,20 @@ export interface BetaOrganizationRateLimitValue {
|
|
|
78
166
|
value: number;
|
|
79
167
|
}
|
|
80
168
|
|
|
169
|
+
export interface BetaOrganizationRateLimitWebSearchGroup {
|
|
170
|
+
/**
|
|
171
|
+
* Opaque identifier of the rate-limit group (for example,
|
|
172
|
+
* `rlg_01VPTCmyiu5ZLsWkcxYG2pY8`). It is the same in every organization and never
|
|
173
|
+
* changes, unlike the entry's own identifier, which differs per organization.
|
|
174
|
+
*/
|
|
175
|
+
id: string;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Always `web_search`: the Messages API web search tool.
|
|
179
|
+
*/
|
|
180
|
+
type: 'web_search';
|
|
181
|
+
}
|
|
182
|
+
|
|
81
183
|
export interface RateLimitListParams extends PageCursorParams {
|
|
82
184
|
/**
|
|
83
185
|
* Filter by group type.
|
|
@@ -95,7 +197,13 @@ export interface RateLimitListParams extends PageCursorParams {
|
|
|
95
197
|
export declare namespace RateLimits {
|
|
96
198
|
export {
|
|
97
199
|
type BetaOrganizationRateLimit as BetaOrganizationRateLimit,
|
|
200
|
+
type BetaOrganizationRateLimitBatchGroup as BetaOrganizationRateLimitBatchGroup,
|
|
201
|
+
type BetaOrganizationRateLimitFilesGroup as BetaOrganizationRateLimitFilesGroup,
|
|
202
|
+
type BetaOrganizationRateLimitModelGroup as BetaOrganizationRateLimitModelGroup,
|
|
203
|
+
type BetaOrganizationRateLimitSkillsGroup as BetaOrganizationRateLimitSkillsGroup,
|
|
204
|
+
type BetaOrganizationRateLimitTokenCountGroup as BetaOrganizationRateLimitTokenCountGroup,
|
|
98
205
|
type BetaOrganizationRateLimitValue as BetaOrganizationRateLimitValue,
|
|
206
|
+
type BetaOrganizationRateLimitWebSearchGroup as BetaOrganizationRateLimitWebSearchGroup,
|
|
99
207
|
type BetaOrganizationRateLimitsPageCursor as BetaOrganizationRateLimitsPageCursor,
|
|
100
208
|
type RateLimitListParams as RateLimitListParams,
|
|
101
209
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { APIResource } from '../../../../core/resource';
|
|
2
|
+
import * as RateLimitsAPI from '../rate-limits';
|
|
2
3
|
import { PageCursor, type PageCursorParams, PagePromise } from '../../../../core/pagination';
|
|
3
4
|
import { RequestOptions } from '../../../../internal/request-options';
|
|
4
5
|
import { path } from '../../../../internal/utils/path';
|
|
@@ -41,9 +42,20 @@ export type BetaWorkspaceRateLimitsPageCursor = PageCursor<BetaWorkspaceRateLimi
|
|
|
41
42
|
|
|
42
43
|
export interface BetaWorkspaceRateLimit {
|
|
43
44
|
/**
|
|
44
|
-
* The
|
|
45
|
-
*
|
|
46
|
-
|
|
45
|
+
* The rate-limit group this entry's limits apply to. Its `type` equals
|
|
46
|
+
* `group_type`.
|
|
47
|
+
*/
|
|
48
|
+
group:
|
|
49
|
+
| RateLimitsAPI.BetaOrganizationRateLimitModelGroup
|
|
50
|
+
| RateLimitsAPI.BetaOrganizationRateLimitBatchGroup
|
|
51
|
+
| RateLimitsAPI.BetaOrganizationRateLimitTokenCountGroup
|
|
52
|
+
| RateLimitsAPI.BetaOrganizationRateLimitFilesGroup
|
|
53
|
+
| RateLimitsAPI.BetaOrganizationRateLimitSkillsGroup
|
|
54
|
+
| RateLimitsAPI.BetaOrganizationRateLimitWebSearchGroup;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated Use `group.type` instead. `group_type` is still returned and always
|
|
58
|
+
* equals `group.type`.
|
|
47
59
|
*/
|
|
48
60
|
group_type: 'batch' | 'files' | 'model_group' | 'skills' | 'token_count' | 'web_search';
|
|
49
61
|
|
|
@@ -60,7 +72,7 @@ export interface BetaWorkspaceRateLimit {
|
|
|
60
72
|
models: Array<string> | null;
|
|
61
73
|
|
|
62
74
|
/**
|
|
63
|
-
* The `id` of the RateLimit
|
|
75
|
+
* The `id` of the organization's RateLimit entry this override applies to.
|
|
64
76
|
*/
|
|
65
77
|
rate_limit_id: string;
|
|
66
78
|
|
|
@@ -146,17 +146,17 @@ export interface BetaDataResidency {
|
|
|
146
146
|
/**
|
|
147
147
|
* Permitted inference geo values. 'unrestricted' means all geos are allowed.
|
|
148
148
|
*/
|
|
149
|
-
allowed_inference_geos: Array<
|
|
149
|
+
allowed_inference_geos: Array<BetaAllowedInferenceGeo> | 'unrestricted';
|
|
150
150
|
|
|
151
151
|
/**
|
|
152
152
|
* Default inference geo applied when requests omit the parameter.
|
|
153
153
|
*/
|
|
154
|
-
default_inference_geo:
|
|
154
|
+
default_inference_geo: 'global' | 'us';
|
|
155
155
|
|
|
156
156
|
/**
|
|
157
157
|
* Geographic region for workspace data storage. Immutable after creation.
|
|
158
158
|
*/
|
|
159
|
-
workspace_geo:
|
|
159
|
+
workspace_geo: 'us';
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
export interface BetaDataResidencyCreateConfig {
|
|
@@ -226,7 +226,9 @@ export interface BetaManagedAgentsAgentCustomToolUseEvent {
|
|
|
226
226
|
/**
|
|
227
227
|
* When set, this event was cross-posted from a subagent's thread to surface its
|
|
228
228
|
* custom tool use on the primary thread's stream. Empty on the thread's own
|
|
229
|
-
* events.
|
|
229
|
+
* events. Informational only: the server routes the matching
|
|
230
|
+
* `user.custom_tool_result` by `custom_tool_use_id`, so clients do not send it
|
|
231
|
+
* back.
|
|
230
232
|
*/
|
|
231
233
|
session_thread_id?: string | null;
|
|
232
234
|
}
|
|
@@ -314,8 +316,8 @@ export interface BetaManagedAgentsAgentMCPToolUseEvent {
|
|
|
314
316
|
/**
|
|
315
317
|
* When set, this event was cross-posted from a subagent's thread to surface its
|
|
316
318
|
* permission request on the primary thread's stream. Empty on the thread's own
|
|
317
|
-
* events.
|
|
318
|
-
* back.
|
|
319
|
+
* events. Informational only: the server routes the matching
|
|
320
|
+
* `user.tool_confirmation` by `tool_use_id`, so clients do not send it back.
|
|
319
321
|
*/
|
|
320
322
|
session_thread_id?: string | null;
|
|
321
323
|
}
|
|
@@ -574,8 +576,9 @@ export interface BetaManagedAgentsAgentToolUseEvent {
|
|
|
574
576
|
/**
|
|
575
577
|
* When set, this event was cross-posted from a subagent's thread to surface its
|
|
576
578
|
* permission request on the primary thread's stream. Empty on the thread's own
|
|
577
|
-
* events.
|
|
578
|
-
*
|
|
579
|
+
* events. Informational only: the server routes the matching
|
|
580
|
+
* `user.tool_confirmation` or `user.tool_result` by `tool_use_id`, so clients do
|
|
581
|
+
* not send it back.
|
|
579
582
|
*/
|
|
580
583
|
session_thread_id?: string | null;
|
|
581
584
|
}
|
|
@@ -1041,11 +1044,6 @@ export interface BetaManagedAgentsSessionErrorEvent {
|
|
|
1041
1044
|
*/
|
|
1042
1045
|
id: string;
|
|
1043
1046
|
|
|
1044
|
-
/**
|
|
1045
|
-
* An unknown or unexpected error occurred during session execution. A fallback
|
|
1046
|
-
* variant; clients that don't recognize a new error code can match on
|
|
1047
|
-
* `retry_status` and `message` alone.
|
|
1048
|
-
*/
|
|
1049
1047
|
error:
|
|
1050
1048
|
| BetaManagedAgentsUnknownError
|
|
1051
1049
|
| BetaManagedAgentsModelOverloadedError
|
|
@@ -1141,9 +1139,6 @@ export interface BetaManagedAgentsSessionStatusIdleEvent {
|
|
|
1141
1139
|
*/
|
|
1142
1140
|
processed_at: string;
|
|
1143
1141
|
|
|
1144
|
-
/**
|
|
1145
|
-
* The agent completed its turn naturally and is ready for the next user message.
|
|
1146
|
-
*/
|
|
1147
1142
|
stop_reason:
|
|
1148
1143
|
| BetaManagedAgentsSessionEndTurn
|
|
1149
1144
|
| BetaManagedAgentsSessionRequiresAction
|
|
@@ -1258,9 +1253,6 @@ export interface BetaManagedAgentsSessionThreadStatusIdleEvent {
|
|
|
1258
1253
|
*/
|
|
1259
1254
|
session_thread_id: string;
|
|
1260
1255
|
|
|
1261
|
-
/**
|
|
1262
|
-
* The agent completed its turn naturally and is ready for the next user message.
|
|
1263
|
-
*/
|
|
1264
1256
|
stop_reason:
|
|
1265
1257
|
| BetaManagedAgentsSessionEndTurn
|
|
1266
1258
|
| BetaManagedAgentsSessionRequiresAction
|
|
@@ -1777,8 +1769,8 @@ export interface BetaManagedAgentsUserCustomToolResultEvent {
|
|
|
1777
1769
|
processed_at?: string | null;
|
|
1778
1770
|
|
|
1779
1771
|
/**
|
|
1780
|
-
*
|
|
1781
|
-
*
|
|
1772
|
+
* Set by the server to the subagent thread this result was routed to. Omitted when
|
|
1773
|
+
* it was routed to the primary thread.
|
|
1782
1774
|
*/
|
|
1783
1775
|
session_thread_id?: string | null;
|
|
1784
1776
|
}
|
|
@@ -1993,9 +1985,8 @@ export interface BetaManagedAgentsUserToolConfirmationEvent {
|
|
|
1993
1985
|
processed_at?: string | null;
|
|
1994
1986
|
|
|
1995
1987
|
/**
|
|
1996
|
-
*
|
|
1997
|
-
*
|
|
1998
|
-
* `agent.mcp_tool_use` event that prompted the approval.
|
|
1988
|
+
* Set by the server to the subagent thread this confirmation was routed to.
|
|
1989
|
+
* Omitted when it was routed to the primary thread.
|
|
1999
1990
|
*/
|
|
2000
1991
|
session_thread_id?: string | null;
|
|
2001
1992
|
}
|
|
@@ -268,9 +268,6 @@ export interface BetaManagedAgentsMemoryStoreResource {
|
|
|
268
268
|
name?: string | null;
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
/**
|
|
272
|
-
* A memory store attached to an agent session.
|
|
273
|
-
*/
|
|
274
271
|
export type BetaManagedAgentsSessionResource =
|
|
275
272
|
| BetaManagedAgentsGitHubRepositoryResource
|
|
276
273
|
| BetaManagedAgentsFileResource
|
|
@@ -741,6 +741,12 @@ export interface BetaManagedAgentsSession {
|
|
|
741
741
|
|
|
742
742
|
/**
|
|
743
743
|
* SessionStatus enum
|
|
744
|
+
*
|
|
745
|
+
* - `rescheduling` - Transient error occurred, retrying automatically.
|
|
746
|
+
* - `running` - Agent is actively executing.
|
|
747
|
+
* - `idle` - Agent is waiting for input, including user messages or tool
|
|
748
|
+
* confirmations. Sessions start in idle.
|
|
749
|
+
* - `terminated` - Session has ended, either due to an error or completion.
|
|
744
750
|
*/
|
|
745
751
|
status: 'rescheduling' | 'running' | 'idle' | 'terminated';
|
|
746
752
|
|
|
@@ -1077,8 +1083,8 @@ export interface BetaManagedAgentsUserToolResultEvent {
|
|
|
1077
1083
|
processed_at?: string | null;
|
|
1078
1084
|
|
|
1079
1085
|
/**
|
|
1080
|
-
*
|
|
1081
|
-
*
|
|
1086
|
+
* Set by the server to the subagent thread this result was routed to. Omitted when
|
|
1087
|
+
* it was routed to the primary thread.
|
|
1082
1088
|
*/
|
|
1083
1089
|
session_thread_id?: string | null;
|
|
1084
1090
|
}
|
|
@@ -225,7 +225,7 @@ export interface CertificateCreateParams {
|
|
|
225
225
|
|
|
226
226
|
export interface CertificateRetrieveParams {
|
|
227
227
|
/**
|
|
228
|
-
* Path param:
|
|
228
|
+
* Path param: ID of the tunnel (`tnl_...`).
|
|
229
229
|
*/
|
|
230
230
|
tunnel_id: string;
|
|
231
231
|
|
|
@@ -270,7 +270,7 @@ export interface CertificateListParams extends PageCursorParams {
|
|
|
270
270
|
|
|
271
271
|
export interface CertificateArchiveParams {
|
|
272
272
|
/**
|
|
273
|
-
* Path param:
|
|
273
|
+
* Path param: ID of the tunnel (`tnl_...`).
|
|
274
274
|
*/
|
|
275
275
|
tunnel_id: string;
|
|
276
276
|
|
|
@@ -17,12 +17,15 @@ export class UserProfiles extends APIResource {
|
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
19
|
create(params: UserProfileCreateParams, options?: RequestOptions): APIPromise<BetaUserProfile> {
|
|
20
|
-
const { betas, ...body } = params;
|
|
20
|
+
const { betas, workspace_id, ...body } = params;
|
|
21
21
|
return this._client.post('/v1/user_profiles?beta=true', {
|
|
22
22
|
body,
|
|
23
23
|
...options,
|
|
24
24
|
headers: buildHeaders([
|
|
25
|
-
{
|
|
25
|
+
{
|
|
26
|
+
'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-08-18'].toString(),
|
|
27
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
28
|
+
},
|
|
26
29
|
options?.headers,
|
|
27
30
|
]),
|
|
28
31
|
});
|
|
@@ -44,11 +47,14 @@ export class UserProfiles extends APIResource {
|
|
|
44
47
|
params: UserProfileRetrieveParams | null | undefined = {},
|
|
45
48
|
options?: RequestOptions,
|
|
46
49
|
): APIPromise<BetaUserProfile> {
|
|
47
|
-
const { betas } = params ?? {};
|
|
50
|
+
const { betas, workspace_id } = params ?? {};
|
|
48
51
|
return this._client.get(path`/v1/user_profiles/${userProfileID}?beta=true`, {
|
|
49
52
|
...options,
|
|
50
53
|
headers: buildHeaders([
|
|
51
|
-
{
|
|
54
|
+
{
|
|
55
|
+
'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-08-18'].toString(),
|
|
56
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
57
|
+
},
|
|
52
58
|
options?.headers,
|
|
53
59
|
]),
|
|
54
60
|
});
|
|
@@ -70,12 +76,15 @@ export class UserProfiles extends APIResource {
|
|
|
70
76
|
params: UserProfileUpdateParams,
|
|
71
77
|
options?: RequestOptions,
|
|
72
78
|
): APIPromise<BetaUserProfile> {
|
|
73
|
-
const { betas, ...body } = params;
|
|
79
|
+
const { betas, workspace_id, ...body } = params;
|
|
74
80
|
return this._client.post(path`/v1/user_profiles/${userProfileID}?beta=true`, {
|
|
75
81
|
body,
|
|
76
82
|
...options,
|
|
77
83
|
headers: buildHeaders([
|
|
78
|
-
{
|
|
84
|
+
{
|
|
85
|
+
'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-08-18'].toString(),
|
|
86
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
87
|
+
},
|
|
79
88
|
options?.headers,
|
|
80
89
|
]),
|
|
81
90
|
});
|
|
@@ -96,12 +105,15 @@ export class UserProfiles extends APIResource {
|
|
|
96
105
|
params: UserProfileListParams | null | undefined = {},
|
|
97
106
|
options?: RequestOptions,
|
|
98
107
|
): PagePromise<BetaUserProfilesPageCursor, BetaUserProfile> {
|
|
99
|
-
const { betas, ...query } = params ?? {};
|
|
108
|
+
const { betas, workspace_id, ...query } = params ?? {};
|
|
100
109
|
return this._client.getAPIList('/v1/user_profiles?beta=true', PageCursor<BetaUserProfile>, {
|
|
101
110
|
query,
|
|
102
111
|
...options,
|
|
103
112
|
headers: buildHeaders([
|
|
104
|
-
{
|
|
113
|
+
{
|
|
114
|
+
'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-08-18'].toString(),
|
|
115
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
116
|
+
},
|
|
105
117
|
options?.headers,
|
|
106
118
|
]),
|
|
107
119
|
});
|
|
@@ -123,11 +135,14 @@ export class UserProfiles extends APIResource {
|
|
|
123
135
|
params: UserProfileCreateEnrollmentURLParams | null | undefined = {},
|
|
124
136
|
options?: RequestOptions,
|
|
125
137
|
): APIPromise<BetaUserProfileEnrollmentURL> {
|
|
126
|
-
const { betas } = params ?? {};
|
|
138
|
+
const { betas, workspace_id } = params ?? {};
|
|
127
139
|
return this._client.post(path`/v1/user_profiles/${userProfileID}/enrollment_url?beta=true`, {
|
|
128
140
|
...options,
|
|
129
141
|
headers: buildHeaders([
|
|
130
|
-
{
|
|
142
|
+
{
|
|
143
|
+
'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-08-18'].toString(),
|
|
144
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
145
|
+
},
|
|
131
146
|
options?.headers,
|
|
132
147
|
]),
|
|
133
148
|
});
|
|
@@ -378,6 +393,16 @@ export interface UserProfileCreateParams {
|
|
|
378
393
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
379
394
|
*/
|
|
380
395
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
399
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
400
|
+
*
|
|
401
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
402
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
403
|
+
* match that Workspace.
|
|
404
|
+
*/
|
|
405
|
+
workspace_id?: string;
|
|
381
406
|
}
|
|
382
407
|
|
|
383
408
|
export interface UserProfileRetrieveParams {
|
|
@@ -385,6 +410,16 @@ export interface UserProfileRetrieveParams {
|
|
|
385
410
|
* Optional header to specify the beta version(s) you want to use.
|
|
386
411
|
*/
|
|
387
412
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Optional header to select the Workspace for this request. The value is a
|
|
416
|
+
* Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
417
|
+
*
|
|
418
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
419
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
420
|
+
* match that Workspace.
|
|
421
|
+
*/
|
|
422
|
+
workspace_id?: string;
|
|
388
423
|
}
|
|
389
424
|
|
|
390
425
|
export interface UserProfileUpdateParams {
|
|
@@ -436,6 +471,16 @@ export interface UserProfileUpdateParams {
|
|
|
436
471
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
437
472
|
*/
|
|
438
473
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
477
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
478
|
+
*
|
|
479
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
480
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
481
|
+
* match that Workspace.
|
|
482
|
+
*/
|
|
483
|
+
workspace_id?: string;
|
|
439
484
|
}
|
|
440
485
|
|
|
441
486
|
export interface UserProfileListParams extends PageCursorParams {
|
|
@@ -453,6 +498,16 @@ export interface UserProfileListParams extends PageCursorParams {
|
|
|
453
498
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
454
499
|
*/
|
|
455
500
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
504
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
505
|
+
*
|
|
506
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
507
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
508
|
+
* match that Workspace.
|
|
509
|
+
*/
|
|
510
|
+
workspace_id?: string;
|
|
456
511
|
}
|
|
457
512
|
|
|
458
513
|
export interface UserProfileCreateEnrollmentURLParams {
|
|
@@ -460,6 +515,16 @@ export interface UserProfileCreateEnrollmentURLParams {
|
|
|
460
515
|
* Optional header to specify the beta version(s) you want to use.
|
|
461
516
|
*/
|
|
462
517
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Optional header to select the Workspace for this request. The value is a
|
|
521
|
+
* Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
522
|
+
*
|
|
523
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
524
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
525
|
+
* match that Workspace.
|
|
526
|
+
*/
|
|
527
|
+
workspace_id?: string;
|
|
463
528
|
}
|
|
464
529
|
|
|
465
530
|
export declare namespace UserProfiles {
|