@anthropic-ai/sdk 0.119.0 → 0.121.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 +46 -0
- package/helpers/beta/environments.d.mts +5 -4
- package/helpers/beta/environments.d.mts.map +1 -1
- package/helpers/beta/environments.d.ts +5 -4
- package/helpers/beta/environments.d.ts.map +1 -1
- package/helpers/beta/environments.js +5 -4
- package/helpers/beta/environments.js.map +1 -1
- package/helpers/beta/environments.mjs +5 -4
- package/helpers/beta/environments.mjs.map +1 -1
- package/helpers/beta/standard-schema.d.mts +45 -0
- package/helpers/beta/standard-schema.d.mts.map +1 -0
- package/helpers/beta/standard-schema.d.ts +45 -0
- package/helpers/beta/standard-schema.d.ts.map +1 -0
- package/helpers/beta/standard-schema.js +58 -0
- package/helpers/beta/standard-schema.js.map +1 -0
- package/helpers/beta/standard-schema.mjs +54 -0
- package/helpers/beta/standard-schema.mjs.map +1 -0
- package/internal/detect-platform.js +1 -1
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/file-store.d.mts +136 -0
- package/internal/file-store.d.mts.map +1 -0
- package/internal/file-store.d.ts +136 -0
- package/internal/file-store.d.ts.map +1 -0
- package/internal/file-store.js +531 -0
- package/internal/file-store.js.map +1 -0
- package/internal/file-store.mjs +523 -0
- package/internal/file-store.mjs.map +1 -0
- package/internal/utils/values.d.mts +6 -0
- package/internal/utils/values.d.mts.map +1 -1
- package/internal/utils/values.d.ts +6 -0
- package/internal/utils/values.d.ts.map +1 -1
- package/internal/utils/values.js +7 -0
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +6 -0
- package/internal/utils/values.mjs.map +1 -1
- package/lib/BetaMessageStream.d.mts.map +1 -1
- package/lib/BetaMessageStream.d.ts.map +1 -1
- package/lib/BetaMessageStream.js +3 -4
- package/lib/BetaMessageStream.js.map +1 -1
- package/lib/BetaMessageStream.mjs +1 -2
- package/lib/BetaMessageStream.mjs.map +1 -1
- package/lib/MessageStream.d.mts.map +1 -1
- package/lib/MessageStream.d.ts.map +1 -1
- package/lib/MessageStream.js +3 -4
- package/lib/MessageStream.js.map +1 -1
- package/lib/MessageStream.mjs +1 -2
- package/lib/MessageStream.mjs.map +1 -1
- package/lib/environments/poller.d.mts +6 -0
- package/lib/environments/poller.d.mts.map +1 -1
- package/lib/environments/poller.d.ts +6 -0
- package/lib/environments/poller.d.ts.map +1 -1
- package/lib/environments/poller.js +46 -1
- package/lib/environments/poller.js.map +1 -1
- package/lib/environments/poller.mjs +46 -1
- package/lib/environments/poller.mjs.map +1 -1
- package/lib/environments/worker.d.mts +89 -12
- package/lib/environments/worker.d.mts.map +1 -1
- package/lib/environments/worker.d.ts +89 -12
- package/lib/environments/worker.d.ts.map +1 -1
- package/lib/environments/worker.js +336 -67
- package/lib/environments/worker.js.map +1 -1
- package/lib/environments/worker.mjs +336 -68
- package/lib/environments/worker.mjs.map +1 -1
- package/lib/sessions/accumulate.d.mts.map +1 -1
- package/lib/sessions/accumulate.d.ts.map +1 -1
- package/lib/sessions/accumulate.js +3 -4
- package/lib/sessions/accumulate.js.map +1 -1
- package/lib/sessions/accumulate.mjs +1 -2
- package/lib/sessions/accumulate.mjs.map +1 -1
- package/lib/standard-schema.d.mts +131 -0
- package/lib/standard-schema.d.mts.map +1 -0
- package/lib/standard-schema.d.ts +131 -0
- package/lib/standard-schema.d.ts.map +1 -0
- package/lib/standard-schema.js +45 -0
- package/lib/standard-schema.js.map +1 -0
- package/lib/standard-schema.mjs +41 -0
- package/lib/standard-schema.mjs.map +1 -0
- package/lib/tools/BetaToolRunner.d.mts.map +1 -1
- package/lib/tools/BetaToolRunner.d.ts.map +1 -1
- package/lib/tools/BetaToolRunner.js +35 -6
- package/lib/tools/BetaToolRunner.js.map +1 -1
- package/lib/tools/BetaToolRunner.mjs +35 -6
- package/lib/tools/BetaToolRunner.mjs.map +1 -1
- package/package.json +2 -11
- package/resources/beta/agents/agents.d.mts +322 -27
- package/resources/beta/agents/agents.d.mts.map +1 -1
- package/resources/beta/agents/agents.d.ts +322 -27
- package/resources/beta/agents/agents.d.ts.map +1 -1
- package/resources/beta/agents/agents.js.map +1 -1
- package/resources/beta/agents/agents.mjs.map +1 -1
- package/resources/beta/agents/index.d.mts +1 -1
- package/resources/beta/agents/index.d.mts.map +1 -1
- package/resources/beta/agents/index.d.ts +1 -1
- package/resources/beta/agents/index.d.ts.map +1 -1
- package/resources/beta/agents/index.js.map +1 -1
- package/resources/beta/agents/index.mjs.map +1 -1
- package/resources/beta/beta.d.mts +7 -3
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +7 -3
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js +4 -0
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +4 -0
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/environments/environments.d.mts +8 -1
- package/resources/beta/environments/environments.d.mts.map +1 -1
- package/resources/beta/environments/environments.d.ts +8 -1
- package/resources/beta/environments/environments.d.ts.map +1 -1
- package/resources/beta/environments/environments.js.map +1 -1
- package/resources/beta/environments/environments.mjs.map +1 -1
- package/resources/beta/environments/work.d.mts +5 -1
- package/resources/beta/environments/work.d.mts.map +1 -1
- package/resources/beta/environments/work.d.ts +5 -1
- package/resources/beta/environments/work.d.ts.map +1 -1
- package/resources/beta/environments/work.js +0 -17
- package/resources/beta/environments/work.js.map +1 -1
- package/resources/beta/environments/work.mjs +0 -17
- package/resources/beta/environments/work.mjs.map +1 -1
- package/resources/beta/index.d.mts +2 -1
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +2 -1
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js +11 -9
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs +1 -0
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/memory-stores/memories.d.mts +6 -5
- package/resources/beta/memory-stores/memories.d.mts.map +1 -1
- package/resources/beta/memory-stores/memories.d.ts +6 -5
- package/resources/beta/memory-stores/memories.d.ts.map +1 -1
- package/resources/beta/memory-stores/memory-versions.d.mts +8 -5
- package/resources/beta/memory-stores/memory-versions.d.mts.map +1 -1
- package/resources/beta/memory-stores/memory-versions.d.ts +8 -5
- package/resources/beta/memory-stores/memory-versions.d.ts.map +1 -1
- package/resources/beta/messages/messages.d.mts +51 -9
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +51 -9
- package/resources/beta/messages/messages.d.ts.map +1 -1
- package/resources/beta/messages/messages.js.map +1 -1
- package/resources/beta/messages/messages.mjs.map +1 -1
- package/resources/beta/organization/api-keys.d.mts +177 -0
- package/resources/beta/organization/api-keys.d.mts.map +1 -0
- package/resources/beta/organization/api-keys.d.ts +177 -0
- package/resources/beta/organization/api-keys.d.ts.map +1 -0
- package/resources/beta/organization/api-keys.js +56 -0
- package/resources/beta/organization/api-keys.js.map +1 -0
- package/resources/beta/organization/api-keys.mjs +52 -0
- package/resources/beta/organization/api-keys.mjs.map +1 -0
- package/resources/beta/organization/external-keys.d.mts +269 -0
- package/resources/beta/organization/external-keys.d.mts.map +1 -0
- package/resources/beta/organization/external-keys.d.ts +269 -0
- package/resources/beta/organization/external-keys.d.ts.map +1 -0
- package/resources/beta/organization/external-keys.js +119 -0
- package/resources/beta/organization/external-keys.js.map +1 -0
- package/resources/beta/organization/external-keys.mjs +115 -0
- package/resources/beta/organization/external-keys.mjs.map +1 -0
- package/resources/beta/organization/federation/federation.d.mts +14 -0
- package/resources/beta/organization/federation/federation.d.mts.map +1 -0
- package/resources/beta/organization/federation/federation.d.ts +14 -0
- package/resources/beta/organization/federation/federation.d.ts.map +1 -0
- package/resources/beta/organization/federation/federation.js +21 -0
- package/resources/beta/organization/federation/federation.js.map +1 -0
- package/resources/beta/organization/federation/federation.mjs +16 -0
- package/resources/beta/organization/federation/federation.mjs.map +1 -0
- package/resources/beta/organization/federation/index.d.mts +4 -0
- package/resources/beta/organization/federation/index.d.mts.map +1 -0
- package/resources/beta/organization/federation/index.d.ts +4 -0
- package/resources/beta/organization/federation/index.d.ts.map +1 -0
- package/resources/beta/organization/federation/index.js +11 -0
- package/resources/beta/organization/federation/index.js.map +1 -0
- package/resources/beta/organization/federation/index.mjs +5 -0
- package/resources/beta/organization/federation/index.mjs.map +1 -0
- package/resources/beta/organization/federation/issuers.d.mts +353 -0
- package/resources/beta/organization/federation/issuers.d.mts.map +1 -0
- package/resources/beta/organization/federation/issuers.d.ts +353 -0
- package/resources/beta/organization/federation/issuers.d.ts.map +1 -0
- package/resources/beta/organization/federation/issuers.js +169 -0
- package/resources/beta/organization/federation/issuers.js.map +1 -0
- package/resources/beta/organization/federation/issuers.mjs +165 -0
- package/resources/beta/organization/federation/issuers.mjs.map +1 -0
- package/resources/beta/organization/federation/rules/index.d.mts +3 -0
- package/resources/beta/organization/federation/rules/index.d.mts.map +1 -0
- package/resources/beta/organization/federation/rules/index.d.ts +3 -0
- package/resources/beta/organization/federation/rules/index.d.ts.map +1 -0
- package/resources/beta/organization/federation/rules/index.js +9 -0
- package/resources/beta/organization/federation/rules/index.js.map +1 -0
- package/resources/beta/organization/federation/rules/index.mjs +4 -0
- package/resources/beta/organization/federation/rules/index.mjs.map +1 -0
- package/resources/beta/organization/federation/rules/rules.d.mts +468 -0
- package/resources/beta/organization/federation/rules/rules.d.mts.map +1 -0
- package/resources/beta/organization/federation/rules/rules.d.ts +468 -0
- package/resources/beta/organization/federation/rules/rules.d.ts.map +1 -0
- package/resources/beta/organization/federation/rules/rules.js +198 -0
- package/resources/beta/organization/federation/rules/rules.js.map +1 -0
- package/resources/beta/organization/federation/rules/rules.mjs +193 -0
- package/resources/beta/organization/federation/rules/rules.mjs.map +1 -0
- package/resources/beta/organization/federation/rules/workspaces.d.mts +124 -0
- package/resources/beta/organization/federation/rules/workspaces.d.mts.map +1 -0
- package/resources/beta/organization/federation/rules/workspaces.d.ts +124 -0
- package/resources/beta/organization/federation/rules/workspaces.d.ts.map +1 -0
- package/resources/beta/organization/federation/rules/workspaces.js +114 -0
- package/resources/beta/organization/federation/rules/workspaces.js.map +1 -0
- package/resources/beta/organization/federation/rules/workspaces.mjs +110 -0
- package/resources/beta/organization/federation/rules/workspaces.mjs.map +1 -0
- package/resources/beta/organization/federation/rules.d.mts +2 -0
- package/resources/beta/organization/federation/rules.d.mts.map +1 -0
- package/resources/beta/organization/federation/rules.d.ts +2 -0
- package/resources/beta/organization/federation/rules.d.ts.map +1 -0
- package/resources/beta/organization/federation/rules.js +6 -0
- package/resources/beta/organization/federation/rules.js.map +1 -0
- package/resources/beta/organization/federation/rules.mjs +3 -0
- package/resources/beta/organization/federation/rules.mjs.map +1 -0
- package/resources/beta/organization/federation.d.mts +2 -0
- package/resources/beta/organization/federation.d.mts.map +1 -0
- package/resources/beta/organization/federation.d.ts +2 -0
- package/resources/beta/organization/federation.d.ts.map +1 -0
- package/resources/beta/organization/federation.js +6 -0
- package/resources/beta/organization/federation.js.map +1 -0
- package/resources/beta/organization/federation.mjs +3 -0
- package/resources/beta/organization/federation.mjs.map +1 -0
- package/resources/beta/organization/index.d.mts +10 -0
- package/resources/beta/organization/index.d.mts.map +1 -0
- package/resources/beta/organization/index.d.ts +10 -0
- package/resources/beta/organization/index.d.ts.map +1 -0
- package/resources/beta/organization/index.js +23 -0
- package/resources/beta/organization/index.js.map +1 -0
- package/resources/beta/organization/index.mjs +11 -0
- package/resources/beta/organization/index.mjs.map +1 -0
- package/resources/beta/organization/invites.d.mts +162 -0
- package/resources/beta/organization/invites.d.mts.map +1 -0
- package/resources/beta/organization/invites.d.ts +162 -0
- package/resources/beta/organization/invites.d.ts.map +1 -0
- package/resources/beta/organization/invites.js +76 -0
- package/resources/beta/organization/invites.js.map +1 -0
- package/resources/beta/organization/invites.mjs +72 -0
- package/resources/beta/organization/invites.mjs.map +1 -0
- package/resources/beta/organization/organization.d.mts +69 -0
- package/resources/beta/organization/organization.d.mts.map +1 -0
- package/resources/beta/organization/organization.d.ts +69 -0
- package/resources/beta/organization/organization.d.ts.map +1 -0
- package/resources/beta/organization/organization.js +58 -0
- package/resources/beta/organization/organization.js.map +1 -0
- package/resources/beta/organization/organization.mjs +53 -0
- package/resources/beta/organization/organization.mjs.map +1 -0
- package/resources/beta/organization/rate-limits.d.mts +78 -0
- package/resources/beta/organization/rate-limits.d.mts.map +1 -0
- package/resources/beta/organization/rate-limits.d.ts +78 -0
- package/resources/beta/organization/rate-limits.d.ts.map +1 -0
- package/resources/beta/organization/rate-limits.js +32 -0
- package/resources/beta/organization/rate-limits.js.map +1 -0
- package/resources/beta/organization/rate-limits.mjs +28 -0
- package/resources/beta/organization/rate-limits.mjs.map +1 -0
- package/resources/beta/organization/service-accounts/index.d.mts +3 -0
- package/resources/beta/organization/service-accounts/index.d.mts.map +1 -0
- package/resources/beta/organization/service-accounts/index.d.ts +3 -0
- package/resources/beta/organization/service-accounts/index.d.ts.map +1 -0
- package/resources/beta/organization/service-accounts/index.js +9 -0
- package/resources/beta/organization/service-accounts/index.js.map +1 -0
- package/resources/beta/organization/service-accounts/index.mjs +4 -0
- package/resources/beta/organization/service-accounts/index.mjs.map +1 -0
- package/resources/beta/organization/service-accounts/service-accounts.d.mts +258 -0
- package/resources/beta/organization/service-accounts/service-accounts.d.mts.map +1 -0
- package/resources/beta/organization/service-accounts/service-accounts.d.ts +258 -0
- package/resources/beta/organization/service-accounts/service-accounts.d.ts.map +1 -0
- package/resources/beta/organization/service-accounts/service-accounts.js +174 -0
- package/resources/beta/organization/service-accounts/service-accounts.js.map +1 -0
- package/resources/beta/organization/service-accounts/service-accounts.mjs +169 -0
- package/resources/beta/organization/service-accounts/service-accounts.mjs.map +1 -0
- package/resources/beta/organization/service-accounts/workspaces.d.mts +141 -0
- package/resources/beta/organization/service-accounts/workspaces.d.mts.map +1 -0
- package/resources/beta/organization/service-accounts/workspaces.d.ts +141 -0
- package/resources/beta/organization/service-accounts/workspaces.d.ts.map +1 -0
- package/resources/beta/organization/service-accounts/workspaces.js +125 -0
- package/resources/beta/organization/service-accounts/workspaces.js.map +1 -0
- package/resources/beta/organization/service-accounts/workspaces.mjs +121 -0
- package/resources/beta/organization/service-accounts/workspaces.mjs.map +1 -0
- package/resources/beta/organization/service-accounts.d.mts +2 -0
- package/resources/beta/organization/service-accounts.d.mts.map +1 -0
- package/resources/beta/organization/service-accounts.d.ts +2 -0
- package/resources/beta/organization/service-accounts.d.ts.map +1 -0
- package/resources/beta/organization/service-accounts.js +6 -0
- package/resources/beta/organization/service-accounts.js.map +1 -0
- package/resources/beta/organization/service-accounts.mjs +3 -0
- package/resources/beta/organization/service-accounts.mjs.map +1 -0
- package/resources/beta/organization/users.d.mts +124 -0
- package/resources/beta/organization/users.d.mts.map +1 -0
- package/resources/beta/organization/users.d.ts +124 -0
- package/resources/beta/organization/users.d.ts.map +1 -0
- package/resources/beta/organization/users.js +67 -0
- package/resources/beta/organization/users.js.map +1 -0
- package/resources/beta/organization/users.mjs +63 -0
- package/resources/beta/organization/users.mjs.map +1 -0
- package/resources/beta/organization/workspaces/index.d.mts +5 -0
- package/resources/beta/organization/workspaces/index.d.mts.map +1 -0
- package/resources/beta/organization/workspaces/index.d.ts +5 -0
- package/resources/beta/organization/workspaces/index.d.ts.map +1 -0
- package/resources/beta/organization/workspaces/index.js +13 -0
- package/resources/beta/organization/workspaces/index.js.map +1 -0
- package/resources/beta/organization/workspaces/index.mjs +6 -0
- package/resources/beta/organization/workspaces/index.mjs.map +1 -0
- package/resources/beta/organization/workspaces/members.d.mts +135 -0
- package/resources/beta/organization/workspaces/members.d.mts.map +1 -0
- package/resources/beta/organization/workspaces/members.d.ts +135 -0
- package/resources/beta/organization/workspaces/members.d.ts.map +1 -0
- package/resources/beta/organization/workspaces/members.js +102 -0
- package/resources/beta/organization/workspaces/members.js.map +1 -0
- package/resources/beta/organization/workspaces/members.mjs +98 -0
- package/resources/beta/organization/workspaces/members.mjs.map +1 -0
- package/resources/beta/organization/workspaces/rate-limits.d.mts +84 -0
- package/resources/beta/organization/workspaces/rate-limits.d.mts.map +1 -0
- package/resources/beta/organization/workspaces/rate-limits.d.ts +84 -0
- package/resources/beta/organization/workspaces/rate-limits.d.ts.map +1 -0
- package/resources/beta/organization/workspaces/rate-limits.js +35 -0
- package/resources/beta/organization/workspaces/rate-limits.js.map +1 -0
- package/resources/beta/organization/workspaces/rate-limits.mjs +31 -0
- package/resources/beta/organization/workspaces/rate-limits.mjs.map +1 -0
- package/resources/beta/organization/workspaces/service-accounts.d.mts +210 -0
- package/resources/beta/organization/workspaces/service-accounts.d.mts.map +1 -0
- package/resources/beta/organization/workspaces/service-accounts.d.ts +210 -0
- package/resources/beta/organization/workspaces/service-accounts.d.ts.map +1 -0
- package/resources/beta/organization/workspaces/service-accounts.js +189 -0
- package/resources/beta/organization/workspaces/service-accounts.js.map +1 -0
- package/resources/beta/organization/workspaces/service-accounts.mjs +185 -0
- package/resources/beta/organization/workspaces/service-accounts.mjs.map +1 -0
- package/resources/beta/organization/workspaces/workspaces.d.mts +287 -0
- package/resources/beta/organization/workspaces/workspaces.d.mts.map +1 -0
- package/resources/beta/organization/workspaces/workspaces.d.ts +287 -0
- package/resources/beta/organization/workspaces/workspaces.d.ts.map +1 -0
- package/resources/beta/organization/workspaces/workspaces.js +112 -0
- package/resources/beta/organization/workspaces/workspaces.js.map +1 -0
- package/resources/beta/organization/workspaces/workspaces.mjs +107 -0
- package/resources/beta/organization/workspaces/workspaces.mjs.map +1 -0
- package/resources/beta/organization/workspaces.d.mts +2 -0
- package/resources/beta/organization/workspaces.d.mts.map +1 -0
- package/resources/beta/organization/workspaces.d.ts +2 -0
- package/resources/beta/organization/workspaces.d.ts.map +1 -0
- package/resources/beta/organization/workspaces.js +6 -0
- package/resources/beta/organization/workspaces.js.map +1 -0
- package/resources/beta/organization/workspaces.mjs +3 -0
- package/resources/beta/organization/workspaces.mjs.map +1 -0
- package/resources/beta/organization.d.mts +2 -0
- package/resources/beta/organization.d.mts.map +1 -0
- package/resources/beta/organization.d.ts +2 -0
- package/resources/beta/organization.d.ts.map +1 -0
- package/resources/beta/organization.js +6 -0
- package/resources/beta/organization.js.map +1 -0
- package/resources/beta/organization.mjs +3 -0
- package/resources/beta/organization.mjs.map +1 -0
- package/resources/beta/sessions/threads/threads.d.mts +2 -1
- package/resources/beta/sessions/threads/threads.d.mts.map +1 -1
- package/resources/beta/sessions/threads/threads.d.ts +2 -1
- package/resources/beta/sessions/threads/threads.d.ts.map +1 -1
- package/resources/beta/sessions/threads/threads.js.map +1 -1
- package/resources/beta/sessions/threads/threads.mjs.map +1 -1
- package/resources/messages/messages.d.mts +1 -1
- package/resources/messages/messages.d.ts +1 -1
- package/src/helpers/beta/environments.ts +5 -4
- package/src/helpers/beta/standard-schema.ts +99 -0
- package/src/internal/detect-platform.ts +1 -1
- package/src/internal/file-store.ts +550 -0
- package/src/internal/utils/values.ts +7 -0
- package/src/lib/BetaMessageStream.ts +1 -3
- package/src/lib/MessageStream.ts +1 -3
- package/src/lib/environments/poller.ts +47 -1
- package/src/lib/environments/worker.ts +419 -79
- package/src/lib/sessions/accumulate.ts +1 -3
- package/src/lib/standard-schema.ts +209 -0
- package/src/lib/tools/BetaToolRunner.ts +38 -6
- package/src/resources/beta/agents/agents.ts +435 -30
- package/src/resources/beta/agents/index.ts +17 -0
- package/src/resources/beta/beta.ts +52 -1
- package/src/resources/beta/environments/environments.ts +8 -1
- package/src/resources/beta/environments/work.ts +7 -0
- package/src/resources/beta/index.ts +18 -0
- package/src/resources/beta/memory-stores/memories.ts +6 -5
- package/src/resources/beta/memory-stores/memory-versions.ts +8 -5
- package/src/resources/beta/messages/messages.ts +51 -9
- package/src/resources/beta/organization/api-keys.ts +231 -0
- package/src/resources/beta/organization/external-keys.ts +362 -0
- package/src/resources/beta/organization/federation/federation.ts +71 -0
- package/src/resources/beta/organization/federation/index.ts +31 -0
- package/src/resources/beta/organization/federation/issuers.ts +486 -0
- package/src/resources/beta/organization/federation/rules/index.ts +23 -0
- package/src/resources/beta/organization/federation/rules/rules.ts +624 -0
- package/src/resources/beta/organization/federation/rules/workspaces.ts +196 -0
- package/src/resources/beta/organization/federation/rules.ts +3 -0
- package/src/resources/beta/organization/federation.ts +3 -0
- package/src/resources/beta/organization/index.ts +83 -0
- package/src/resources/beta/organization/invites.ts +207 -0
- package/src/resources/beta/organization/organization.ts +245 -0
- package/src/resources/beta/organization/rate-limits.ts +105 -0
- package/src/resources/beta/organization/service-accounts/index.ts +21 -0
- package/src/resources/beta/organization/service-accounts/service-accounts.ts +389 -0
- package/src/resources/beta/organization/service-accounts/workspaces.ts +217 -0
- package/src/resources/beta/organization/service-accounts.ts +3 -0
- package/src/resources/beta/organization/users.ts +163 -0
- package/src/resources/beta/organization/workspaces/index.ts +43 -0
- package/src/resources/beta/organization/workspaces/members.ts +209 -0
- package/src/resources/beta/organization/workspaces/rate-limits.ts +114 -0
- package/src/resources/beta/organization/workspaces/service-accounts.ts +325 -0
- package/src/resources/beta/organization/workspaces/workspaces.ts +434 -0
- package/src/resources/beta/organization/workspaces.ts +3 -0
- package/src/resources/beta/organization.ts +3 -0
- package/src/resources/beta/sessions/threads/threads.ts +2 -1
- package/src/resources/messages/messages.ts +1 -1
- package/src/tools/agent-toolset/fs-util.ts +40 -24
- package/src/tools/agent-toolset/memories.ts +1017 -0
- package/src/tools/agent-toolset/node.browser.ts +69 -1
- package/src/tools/agent-toolset/node.ts +143 -57
- package/src/tools/agent-toolset/skills.ts +29 -9
- package/src/tools/agent-toolset/sync-interval.ts +30 -0
- package/src/version.ts +1 -1
- package/tools/agent-toolset/fs-util.d.mts +23 -10
- package/tools/agent-toolset/fs-util.d.mts.map +1 -1
- package/tools/agent-toolset/fs-util.d.ts +23 -10
- package/tools/agent-toolset/fs-util.d.ts.map +1 -1
- package/tools/agent-toolset/fs-util.js +40 -25
- package/tools/agent-toolset/fs-util.js.map +1 -1
- package/tools/agent-toolset/fs-util.mjs +38 -25
- package/tools/agent-toolset/fs-util.mjs.map +1 -1
- package/tools/agent-toolset/memories.d.mts +173 -0
- package/tools/agent-toolset/memories.d.mts.map +1 -0
- package/tools/agent-toolset/memories.d.ts +173 -0
- package/tools/agent-toolset/memories.d.ts.map +1 -0
- package/tools/agent-toolset/memories.js +902 -0
- package/tools/agent-toolset/memories.js.map +1 -0
- package/tools/agent-toolset/memories.mjs +895 -0
- package/tools/agent-toolset/memories.mjs.map +1 -0
- package/tools/agent-toolset/node.browser.d.mts +32 -1
- package/tools/agent-toolset/node.browser.d.mts.map +1 -1
- package/tools/agent-toolset/node.browser.d.ts +32 -1
- package/tools/agent-toolset/node.browser.d.ts.map +1 -1
- package/tools/agent-toolset/node.browser.js +59 -1
- package/tools/agent-toolset/node.browser.js.map +1 -1
- package/tools/agent-toolset/node.browser.mjs +54 -0
- package/tools/agent-toolset/node.browser.mjs.map +1 -1
- package/tools/agent-toolset/node.d.mts +56 -24
- package/tools/agent-toolset/node.d.mts.map +1 -1
- package/tools/agent-toolset/node.d.ts +56 -24
- package/tools/agent-toolset/node.d.ts.map +1 -1
- package/tools/agent-toolset/node.js +83 -44
- package/tools/agent-toolset/node.js.map +1 -1
- package/tools/agent-toolset/node.mjs +77 -44
- package/tools/agent-toolset/node.mjs.map +1 -1
- package/tools/agent-toolset/skills.d.mts +16 -7
- package/tools/agent-toolset/skills.d.mts.map +1 -1
- package/tools/agent-toolset/skills.d.ts +16 -7
- package/tools/agent-toolset/skills.d.ts.map +1 -1
- package/tools/agent-toolset/skills.js +27 -9
- package/tools/agent-toolset/skills.js.map +1 -1
- package/tools/agent-toolset/skills.mjs +27 -9
- package/tools/agent-toolset/skills.mjs.map +1 -1
- package/tools/agent-toolset/sync-interval.d.mts +19 -0
- package/tools/agent-toolset/sync-interval.d.mts.map +1 -0
- package/tools/agent-toolset/sync-interval.d.ts +19 -0
- package/tools/agent-toolset/sync-interval.d.ts.map +1 -0
- package/tools/agent-toolset/sync-interval.js +29 -0
- package/tools/agent-toolset/sync-interval.js.map +1 -0
- package/tools/agent-toolset/sync-interval.mjs +25 -0
- package/tools/agent-toolset/sync-interval.mjs.map +1 -0
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../../../core/resource.mjs";
|
|
3
|
+
import * as WorkspacesAPI from "./workspaces.mjs";
|
|
4
|
+
import { Workspaces, } from "./workspaces.mjs";
|
|
5
|
+
import { PageCursor } from "../../../../../core/pagination.mjs";
|
|
6
|
+
import { buildHeaders } from "../../../../../internal/headers.mjs";
|
|
7
|
+
import { path } from "../../../../../internal/utils/path.mjs";
|
|
8
|
+
export class Rules extends APIResource {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.workspaces = new WorkspacesAPI.Workspaces(this._client);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
15
|
+
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
16
|
+
* API keys are not accepted. See
|
|
17
|
+
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
18
|
+
*
|
|
19
|
+
* Create a federation rule owned by your organization.
|
|
20
|
+
*
|
|
21
|
+
* The referenced issuer and the target service account must already exist in the
|
|
22
|
+
* same organization; invalid references are rejected with a 400 error. The
|
|
23
|
+
* workspace reference is validated. Membership is not checked at rule creation:
|
|
24
|
+
* token exchange resolves a single enabled workspace per call and is rejected
|
|
25
|
+
* unless the target service account is a member of that workspace (it is
|
|
26
|
+
* implicitly a member of the default workspace). Rules on well-known shared
|
|
27
|
+
* issuers (GitHub Actions, GitLab, Buildkite, Terraform Cloud, Google) must
|
|
28
|
+
* constrain tenant identity via an identity-bearing claim, a tenant-pinning
|
|
29
|
+
* subject prefix (such as `repo:YOUR_ORG/...`), or a CEL condition referencing one
|
|
30
|
+
* of those identity claims (e.g. `claims.repository_owner`). OAuth callers may
|
|
31
|
+
* only manage rules whose `oauth_scope` is `workspace:developer` or
|
|
32
|
+
* `workspace:inference`; other scopes require a Console session.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const betaFederationRule =
|
|
37
|
+
* await client.beta.organization.federation.rules.create({
|
|
38
|
+
* issuer_id: 'issuer_id',
|
|
39
|
+
* match: {},
|
|
40
|
+
* name: 'x',
|
|
41
|
+
* oauth_scope: 'x',
|
|
42
|
+
* target: {
|
|
43
|
+
* service_account_id: 'svac_01SDCCSbTxrXDpWc1phhtcfK',
|
|
44
|
+
* type: 'service_account',
|
|
45
|
+
* },
|
|
46
|
+
* });
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
create(params, options) {
|
|
50
|
+
const { betas, ...body } = params;
|
|
51
|
+
return this._client.post('/v1/organizations/federation_rules?beta=true', {
|
|
52
|
+
body,
|
|
53
|
+
...options,
|
|
54
|
+
headers: buildHeaders([
|
|
55
|
+
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
56
|
+
options?.headers,
|
|
57
|
+
]),
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
62
|
+
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
63
|
+
* API keys are not accepted. See
|
|
64
|
+
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
65
|
+
*
|
|
66
|
+
* Retrieve a federation rule by its ID (`fdrl_...`).
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* const betaFederationRule =
|
|
71
|
+
* await client.beta.organization.federation.rules.retrieve(
|
|
72
|
+
* 'federation_rule_id',
|
|
73
|
+
* );
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
retrieve(federationRuleID, params = {}, options) {
|
|
77
|
+
const { betas } = params ?? {};
|
|
78
|
+
return this._client.get(path `/v1/organizations/federation_rules/${federationRuleID}?beta=true`, {
|
|
79
|
+
...options,
|
|
80
|
+
headers: buildHeaders([
|
|
81
|
+
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
82
|
+
options?.headers,
|
|
83
|
+
]),
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
88
|
+
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
89
|
+
* API keys are not accepted. See
|
|
90
|
+
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
91
|
+
*
|
|
92
|
+
* Partially update a federation rule.
|
|
93
|
+
*
|
|
94
|
+
* `issuer_id` is immutable. `match` and `target` are replaced as whole objects
|
|
95
|
+
* when set. Referenced service accounts and workspaces must exist in your
|
|
96
|
+
* organization; invalid references are rejected with a 400 error. Archived rules
|
|
97
|
+
* cannot be updated; this returns 400. Create a new rule instead. Rules on
|
|
98
|
+
* well-known shared issuers (GitHub Actions, GitLab, Buildkite, Terraform Cloud,
|
|
99
|
+
* Google) must constrain tenant identity via an identity-bearing claim, a
|
|
100
|
+
* tenant-pinning subject prefix (such as `repo:YOUR_ORG/...`), or a CEL condition
|
|
101
|
+
* referencing one of those identity claims (e.g. `claims.repository_owner`). On
|
|
102
|
+
* these issuers the requirement is re-checked on every update; if an existing
|
|
103
|
+
* rule's stored match does not yet constrain tenant identity, any update (even a
|
|
104
|
+
* rename or description change) must also supply a conforming `match` in the same
|
|
105
|
+
* request. OAuth callers may only manage rules whose `oauth_scope` is
|
|
106
|
+
* `workspace:developer` or `workspace:inference`; other scopes require a Console
|
|
107
|
+
* session.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```ts
|
|
111
|
+
* const betaFederationRule =
|
|
112
|
+
* await client.beta.organization.federation.rules.update(
|
|
113
|
+
* 'federation_rule_id',
|
|
114
|
+
* );
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
update(federationRuleID, params, options) {
|
|
118
|
+
const { betas, ...body } = params;
|
|
119
|
+
return this._client.post(path `/v1/organizations/federation_rules/${federationRuleID}?beta=true`, {
|
|
120
|
+
body,
|
|
121
|
+
...options,
|
|
122
|
+
headers: buildHeaders([
|
|
123
|
+
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
124
|
+
options?.headers,
|
|
125
|
+
]),
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
130
|
+
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
131
|
+
* API keys are not accepted. See
|
|
132
|
+
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
133
|
+
*
|
|
134
|
+
* List federation rules in your organization.
|
|
135
|
+
*
|
|
136
|
+
* Optionally filter by issuer with `issuer_id`. Archived rules are excluded unless
|
|
137
|
+
* `include_archived=true`.
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* ```ts
|
|
141
|
+
* // Automatically fetches more pages as needed.
|
|
142
|
+
* for await (const betaFederationRule of client.beta.organization.federation.rules.list()) {
|
|
143
|
+
* // ...
|
|
144
|
+
* }
|
|
145
|
+
* ```
|
|
146
|
+
*/
|
|
147
|
+
list(params = {}, options) {
|
|
148
|
+
const { betas, ...query } = params ?? {};
|
|
149
|
+
return this._client.getAPIList('/v1/organizations/federation_rules?beta=true', (PageCursor), {
|
|
150
|
+
query,
|
|
151
|
+
...options,
|
|
152
|
+
headers: buildHeaders([
|
|
153
|
+
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
154
|
+
options?.headers,
|
|
155
|
+
]),
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
160
|
+
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
161
|
+
* API keys are not accepted. See
|
|
162
|
+
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
163
|
+
*
|
|
164
|
+
* Archive a federation rule.
|
|
165
|
+
*
|
|
166
|
+
* Token exchange through this rule stops immediately. Idempotent; re-archiving
|
|
167
|
+
* returns the rule with its original `archived_at`. Archiving clears the rule's
|
|
168
|
+
* workspace targeting (`workspace_id` and `workspace_ids` are emptied). Tokens
|
|
169
|
+
* already minted before archive remain valid until they expire. OAuth callers may
|
|
170
|
+
* only manage rules whose `oauth_scope` is `workspace:developer` or
|
|
171
|
+
* `workspace:inference`; other scopes require a Console session.
|
|
172
|
+
*
|
|
173
|
+
* @example
|
|
174
|
+
* ```ts
|
|
175
|
+
* const betaFederationRule =
|
|
176
|
+
* await client.beta.organization.federation.rules.archive(
|
|
177
|
+
* 'federation_rule_id',
|
|
178
|
+
* );
|
|
179
|
+
* ```
|
|
180
|
+
*/
|
|
181
|
+
archive(federationRuleID, params = {}, options) {
|
|
182
|
+
const { betas } = params ?? {};
|
|
183
|
+
return this._client.post(path `/v1/organizations/federation_rules/${federationRuleID}/archive?beta=true`, {
|
|
184
|
+
...options,
|
|
185
|
+
headers: buildHeaders([
|
|
186
|
+
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
187
|
+
options?.headers,
|
|
188
|
+
]),
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
Rules.Workspaces = Workspaces;
|
|
193
|
+
//# sourceMappingURL=rules.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.mjs","sourceRoot":"","sources":["../../../../../src/resources/beta/organization/federation/rules/rules.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEt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AC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,OAAO,CACL,gBAAwB,EACxB,SAA+C,EAAE,EACjD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,sCAAsC,gBAAgB,oBAAoB,EAAE;YACvG,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AA0XD,KAAK,CAAC,UAAU,GAAG,UAAU,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { APIResource } from "../../../../../core/resource.mjs";
|
|
2
|
+
import * as BetaAPI from "../../../beta.mjs";
|
|
3
|
+
import * as RulesAPI from "./rules.mjs";
|
|
4
|
+
import { BetaFederationRuleWorkspacesPageCursor } from "./rules.mjs";
|
|
5
|
+
import { APIPromise } from "../../../../../core/api-promise.mjs";
|
|
6
|
+
import { type PageCursorParams, PagePromise } from "../../../../../core/pagination.mjs";
|
|
7
|
+
import { RequestOptions } from "../../../../../internal/request-options.mjs";
|
|
8
|
+
export declare class Workspaces extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
11
|
+
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
12
|
+
* API keys are not accepted. See
|
|
13
|
+
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
14
|
+
*
|
|
15
|
+
* List workspaces where this federation rule is enabled.
|
|
16
|
+
*
|
|
17
|
+
* Returns all workspace enablements in a single response; the `limit` and `page`
|
|
18
|
+
* parameters are accepted but have no effect, and `next_page` is always `null`.
|
|
19
|
+
* Returns explicit per-workspace enablements only; for rules with
|
|
20
|
+
* `applies_to_all_workspaces` or a legacy single `workspace_id`, check those
|
|
21
|
+
* fields on the rule itself.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* // Automatically fetches more pages as needed.
|
|
26
|
+
* for await (const betaFederationRuleWorkspace of client.beta.organization.federation.rules.workspaces.list(
|
|
27
|
+
* 'federation_rule_id',
|
|
28
|
+
* )) {
|
|
29
|
+
* // ...
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
list(federationRuleID: string, params?: WorkspaceListParams | null | undefined, options?: RequestOptions): PagePromise<BetaFederationRuleWorkspacesPageCursor, RulesAPI.BetaFederationRuleWorkspace>;
|
|
34
|
+
/**
|
|
35
|
+
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
36
|
+
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
37
|
+
* API keys are not accepted. See
|
|
38
|
+
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
39
|
+
*
|
|
40
|
+
* Enable a federation rule for a workspace.
|
|
41
|
+
*
|
|
42
|
+
* Idempotent; re-enabling returns the existing enablement. The rule and workspace
|
|
43
|
+
* must both belong to your organization. Membership of the rule's target service
|
|
44
|
+
* account in this workspace is not checked at enablement: token exchange into this
|
|
45
|
+
* workspace is rejected unless the target is a member (it is implicitly a member
|
|
46
|
+
* of the default workspace). Archived rules are rejected with 400. OAuth callers
|
|
47
|
+
* may only manage rules whose `oauth_scope` is `workspace:developer` or
|
|
48
|
+
* `workspace:inference`; other scopes require a Console session.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* const betaFederationRuleWorkspace =
|
|
53
|
+
* await client.beta.organization.federation.rules.workspaces.add(
|
|
54
|
+
* 'federation_rule_id',
|
|
55
|
+
* { workspace_id: 'workspace_id' },
|
|
56
|
+
* );
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
add(federationRuleID: string, params: WorkspaceAddParams, options?: RequestOptions): APIPromise<RulesAPI.BetaFederationRuleWorkspace>;
|
|
60
|
+
/**
|
|
61
|
+
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
62
|
+
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
63
|
+
* API keys are not accepted. See
|
|
64
|
+
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
65
|
+
*
|
|
66
|
+
* Disable a federation rule for a workspace.
|
|
67
|
+
*
|
|
68
|
+
* Idempotent; succeeds even if the enablement was already removed. OAuth callers
|
|
69
|
+
* may only manage rules whose `oauth_scope` is `workspace:developer` or
|
|
70
|
+
* `workspace:inference`; other scopes require a Console session.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts
|
|
74
|
+
* const workspace =
|
|
75
|
+
* await client.beta.organization.federation.rules.workspaces.remove(
|
|
76
|
+
* 'workspace_id',
|
|
77
|
+
* { federation_rule_id: 'federation_rule_id' },
|
|
78
|
+
* );
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
remove(workspaceID: string, params: WorkspaceRemoveParams, options?: RequestOptions): APIPromise<WorkspaceRemoveResponse>;
|
|
82
|
+
}
|
|
83
|
+
export interface WorkspaceRemoveResponse {
|
|
84
|
+
/**
|
|
85
|
+
* Tagged ID of the federation rule.
|
|
86
|
+
*/
|
|
87
|
+
federation_rule_id: string;
|
|
88
|
+
type: 'federation_rule_workspace_deleted';
|
|
89
|
+
/**
|
|
90
|
+
* Tagged ID of the workspace named in the delete request. Removal is idempotent.
|
|
91
|
+
*/
|
|
92
|
+
workspace_id: string;
|
|
93
|
+
}
|
|
94
|
+
export interface WorkspaceListParams extends PageCursorParams {
|
|
95
|
+
/**
|
|
96
|
+
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
97
|
+
*/
|
|
98
|
+
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
99
|
+
}
|
|
100
|
+
export interface WorkspaceAddParams {
|
|
101
|
+
/**
|
|
102
|
+
* Body param: Tagged ID of the workspace to enable this rule for.
|
|
103
|
+
*/
|
|
104
|
+
workspace_id: string;
|
|
105
|
+
/**
|
|
106
|
+
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
107
|
+
*/
|
|
108
|
+
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
109
|
+
}
|
|
110
|
+
export interface WorkspaceRemoveParams {
|
|
111
|
+
/**
|
|
112
|
+
* Path param: ID of the federation rule.
|
|
113
|
+
*/
|
|
114
|
+
federation_rule_id: string;
|
|
115
|
+
/**
|
|
116
|
+
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
117
|
+
*/
|
|
118
|
+
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
119
|
+
}
|
|
120
|
+
export declare namespace Workspaces {
|
|
121
|
+
export { type WorkspaceRemoveResponse as WorkspaceRemoveResponse, type WorkspaceListParams as WorkspaceListParams, type WorkspaceAddParams as WorkspaceAddParams, type WorkspaceRemoveParams as WorkspaceRemoveParams, };
|
|
122
|
+
}
|
|
123
|
+
export { type BetaFederationRuleWorkspacesPageCursor };
|
|
124
|
+
//# sourceMappingURL=workspaces.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspaces.d.mts","sourceRoot":"","sources":["../../../../../src/resources/beta/organization/federation/rules/workspaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,yCAAqC;AAC3D,OAAO,KAAK,OAAO,0BAAsB;AACzC,OAAO,KAAK,QAAQ,oBAAgB;AACpC,OAAO,EAAE,sCAAsC,EAAE,oBAAgB;AACjE,OAAO,EAAE,UAAU,EAAE,4CAAwC;AAC7D,OAAO,EAAc,KAAK,gBAAgB,EAAE,WAAW,EAAE,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C;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH;AAED,OAAO,EAAE,KAAK,sCAAsC,EAAE,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { APIResource } from "../../../../../core/resource.js";
|
|
2
|
+
import * as BetaAPI from "../../../beta.js";
|
|
3
|
+
import * as RulesAPI from "./rules.js";
|
|
4
|
+
import { BetaFederationRuleWorkspacesPageCursor } from "./rules.js";
|
|
5
|
+
import { APIPromise } from "../../../../../core/api-promise.js";
|
|
6
|
+
import { type PageCursorParams, PagePromise } from "../../../../../core/pagination.js";
|
|
7
|
+
import { RequestOptions } from "../../../../../internal/request-options.js";
|
|
8
|
+
export declare class Workspaces extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
11
|
+
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
12
|
+
* API keys are not accepted. See
|
|
13
|
+
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
14
|
+
*
|
|
15
|
+
* List workspaces where this federation rule is enabled.
|
|
16
|
+
*
|
|
17
|
+
* Returns all workspace enablements in a single response; the `limit` and `page`
|
|
18
|
+
* parameters are accepted but have no effect, and `next_page` is always `null`.
|
|
19
|
+
* Returns explicit per-workspace enablements only; for rules with
|
|
20
|
+
* `applies_to_all_workspaces` or a legacy single `workspace_id`, check those
|
|
21
|
+
* fields on the rule itself.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* // Automatically fetches more pages as needed.
|
|
26
|
+
* for await (const betaFederationRuleWorkspace of client.beta.organization.federation.rules.workspaces.list(
|
|
27
|
+
* 'federation_rule_id',
|
|
28
|
+
* )) {
|
|
29
|
+
* // ...
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
list(federationRuleID: string, params?: WorkspaceListParams | null | undefined, options?: RequestOptions): PagePromise<BetaFederationRuleWorkspacesPageCursor, RulesAPI.BetaFederationRuleWorkspace>;
|
|
34
|
+
/**
|
|
35
|
+
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
36
|
+
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
37
|
+
* API keys are not accepted. See
|
|
38
|
+
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
39
|
+
*
|
|
40
|
+
* Enable a federation rule for a workspace.
|
|
41
|
+
*
|
|
42
|
+
* Idempotent; re-enabling returns the existing enablement. The rule and workspace
|
|
43
|
+
* must both belong to your organization. Membership of the rule's target service
|
|
44
|
+
* account in this workspace is not checked at enablement: token exchange into this
|
|
45
|
+
* workspace is rejected unless the target is a member (it is implicitly a member
|
|
46
|
+
* of the default workspace). Archived rules are rejected with 400. OAuth callers
|
|
47
|
+
* may only manage rules whose `oauth_scope` is `workspace:developer` or
|
|
48
|
+
* `workspace:inference`; other scopes require a Console session.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* const betaFederationRuleWorkspace =
|
|
53
|
+
* await client.beta.organization.federation.rules.workspaces.add(
|
|
54
|
+
* 'federation_rule_id',
|
|
55
|
+
* { workspace_id: 'workspace_id' },
|
|
56
|
+
* );
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
add(federationRuleID: string, params: WorkspaceAddParams, options?: RequestOptions): APIPromise<RulesAPI.BetaFederationRuleWorkspace>;
|
|
60
|
+
/**
|
|
61
|
+
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
62
|
+
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
63
|
+
* API keys are not accepted. See
|
|
64
|
+
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
65
|
+
*
|
|
66
|
+
* Disable a federation rule for a workspace.
|
|
67
|
+
*
|
|
68
|
+
* Idempotent; succeeds even if the enablement was already removed. OAuth callers
|
|
69
|
+
* may only manage rules whose `oauth_scope` is `workspace:developer` or
|
|
70
|
+
* `workspace:inference`; other scopes require a Console session.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts
|
|
74
|
+
* const workspace =
|
|
75
|
+
* await client.beta.organization.federation.rules.workspaces.remove(
|
|
76
|
+
* 'workspace_id',
|
|
77
|
+
* { federation_rule_id: 'federation_rule_id' },
|
|
78
|
+
* );
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
remove(workspaceID: string, params: WorkspaceRemoveParams, options?: RequestOptions): APIPromise<WorkspaceRemoveResponse>;
|
|
82
|
+
}
|
|
83
|
+
export interface WorkspaceRemoveResponse {
|
|
84
|
+
/**
|
|
85
|
+
* Tagged ID of the federation rule.
|
|
86
|
+
*/
|
|
87
|
+
federation_rule_id: string;
|
|
88
|
+
type: 'federation_rule_workspace_deleted';
|
|
89
|
+
/**
|
|
90
|
+
* Tagged ID of the workspace named in the delete request. Removal is idempotent.
|
|
91
|
+
*/
|
|
92
|
+
workspace_id: string;
|
|
93
|
+
}
|
|
94
|
+
export interface WorkspaceListParams extends PageCursorParams {
|
|
95
|
+
/**
|
|
96
|
+
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
97
|
+
*/
|
|
98
|
+
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
99
|
+
}
|
|
100
|
+
export interface WorkspaceAddParams {
|
|
101
|
+
/**
|
|
102
|
+
* Body param: Tagged ID of the workspace to enable this rule for.
|
|
103
|
+
*/
|
|
104
|
+
workspace_id: string;
|
|
105
|
+
/**
|
|
106
|
+
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
107
|
+
*/
|
|
108
|
+
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
109
|
+
}
|
|
110
|
+
export interface WorkspaceRemoveParams {
|
|
111
|
+
/**
|
|
112
|
+
* Path param: ID of the federation rule.
|
|
113
|
+
*/
|
|
114
|
+
federation_rule_id: string;
|
|
115
|
+
/**
|
|
116
|
+
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
117
|
+
*/
|
|
118
|
+
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
119
|
+
}
|
|
120
|
+
export declare namespace Workspaces {
|
|
121
|
+
export { type WorkspaceRemoveResponse as WorkspaceRemoveResponse, type WorkspaceListParams as WorkspaceListParams, type WorkspaceAddParams as WorkspaceAddParams, type WorkspaceRemoveParams as WorkspaceRemoveParams, };
|
|
122
|
+
}
|
|
123
|
+
export { type BetaFederationRuleWorkspacesPageCursor };
|
|
124
|
+
//# sourceMappingURL=workspaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspaces.d.ts","sourceRoot":"","sources":["../../../../../src/resources/beta/organization/federation/rules/workspaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,wCAAqC;AAC3D,OAAO,KAAK,OAAO,yBAAsB;AACzC,OAAO,KAAK,QAAQ,mBAAgB;AACpC,OAAO,EAAE,sCAAsC,EAAE,mBAAgB;AACjE,OAAO,EAAE,UAAU,EAAE,2CAAwC;AAC7D,OAAO,EAAc,KAAK,gBAAgB,EAAE,WAAW,EAAE,0CAAuC;AAEhG,OAAO,EAAE,cAAc,EAAE,mDAAgD;AAGzE,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,IAAI,CACF,gBAAgB,EAAE,MAAM,EACxB,MAAM,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,sCAAsC,EAAE,QAAQ,CAAC,2BAA2B,CAAC;IAgB5F;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,GAAG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ING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Workspaces = void 0;
|
|
5
|
+
const resource_1 = require("../../../../../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../../../../../core/pagination.js");
|
|
7
|
+
const headers_1 = require("../../../../../internal/headers.js");
|
|
8
|
+
const path_1 = require("../../../../../internal/utils/path.js");
|
|
9
|
+
class Workspaces extends resource_1.APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
12
|
+
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
13
|
+
* API keys are not accepted. See
|
|
14
|
+
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
15
|
+
*
|
|
16
|
+
* List workspaces where this federation rule is enabled.
|
|
17
|
+
*
|
|
18
|
+
* Returns all workspace enablements in a single response; the `limit` and `page`
|
|
19
|
+
* parameters are accepted but have no effect, and `next_page` is always `null`.
|
|
20
|
+
* Returns explicit per-workspace enablements only; for rules with
|
|
21
|
+
* `applies_to_all_workspaces` or a legacy single `workspace_id`, check those
|
|
22
|
+
* fields on the rule itself.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* // Automatically fetches more pages as needed.
|
|
27
|
+
* for await (const betaFederationRuleWorkspace of client.beta.organization.federation.rules.workspaces.list(
|
|
28
|
+
* 'federation_rule_id',
|
|
29
|
+
* )) {
|
|
30
|
+
* // ...
|
|
31
|
+
* }
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
list(federationRuleID, params = {}, options) {
|
|
35
|
+
const { betas, ...query } = params ?? {};
|
|
36
|
+
return this._client.getAPIList((0, path_1.path) `/v1/organizations/federation_rules/${federationRuleID}/workspaces?beta=true`, (pagination_1.PageCursor), {
|
|
37
|
+
query,
|
|
38
|
+
...options,
|
|
39
|
+
headers: (0, headers_1.buildHeaders)([
|
|
40
|
+
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
41
|
+
options?.headers,
|
|
42
|
+
]),
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
47
|
+
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
48
|
+
* API keys are not accepted. See
|
|
49
|
+
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
50
|
+
*
|
|
51
|
+
* Enable a federation rule for a workspace.
|
|
52
|
+
*
|
|
53
|
+
* Idempotent; re-enabling returns the existing enablement. The rule and workspace
|
|
54
|
+
* must both belong to your organization. Membership of the rule's target service
|
|
55
|
+
* account in this workspace is not checked at enablement: token exchange into this
|
|
56
|
+
* workspace is rejected unless the target is a member (it is implicitly a member
|
|
57
|
+
* of the default workspace). Archived rules are rejected with 400. OAuth callers
|
|
58
|
+
* may only manage rules whose `oauth_scope` is `workspace:developer` or
|
|
59
|
+
* `workspace:inference`; other scopes require a Console session.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* const betaFederationRuleWorkspace =
|
|
64
|
+
* await client.beta.organization.federation.rules.workspaces.add(
|
|
65
|
+
* 'federation_rule_id',
|
|
66
|
+
* { workspace_id: 'workspace_id' },
|
|
67
|
+
* );
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
add(federationRuleID, params, options) {
|
|
71
|
+
const { betas, ...body } = params;
|
|
72
|
+
return this._client.post((0, path_1.path) `/v1/organizations/federation_rules/${federationRuleID}/workspaces?beta=true`, {
|
|
73
|
+
body,
|
|
74
|
+
...options,
|
|
75
|
+
headers: (0, headers_1.buildHeaders)([
|
|
76
|
+
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
77
|
+
options?.headers,
|
|
78
|
+
]),
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
83
|
+
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
84
|
+
* API keys are not accepted. See
|
|
85
|
+
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
86
|
+
*
|
|
87
|
+
* Disable a federation rule for a workspace.
|
|
88
|
+
*
|
|
89
|
+
* Idempotent; succeeds even if the enablement was already removed. OAuth callers
|
|
90
|
+
* may only manage rules whose `oauth_scope` is `workspace:developer` or
|
|
91
|
+
* `workspace:inference`; other scopes require a Console session.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```ts
|
|
95
|
+
* const workspace =
|
|
96
|
+
* await client.beta.organization.federation.rules.workspaces.remove(
|
|
97
|
+
* 'workspace_id',
|
|
98
|
+
* { federation_rule_id: 'federation_rule_id' },
|
|
99
|
+
* );
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
remove(workspaceID, params, options) {
|
|
103
|
+
const { federation_rule_id, betas } = params;
|
|
104
|
+
return this._client.delete((0, path_1.path) `/v1/organizations/federation_rules/${federation_rule_id}/workspaces/${workspaceID}?beta=true`, {
|
|
105
|
+
...options,
|
|
106
|
+
headers: (0, headers_1.buildHeaders)([
|
|
107
|
+
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
108
|
+
options?.headers,
|
|
109
|
+
]),
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
exports.Workspaces = Workspaces;
|
|
114
|
+
//# sourceMappingURL=workspaces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspaces.js","sourceRoot":"","sources":["../../../../../src/resources/beta/organization/federation/rules/workspaces.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,8DAA2D;AAK3D,kEAAgG;AAChG,gEAA+D;AAE/D,gEAA0D;AAE1D,MAAa,UAAW,SAAQ,sBAAW;IACzC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