@anthropic-ai/sdk 0.122.0 → 0.123.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 +34 -0
- package/core/credentials.d.mts.map +1 -1
- package/core/credentials.d.ts.map +1 -1
- package/core/credentials.js +5 -7
- package/core/credentials.js.map +1 -1
- package/core/credentials.mjs +5 -7
- package/core/credentials.mjs.map +1 -1
- package/internal/file-store.d.mts.map +1 -1
- package/internal/file-store.d.ts.map +1 -1
- package/internal/file-store.js +23 -25
- package/internal/file-store.js.map +1 -1
- package/internal/file-store.mjs +5 -6
- package/internal/file-store.mjs.map +1 -1
- package/internal/node.browser.d.mts +9 -0
- package/internal/node.browser.d.mts.map +1 -0
- package/internal/node.browser.d.ts +9 -0
- package/internal/node.browser.d.ts.map +1 -0
- package/internal/node.browser.js +22 -0
- package/internal/node.browser.js.map +1 -0
- package/internal/node.browser.mjs +19 -0
- package/internal/node.browser.mjs.map +1 -0
- package/internal/node.d.mts +14 -0
- package/internal/node.d.mts.map +1 -0
- package/internal/node.d.ts +14 -0
- package/internal/node.d.ts.map +1 -0
- package/internal/node.js +24 -0
- package/internal/node.js.map +1 -0
- package/internal/node.mjs +14 -0
- package/internal/node.mjs.map +1 -0
- package/lib/BetaMessageStream.d.mts.map +1 -1
- package/lib/BetaMessageStream.d.ts.map +1 -1
- package/lib/BetaMessageStream.js +3 -0
- package/lib/BetaMessageStream.js.map +1 -1
- package/lib/BetaMessageStream.mjs +3 -0
- package/lib/BetaMessageStream.mjs.map +1 -1
- package/lib/credentials/credential-chain.js +1 -1
- package/lib/credentials/credential-chain.js.map +1 -1
- package/lib/credentials/credential-chain.mjs +1 -1
- package/lib/credentials/credential-chain.mjs.map +1 -1
- package/lib/credentials/identity-token.js +1 -1
- package/lib/credentials/identity-token.js.map +1 -1
- package/lib/credentials/identity-token.mjs +1 -1
- package/lib/credentials/identity-token.mjs.map +1 -1
- package/lib/credentials/types.d.mts.map +1 -1
- package/lib/credentials/types.d.ts.map +1 -1
- package/lib/credentials/types.js +2 -3
- package/lib/credentials/types.js.map +1 -1
- package/lib/credentials/types.mjs +2 -3
- package/lib/credentials/types.mjs.map +1 -1
- package/lib/credentials/user-oauth.js +1 -1
- package/lib/credentials/user-oauth.js.map +1 -1
- package/lib/credentials/user-oauth.mjs +1 -1
- package/lib/credentials/user-oauth.mjs.map +1 -1
- package/lib/middleware.d.mts.map +1 -1
- package/lib/middleware.d.ts.map +1 -1
- package/lib/middleware.js +30 -7
- package/lib/middleware.js.map +1 -1
- package/lib/middleware.mjs +30 -7
- package/lib/middleware.mjs.map +1 -1
- package/package.json +3 -1
- package/resources/beta/agents/agents.d.mts +1 -1
- package/resources/beta/agents/agents.d.mts.map +1 -1
- package/resources/beta/agents/agents.d.ts +1 -1
- 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/beta.d.mts +5 -5
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +5 -5
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/deployment-runs.d.mts +6 -6
- package/resources/beta/deployment-runs.d.ts +6 -6
- package/resources/beta/deployments.d.mts +3 -2
- package/resources/beta/deployments.d.mts.map +1 -1
- package/resources/beta/deployments.d.ts +3 -2
- package/resources/beta/deployments.d.ts.map +1 -1
- package/resources/beta/dreams.d.mts +28 -1
- package/resources/beta/dreams.d.mts.map +1 -1
- package/resources/beta/dreams.d.ts +28 -1
- package/resources/beta/dreams.d.ts.map +1 -1
- package/resources/beta/index.d.mts +2 -2
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +2 -2
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/memory-stores/memories.d.mts +6 -4
- package/resources/beta/memory-stores/memories.d.mts.map +1 -1
- package/resources/beta/memory-stores/memories.d.ts +6 -4
- package/resources/beta/memory-stores/memories.d.ts.map +1 -1
- package/resources/beta/messages/index.d.mts +1 -1
- package/resources/beta/messages/index.d.mts.map +1 -1
- package/resources/beta/messages/index.d.ts +1 -1
- package/resources/beta/messages/index.d.ts.map +1 -1
- package/resources/beta/messages/index.js.map +1 -1
- package/resources/beta/messages/index.mjs.map +1 -1
- package/resources/beta/messages/messages.d.mts +130 -3
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +130 -3
- 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/compliance-settings.d.mts +74 -0
- package/resources/beta/organization/compliance-settings.d.mts.map +1 -0
- package/resources/beta/organization/compliance-settings.d.ts +74 -0
- package/resources/beta/organization/compliance-settings.d.ts.map +1 -0
- package/resources/beta/organization/compliance-settings.js +52 -0
- package/resources/beta/organization/compliance-settings.js.map +1 -0
- package/resources/beta/organization/compliance-settings.mjs +48 -0
- package/resources/beta/organization/compliance-settings.mjs.map +1 -0
- package/resources/beta/organization/external-keys.d.mts +6 -3
- package/resources/beta/organization/external-keys.d.mts.map +1 -1
- package/resources/beta/organization/external-keys.d.ts +6 -3
- package/resources/beta/organization/external-keys.d.ts.map +1 -1
- package/resources/beta/organization/index.d.mts +1 -0
- package/resources/beta/organization/index.d.mts.map +1 -1
- package/resources/beta/organization/index.d.ts +1 -0
- package/resources/beta/organization/index.d.ts.map +1 -1
- package/resources/beta/organization/index.js +3 -1
- package/resources/beta/organization/index.js.map +1 -1
- package/resources/beta/organization/index.mjs +1 -0
- package/resources/beta/organization/index.mjs.map +1 -1
- package/resources/beta/organization/organization.d.mts +4 -0
- package/resources/beta/organization/organization.d.mts.map +1 -1
- package/resources/beta/organization/organization.d.ts +4 -0
- package/resources/beta/organization/organization.d.ts.map +1 -1
- package/resources/beta/organization/organization.js +4 -0
- package/resources/beta/organization/organization.js.map +1 -1
- package/resources/beta/organization/organization.mjs +4 -0
- package/resources/beta/organization/organization.mjs.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.d.mts +28 -12
- package/resources/beta/organization/workspaces/workspaces.d.mts.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.d.ts +28 -12
- package/resources/beta/organization/workspaces/workspaces.d.ts.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.js.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.mjs.map +1 -1
- package/resources/beta/sessions/events.d.mts +1 -1
- package/resources/beta/sessions/events.d.ts +1 -1
- package/resources/beta/sessions/sessions.d.mts +10 -10
- package/resources/beta/sessions/sessions.d.ts +10 -10
- package/resources/beta/user-profiles.d.mts +21 -25
- package/resources/beta/user-profiles.d.mts.map +1 -1
- package/resources/beta/user-profiles.d.ts +21 -25
- package/resources/beta/user-profiles.d.ts.map +1 -1
- package/resources/messages/messages.d.mts +1 -3
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +1 -3
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs.map +1 -1
- package/src/core/credentials.ts +5 -7
- package/src/internal/file-store.ts +11 -10
- package/src/internal/node.browser.ts +22 -0
- package/src/internal/node.ts +14 -0
- package/src/lib/BetaMessageStream.ts +4 -0
- package/src/lib/credentials/credential-chain.ts +1 -1
- package/src/lib/credentials/identity-token.ts +1 -1
- package/src/lib/credentials/types.ts +2 -3
- package/src/lib/credentials/user-oauth.ts +1 -1
- package/src/lib/middleware.ts +33 -9
- package/src/resources/beta/agents/agents.ts +1 -0
- package/src/resources/beta/beta.ts +16 -1
- package/src/resources/beta/deployment-runs.ts +6 -6
- package/src/resources/beta/deployments.ts +3 -2
- package/src/resources/beta/dreams.ts +42 -0
- package/src/resources/beta/index.ts +6 -0
- package/src/resources/beta/memory-stores/memories.ts +6 -4
- package/src/resources/beta/messages/index.ts +4 -0
- package/src/resources/beta/messages/messages.ts +149 -8
- package/src/resources/beta/organization/compliance-settings.ts +96 -0
- package/src/resources/beta/organization/external-keys.ts +6 -3
- package/src/resources/beta/organization/index.ts +9 -0
- package/src/resources/beta/organization/organization.ts +24 -0
- package/src/resources/beta/organization/workspaces/workspaces.ts +28 -12
- package/src/resources/beta/sessions/events.ts +1 -1
- package/src/resources/beta/sessions/sessions.ts +10 -10
- package/src/resources/beta/user-profiles.ts +24 -27
- package/src/resources/messages/messages.ts +2 -8
- package/src/tools/agent-toolset/fs-util.ts +6 -5
- package/src/tools/agent-toolset/memories.ts +5 -3
- package/src/tools/agent-toolset/skills.ts +5 -10
- package/src/version.ts +1 -1
- package/tools/agent-toolset/fs-util.d.mts.map +1 -1
- package/tools/agent-toolset/fs-util.d.ts.map +1 -1
- package/tools/agent-toolset/fs-util.js +13 -15
- package/tools/agent-toolset/fs-util.js.map +1 -1
- package/tools/agent-toolset/fs-util.mjs +3 -4
- package/tools/agent-toolset/fs-util.mjs.map +1 -1
- package/tools/agent-toolset/memories.d.mts.map +1 -1
- package/tools/agent-toolset/memories.d.ts.map +1 -1
- package/tools/agent-toolset/memories.js +6 -4
- package/tools/agent-toolset/memories.js.map +1 -1
- package/tools/agent-toolset/memories.mjs +5 -3
- package/tools/agent-toolset/memories.mjs.map +1 -1
- package/tools/agent-toolset/skills.d.mts.map +1 -1
- package/tools/agent-toolset/skills.d.ts.map +1 -1
- package/tools/agent-toolset/skills.js +15 -21
- package/tools/agent-toolset/skills.js.map +1 -1
- package/tools/agent-toolset/skills.mjs +4 -9
- package/tools/agent-toolset/skills.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
|
@@ -1221,10 +1221,6 @@ export interface BetaBrowserSwitchTabConfig {
|
|
|
1221
1221
|
export interface BetaBrowserToolset20260801 {
|
|
1222
1222
|
type: 'browser_toolset_20260801';
|
|
1223
1223
|
|
|
1224
|
-
allowed_callers?: Array<
|
|
1225
|
-
'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'
|
|
1226
|
-
>;
|
|
1227
|
-
|
|
1228
1224
|
/**
|
|
1229
1225
|
* Create a cache control breakpoint at this content block.
|
|
1230
1226
|
*/
|
|
@@ -2472,10 +2468,6 @@ export interface BetaComputerScrollConfig {
|
|
|
2472
2468
|
export interface BetaComputerToolset20260801 {
|
|
2473
2469
|
type: 'computer_toolset_20260801';
|
|
2474
2470
|
|
|
2475
|
-
allowed_callers?: Array<
|
|
2476
|
-
'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'
|
|
2477
|
-
>;
|
|
2478
|
-
|
|
2479
2471
|
/**
|
|
2480
2472
|
* Create a cache control breakpoint at this content block.
|
|
2481
2473
|
*/
|
|
@@ -3692,6 +3684,25 @@ export interface BetaMessage {
|
|
|
3692
3684
|
* `cache_creation_input_tokens`, and `cache_read_input_tokens`.
|
|
3693
3685
|
*/
|
|
3694
3686
|
usage: BetaUsage;
|
|
3687
|
+
|
|
3688
|
+
/**
|
|
3689
|
+
* Changes the API made to the request's input before showing it to the model: one
|
|
3690
|
+
* entry per change, in request order. Today the only entry type is
|
|
3691
|
+
* `thinking_dropped` — a `thinking`, `redacted_thinking` or `connector_text` block
|
|
3692
|
+
* from the request's `messages` that was removed from the prompt instead of being
|
|
3693
|
+
* shown to the model because it failed a binding check. More entry types may be
|
|
3694
|
+
* added over time; ignore types you do not recognize.
|
|
3695
|
+
*
|
|
3696
|
+
* Requires `anthropic-beta: thinking-binding-controls-2026-08-01`. Present on
|
|
3697
|
+
* every such response from a model that supports extended thinking, as `[]` when
|
|
3698
|
+
* nothing was changed; without the beta, blocks are removed all the same but
|
|
3699
|
+
* nothing is reported. Removed blocks contribute nothing to `usage.input_tokens`.
|
|
3700
|
+
* When streaming, the array is final in `message_start`; the final `message_delta`
|
|
3701
|
+
* event carries it only when a server-side model fallback happened mid-stream, in
|
|
3702
|
+
* which case it holds the serving model's entries and replaces the one in
|
|
3703
|
+
* `message_start`.
|
|
3704
|
+
*/
|
|
3705
|
+
input_transformations?: Array<BetaThinkingDroppedInputTransformation> | null;
|
|
3695
3706
|
}
|
|
3696
3707
|
|
|
3697
3708
|
export interface BetaMessageDeltaUsage {
|
|
@@ -3809,6 +3820,25 @@ export interface BetaMessageParam {
|
|
|
3809
3820
|
content: string | Array<BetaContentBlockParam>;
|
|
3810
3821
|
|
|
3811
3822
|
role: 'user' | 'assistant' | 'system';
|
|
3823
|
+
|
|
3824
|
+
/**
|
|
3825
|
+
* How long this system message's text stays in front of the model. `"never"` (the
|
|
3826
|
+
* default) renders it on every request that includes it. `"next_user_message"`
|
|
3827
|
+
* renders it only for the user turn it follows: once a later `role: "user"`
|
|
3828
|
+
* message exists in `messages` the message stays in the array (send it unchanged)
|
|
3829
|
+
* but is no longer shown to the model. Only permitted on `role: "system"`
|
|
3830
|
+
* messages.
|
|
3831
|
+
*/
|
|
3832
|
+
clear_at?: 'next_user_message' | 'never' | null;
|
|
3833
|
+
|
|
3834
|
+
/**
|
|
3835
|
+
* Per-message output configuration on a role:"system" input message.
|
|
3836
|
+
*
|
|
3837
|
+
* Fields here apply per-turn; `format` remains top-level only. An empty `{}` is
|
|
3838
|
+
* accepted on a message that carries content; a message with neither content nor
|
|
3839
|
+
* output_config fields is rejected.
|
|
3840
|
+
*/
|
|
3841
|
+
output_config?: BetaSystemMessageOutputConfig | null;
|
|
3812
3842
|
}
|
|
3813
3843
|
|
|
3814
3844
|
export interface BetaMessageTokensCount {
|
|
@@ -3953,6 +3983,25 @@ export interface BetaRawMessageDeltaEvent {
|
|
|
3953
3983
|
* `cache_creation_input_tokens`, and `cache_read_input_tokens`.
|
|
3954
3984
|
*/
|
|
3955
3985
|
usage: BetaMessageDeltaUsage;
|
|
3986
|
+
|
|
3987
|
+
/**
|
|
3988
|
+
* Changes the API made to the request's input before showing it to the model: one
|
|
3989
|
+
* entry per change, in request order. Today the only entry type is
|
|
3990
|
+
* `thinking_dropped` — a `thinking`, `redacted_thinking` or `connector_text` block
|
|
3991
|
+
* from the request's `messages` that was removed from the prompt instead of being
|
|
3992
|
+
* shown to the model because it failed a binding check. More entry types may be
|
|
3993
|
+
* added over time; ignore types you do not recognize.
|
|
3994
|
+
*
|
|
3995
|
+
* Requires `anthropic-beta: thinking-binding-controls-2026-08-01`. Present on
|
|
3996
|
+
* every such response from a model that supports extended thinking, as `[]` when
|
|
3997
|
+
* nothing was changed; without the beta, blocks are removed all the same but
|
|
3998
|
+
* nothing is reported. Removed blocks contribute nothing to `usage.input_tokens`.
|
|
3999
|
+
* When streaming, the array is final in `message_start`; the final `message_delta`
|
|
4000
|
+
* event carries it only when a server-side model fallback happened mid-stream, in
|
|
4001
|
+
* which case it holds the serving model's entries and replaces the one in
|
|
4002
|
+
* `message_start`.
|
|
4003
|
+
*/
|
|
4004
|
+
input_transformations?: Array<BetaThinkingDroppedInputTransformation> | null;
|
|
3956
4005
|
}
|
|
3957
4006
|
|
|
3958
4007
|
export namespace BetaRawMessageDeltaEvent {
|
|
@@ -4343,6 +4392,20 @@ export type BetaStopReason =
|
|
|
4343
4392
|
| 'refusal'
|
|
4344
4393
|
| 'model_context_window_exceeded';
|
|
4345
4394
|
|
|
4395
|
+
/**
|
|
4396
|
+
* Per-message output configuration on a role:"system" input message.
|
|
4397
|
+
*
|
|
4398
|
+
* Fields here apply per-turn; `format` remains top-level only. An empty `{}` is
|
|
4399
|
+
* accepted on a message that carries content; a message with neither content nor
|
|
4400
|
+
* output_config fields is rejected.
|
|
4401
|
+
*/
|
|
4402
|
+
export interface BetaSystemMessageOutputConfig {
|
|
4403
|
+
/**
|
|
4404
|
+
* All possible effort levels.
|
|
4405
|
+
*/
|
|
4406
|
+
effort?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | null;
|
|
4407
|
+
}
|
|
4408
|
+
|
|
4346
4409
|
export interface BetaTextBlock {
|
|
4347
4410
|
/**
|
|
4348
4411
|
* Citations supporting the text block.
|
|
@@ -4537,6 +4600,22 @@ export interface BetaThinkingBlock {
|
|
|
4537
4600
|
type: 'thinking';
|
|
4538
4601
|
}
|
|
4539
4602
|
|
|
4603
|
+
/**
|
|
4604
|
+
* Controls for block binding: what happens when a thinking block this request
|
|
4605
|
+
* sends back fails the conversation check. Every field is optional; an empty
|
|
4606
|
+
* object means every default.
|
|
4607
|
+
*/
|
|
4608
|
+
export interface BetaThinkingBlockBinding {
|
|
4609
|
+
/**
|
|
4610
|
+
* What happens when a thinking block in `messages` fails the conversation check:
|
|
4611
|
+
* it was created in a different conversation, or the messages before it have
|
|
4612
|
+
* changed since. `"error"` (the default) fails the request with a 400 error.
|
|
4613
|
+
* `"drop_block"` removes the failing blocks and the request proceeds; the model no
|
|
4614
|
+
* longer sees the dropped reasoning.
|
|
4615
|
+
*/
|
|
4616
|
+
prefix_mismatch_behavior?: BetaThinkingPrefixMismatchBehavior | null;
|
|
4617
|
+
}
|
|
4618
|
+
|
|
4540
4619
|
export interface BetaThinkingBlockParam {
|
|
4541
4620
|
/**
|
|
4542
4621
|
* The `signature` value of this thinking block, exactly as returned by the API in
|
|
@@ -4558,6 +4637,13 @@ export interface BetaThinkingBlockParam {
|
|
|
4558
4637
|
export interface BetaThinkingConfigAdaptive {
|
|
4559
4638
|
type: 'adaptive';
|
|
4560
4639
|
|
|
4640
|
+
/**
|
|
4641
|
+
* Controls for block binding: what happens when a thinking block this request
|
|
4642
|
+
* sends back fails the conversation check. Every field is optional; an empty
|
|
4643
|
+
* object means every default.
|
|
4644
|
+
*/
|
|
4645
|
+
block_binding?: BetaThinkingBlockBinding | null;
|
|
4646
|
+
|
|
4561
4647
|
/**
|
|
4562
4648
|
* Controls how thinking content appears in the response. When set to `summarized`,
|
|
4563
4649
|
* thinking is returned normally. When set to `omitted`, thinking content is
|
|
@@ -4587,6 +4673,13 @@ export interface BetaThinkingConfigEnabled {
|
|
|
4587
4673
|
|
|
4588
4674
|
type: 'enabled';
|
|
4589
4675
|
|
|
4676
|
+
/**
|
|
4677
|
+
* Controls for block binding: what happens when a thinking block this request
|
|
4678
|
+
* sends back fails the conversation check. Every field is optional; an empty
|
|
4679
|
+
* object means every default.
|
|
4680
|
+
*/
|
|
4681
|
+
block_binding?: BetaThinkingBlockBinding | null;
|
|
4682
|
+
|
|
4590
4683
|
/**
|
|
4591
4684
|
* Controls how thinking content appears in the response. When set to `summarized`,
|
|
4592
4685
|
* thinking is returned normally. When set to `omitted`, thinking content is
|
|
@@ -4635,6 +4728,50 @@ export interface BetaThinkingDelta {
|
|
|
4635
4728
|
type: 'thinking_delta';
|
|
4636
4729
|
}
|
|
4637
4730
|
|
|
4731
|
+
export interface BetaThinkingDroppedInputTransformation {
|
|
4732
|
+
/**
|
|
4733
|
+
* Where the removed block was in your request, as `messages.{i}.content.{j}`: `i`
|
|
4734
|
+
* indexes the `messages` array you sent and `j` that message's `content` array —
|
|
4735
|
+
* the same form error messages use.
|
|
4736
|
+
*/
|
|
4737
|
+
path: string;
|
|
4738
|
+
|
|
4739
|
+
/**
|
|
4740
|
+
* Which binding check removed the block: `model_binding_mismatch` — it was created
|
|
4741
|
+
* by a model whose reasoning the requested model may not read;
|
|
4742
|
+
* `prefix_binding_mismatch` — the conversation before it differs from the
|
|
4743
|
+
* conversation it was created in (the rest of that turn's consecutive thinking
|
|
4744
|
+
* blocks are removed with it, each with this reason);
|
|
4745
|
+
* `organization_binding_mismatch` — it was created under a different organization
|
|
4746
|
+
* (an Anthropic organization, AWS account or Google Cloud project) and this
|
|
4747
|
+
* organization is not one of its additional organizations;
|
|
4748
|
+
* `end_user_binding_mismatch` — it was created for a different end user, or was
|
|
4749
|
+
* removed by the consumer-organization binding. A block that would fail several
|
|
4750
|
+
* checks reports one reason, in this order of precedence:
|
|
4751
|
+
* `organization_binding_mismatch`, `end_user_binding_mismatch`,
|
|
4752
|
+
* `model_binding_mismatch`, `prefix_binding_mismatch`.
|
|
4753
|
+
*/
|
|
4754
|
+
reason:
|
|
4755
|
+
| 'model_binding_mismatch'
|
|
4756
|
+
| 'prefix_binding_mismatch'
|
|
4757
|
+
| 'organization_binding_mismatch'
|
|
4758
|
+
| 'end_user_binding_mismatch';
|
|
4759
|
+
|
|
4760
|
+
/**
|
|
4761
|
+
* Always `thinking_dropped` for this entry type.
|
|
4762
|
+
*/
|
|
4763
|
+
type: 'thinking_dropped';
|
|
4764
|
+
}
|
|
4765
|
+
|
|
4766
|
+
/**
|
|
4767
|
+
* What happens when a thinking block in `messages` fails the conversation check:
|
|
4768
|
+
* it was created in a different conversation, or the messages before it have
|
|
4769
|
+
* changed since. `"error"` (the default) fails the request with a 400 error.
|
|
4770
|
+
* `"drop_block"` removes the failing blocks and the request proceeds; the model no
|
|
4771
|
+
* longer sees the dropped reasoning.
|
|
4772
|
+
*/
|
|
4773
|
+
export type BetaThinkingPrefixMismatchBehavior = 'error' | 'drop_block';
|
|
4774
|
+
|
|
4638
4775
|
export interface BetaThinkingTurns {
|
|
4639
4776
|
type: 'thinking_turns';
|
|
4640
4777
|
|
|
@@ -7060,6 +7197,7 @@ export declare namespace Messages {
|
|
|
7060
7197
|
type BetaSignatureDelta as BetaSignatureDelta,
|
|
7061
7198
|
type BetaSkillParams as BetaSkillParams,
|
|
7062
7199
|
type BetaStopReason as BetaStopReason,
|
|
7200
|
+
type BetaSystemMessageOutputConfig as BetaSystemMessageOutputConfig,
|
|
7063
7201
|
type BetaTextBlock as BetaTextBlock,
|
|
7064
7202
|
type BetaTextBlockParam as BetaTextBlockParam,
|
|
7065
7203
|
type BetaTextCitation as BetaTextCitation,
|
|
@@ -7076,12 +7214,15 @@ export declare namespace Messages {
|
|
|
7076
7214
|
type BetaTextEditorCodeExecutionViewResultBlock as BetaTextEditorCodeExecutionViewResultBlock,
|
|
7077
7215
|
type BetaTextEditorCodeExecutionViewResultBlockParam as BetaTextEditorCodeExecutionViewResultBlockParam,
|
|
7078
7216
|
type BetaThinkingBlock as BetaThinkingBlock,
|
|
7217
|
+
type BetaThinkingBlockBinding as BetaThinkingBlockBinding,
|
|
7079
7218
|
type BetaThinkingBlockParam as BetaThinkingBlockParam,
|
|
7080
7219
|
type BetaThinkingConfigAdaptive as BetaThinkingConfigAdaptive,
|
|
7081
7220
|
type BetaThinkingConfigDisabled as BetaThinkingConfigDisabled,
|
|
7082
7221
|
type BetaThinkingConfigEnabled as BetaThinkingConfigEnabled,
|
|
7083
7222
|
type BetaThinkingConfigParam as BetaThinkingConfigParam,
|
|
7084
7223
|
type BetaThinkingDelta as BetaThinkingDelta,
|
|
7224
|
+
type BetaThinkingDroppedInputTransformation as BetaThinkingDroppedInputTransformation,
|
|
7225
|
+
type BetaThinkingPrefixMismatchBehavior as BetaThinkingPrefixMismatchBehavior,
|
|
7085
7226
|
type BetaThinkingTurns as BetaThinkingTurns,
|
|
7086
7227
|
type BetaTokenTaskBudget as BetaTokenTaskBudget,
|
|
7087
7228
|
type BetaTool as BetaTool,
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
6
|
+
|
|
7
|
+
export class ComplianceSettings extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Retrieve your organization's Compliance Settings.
|
|
10
|
+
*
|
|
11
|
+
* Compliance Settings is a singleton resource: there is exactly one per
|
|
12
|
+
* organization, addressed without an identifier. The `state` field reflects
|
|
13
|
+
* whether the Compliance API is enabled. An organization with a parent
|
|
14
|
+
* organization reads the state inherited from the parent's configuration.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const betaComplianceSettings =
|
|
19
|
+
* await client.beta.organization.complianceSettings.retrieve();
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
retrieve(options?: RequestOptions): APIPromise<BetaComplianceSettings> {
|
|
23
|
+
return this._client.get('/v1/organizations/compliance_settings?beta=true', options);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Update your organization's Compliance Settings.
|
|
28
|
+
*
|
|
29
|
+
* Setting `state` to `enabled` turns on the Compliance API and begins capturing
|
|
30
|
+
* organization activity events. Setting it to `disabled` turns both off. `state`
|
|
31
|
+
* reflects whether the Compliance API is enabled.
|
|
32
|
+
*
|
|
33
|
+
* A request that sets `state` to its current value succeeds and leaves the
|
|
34
|
+
* resource unchanged. A `disabled` request stays in effect until a later `enabled`
|
|
35
|
+
* request or the organization's next provisioning action that enables Access
|
|
36
|
+
* Transparency: enabling Access Transparency also enables the Compliance API,
|
|
37
|
+
* which serves its activity events, so such provisioning (including re-runs)
|
|
38
|
+
* re-enables the Compliance API even after a `disabled` request. Automated
|
|
39
|
+
* provisioning never disables compliance settings.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const betaComplianceSettings =
|
|
44
|
+
* await client.beta.organization.complianceSettings.update({
|
|
45
|
+
* state: { type: 'enabled' },
|
|
46
|
+
* });
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
update(body: ComplianceSettingUpdateParams, options?: RequestOptions): APIPromise<BetaComplianceSettings> {
|
|
50
|
+
return this._client.post('/v1/organizations/compliance_settings?beta=true', { body, ...options });
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface BetaComplianceSettings {
|
|
55
|
+
/**
|
|
56
|
+
* Whether the Compliance API is enabled for this organization.
|
|
57
|
+
*/
|
|
58
|
+
state: BetaComplianceSettingsStateEnabled | BetaComplianceSettingsStateDisabled;
|
|
59
|
+
|
|
60
|
+
type: 'compliance_settings';
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface BetaComplianceSettingsStateDisabled {
|
|
64
|
+
type: 'disabled';
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface BetaComplianceSettingsStateDisabledParam {
|
|
68
|
+
type: 'disabled';
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface BetaComplianceSettingsStateEnabled {
|
|
72
|
+
type: 'enabled';
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface BetaComplianceSettingsStateEnabledParam {
|
|
76
|
+
type: 'enabled';
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface ComplianceSettingUpdateParams {
|
|
80
|
+
/**
|
|
81
|
+
* Desired state. Accepts the string shorthand "enabled" or "disabled" in place of
|
|
82
|
+
* the object form; the response always returns the canonical object form.
|
|
83
|
+
*/
|
|
84
|
+
state: BetaComplianceSettingsStateEnabledParam | BetaComplianceSettingsStateDisabledParam;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export declare namespace ComplianceSettings {
|
|
88
|
+
export {
|
|
89
|
+
type BetaComplianceSettings as BetaComplianceSettings,
|
|
90
|
+
type BetaComplianceSettingsStateDisabled as BetaComplianceSettingsStateDisabled,
|
|
91
|
+
type BetaComplianceSettingsStateDisabledParam as BetaComplianceSettingsStateDisabledParam,
|
|
92
|
+
type BetaComplianceSettingsStateEnabled as BetaComplianceSettingsStateEnabled,
|
|
93
|
+
type BetaComplianceSettingsStateEnabledParam as BetaComplianceSettingsStateEnabledParam,
|
|
94
|
+
type ComplianceSettingUpdateParams as ComplianceSettingUpdateParams,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
@@ -136,7 +136,9 @@ export type BetaExternalKeysPageCursor = PageCursor<BetaExternalKey>;
|
|
|
136
136
|
|
|
137
137
|
export interface BetaAWSExternalKeyConfig {
|
|
138
138
|
/**
|
|
139
|
-
* Full ARN of the AWS KMS key.
|
|
139
|
+
* Full ARN of the AWS KMS key. On Claude Platform on AWS the key must be a
|
|
140
|
+
* single-Region key in your organization's own AWS account; cross-account keys,
|
|
141
|
+
* multi-Region keys, and alias ARNs are rejected.
|
|
140
142
|
*/
|
|
141
143
|
kms_arn: string;
|
|
142
144
|
|
|
@@ -148,8 +150,9 @@ export interface BetaAWSExternalKeyConfig {
|
|
|
148
150
|
region?: string | null;
|
|
149
151
|
|
|
150
152
|
/**
|
|
151
|
-
* @deprecated IAM role ARN. Deprecated — Anthropic reaches the KMS key
|
|
152
|
-
*
|
|
153
|
+
* @deprecated IAM role ARN. Deprecated — Anthropic reaches the KMS key through its
|
|
154
|
+
* own intermediate role (or, on Claude Platform on AWS, with credentials AWS
|
|
155
|
+
* issues for the Workspace); this field is ignored.
|
|
153
156
|
*/
|
|
154
157
|
role_arn?: string | null;
|
|
155
158
|
}
|
|
@@ -12,6 +12,15 @@ export {
|
|
|
12
12
|
type APIKeyListParams,
|
|
13
13
|
type BetaAPIKeysPage,
|
|
14
14
|
} from './api-keys';
|
|
15
|
+
export {
|
|
16
|
+
ComplianceSettings,
|
|
17
|
+
type BetaComplianceSettings,
|
|
18
|
+
type BetaComplianceSettingsStateDisabled,
|
|
19
|
+
type BetaComplianceSettingsStateDisabledParam,
|
|
20
|
+
type BetaComplianceSettingsStateEnabled,
|
|
21
|
+
type BetaComplianceSettingsStateEnabledParam,
|
|
22
|
+
type ComplianceSettingUpdateParams,
|
|
23
|
+
} from './compliance-settings';
|
|
15
24
|
export {
|
|
16
25
|
ExternalKeys,
|
|
17
26
|
type BetaAWSExternalKeyConfig,
|
|
@@ -14,6 +14,16 @@ import {
|
|
|
14
14
|
BetaAPIKeyWorkspaceScope,
|
|
15
15
|
BetaAPIKeysPage,
|
|
16
16
|
} from './api-keys';
|
|
17
|
+
import * as ComplianceSettingsAPI from './compliance-settings';
|
|
18
|
+
import {
|
|
19
|
+
BetaComplianceSettings,
|
|
20
|
+
BetaComplianceSettingsStateDisabled,
|
|
21
|
+
BetaComplianceSettingsStateDisabledParam,
|
|
22
|
+
BetaComplianceSettingsStateEnabled,
|
|
23
|
+
BetaComplianceSettingsStateEnabledParam,
|
|
24
|
+
ComplianceSettingUpdateParams,
|
|
25
|
+
ComplianceSettings,
|
|
26
|
+
} from './compliance-settings';
|
|
17
27
|
import * as ExternalKeysAPI from './external-keys';
|
|
18
28
|
import {
|
|
19
29
|
BetaAWSExternalKeyConfig,
|
|
@@ -99,6 +109,9 @@ export class Organization extends APIResource {
|
|
|
99
109
|
users: UsersAPI.Users = new UsersAPI.Users(this._client);
|
|
100
110
|
workspaces: WorkspacesAPI.Workspaces = new WorkspacesAPI.Workspaces(this._client);
|
|
101
111
|
rateLimits: RateLimitsAPI.RateLimits = new RateLimitsAPI.RateLimits(this._client);
|
|
112
|
+
complianceSettings: ComplianceSettingsAPI.ComplianceSettings = new ComplianceSettingsAPI.ComplianceSettings(
|
|
113
|
+
this._client,
|
|
114
|
+
);
|
|
102
115
|
|
|
103
116
|
/**
|
|
104
117
|
* Retrieve information about the organization associated with the authenticated
|
|
@@ -153,6 +166,7 @@ Organization.ServiceAccounts = ServiceAccounts;
|
|
|
153
166
|
Organization.Users = Users;
|
|
154
167
|
Organization.Workspaces = Workspaces;
|
|
155
168
|
Organization.RateLimits = RateLimits;
|
|
169
|
+
Organization.ComplianceSettings = ComplianceSettings;
|
|
156
170
|
|
|
157
171
|
export declare namespace Organization {
|
|
158
172
|
export { type BetaOrganization as BetaOrganization, type BetaOrganizationRole as BetaOrganizationRole };
|
|
@@ -242,4 +256,14 @@ export declare namespace Organization {
|
|
|
242
256
|
type BetaOrganizationRateLimitsPageCursor as BetaOrganizationRateLimitsPageCursor,
|
|
243
257
|
type RateLimitListParams as RateLimitListParams,
|
|
244
258
|
};
|
|
259
|
+
|
|
260
|
+
export {
|
|
261
|
+
ComplianceSettings as ComplianceSettings,
|
|
262
|
+
type BetaComplianceSettings as BetaComplianceSettings,
|
|
263
|
+
type BetaComplianceSettingsStateDisabled as BetaComplianceSettingsStateDisabled,
|
|
264
|
+
type BetaComplianceSettingsStateDisabledParam as BetaComplianceSettingsStateDisabledParam,
|
|
265
|
+
type BetaComplianceSettingsStateEnabled as BetaComplianceSettingsStateEnabled,
|
|
266
|
+
type BetaComplianceSettingsStateEnabledParam as BetaComplianceSettingsStateEnabledParam,
|
|
267
|
+
type ComplianceSettingUpdateParams as ComplianceSettingUpdateParams,
|
|
268
|
+
};
|
|
245
269
|
}
|
|
@@ -221,8 +221,12 @@ export interface BetaWorkspace {
|
|
|
221
221
|
* key-policy condition so the key is scoped to this compartment. On GCP and Azure,
|
|
222
222
|
* Anthropic enforces the compartment binding automatically; you do not need to
|
|
223
223
|
* reference this value in your key configuration. See the CMEK integration guide
|
|
224
|
-
* for the required key configuration
|
|
225
|
-
* validation.
|
|
224
|
+
* for the required key configuration; unless your organization is on Claude
|
|
225
|
+
* Platform on AWS, it includes a separate value used during key validation. On
|
|
226
|
+
* Claude Platform on AWS there is no separate validation value: the key is
|
|
227
|
+
* validated against this Workspace's own value when it is attached, so if your key
|
|
228
|
+
* policy uses the compartment condition, add this value to it before attaching the
|
|
229
|
+
* key.
|
|
226
230
|
*/
|
|
227
231
|
compartment_id: string;
|
|
228
232
|
|
|
@@ -245,10 +249,14 @@ export interface BetaWorkspace {
|
|
|
245
249
|
* ID of the customer-managed encryption key (CMEK) configuration to use for this
|
|
246
250
|
* Workspace. Setting this field requires CMEK to be enabled for your organization.
|
|
247
251
|
* When set, data stored for this Workspace is encrypted with the referenced key.
|
|
248
|
-
* Create key configurations with the External Keys API.
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
+
* Create key configurations with the External Keys API. On Claude Platform on AWS
|
|
253
|
+
* the value is the AWS KMS key ARN, and the key must be a single-Region key in the
|
|
254
|
+
* same AWS account and Region as the Workspace. On that platform the key is
|
|
255
|
+
* validated against this Workspace when it is attached, so a key-policy problem is
|
|
256
|
+
* reported as an error on this request. This field is write-once: once a key is
|
|
257
|
+
* attached to a Workspace it cannot be detached or replaced. To rotate key
|
|
258
|
+
* material, rotate the underlying key on your cloud KMS; the `external_key_id`
|
|
259
|
+
* stays the same.
|
|
252
260
|
*/
|
|
253
261
|
external_key_id: string | null;
|
|
254
262
|
|
|
@@ -324,8 +332,12 @@ export interface WorkspaceCreateParams {
|
|
|
324
332
|
* Body param: ID of the customer-managed encryption key (CMEK) configuration to
|
|
325
333
|
* use for this Workspace. Setting this field requires CMEK to be enabled for your
|
|
326
334
|
* organization. When set, data stored for this Workspace is encrypted with the
|
|
327
|
-
* referenced key. Create key configurations with the External Keys API.
|
|
328
|
-
*
|
|
335
|
+
* referenced key. Create key configurations with the External Keys API. On Claude
|
|
336
|
+
* Platform on AWS the value is the AWS KMS key ARN, and the key must be a
|
|
337
|
+
* single-Region key in the same AWS account and Region as the Workspace. On that
|
|
338
|
+
* platform the key is validated against this Workspace when it is attached, so a
|
|
339
|
+
* key-policy problem is reported as an error on this request. This field is
|
|
340
|
+
* write-once: once a key is attached to a Workspace it cannot be detached or
|
|
329
341
|
* replaced. To rotate key material, rotate the underlying key on your cloud KMS;
|
|
330
342
|
* the `external_key_id` stays the same.
|
|
331
343
|
*/
|
|
@@ -358,10 +370,14 @@ export interface WorkspaceUpdateParams {
|
|
|
358
370
|
* ID of the customer-managed encryption key (CMEK) configuration to use for this
|
|
359
371
|
* Workspace. Setting this field requires CMEK to be enabled for your organization.
|
|
360
372
|
* When set, data stored for this Workspace is encrypted with the referenced key.
|
|
361
|
-
* Create key configurations with the External Keys API.
|
|
362
|
-
*
|
|
363
|
-
*
|
|
364
|
-
*
|
|
373
|
+
* Create key configurations with the External Keys API. On Claude Platform on AWS
|
|
374
|
+
* the value is the AWS KMS key ARN, and the key must be a single-Region key in the
|
|
375
|
+
* same AWS account and Region as the Workspace. On that platform the key is
|
|
376
|
+
* validated against this Workspace when it is attached, so a key-policy problem is
|
|
377
|
+
* reported as an error on this request. This field is write-once: once a key is
|
|
378
|
+
* attached to a Workspace it cannot be detached or replaced. To rotate key
|
|
379
|
+
* material, rotate the underlying key on your cloud KMS; the `external_key_id`
|
|
380
|
+
* stays the same.
|
|
365
381
|
*/
|
|
366
382
|
external_key_id?: string;
|
|
367
383
|
|
|
@@ -1977,7 +1977,7 @@ export interface EventListParams extends PageCursorParams {
|
|
|
1977
1977
|
|
|
1978
1978
|
/**
|
|
1979
1979
|
* Query param: Sort direction for results, ordered by the event's `processed_at`.
|
|
1980
|
-
* Defaults to asc (chronological).
|
|
1980
|
+
* Defaults to `asc` (chronological).
|
|
1981
1981
|
*/
|
|
1982
1982
|
order?: 'asc' | 'desc';
|
|
1983
1983
|
|
|
@@ -614,7 +614,7 @@ export type BetaManagedAgentsMultiagentRosterEntryParams =
|
|
|
614
614
|
| BetaManagedAgentsAdvisorParams;
|
|
615
615
|
|
|
616
616
|
/**
|
|
617
|
-
* Evaluation state for a single outcome defined via a define_outcome event.
|
|
617
|
+
* Evaluation state for a single outcome defined via a `define_outcome` event.
|
|
618
618
|
*/
|
|
619
619
|
export interface BetaManagedAgentsOutcomeEvaluationResource {
|
|
620
620
|
/**
|
|
@@ -628,9 +628,9 @@ export interface BetaManagedAgentsOutcomeEvaluationResource {
|
|
|
628
628
|
description: string;
|
|
629
629
|
|
|
630
630
|
/**
|
|
631
|
-
* Grader's verdict text from the most recent evaluation. For satisfied
|
|
632
|
-
* why criteria are met; for needs_revision (intermediate), what's missing; for
|
|
633
|
-
* failed
|
|
631
|
+
* Grader's verdict text from the most recent evaluation. For `satisfied`, explains
|
|
632
|
+
* why criteria are met; for `needs_revision` (intermediate), what's missing; for
|
|
633
|
+
* `failed`, why unrecoverable.
|
|
634
634
|
*/
|
|
635
635
|
explanation: string | null;
|
|
636
636
|
|
|
@@ -702,7 +702,7 @@ export interface BetaManagedAgentsSession {
|
|
|
702
702
|
metadata: { [key: string]: string };
|
|
703
703
|
|
|
704
704
|
/**
|
|
705
|
-
* Per-outcome evaluation state. One entry per define_outcome event sent to the
|
|
705
|
+
* Per-outcome evaluation state. One entry per `define_outcome` event sent to the
|
|
706
706
|
* session.
|
|
707
707
|
*/
|
|
708
708
|
outcome_evaluations: Array<BetaManagedAgentsOutcomeEvaluationResource>;
|
|
@@ -826,7 +826,7 @@ export interface BetaManagedAgentsSessionMultiagentCoordinator {
|
|
|
826
826
|
*/
|
|
827
827
|
export interface BetaManagedAgentsSessionStats {
|
|
828
828
|
/**
|
|
829
|
-
* Cumulative time in seconds the session spent in running status. Excludes idle
|
|
829
|
+
* Cumulative time in seconds the session spent in `running` status. Excludes idle
|
|
830
830
|
* time.
|
|
831
831
|
*/
|
|
832
832
|
active_seconds?: number;
|
|
@@ -1173,7 +1173,7 @@ export interface SessionListParams extends BidirectionalPageCursorParams {
|
|
|
1173
1173
|
agent_id?: string;
|
|
1174
1174
|
|
|
1175
1175
|
/**
|
|
1176
|
-
* Query param: Filter by agent version. Only applies when agent_id is also set.
|
|
1176
|
+
* Query param: Filter by agent version. Only applies when `agent_id` is also set.
|
|
1177
1177
|
*/
|
|
1178
1178
|
agent_version?: number;
|
|
1179
1179
|
|
|
@@ -1209,14 +1209,14 @@ export interface SessionListParams extends BidirectionalPageCursorParams {
|
|
|
1209
1209
|
include_archived?: boolean;
|
|
1210
1210
|
|
|
1211
1211
|
/**
|
|
1212
|
-
* Query param: Filter sessions whose resources contain a memory_store with this
|
|
1212
|
+
* Query param: Filter sessions whose resources contain a `memory_store` with this
|
|
1213
1213
|
* memory store ID.
|
|
1214
1214
|
*/
|
|
1215
1215
|
memory_store_id?: string;
|
|
1216
1216
|
|
|
1217
1217
|
/**
|
|
1218
|
-
* Query param: Sort direction for results, ordered by created_at
|
|
1219
|
-
* (newest first).
|
|
1218
|
+
* Query param: Sort direction for results, ordered by `created_at`. Defaults to
|
|
1219
|
+
* `desc` (newest first).
|
|
1220
1220
|
*/
|
|
1221
1221
|
order?: 'asc' | 'desc';
|
|
1222
1222
|
|
|
@@ -186,18 +186,16 @@ export interface BetaUserProfile {
|
|
|
186
186
|
external_id?: string | null;
|
|
187
187
|
|
|
188
188
|
/**
|
|
189
|
-
*
|
|
190
|
-
* For a resold-to company (`access_type` `passthrough`, or `relationship` `resold`
|
|
191
|
-
* under the `user-profiles-2026-03-24` header) this is that company's name.
|
|
189
|
+
* A timestamp in RFC 3339 format
|
|
192
190
|
*/
|
|
193
|
-
|
|
191
|
+
external_user_onboarded_at?: string | null;
|
|
194
192
|
|
|
195
193
|
/**
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
194
|
+
* Real-world name of the entity this profile represents (company or individual).
|
|
195
|
+
* For a company the platform resells Claude access to (`access_type`
|
|
196
|
+
* `passthrough`) this is that company's name.
|
|
199
197
|
*/
|
|
200
|
-
|
|
198
|
+
name?: string | null;
|
|
201
199
|
}
|
|
202
200
|
|
|
203
201
|
export interface BetaUserProfileEnrollmentURL {
|
|
@@ -240,6 +238,11 @@ export interface UserProfileCreateParams {
|
|
|
240
238
|
*/
|
|
241
239
|
external_id?: string | null;
|
|
242
240
|
|
|
241
|
+
/**
|
|
242
|
+
* Body param: A timestamp in RFC 3339 format
|
|
243
|
+
*/
|
|
244
|
+
external_user_onboarded_at?: string;
|
|
245
|
+
|
|
243
246
|
/**
|
|
244
247
|
* Body param: Free-form key-value data to attach to this user profile. Maximum 16
|
|
245
248
|
* keys, with keys up to 64 characters and values up to 512 characters. Values must
|
|
@@ -249,20 +252,12 @@ export interface UserProfileCreateParams {
|
|
|
249
252
|
|
|
250
253
|
/**
|
|
251
254
|
* Body param: Optional for all profiles. Real-world name of the entity this
|
|
252
|
-
* profile represents (company or individual); for a
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
+
* profile represents (company or individual); for a company the platform resells
|
|
256
|
+
* Claude access to (`access_type` `passthrough`), that company's name where known.
|
|
257
|
+
* Maximum 255 characters.
|
|
255
258
|
*/
|
|
256
259
|
name?: string | null;
|
|
257
260
|
|
|
258
|
-
/**
|
|
259
|
-
* Body param: How the entity behind a user profile relates to the platform that
|
|
260
|
-
* owns the API key. `external`: an individual end-user of the platform. `resold`:
|
|
261
|
-
* a company the platform resells Claude access to. `internal`: the platform's own
|
|
262
|
-
* usage.
|
|
263
|
-
*/
|
|
264
|
-
relationship?: 'external' | 'resold' | 'internal';
|
|
265
|
-
|
|
266
261
|
/**
|
|
267
262
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
268
263
|
*/
|
|
@@ -292,6 +287,11 @@ export interface UserProfileUpdateParams {
|
|
|
292
287
|
*/
|
|
293
288
|
external_id?: string | null;
|
|
294
289
|
|
|
290
|
+
/**
|
|
291
|
+
* Body param: A timestamp in RFC 3339 format
|
|
292
|
+
*/
|
|
293
|
+
external_user_onboarded_at?: string;
|
|
294
|
+
|
|
295
295
|
/**
|
|
296
296
|
* Body param: Key-value pairs to merge into the stored metadata. Keys provided
|
|
297
297
|
* overwrite existing values. To remove a key, set its value to an empty string.
|
|
@@ -306,14 +306,6 @@ export interface UserProfileUpdateParams {
|
|
|
306
306
|
*/
|
|
307
307
|
name?: string | null;
|
|
308
308
|
|
|
309
|
-
/**
|
|
310
|
-
* Body param: How the entity behind a user profile relates to the platform that
|
|
311
|
-
* owns the API key. `external`: an individual end-user of the platform. `resold`:
|
|
312
|
-
* a company the platform resells Claude access to. `internal`: the platform's own
|
|
313
|
-
* usage.
|
|
314
|
-
*/
|
|
315
|
-
relationship?: 'external' | 'resold' | 'internal' | null;
|
|
316
|
-
|
|
317
309
|
/**
|
|
318
310
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
319
311
|
*/
|
|
@@ -326,6 +318,11 @@ export interface UserProfileListParams extends PageCursorParams {
|
|
|
326
318
|
*/
|
|
327
319
|
order?: 'asc' | 'desc';
|
|
328
320
|
|
|
321
|
+
/**
|
|
322
|
+
* Query param: Query parameter for order_by
|
|
323
|
+
*/
|
|
324
|
+
order_by?: 'created_at' | 'name';
|
|
325
|
+
|
|
329
326
|
/**
|
|
330
327
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
331
328
|
*/
|