Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ partial void ProcessGetApiKeyResponseContent(
/// <summary>
/// List api_keys<br/>
/// List out all API keys. They are sorted by creation date, with the most recently-created keys coming first.<br/>
/// To create new API keys, go to [**Settings &gt; API keys**](https://www.braintrust.dev/app/~/configuration/org/api-keys) in the Braintrust UI.
/// To create new API keys, visit [**Settings &gt; API keys**](https://www.braintrust.dev/app/~/configuration/org/api-keys) in the Braintrust UI.
/// </summary>
/// <param name="limit">
/// Limit the number of objects to return
Expand Down Expand Up @@ -114,7 +114,7 @@ partial void ProcessGetApiKeyResponseContent(
/// <summary>
/// List api_keys<br/>
/// List out all API keys. They are sorted by creation date, with the most recently-created keys coming first.<br/>
/// To create new API keys, go to [**Settings &gt; API keys**](https://www.braintrust.dev/app/~/configuration/org/api-keys) in the Braintrust UI.
/// To create new API keys, visit [**Settings &gt; API keys**](https://www.braintrust.dev/app/~/configuration/org/api-keys) in the Braintrust UI.
/// </summary>
/// <param name="limit">
/// Limit the number of objects to return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ partial void ProcessEvalLaunchResponseContent(
/// An optional experiment id to use as a base. If specified, the new experiment will be summarized and compared to this experiment.
/// </param>
/// <param name="gitMetadataSettings">
/// Optional settings for collecting git metadata. By default, will collect all git metadata fields allowed in org-level settings.
/// Optional settings for collecting git metadata. By default, will collect git metadata fields allowed in org-level settings, excluding diff content unless the org opts in.
/// </param>
/// <param name="repoInfo"></param>
/// <param name="strict">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public partial interface IApiKeysClient
/// <summary>
/// List api_keys<br/>
/// List out all API keys. They are sorted by creation date, with the most recently-created keys coming first.<br/>
/// To create new API keys, go to [**Settings &gt; API keys**](https://www.braintrust.dev/app/~/configuration/org/api-keys) in the Braintrust UI.
/// To create new API keys, visit [**Settings &gt; API keys**](https://www.braintrust.dev/app/~/configuration/org/api-keys) in the Braintrust UI.
/// </summary>
/// <param name="limit">
/// Limit the number of objects to return
Expand Down Expand Up @@ -44,7 +44,7 @@ public partial interface IApiKeysClient
/// <summary>
/// List api_keys<br/>
/// List out all API keys. They are sorted by creation date, with the most recently-created keys coming first.<br/>
/// To create new API keys, go to [**Settings &gt; API keys**](https://www.braintrust.dev/app/~/configuration/org/api-keys) in the Braintrust UI.
/// To create new API keys, visit [**Settings &gt; API keys**](https://www.braintrust.dev/app/~/configuration/org/api-keys) in the Braintrust UI.
/// </summary>
/// <param name="limit">
/// Limit the number of objects to return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public partial interface IEvalsClient
/// An optional experiment id to use as a base. If specified, the new experiment will be summarized and compared to this experiment.
/// </param>
/// <param name="gitMetadataSettings">
/// Optional settings for collecting git metadata. By default, will collect all git metadata fields allowed in org-level settings.
/// Optional settings for collecting git metadata. By default, will collect git metadata fields allowed in org-level settings, excluding diff content unless the org opts in.
/// </param>
/// <param name="repoInfo"></param>
/// <param name="strict">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ public partial interface IOrganizationsClient
{
/// <summary>
/// Modify organization membership<br/>
/// Modify organization membership.<br/>
/// Organization owners can use this endpoint to create service accounts, but service tokens for those accounts must be created in the Braintrust UI, at [**Settings &gt; Service tokens**](https://www.braintrust.dev/app/~/configuration/org/service-tokens).
/// Add or remove members, create service accounts.
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
Expand All @@ -20,8 +19,7 @@ public partial interface IOrganizationsClient
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Modify organization membership<br/>
/// Modify organization membership.<br/>
/// Organization owners can use this endpoint to create service accounts, but service tokens for those accounts must be created in the Braintrust UI, at [**Settings &gt; Service tokens**](https://www.braintrust.dev/app/~/configuration/org/service-tokens).
/// Add or remove members, create service accounts.
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
Expand All @@ -34,8 +32,7 @@ public partial interface IOrganizationsClient
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Modify organization membership<br/>
/// Modify organization membership.<br/>
/// Organization owners can use this endpoint to create service accounts, but service tokens for those accounts must be created in the Braintrust UI, at [**Settings &gt; Service tokens**](https://www.braintrust.dev/app/~/configuration/org/service-tokens).
/// Add or remove members, create service accounts.
/// </summary>
/// <param name="inviteUsers">
/// Users to invite to the organization
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public partial interface IServiceTokensClient
/// <summary>
/// List service_tokens<br/>
/// List out all service tokens. They are sorted by creation date, with the most recently-created tokens coming first.<br/>
/// To create service tokens, organization owners can go to [**Settings &gt; Service tokens**](https://www.braintrust.dev/app/~/configuration/org/service-tokens) in the Braintrust UI.
/// To create a service token, visit [**Settings &gt; Service tokens**](https://www.braintrust.dev/app/~/configuration/org/service-tokens) as an organization owner, or call [`POST /v1/service_token`](https://www.braintrust.dev/docs/api-reference/servicetokens/create-service_token) and authenticate with a service token that has organization-owner permissions.
/// </summary>
/// <param name="limit">
/// Limit the number of objects to return
Expand Down Expand Up @@ -44,7 +44,7 @@ public partial interface IServiceTokensClient
/// <summary>
/// List service_tokens<br/>
/// List out all service tokens. They are sorted by creation date, with the most recently-created tokens coming first.<br/>
/// To create service tokens, organization owners can go to [**Settings &gt; Service tokens**](https://www.braintrust.dev/app/~/configuration/org/service-tokens) in the Braintrust UI.
/// To create a service token, visit [**Settings &gt; Service tokens**](https://www.braintrust.dev/app/~/configuration/org/service-tokens) as an organization owner, or call [`POST /v1/service_token`](https://www.braintrust.dev/docs/api-reference/servicetokens/create-service_token) and authenticate with a service token that has organization-owner permissions.
/// </summary>
/// <param name="limit">
/// Limit the number of objects to return
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#nullable enable

namespace Braintrust
{
public partial interface IServiceTokensClient
{
/// <summary>
/// Create service_token<br/>
/// Create a new service token.<br/>
/// When calling this endpoint, you must authenticate using a service token that has organization-owner permissions. User API keys cannot be used.
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Braintrust.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Braintrust.CreateServiceTokenOutput> PostServiceTokenAsync(

global::Braintrust.PostServiceTokenRequest request,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Create service_token<br/>
/// Create a new service token.<br/>
/// When calling this endpoint, you must authenticate using a service token that has organization-owner permissions. User API keys cannot be used.
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Braintrust.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Braintrust.AutoSDKHttpResponse<global::Braintrust.CreateServiceTokenOutput>> PostServiceTokenAsResponseAsync(

global::Braintrust.PostServiceTokenRequest request,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Create service_token<br/>
/// Create a new service token.<br/>
/// When calling this endpoint, you must authenticate using a service token that has organization-owner permissions. User API keys cannot be used.
/// </summary>
/// <param name="name">
/// Name of the service token. Does not have to be unique
/// </param>
/// <param name="orgName">
/// For nearly all users, this parameter should be unnecessary. But in the rare case that your API key belongs to multiple organizations, you may specify the name of the organization the Service token belongs in.
/// </param>
/// <param name="serviceAccountId">
/// The ID of the service account to which the token should belong. To create a service account, visit [**Settings &gt; Service tokens**](https://www.braintrust.dev/app/~/configuration/org/service-tokens) in the Braintrust UI or call [`PATCH /v1/organization/members`](https://www.braintrust.dev/docs/api-reference/organizations/modify-organization-membership).
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::Braintrust.CreateServiceTokenOutput> PostServiceTokenAsync(
string name,
string serviceAccountId,
string? orgName = default,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#nullable enable

namespace Braintrust
{
public partial interface IServiceTokensClient
{
/// <summary>
/// Create or replace service_token<br/>
/// Create or replace service_token. If there is an existing service_token with the same name as the one specified in the request, will replace the existing service_token with the provided fields
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Braintrust.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Braintrust.CreateServiceTokenOutput> PutServiceTokenAsync(

global::Braintrust.PutServiceTokenRequest request,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Create or replace service_token<br/>
/// Create or replace service_token. If there is an existing service_token with the same name as the one specified in the request, will replace the existing service_token with the provided fields
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Braintrust.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Braintrust.AutoSDKHttpResponse<global::Braintrust.CreateServiceTokenOutput>> PutServiceTokenAsResponseAsync(

global::Braintrust.PutServiceTokenRequest request,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Create or replace service_token<br/>
/// Create or replace service_token. If there is an existing service_token with the same name as the one specified in the request, will replace the existing service_token with the provided fields
/// </summary>
/// <param name="name">
/// Name of the service token. Does not have to be unique
/// </param>
/// <param name="orgName">
/// For nearly all users, this parameter should be unnecessary. But in the rare case that your API key belongs to multiple organizations, you may specify the name of the organization the Service token belongs in.
/// </param>
/// <param name="serviceAccountId">
/// The ID of the service account to which the token should belong. To create a service account, visit [**Settings &gt; Service tokens**](https://www.braintrust.dev/app/~/configuration/org/service-tokens) in the Braintrust UI or call [`PATCH /v1/organization/members`](https://www.braintrust.dev/docs/api-reference/organizations/modify-organization-membership).
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::Braintrust.CreateServiceTokenOutput> PutServiceTokenAsync(
string name,
string serviceAccountId,
string? orgName = default,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace Braintrust.JsonConverters
{
/// <inheritdoc />
public sealed class AutomationStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Braintrust.AutomationStatus>
{
/// <inheritdoc />
public override global::Braintrust.AutomationStatus Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::Braintrust.AutomationStatusExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Braintrust.AutomationStatus)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::Braintrust.AutomationStatus);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Braintrust.AutomationStatus value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::Braintrust.AutomationStatusExtensions.ToValueString(value));
}
}
}
Loading