@anthropic-ai/sdk 0.120.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 +33 -0
- 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/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/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/beta.d.mts +5 -1
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +5 -1
- 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/index.d.mts +1 -0
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +1 -0
- 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 +50 -8
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +50 -8
- 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/src/helpers/beta/standard-schema.ts +99 -0
- package/src/internal/detect-platform.ts +1 -1
- 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/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/beta.ts +18 -1
- package/src/resources/beta/environments/environments.ts +8 -1
- package/src/resources/beta/index.ts +1 -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 +50 -8
- 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/tools/agent-toolset/node.browser.ts +1 -1
- package/src/tools/agent-toolset/node.ts +4 -4
- package/src/version.ts +1 -1
- package/tools/agent-toolset/node.browser.d.mts +1 -1
- package/tools/agent-toolset/node.browser.d.mts.map +1 -1
- package/tools/agent-toolset/node.browser.d.ts +1 -1
- package/tools/agent-toolset/node.browser.d.ts.map +1 -1
- package/tools/agent-toolset/node.browser.js.map +1 -1
- package/tools/agent-toolset/node.browser.mjs.map +1 -1
- package/tools/agent-toolset/node.d.mts +2 -2
- package/tools/agent-toolset/node.d.mts.map +1 -1
- package/tools/agent-toolset/node.d.ts +2 -2
- package/tools/agent-toolset/node.d.ts.map +1 -1
- package/tools/agent-toolset/node.js.map +1 -1
- package/tools/agent-toolset/node.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
3
|
+
import { Page, type PageParams, PagePromise } from "../../../core/pagination.js";
|
|
4
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
5
|
+
export declare class APIKeys extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Get API Key
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const betaAPIKey =
|
|
12
|
+
* await client.beta.organization.apiKeys.retrieve(
|
|
13
|
+
* 'api_key_id',
|
|
14
|
+
* );
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
retrieve(apiKeyID: string, options?: RequestOptions): APIPromise<BetaAPIKey>;
|
|
18
|
+
/**
|
|
19
|
+
* Update API Key
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const betaAPIKey =
|
|
24
|
+
* await client.beta.organization.apiKeys.update(
|
|
25
|
+
* 'api_key_id',
|
|
26
|
+
* );
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
update(apiKeyID: string, body: APIKeyUpdateParams, options?: RequestOptions): APIPromise<BetaAPIKey>;
|
|
30
|
+
/**
|
|
31
|
+
* List API Keys
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* // Automatically fetches more pages as needed.
|
|
36
|
+
* for await (const betaAPIKey of client.beta.organization.apiKeys.list()) {
|
|
37
|
+
* // ...
|
|
38
|
+
* }
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
list(query?: APIKeyListParams | null | undefined, options?: RequestOptions): PagePromise<BetaAPIKeysPage, BetaAPIKey>;
|
|
42
|
+
}
|
|
43
|
+
export type BetaAPIKeysPage = Page<BetaAPIKey>;
|
|
44
|
+
export interface BetaAPIKey {
|
|
45
|
+
/**
|
|
46
|
+
* ID of the API key.
|
|
47
|
+
*/
|
|
48
|
+
id: string;
|
|
49
|
+
/**
|
|
50
|
+
* RFC 3339 datetime string indicating when the API Key was created.
|
|
51
|
+
*/
|
|
52
|
+
created_at: string;
|
|
53
|
+
/**
|
|
54
|
+
* The ID and type of the actor that created the API key, or `null` when the
|
|
55
|
+
* creator is not recorded (legacy, workload-identity-federated, or system-created
|
|
56
|
+
* keys).
|
|
57
|
+
*/
|
|
58
|
+
created_by: BetaAPIKeyCreatedBy | null;
|
|
59
|
+
/**
|
|
60
|
+
* RFC 3339 datetime string indicating when the API Key expires, or `null` if it
|
|
61
|
+
* never expires.
|
|
62
|
+
*/
|
|
63
|
+
expires_at: string | null;
|
|
64
|
+
/**
|
|
65
|
+
* Name of the API key.
|
|
66
|
+
*/
|
|
67
|
+
name: string;
|
|
68
|
+
/**
|
|
69
|
+
* Partially redacted hint for the API key.
|
|
70
|
+
*/
|
|
71
|
+
partial_key_hint: string | null;
|
|
72
|
+
/**
|
|
73
|
+
* The principal the API key acts as (a User or a Service Account), or `null` if
|
|
74
|
+
* the API key is not bound to a principal.
|
|
75
|
+
*/
|
|
76
|
+
principal: BetaAPIKeyUserActor | BetaAPIKeyServiceAccountActor | null;
|
|
77
|
+
/**
|
|
78
|
+
* Where the API key belongs: its Workspace
|
|
79
|
+
* (`{"type": "workspace", "workspace_id": "wrkspc_..."}`, with the Workspace's
|
|
80
|
+
* real ID even when it is the organization's default Workspace), or the
|
|
81
|
+
* organization (`{"type": "organization"}`) for a principal-bound API key that has
|
|
82
|
+
* no Workspace.
|
|
83
|
+
*/
|
|
84
|
+
scope: BetaAPIKeyOrganizationScope | BetaAPIKeyWorkspaceScope;
|
|
85
|
+
/**
|
|
86
|
+
* Status of the API key.
|
|
87
|
+
*/
|
|
88
|
+
status: 'active' | 'archived' | 'expired' | 'inactive';
|
|
89
|
+
/**
|
|
90
|
+
* Object type.
|
|
91
|
+
*
|
|
92
|
+
* For API Keys, this is always `"api_key"`.
|
|
93
|
+
*/
|
|
94
|
+
type: 'api_key';
|
|
95
|
+
/**
|
|
96
|
+
* @deprecated Use `scope` instead. `workspace_id` is `null` both for an API key in
|
|
97
|
+
* the default Workspace and for a principal-bound API key that has no Workspace.
|
|
98
|
+
*/
|
|
99
|
+
workspace_id: string | null;
|
|
100
|
+
}
|
|
101
|
+
export interface BetaAPIKeyCreatedBy {
|
|
102
|
+
/**
|
|
103
|
+
* ID of the actor that created the object.
|
|
104
|
+
*/
|
|
105
|
+
id: string;
|
|
106
|
+
/**
|
|
107
|
+
* Type of the actor that created the object.
|
|
108
|
+
*/
|
|
109
|
+
type: 'service_account' | 'user';
|
|
110
|
+
}
|
|
111
|
+
export interface BetaAPIKeyOrganizationScope {
|
|
112
|
+
/**
|
|
113
|
+
* Scope type. Always `"organization"`: the API key has no Workspace. Only a
|
|
114
|
+
* principal-bound API key can have this scope.
|
|
115
|
+
*/
|
|
116
|
+
type: 'organization';
|
|
117
|
+
}
|
|
118
|
+
export interface BetaAPIKeyServiceAccountActor {
|
|
119
|
+
/**
|
|
120
|
+
* ID of the Service Account the API key acts as.
|
|
121
|
+
*/
|
|
122
|
+
service_account_id: string;
|
|
123
|
+
/**
|
|
124
|
+
* Principal type. Always `"service_account_actor"` for a Service Account.
|
|
125
|
+
*/
|
|
126
|
+
type: 'service_account_actor';
|
|
127
|
+
}
|
|
128
|
+
export interface BetaAPIKeyUserActor {
|
|
129
|
+
/**
|
|
130
|
+
* Principal type. Always `"user_actor"` for a User.
|
|
131
|
+
*/
|
|
132
|
+
type: 'user_actor';
|
|
133
|
+
/**
|
|
134
|
+
* ID of the User the API key acts as.
|
|
135
|
+
*/
|
|
136
|
+
user_id: string;
|
|
137
|
+
}
|
|
138
|
+
export interface BetaAPIKeyWorkspaceScope {
|
|
139
|
+
/**
|
|
140
|
+
* Scope type. Always `"workspace"`: the API key belongs to one Workspace.
|
|
141
|
+
*/
|
|
142
|
+
type: 'workspace';
|
|
143
|
+
/**
|
|
144
|
+
* ID of the Workspace the API key belongs to. Unlike the deprecated top-level
|
|
145
|
+
* `workspace_id`, this is the Workspace's real ID even for the organization's
|
|
146
|
+
* default Workspace.
|
|
147
|
+
*/
|
|
148
|
+
workspace_id: string;
|
|
149
|
+
}
|
|
150
|
+
export interface APIKeyUpdateParams {
|
|
151
|
+
/**
|
|
152
|
+
* Name of the API key.
|
|
153
|
+
*/
|
|
154
|
+
name?: string | null;
|
|
155
|
+
/**
|
|
156
|
+
* Status of the API key.
|
|
157
|
+
*/
|
|
158
|
+
status?: 'active' | 'archived' | 'inactive' | null;
|
|
159
|
+
}
|
|
160
|
+
export interface APIKeyListParams extends PageParams {
|
|
161
|
+
/**
|
|
162
|
+
* Filter by the ID of the User who created the object.
|
|
163
|
+
*/
|
|
164
|
+
created_by_user_id?: string | null;
|
|
165
|
+
/**
|
|
166
|
+
* Filter by API key status.
|
|
167
|
+
*/
|
|
168
|
+
status?: 'active' | 'archived' | 'expired' | 'inactive' | null;
|
|
169
|
+
/**
|
|
170
|
+
* Filter by Workspace ID.
|
|
171
|
+
*/
|
|
172
|
+
workspace_id?: string | null;
|
|
173
|
+
}
|
|
174
|
+
export declare namespace APIKeys {
|
|
175
|
+
export { type BetaAPIKey as BetaAPIKey, type BetaAPIKeyCreatedBy as BetaAPIKeyCreatedBy, type BetaAPIKeyOrganizationScope as BetaAPIKeyOrganizationScope, type BetaAPIKeyServiceAccountActor as BetaAPIKeyServiceAccountActor, type BetaAPIKeyUserActor as BetaAPIKeyUserActor, type BetaAPIKeyWorkspaceScope as BetaAPIKeyWorkspaceScope, type BetaAPIKeysPage as BetaAPIKeysPage, type APIKeyUpdateParams as APIKeyUpdateParams, type APIKeyListParams as APIKeyListParams, };
|
|
176
|
+
}
|
|
177
|
+
//# sourceMappingURL=api-keys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-keys.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/organization/api-keys.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,qCAAkC;AACvD,OAAO,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,WAAW,EAAE,oCAAiC;AAC9E,OAAO,EAAE,cAAc,EAAE,6CAA0C;AAGnE,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC;IAI5E;;;;;;;;;;OAUG;IACH,MAAM,CAAC,QAAQ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TING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.APIKeys = void 0;
|
|
5
|
+
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../../../core/pagination.js");
|
|
7
|
+
const path_1 = require("../../../internal/utils/path.js");
|
|
8
|
+
class APIKeys extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Get API Key
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const betaAPIKey =
|
|
15
|
+
* await client.beta.organization.apiKeys.retrieve(
|
|
16
|
+
* 'api_key_id',
|
|
17
|
+
* );
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
retrieve(apiKeyID, options) {
|
|
21
|
+
return this._client.get((0, path_1.path) `/v1/organizations/api_keys/${apiKeyID}?beta=true`, options);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Update API Key
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const betaAPIKey =
|
|
29
|
+
* await client.beta.organization.apiKeys.update(
|
|
30
|
+
* 'api_key_id',
|
|
31
|
+
* );
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
update(apiKeyID, body, options) {
|
|
35
|
+
return this._client.post((0, path_1.path) `/v1/organizations/api_keys/${apiKeyID}?beta=true`, { body, ...options });
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* List API Keys
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* // Automatically fetches more pages as needed.
|
|
43
|
+
* for await (const betaAPIKey of client.beta.organization.apiKeys.list()) {
|
|
44
|
+
* // ...
|
|
45
|
+
* }
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
list(query = {}, options) {
|
|
49
|
+
return this._client.getAPIList('/v1/organizations/api_keys?beta=true', (pagination_1.Page), {
|
|
50
|
+
query,
|
|
51
|
+
...options,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.APIKeys = APIKeys;
|
|
56
|
+
//# sourceMappingURL=api-keys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-keys.js","sourceRoot":"","sources":["../../../src/resources/beta/organization/api-keys.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,4DAA8E;AAE9E,0DAAoD;AAEpD,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,QAAgB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,8BAA8B,QAAQ,YAAY,EAAE,OAAO,CAAC,CAAC;IAC3F,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,QAAgB,EAAE,IAAwB,EAAE,OAAwB;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,8BAA8B,QAAQ,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzG,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,sCAAsC,EAAE,CAAA,iBAAgB,CAAA,EAAE;YACvF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAnDD,0BAmDC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import { Page } from "../../../core/pagination.mjs";
|
|
4
|
+
import { path } from "../../../internal/utils/path.mjs";
|
|
5
|
+
export class APIKeys extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Get API Key
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const betaAPIKey =
|
|
12
|
+
* await client.beta.organization.apiKeys.retrieve(
|
|
13
|
+
* 'api_key_id',
|
|
14
|
+
* );
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
retrieve(apiKeyID, options) {
|
|
18
|
+
return this._client.get(path `/v1/organizations/api_keys/${apiKeyID}?beta=true`, options);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Update API Key
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const betaAPIKey =
|
|
26
|
+
* await client.beta.organization.apiKeys.update(
|
|
27
|
+
* 'api_key_id',
|
|
28
|
+
* );
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
update(apiKeyID, body, options) {
|
|
32
|
+
return this._client.post(path `/v1/organizations/api_keys/${apiKeyID}?beta=true`, { body, ...options });
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* List API Keys
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* // Automatically fetches more pages as needed.
|
|
40
|
+
* for await (const betaAPIKey of client.beta.organization.apiKeys.list()) {
|
|
41
|
+
* // ...
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
list(query = {}, options) {
|
|
46
|
+
return this._client.getAPIList('/v1/organizations/api_keys?beta=true', (Page), {
|
|
47
|
+
query,
|
|
48
|
+
...options,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=api-keys.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-keys.mjs","sourceRoot":"","sources":["../../../src/resources/beta/organization/api-keys.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAErD,OAAO,EAAE,IAAI,EAAgC,qCAAiC;AAE9E,OAAO,EAAE,IAAI,EAAE,yCAAqC;AAEpD,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,QAAgB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,8BAA8B,QAAQ,YAAY,EAAE,OAAO,CAAC,CAAC;IAC3F,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,QAAgB,EAAE,IAAwB,EAAE,OAAwB;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,8BAA8B,QAAQ,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzG,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,sCAAsC,EAAE,CAAA,IAAgB,CAAA,EAAE;YACvF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
3
|
+
import { PageCursor, type PageCursorParams, PagePromise } from "../../../core/pagination.mjs";
|
|
4
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
5
|
+
export declare class ExternalKeys extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Create an external key config owned by the caller's organization.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const betaExternalKey =
|
|
12
|
+
* await client.beta.organization.externalKeys.create({
|
|
13
|
+
* provider_config: {
|
|
14
|
+
* kms_arn:
|
|
15
|
+
* 'arn:aws:kms:us-east-1:111122223333:key/abcd1234-5678-90ab-cdef-000011112222',
|
|
16
|
+
* type: 'aws',
|
|
17
|
+
* },
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
create(body: ExternalKeyCreateParams, options?: RequestOptions): APIPromise<BetaExternalKey>;
|
|
22
|
+
/**
|
|
23
|
+
* Retrieve a single external key config in the caller's organization by ID.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const betaExternalKey =
|
|
28
|
+
* await client.beta.organization.externalKeys.retrieve(
|
|
29
|
+
* 'external_key_id',
|
|
30
|
+
* );
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
retrieve(externalKeyID: string, options?: RequestOptions): APIPromise<BetaExternalKey>;
|
|
34
|
+
/**
|
|
35
|
+
* Partially update an external key config. Omitted fields are left unchanged.
|
|
36
|
+
*
|
|
37
|
+
* `display_name` is always editable. `geo` and `provider_config` cannot be changed
|
|
38
|
+
* once any workspace references this config, because previously encrypted data
|
|
39
|
+
* requires the original key identity to decrypt.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const betaExternalKey =
|
|
44
|
+
* await client.beta.organization.externalKeys.update(
|
|
45
|
+
* 'external_key_id',
|
|
46
|
+
* );
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
update(externalKeyID: string, body: ExternalKeyUpdateParams, options?: RequestOptions): APIPromise<BetaExternalKey>;
|
|
50
|
+
/**
|
|
51
|
+
* List external key configs in the caller's organization.
|
|
52
|
+
*
|
|
53
|
+
* Results are ordered by creation time (newest first). Use the `next_page` cursor
|
|
54
|
+
* from the response to fetch subsequent pages.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* // Automatically fetches more pages as needed.
|
|
59
|
+
* for await (const betaExternalKey of client.beta.organization.externalKeys.list()) {
|
|
60
|
+
* // ...
|
|
61
|
+
* }
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
list(query?: ExternalKeyListParams | null | undefined, options?: RequestOptions): PagePromise<BetaExternalKeysPageCursor, BetaExternalKey>;
|
|
65
|
+
/**
|
|
66
|
+
* Delete an external key config.
|
|
67
|
+
*
|
|
68
|
+
* The request is rejected if any workspace still references this config.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* const externalKey =
|
|
73
|
+
* await client.beta.organization.externalKeys.delete(
|
|
74
|
+
* 'external_key_id',
|
|
75
|
+
* );
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
delete(externalKeyID: string, options?: RequestOptions): APIPromise<ExternalKeyDeleteResponse>;
|
|
79
|
+
/**
|
|
80
|
+
* Validate an external key config against the customer's KMS.
|
|
81
|
+
*
|
|
82
|
+
* Anthropic performs an encrypt/decrypt roundtrip against the configured KMS key
|
|
83
|
+
* and waits up to 30 seconds for the result. The response status is `success` if
|
|
84
|
+
* the roundtrip succeeded, or `failure` with an error message if it failed or
|
|
85
|
+
* timed out.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```ts
|
|
89
|
+
* const response =
|
|
90
|
+
* await client.beta.organization.externalKeys.validate(
|
|
91
|
+
* 'external_key_id',
|
|
92
|
+
* );
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
validate(externalKeyID: string, options?: RequestOptions): APIPromise<ExternalKeyValidateResponse>;
|
|
96
|
+
}
|
|
97
|
+
export type BetaExternalKeysPageCursor = PageCursor<BetaExternalKey>;
|
|
98
|
+
export interface BetaAWSExternalKeyConfig {
|
|
99
|
+
/**
|
|
100
|
+
* Full ARN of the AWS KMS key.
|
|
101
|
+
*/
|
|
102
|
+
kms_arn: string;
|
|
103
|
+
type: 'aws';
|
|
104
|
+
/**
|
|
105
|
+
* AWS region. Derived from `kms_arn` if omitted.
|
|
106
|
+
*/
|
|
107
|
+
region?: string | null;
|
|
108
|
+
/**
|
|
109
|
+
* @deprecated IAM role ARN. Deprecated — Anthropic reaches the KMS key via a
|
|
110
|
+
* managed intermediate role; this field is ignored.
|
|
111
|
+
*/
|
|
112
|
+
role_arn?: string | null;
|
|
113
|
+
}
|
|
114
|
+
export interface BetaAzureExternalKeyConfig {
|
|
115
|
+
/**
|
|
116
|
+
* Name of the key within the vault.
|
|
117
|
+
*/
|
|
118
|
+
key_name: string;
|
|
119
|
+
/**
|
|
120
|
+
* Azure AD tenant ID.
|
|
121
|
+
*/
|
|
122
|
+
tenant_id: string;
|
|
123
|
+
type: 'azure';
|
|
124
|
+
/**
|
|
125
|
+
* Key Vault data-plane URI — `https://{vault-name}.vault.azure.net` or
|
|
126
|
+
* `https://{hsm-name}.managedhsm.azure.net`.
|
|
127
|
+
*/
|
|
128
|
+
vault_uri: string;
|
|
129
|
+
/**
|
|
130
|
+
* Azure AD application (client) ID. Omit to use Anthropic's multitenant app.
|
|
131
|
+
* Provide only if using a single-tenant app registration in the customer's
|
|
132
|
+
* directory.
|
|
133
|
+
*/
|
|
134
|
+
client_id?: string | null;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Azure Key Vault provider configuration.
|
|
138
|
+
*/
|
|
139
|
+
export interface BetaAzureExternalKeyConfigParam {
|
|
140
|
+
/**
|
|
141
|
+
* Name of the key within the vault.
|
|
142
|
+
*/
|
|
143
|
+
key_name: string;
|
|
144
|
+
/**
|
|
145
|
+
* Azure AD tenant ID.
|
|
146
|
+
*/
|
|
147
|
+
tenant_id: string;
|
|
148
|
+
type: 'azure';
|
|
149
|
+
/**
|
|
150
|
+
* Key Vault data-plane URI — `https://{vault-name}.vault.azure.net` or
|
|
151
|
+
* `https://{hsm-name}.managedhsm.azure.net`.
|
|
152
|
+
*/
|
|
153
|
+
vault_uri: string;
|
|
154
|
+
/**
|
|
155
|
+
* Azure AD application (client) ID. Omit to use Anthropic's multitenant app.
|
|
156
|
+
* Provide only if using a single-tenant app registration in the customer's
|
|
157
|
+
* directory.
|
|
158
|
+
*/
|
|
159
|
+
client_id?: string | null;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* CMEK external key config belonging to the caller's organization.
|
|
163
|
+
*
|
|
164
|
+
* Configs are organization-scoped. Workspaces attach to a config; once any
|
|
165
|
+
* workspace references it, the provider fields become effectively immutable
|
|
166
|
+
* (existing encrypted data needs the config for decrypt).
|
|
167
|
+
*/
|
|
168
|
+
export interface BetaExternalKey {
|
|
169
|
+
/**
|
|
170
|
+
* Identifier of the external key config. A tagged ID prefixed `ekey_`, or — for
|
|
171
|
+
* organizations on the Claude Platform on AWS — the AWS KMS key ARN.
|
|
172
|
+
*/
|
|
173
|
+
id: string;
|
|
174
|
+
/**
|
|
175
|
+
* Whether any workspace uses this config to encrypt its data — counting live and
|
|
176
|
+
* archived workspaces (an archived workspace's data remains encrypted under the
|
|
177
|
+
* config), excluding deleted ones. Only an attached config is used by the
|
|
178
|
+
* encryption path; an `unattached` config is inert and can be deleted.
|
|
179
|
+
*/
|
|
180
|
+
attachment: BetaExternalKeyAttachedAttachment | BetaExternalKeyUnattachedAttachment;
|
|
181
|
+
created_at: string;
|
|
182
|
+
/**
|
|
183
|
+
* Human-friendly display name. Null if none was set.
|
|
184
|
+
*/
|
|
185
|
+
display_name: string | null;
|
|
186
|
+
/**
|
|
187
|
+
* Data residency geo. Selects which regional validator handles this key's
|
|
188
|
+
* encrypt/decrypt roundtrips.
|
|
189
|
+
*/
|
|
190
|
+
geo: string;
|
|
191
|
+
/**
|
|
192
|
+
* KMS provider identity and auth coordinates.
|
|
193
|
+
*/
|
|
194
|
+
provider_config: BetaAWSExternalKeyConfig | BetaGCPExternalKeyConfig | BetaAzureExternalKeyConfig;
|
|
195
|
+
type: 'external_key';
|
|
196
|
+
updated_at: string;
|
|
197
|
+
}
|
|
198
|
+
export interface BetaExternalKeyAttachedAttachment {
|
|
199
|
+
type: 'attached';
|
|
200
|
+
}
|
|
201
|
+
export interface BetaExternalKeyUnattachedAttachment {
|
|
202
|
+
type: 'unattached';
|
|
203
|
+
}
|
|
204
|
+
export interface BetaGCPExternalKeyConfig {
|
|
205
|
+
/**
|
|
206
|
+
* Full resource name of the Cloud KMS key.
|
|
207
|
+
*/
|
|
208
|
+
key_name: string;
|
|
209
|
+
type: 'gcp';
|
|
210
|
+
}
|
|
211
|
+
export interface ExternalKeyDeleteResponse {
|
|
212
|
+
/**
|
|
213
|
+
* ID of the deleted External Key.
|
|
214
|
+
*/
|
|
215
|
+
id: string;
|
|
216
|
+
type: 'external_key_deleted';
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Result of a validation roundtrip against the customer's KMS.
|
|
220
|
+
*
|
|
221
|
+
* HTTP 200 for both outcomes — the operation completed; `status` says whether the
|
|
222
|
+
* key works.
|
|
223
|
+
*/
|
|
224
|
+
export interface ExternalKeyValidateResponse {
|
|
225
|
+
/**
|
|
226
|
+
* Error message when status is `failure`. Null otherwise.
|
|
227
|
+
*/
|
|
228
|
+
error: string | null;
|
|
229
|
+
/**
|
|
230
|
+
* `success` — encrypt/decrypt roundtrip succeeded. `failure` — the roundtrip
|
|
231
|
+
* failed or timed out; see `error`.
|
|
232
|
+
*/
|
|
233
|
+
status: 'failure' | 'success';
|
|
234
|
+
type: 'external_key_validation';
|
|
235
|
+
}
|
|
236
|
+
export interface ExternalKeyCreateParams {
|
|
237
|
+
/**
|
|
238
|
+
* KMS provider identity and auth coordinates.
|
|
239
|
+
*/
|
|
240
|
+
provider_config: BetaAWSExternalKeyConfig | BetaGCPExternalKeyConfig | BetaAzureExternalKeyConfigParam;
|
|
241
|
+
/**
|
|
242
|
+
* Human-friendly display name.
|
|
243
|
+
*/
|
|
244
|
+
display_name?: string | null;
|
|
245
|
+
/**
|
|
246
|
+
* Data residency geo. Only `us` is supported.
|
|
247
|
+
*/
|
|
248
|
+
geo?: 'us';
|
|
249
|
+
}
|
|
250
|
+
export interface ExternalKeyUpdateParams {
|
|
251
|
+
/**
|
|
252
|
+
* Human-friendly display name.
|
|
253
|
+
*/
|
|
254
|
+
display_name?: string | null;
|
|
255
|
+
/**
|
|
256
|
+
* Data residency geo. Only `us` is supported.
|
|
257
|
+
*/
|
|
258
|
+
geo?: 'us' | null;
|
|
259
|
+
/**
|
|
260
|
+
* KMS provider identity and auth coordinates.
|
|
261
|
+
*/
|
|
262
|
+
provider_config?: BetaAWSExternalKeyConfig | BetaGCPExternalKeyConfig | BetaAzureExternalKeyConfigParam | null;
|
|
263
|
+
}
|
|
264
|
+
export interface ExternalKeyListParams extends PageCursorParams {
|
|
265
|
+
}
|
|
266
|
+
export declare namespace ExternalKeys {
|
|
267
|
+
export { type BetaAWSExternalKeyConfig as BetaAWSExternalKeyConfig, type BetaAzureExternalKeyConfig as BetaAzureExternalKeyConfig, type BetaAzureExternalKeyConfigParam as BetaAzureExternalKeyConfigParam, type BetaExternalKey as BetaExternalKey, type BetaExternalKeyAttachedAttachment as BetaExternalKeyAttachedAttachment, type BetaExternalKeyUnattachedAttachment as BetaExternalKeyUnattachedAttachment, type BetaGCPExternalKeyConfig as BetaGCPExternalKeyConfig, type ExternalKeyDeleteResponse as ExternalKeyDeleteResponse, type ExternalKeyValidateResponse as ExternalKeyValidateResponse, type BetaExternalKeysPageCursor as BetaExternalKeysPageCursor, type ExternalKeyCreateParams as ExternalKeyCreateParams, type ExternalKeyUpdateParams as ExternalKeyUpdateParams, type ExternalKeyListParams as ExternalKeyListParams, };
|
|
268
|
+
}
|
|
269
|
+
//# sourceMappingURL=external-keys.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-keys.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/organization/external-keys.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,sCAAkC;AACvD,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,qCAAiC;AAC1F,OAAO,EAAE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