@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,196 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../../../core/resource';
|
|
4
|
+
import * as BetaAPI from '../../../beta';
|
|
5
|
+
import * as RulesAPI from './rules';
|
|
6
|
+
import { BetaFederationRuleWorkspacesPageCursor } from './rules';
|
|
7
|
+
import { APIPromise } from '../../../../../core/api-promise';
|
|
8
|
+
import { PageCursor, type PageCursorParams, PagePromise } from '../../../../../core/pagination';
|
|
9
|
+
import { buildHeaders } from '../../../../../internal/headers';
|
|
10
|
+
import { RequestOptions } from '../../../../../internal/request-options';
|
|
11
|
+
import { path } from '../../../../../internal/utils/path';
|
|
12
|
+
|
|
13
|
+
export class Workspaces extends APIResource {
|
|
14
|
+
/**
|
|
15
|
+
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
16
|
+
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
17
|
+
* API keys are not accepted. See
|
|
18
|
+
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
19
|
+
*
|
|
20
|
+
* List workspaces where this federation rule is enabled.
|
|
21
|
+
*
|
|
22
|
+
* Returns all workspace enablements in a single response; the `limit` and `page`
|
|
23
|
+
* parameters are accepted but have no effect, and `next_page` is always `null`.
|
|
24
|
+
* Returns explicit per-workspace enablements only; for rules with
|
|
25
|
+
* `applies_to_all_workspaces` or a legacy single `workspace_id`, check those
|
|
26
|
+
* fields on the rule itself.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* // Automatically fetches more pages as needed.
|
|
31
|
+
* for await (const betaFederationRuleWorkspace of client.beta.organization.federation.rules.workspaces.list(
|
|
32
|
+
* 'federation_rule_id',
|
|
33
|
+
* )) {
|
|
34
|
+
* // ...
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
list(
|
|
39
|
+
federationRuleID: string,
|
|
40
|
+
params: WorkspaceListParams | null | undefined = {},
|
|
41
|
+
options?: RequestOptions,
|
|
42
|
+
): PagePromise<BetaFederationRuleWorkspacesPageCursor, RulesAPI.BetaFederationRuleWorkspace> {
|
|
43
|
+
const { betas, ...query } = params ?? {};
|
|
44
|
+
return this._client.getAPIList(
|
|
45
|
+
path`/v1/organizations/federation_rules/${federationRuleID}/workspaces?beta=true`,
|
|
46
|
+
PageCursor<RulesAPI.BetaFederationRuleWorkspace>,
|
|
47
|
+
{
|
|
48
|
+
query,
|
|
49
|
+
...options,
|
|
50
|
+
headers: buildHeaders([
|
|
51
|
+
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
52
|
+
options?.headers,
|
|
53
|
+
]),
|
|
54
|
+
},
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
60
|
+
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
61
|
+
* API keys are not accepted. See
|
|
62
|
+
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
63
|
+
*
|
|
64
|
+
* Enable a federation rule for a workspace.
|
|
65
|
+
*
|
|
66
|
+
* Idempotent; re-enabling returns the existing enablement. The rule and workspace
|
|
67
|
+
* must both belong to your organization. Membership of the rule's target service
|
|
68
|
+
* account in this workspace is not checked at enablement: token exchange into this
|
|
69
|
+
* workspace is rejected unless the target is a member (it is implicitly a member
|
|
70
|
+
* of the default workspace). Archived rules are rejected with 400. OAuth callers
|
|
71
|
+
* may only manage rules whose `oauth_scope` is `workspace:developer` or
|
|
72
|
+
* `workspace:inference`; other scopes require a Console session.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```ts
|
|
76
|
+
* const betaFederationRuleWorkspace =
|
|
77
|
+
* await client.beta.organization.federation.rules.workspaces.add(
|
|
78
|
+
* 'federation_rule_id',
|
|
79
|
+
* { workspace_id: 'workspace_id' },
|
|
80
|
+
* );
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
add(
|
|
84
|
+
federationRuleID: string,
|
|
85
|
+
params: WorkspaceAddParams,
|
|
86
|
+
options?: RequestOptions,
|
|
87
|
+
): APIPromise<RulesAPI.BetaFederationRuleWorkspace> {
|
|
88
|
+
const { betas, ...body } = params;
|
|
89
|
+
return this._client.post(
|
|
90
|
+
path`/v1/organizations/federation_rules/${federationRuleID}/workspaces?beta=true`,
|
|
91
|
+
{
|
|
92
|
+
body,
|
|
93
|
+
...options,
|
|
94
|
+
headers: buildHeaders([
|
|
95
|
+
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
96
|
+
options?.headers,
|
|
97
|
+
]),
|
|
98
|
+
},
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* **Requires an OAuth access token with the `org:admin` scope**, from
|
|
104
|
+
* `ant auth login --scope org:admin` or a workload identity federation rule; Admin
|
|
105
|
+
* API keys are not accepted. See
|
|
106
|
+
* [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
|
|
107
|
+
*
|
|
108
|
+
* Disable a federation rule for a workspace.
|
|
109
|
+
*
|
|
110
|
+
* Idempotent; succeeds even if the enablement was already removed. OAuth callers
|
|
111
|
+
* may only manage rules whose `oauth_scope` is `workspace:developer` or
|
|
112
|
+
* `workspace:inference`; other scopes require a Console session.
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```ts
|
|
116
|
+
* const workspace =
|
|
117
|
+
* await client.beta.organization.federation.rules.workspaces.remove(
|
|
118
|
+
* 'workspace_id',
|
|
119
|
+
* { federation_rule_id: 'federation_rule_id' },
|
|
120
|
+
* );
|
|
121
|
+
* ```
|
|
122
|
+
*/
|
|
123
|
+
remove(
|
|
124
|
+
workspaceID: string,
|
|
125
|
+
params: WorkspaceRemoveParams,
|
|
126
|
+
options?: RequestOptions,
|
|
127
|
+
): APIPromise<WorkspaceRemoveResponse> {
|
|
128
|
+
const { federation_rule_id, betas } = params;
|
|
129
|
+
return this._client.delete(
|
|
130
|
+
path`/v1/organizations/federation_rules/${federation_rule_id}/workspaces/${workspaceID}?beta=true`,
|
|
131
|
+
{
|
|
132
|
+
...options,
|
|
133
|
+
headers: buildHeaders([
|
|
134
|
+
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
135
|
+
options?.headers,
|
|
136
|
+
]),
|
|
137
|
+
},
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export interface WorkspaceRemoveResponse {
|
|
143
|
+
/**
|
|
144
|
+
* Tagged ID of the federation rule.
|
|
145
|
+
*/
|
|
146
|
+
federation_rule_id: string;
|
|
147
|
+
|
|
148
|
+
type: 'federation_rule_workspace_deleted';
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Tagged ID of the workspace named in the delete request. Removal is idempotent.
|
|
152
|
+
*/
|
|
153
|
+
workspace_id: string;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export interface WorkspaceListParams extends PageCursorParams {
|
|
157
|
+
/**
|
|
158
|
+
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
159
|
+
*/
|
|
160
|
+
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export interface WorkspaceAddParams {
|
|
164
|
+
/**
|
|
165
|
+
* Body param: Tagged ID of the workspace to enable this rule for.
|
|
166
|
+
*/
|
|
167
|
+
workspace_id: string;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
171
|
+
*/
|
|
172
|
+
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export interface WorkspaceRemoveParams {
|
|
176
|
+
/**
|
|
177
|
+
* Path param: ID of the federation rule.
|
|
178
|
+
*/
|
|
179
|
+
federation_rule_id: string;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
183
|
+
*/
|
|
184
|
+
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export declare namespace Workspaces {
|
|
188
|
+
export {
|
|
189
|
+
type WorkspaceRemoveResponse as WorkspaceRemoveResponse,
|
|
190
|
+
type WorkspaceListParams as WorkspaceListParams,
|
|
191
|
+
type WorkspaceAddParams as WorkspaceAddParams,
|
|
192
|
+
type WorkspaceRemoveParams as WorkspaceRemoveParams,
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export { type BetaFederationRuleWorkspacesPageCursor };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
APIKeys,
|
|
5
|
+
type BetaAPIKey,
|
|
6
|
+
type BetaAPIKeyCreatedBy,
|
|
7
|
+
type BetaAPIKeyOrganizationScope,
|
|
8
|
+
type BetaAPIKeyServiceAccountActor,
|
|
9
|
+
type BetaAPIKeyUserActor,
|
|
10
|
+
type BetaAPIKeyWorkspaceScope,
|
|
11
|
+
type APIKeyUpdateParams,
|
|
12
|
+
type APIKeyListParams,
|
|
13
|
+
type BetaAPIKeysPage,
|
|
14
|
+
} from './api-keys';
|
|
15
|
+
export {
|
|
16
|
+
ExternalKeys,
|
|
17
|
+
type BetaAWSExternalKeyConfig,
|
|
18
|
+
type BetaAzureExternalKeyConfig,
|
|
19
|
+
type BetaAzureExternalKeyConfigParam,
|
|
20
|
+
type BetaExternalKey,
|
|
21
|
+
type BetaExternalKeyAttachedAttachment,
|
|
22
|
+
type BetaExternalKeyUnattachedAttachment,
|
|
23
|
+
type BetaGCPExternalKeyConfig,
|
|
24
|
+
type ExternalKeyDeleteResponse,
|
|
25
|
+
type ExternalKeyValidateResponse,
|
|
26
|
+
type ExternalKeyCreateParams,
|
|
27
|
+
type ExternalKeyUpdateParams,
|
|
28
|
+
type ExternalKeyListParams,
|
|
29
|
+
type BetaExternalKeysPageCursor,
|
|
30
|
+
} from './external-keys';
|
|
31
|
+
export { Federation } from './federation/index';
|
|
32
|
+
export {
|
|
33
|
+
Invites,
|
|
34
|
+
type BetaOrganizationInvite,
|
|
35
|
+
type InviteDeleteResponse,
|
|
36
|
+
type InviteCreateParams,
|
|
37
|
+
type InviteListParams,
|
|
38
|
+
type BetaOrganizationInvitesPage,
|
|
39
|
+
} from './invites';
|
|
40
|
+
export { Organization, type BetaOrganization, type BetaOrganizationRole } from './organization';
|
|
41
|
+
export {
|
|
42
|
+
RateLimits,
|
|
43
|
+
type BetaOrganizationRateLimit,
|
|
44
|
+
type BetaOrganizationRateLimitValue,
|
|
45
|
+
type RateLimitListParams,
|
|
46
|
+
type BetaOrganizationRateLimitsPageCursor,
|
|
47
|
+
} from './rate-limits';
|
|
48
|
+
export {
|
|
49
|
+
ServiceAccounts,
|
|
50
|
+
type BetaServiceAccount,
|
|
51
|
+
type BetaServiceAccountWorkspaceMember,
|
|
52
|
+
type ServiceAccountCreateParams,
|
|
53
|
+
type ServiceAccountRetrieveParams,
|
|
54
|
+
type ServiceAccountUpdateParams,
|
|
55
|
+
type ServiceAccountListParams,
|
|
56
|
+
type ServiceAccountArchiveParams,
|
|
57
|
+
type BetaServiceAccountWorkspaceMembersPageCursor,
|
|
58
|
+
type BetaServiceAccountsPageCursor,
|
|
59
|
+
} from './service-accounts/index';
|
|
60
|
+
export {
|
|
61
|
+
Users,
|
|
62
|
+
type BetaOrganizationUser,
|
|
63
|
+
type UserRemoveResponse,
|
|
64
|
+
type UserUpdateParams,
|
|
65
|
+
type UserListParams,
|
|
66
|
+
type BetaOrganizationUsersPage,
|
|
67
|
+
} from './users';
|
|
68
|
+
export {
|
|
69
|
+
Workspaces,
|
|
70
|
+
type BetaAllowedInferenceGeo,
|
|
71
|
+
type BetaDataResidency,
|
|
72
|
+
type BetaDataResidencyCreateConfig,
|
|
73
|
+
type BetaDataResidencyUpdateConfig,
|
|
74
|
+
type BetaNoBillingWorkspaceRole,
|
|
75
|
+
type BetaWorkspace,
|
|
76
|
+
type BetaWorkspaceMember,
|
|
77
|
+
type BetaWorkspaceRole,
|
|
78
|
+
type WorkspaceCreateParams,
|
|
79
|
+
type WorkspaceUpdateParams,
|
|
80
|
+
type WorkspaceListParams,
|
|
81
|
+
type BetaWorkspaceMembersPage,
|
|
82
|
+
type BetaWorkspacesPage,
|
|
83
|
+
} from './workspaces/index';
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as OrganizationAPI from './organization';
|
|
5
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
6
|
+
import { Page, type PageParams, PagePromise } from '../../../core/pagination';
|
|
7
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
8
|
+
import { path } from '../../../internal/utils/path';
|
|
9
|
+
|
|
10
|
+
export class Invites extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Invite a user to join the organization by email.
|
|
13
|
+
*
|
|
14
|
+
* On plans that draw members from a finite pool of purchased seats, the invite
|
|
15
|
+
* automatically consumes a seat from the lowest tier with availability; there is
|
|
16
|
+
* no seat-tier parameter. When no seat is free the request fails with a 400 error
|
|
17
|
+
* rather than purchasing a seat.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const betaOrganizationInvite =
|
|
22
|
+
* await client.beta.organization.invites.create({
|
|
23
|
+
* email: 'user@emaildomain.com',
|
|
24
|
+
* role: 'user',
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
create(body: InviteCreateParams, options?: RequestOptions): APIPromise<BetaOrganizationInvite> {
|
|
29
|
+
return this._client.post('/v1/organizations/invites?beta=true', { body, ...options });
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Retrieve an invite by ID.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const betaOrganizationInvite =
|
|
38
|
+
* await client.beta.organization.invites.retrieve(
|
|
39
|
+
* 'invite_id',
|
|
40
|
+
* );
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
retrieve(inviteID: string, options?: RequestOptions): APIPromise<BetaOrganizationInvite> {
|
|
44
|
+
return this._client.get(path`/v1/organizations/invites/${inviteID}?beta=true`, options);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* List the organization's invites.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* // Automatically fetches more pages as needed.
|
|
53
|
+
* for await (const betaOrganizationInvite of client.beta.organization.invites.list()) {
|
|
54
|
+
* // ...
|
|
55
|
+
* }
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
list(
|
|
59
|
+
query: InviteListParams | null | undefined = {},
|
|
60
|
+
options?: RequestOptions,
|
|
61
|
+
): PagePromise<BetaOrganizationInvitesPage, BetaOrganizationInvite> {
|
|
62
|
+
return this._client.getAPIList('/v1/organizations/invites?beta=true', Page<BetaOrganizationInvite>, {
|
|
63
|
+
query,
|
|
64
|
+
...options,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Delete a pending invite.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* const invite =
|
|
74
|
+
* await client.beta.organization.invites.delete(
|
|
75
|
+
* 'invite_id',
|
|
76
|
+
* );
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
delete(inviteID: string, options?: RequestOptions): APIPromise<InviteDeleteResponse> {
|
|
80
|
+
return this._client.delete(path`/v1/organizations/invites/${inviteID}?beta=true`, options);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export type BetaOrganizationInvitesPage = Page<BetaOrganizationInvite>;
|
|
85
|
+
|
|
86
|
+
export interface BetaOrganizationInvite {
|
|
87
|
+
/**
|
|
88
|
+
* ID of the Invite.
|
|
89
|
+
*/
|
|
90
|
+
id: string;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* RFC 3339 datetime string indicating when the Invite was accepted, or null.
|
|
94
|
+
*/
|
|
95
|
+
accepted_at: string | null;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Email of the User being invited.
|
|
99
|
+
*/
|
|
100
|
+
email: string;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* RFC 3339 datetime string indicating when the Invite expires.
|
|
104
|
+
*/
|
|
105
|
+
expires_at: string;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* RFC 3339 datetime string indicating when the Invite was created.
|
|
109
|
+
*/
|
|
110
|
+
invited_at: string;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* RBAC group IDs recorded on the Invite (Claude Enterprise organizations), to be
|
|
114
|
+
* assigned to the User when the Invite is accepted. `[]` when none.
|
|
115
|
+
*/
|
|
116
|
+
rbac_group_ids: Array<string>;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Organization role of the User.
|
|
120
|
+
*/
|
|
121
|
+
role: OrganizationAPI.BetaOrganizationRole;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Status of the Invite.
|
|
125
|
+
*/
|
|
126
|
+
status: 'accepted' | 'deleted' | 'expired' | 'pending';
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Object type.
|
|
130
|
+
*
|
|
131
|
+
* For Invites, this is always `"invite"`.
|
|
132
|
+
*/
|
|
133
|
+
type: 'invite';
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export interface InviteDeleteResponse {
|
|
137
|
+
/**
|
|
138
|
+
* ID of the Invite.
|
|
139
|
+
*/
|
|
140
|
+
id: string;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Deleted object type.
|
|
144
|
+
*
|
|
145
|
+
* For Invites, this is always `"invite_deleted"`.
|
|
146
|
+
*/
|
|
147
|
+
type: 'invite_deleted';
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface InviteCreateParams {
|
|
151
|
+
/**
|
|
152
|
+
* Email of the User.
|
|
153
|
+
*/
|
|
154
|
+
email: string;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Role for the invited User.
|
|
158
|
+
*
|
|
159
|
+
* The accepted values depend on the organization type. Console and API
|
|
160
|
+
* organizations accept `user`, `developer`, `billing`, and `claude_code_user`;
|
|
161
|
+
* `admin` cannot be assigned through the API. Claude Enterprise organizations
|
|
162
|
+
* accept `user` and `managed`.
|
|
163
|
+
*/
|
|
164
|
+
role: 'billing' | 'claude_code_user' | 'developer' | 'managed' | 'user';
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* RBAC group IDs to assign to the User when the Invite is accepted. A non-empty
|
|
168
|
+
* array is accepted only for a Claude Enterprise organization with RBAC groups,
|
|
169
|
+
* and requires the key to carry the `write:rbac_groups` scope.
|
|
170
|
+
*/
|
|
171
|
+
rbac_group_ids?: Array<string>;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export interface InviteListParams extends PageParams {
|
|
175
|
+
/**
|
|
176
|
+
* Filter by the email address the Invite was sent to. Matches the same way as the
|
|
177
|
+
* Users list's `email` filter (normalized, case-insensitive).
|
|
178
|
+
*/
|
|
179
|
+
email?: string;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Filter to items whose `role` equals one of the supplied values. Repeatable;
|
|
183
|
+
* values are OR'ed together.
|
|
184
|
+
*
|
|
185
|
+
* Accepted values depend on the organization type: Console and API organizations
|
|
186
|
+
* accept `user`, `developer`, `billing`, `admin`, and `claude_code_user`; Claude
|
|
187
|
+
* Enterprise organizations accept `user`, `owner`, `primary_owner`,
|
|
188
|
+
* `membership_admin`, and `managed`.
|
|
189
|
+
*/
|
|
190
|
+
roles?: Array<string>;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Filter by Invite status. Repeatable; values are OR'ed together. Omit to return
|
|
194
|
+
* `pending`, `accepted`, and `expired` Invites alike.
|
|
195
|
+
*/
|
|
196
|
+
statuses?: Array<'accepted' | 'expired' | 'pending'>;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export declare namespace Invites {
|
|
200
|
+
export {
|
|
201
|
+
type BetaOrganizationInvite as BetaOrganizationInvite,
|
|
202
|
+
type InviteDeleteResponse as InviteDeleteResponse,
|
|
203
|
+
type BetaOrganizationInvitesPage as BetaOrganizationInvitesPage,
|
|
204
|
+
type InviteCreateParams as InviteCreateParams,
|
|
205
|
+
type InviteListParams as InviteListParams,
|
|
206
|
+
};
|
|
207
|
+
}
|