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 @@ -18,6 +18,12 @@ internal static partial class EditRoutesSettingsTeamsByTeamIdCommandApiCommand
{
Description = @"Harnesses to change; harnesses left out are unchanged. Pass null to clear every harness, so each role uses the team's default.",
};

private static Option<global::Baseten.UpdateRouteTeamSpendLimitSettingV1?> SpendLimit { get; } = new(
name: @"--spend-limit")
{
Description = @"Spend limit fields to change. Pass null to remove the team's per-member limit; omit to leave it unchanged.",
};
private static Option<string?> Input { get; } = new(@"--input")
{
Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.",
Expand Down Expand Up @@ -63,6 +69,7 @@ public static Command Create(string? commandName = null)
Changes only the fields in the request, all or nothing. Requires team admin.");
command.Arguments.Add(TeamId);
command.Options.Add(HarnessDefaults);
command.Options.Add(SpendLimit);
command.Options.Add(Input);
command.Options.Add(RequestJson);
command.Options.Add(RequestFile);
Expand Down Expand Up @@ -90,12 +97,14 @@ await CliRuntime.RunAsync(async () =>
cancellationToken).ConfigureAwait(false);
var teamId = parseResult.GetRequiredValue(TeamId);
var harnessDefaults = CliRuntime.WasSpecified(parseResult, HarnessDefaults) ? parseResult.GetValue(HarnessDefaults) : (__requestBase is { } __HarnessDefaultsBaseValue ? __HarnessDefaultsBaseValue.HarnessDefaults : default);
var spendLimit = CliRuntime.WasSpecified(parseResult, SpendLimit) ? parseResult.GetValue(SpendLimit) : (__requestBase is { } __SpendLimitBaseValue ? __SpendLimitBaseValue.SpendLimit : default);
using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false);


var response = await client.EditRoutesSettingsTeamsByTeamIdAsync(
teamId: teamId,
harnessDefaults: harnessDefaults,
spendLimit: spendLimit,
cancellationToken: cancellationToken).ConfigureAwait(false);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private static string FormatResponse(ParseResult parseResult, global::Baseten.Ro
public static Command Create(string? commandName = null)
{
var command = new Command(commandName ?? @"edit-routes-settings-users-by-user-id", @"Updates a user's route settings
Changes only the fields in the request. Once the user's metered spend in a month reaches the spend limit, requests with Routes keys they created are rejected until the limit is raised or the next month starts. A limit of 0 blocks the user after their first metered request. Spend is metered every 15 minutes and can lag, so a user can go over the limit. If the user has spend this month, changes take effect within seconds; otherwise at the next metering run.");
Changes only the fields in the request. Once the user's metered spend in a month reaches the spend limit, requests with Routes keys they created are rejected until the limit is raised or the next month starts. Spend is metered every 15 minutes and can lag, so a user can go over the limit. The user's own limit supersedes their team's per-member limit.");
command.Arguments.Add(UserId);
command.Options.Add(SpendLimit);
command.Options.Add(Input);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private static string FormatResponse(ParseResult parseResult, global::Baseten.Ro
public static Command Create(string? commandName = null)
{
var command = new Command(commandName ?? @"get-routes-settings-teams-by-team-id", @"Gets a team's route settings
Returns the settings that apply to the team, including the default models for each coding harness. Any member who can invoke the team's routes can read them.");
Returns the settings that apply to the team, including the default models for each coding harness and the team's spend limits. Any member who can invoke the team's routes can read them.");
command.Arguments.Add(TeamId);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private static string FormatResponse(ParseResult parseResult, global::Baseten.Ro
public static Command Create(string? commandName = null)
{
var command = new Command(commandName ?? @"get-routes-settings-users-by-user-id", @"Gets a user's route settings
Returns the settings that apply to the user, including the spend limit that caps what they can spend on Baseten Code each month. Use `me` as the user ID for your own settings. Users can read their own settings; only organization admins can read other users' settings or change them.");
Returns the settings that apply to the user, including the spend limit that caps what they can spend on Baseten Code each month: the limit set on the user, their team's per-member limit, and the effective limit for this user. The user limit always overrides the team's per-member limit.");
command.Arguments.Add(UserId);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ partial void ProcessEditRoutesSettingsTeamsByTeamIdResponseContent(
/// --url https://api.baseten.co/v1/routes/settings/teams/{team_id} \<br/>
/// --header "Authorization: Bearer $BASETEN_API_KEY" \<br/>
/// --data '{<br/>
/// "harness_defaults": null<br/>
/// "harness_defaults": null,<br/>
/// "spend_limit": null<br/>
/// }'
/// </remarks>
public async global::System.Threading.Tasks.Task<global::Baseten.RouteTeamSettingsV1> EditRoutesSettingsTeamsByTeamIdAsync(
Expand Down Expand Up @@ -91,7 +92,8 @@ partial void ProcessEditRoutesSettingsTeamsByTeamIdResponseContent(
/// --url https://api.baseten.co/v1/routes/settings/teams/{team_id} \<br/>
/// --header "Authorization: Bearer $BASETEN_API_KEY" \<br/>
/// --data '{<br/>
/// "harness_defaults": null<br/>
/// "harness_defaults": null,<br/>
/// "spend_limit": null<br/>
/// }'
/// </remarks>
public async global::System.Threading.Tasks.Task<global::Baseten.AutoSDKHttpResponse<global::Baseten.RouteTeamSettingsV1>> EditRoutesSettingsTeamsByTeamIdAsResponseAsync(
Expand Down Expand Up @@ -467,18 +469,24 @@ partial void ProcessEditRoutesSettingsTeamsByTeamIdResponseContent(
/// Harnesses to change; harnesses left out are unchanged. Pass null to clear every harness, so each role uses the team's default.<br/>
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464
/// </param>
/// <param name="spendLimit">
/// Spend limit fields to change. Pass null to remove the team's per-member limit; omit to leave it unchanged.<br/>
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464
/// </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>
public async global::System.Threading.Tasks.Task<global::Baseten.RouteTeamSettingsV1> EditRoutesSettingsTeamsByTeamIdAsync(
string teamId,
global::Baseten.UpdateRouteHarnessDefaultsV1? harnessDefaults = default,
global::Baseten.UpdateRouteTeamSpendLimitSettingV1? spendLimit = default,
global::Baseten.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __request = new global::Baseten.UpdateRouteTeamSettingsRequestV1
{
HarnessDefaults = harnessDefaults,
SpendLimit = spendLimit,
};

return await EditRoutesSettingsTeamsByTeamIdAsync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ partial void ProcessEditRoutesSettingsUsersByUserIdResponseContent(

/// <summary>
/// Updates a user's route settings<br/>
/// Changes only the fields in the request. Once the user's metered spend in a month reaches the spend limit, requests with Routes keys they created are rejected until the limit is raised or the next month starts. A limit of 0 blocks the user after their first metered request. Spend is metered every 15 minutes and can lag, so a user can go over the limit. If the user has spend this month, changes take effect within seconds; otherwise at the next metering run.
/// Changes only the fields in the request. Once the user's metered spend in a month reaches the spend limit, requests with Routes keys they created are rejected until the limit is raised or the next month starts. Spend is metered every 15 minutes and can lag, so a user can go over the limit. The user's own limit supersedes their team's per-member limit.
/// </summary>
/// <param name="userId"></param>
/// <param name="request"></param>
Expand Down Expand Up @@ -79,7 +79,7 @@ partial void ProcessEditRoutesSettingsUsersByUserIdResponseContent(
}
/// <summary>
/// Updates a user's route settings<br/>
/// Changes only the fields in the request. Once the user's metered spend in a month reaches the spend limit, requests with Routes keys they created are rejected until the limit is raised or the next month starts. A limit of 0 blocks the user after their first metered request. Spend is metered every 15 minutes and can lag, so a user can go over the limit. If the user has spend this month, changes take effect within seconds; otherwise at the next metering run.
/// Changes only the fields in the request. Once the user's metered spend in a month reaches the spend limit, requests with Routes keys they created are rejected until the limit is raised or the next month starts. Spend is metered every 15 minutes and can lag, so a user can go over the limit. The user's own limit supersedes their team's per-member limit.
/// </summary>
/// <param name="userId"></param>
/// <param name="request"></param>
Expand Down Expand Up @@ -460,7 +460,7 @@ partial void ProcessEditRoutesSettingsUsersByUserIdResponseContent(
}
/// <summary>
/// Updates a user's route settings<br/>
/// Changes only the fields in the request. Once the user's metered spend in a month reaches the spend limit, requests with Routes keys they created are rejected until the limit is raised or the next month starts. A limit of 0 blocks the user after their first metered request. Spend is metered every 15 minutes and can lag, so a user can go over the limit. If the user has spend this month, changes take effect within seconds; otherwise at the next metering run.
/// Changes only the fields in the request. Once the user's metered spend in a month reaches the spend limit, requests with Routes keys they created are rejected until the limit is raised or the next month starts. Spend is metered every 15 minutes and can lag, so a user can go over the limit. The user's own limit supersedes their team's per-member limit.
/// </summary>
/// <param name="userId"></param>
/// <param name="spendLimit">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ partial void ProcessGetRoutesSettingsTeamsByTeamIdResponseContent(

/// <summary>
/// Gets a team's route settings<br/>
/// Returns the settings that apply to the team, including the default models for each coding harness. Any member who can invoke the team's routes can read them.
/// Returns the settings that apply to the team, including the default models for each coding harness and the team's spend limits. Any member who can invoke the team's routes can read them.
/// </summary>
/// <param name="teamId"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
Expand All @@ -69,7 +69,7 @@ partial void ProcessGetRoutesSettingsTeamsByTeamIdResponseContent(
}
/// <summary>
/// Gets a team's route settings<br/>
/// Returns the settings that apply to the team, including the default models for each coding harness. Any member who can invoke the team's routes can read them.
/// Returns the settings that apply to the team, including the default models for each coding harness and the team's spend limits. Any member who can invoke the team's routes can read them.
/// </summary>
/// <param name="teamId"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ partial void ProcessGetRoutesSettingsUsersByUserIdResponseContent(

/// <summary>
/// Gets a user's route settings<br/>
/// Returns the settings that apply to the user, including the spend limit that caps what they can spend on Baseten Code each month. Use `me` as the user ID for your own settings. Users can read their own settings; only organization admins can read other users' settings or change them.
/// Returns the settings that apply to the user, including the spend limit that caps what they can spend on Baseten Code each month: the limit set on the user, their team's per-member limit, and the effective limit for this user. The user limit always overrides the team's per-member limit.
/// </summary>
/// <param name="userId"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
Expand All @@ -69,7 +69,7 @@ partial void ProcessGetRoutesSettingsUsersByUserIdResponseContent(
}
/// <summary>
/// Gets a user's route settings<br/>
/// Returns the settings that apply to the user, including the spend limit that caps what they can spend on Baseten Code each month. Use `me` as the user ID for your own settings. Users can read their own settings; only organization admins can read other users' settings or change them.
/// Returns the settings that apply to the user, including the spend limit that caps what they can spend on Baseten Code each month: the limit set on the user, their team's per-member limit, and the effective limit for this user. The user limit always overrides the team's per-member limit.
/// </summary>
/// <param name="userId"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public partial interface IBasetenClient
/// --url https://api.baseten.co/v1/routes/settings/teams/{team_id} \<br/>
/// --header "Authorization: Bearer $BASETEN_API_KEY" \<br/>
/// --data '{<br/>
/// "harness_defaults": null<br/>
/// "harness_defaults": null,<br/>
/// "spend_limit": null<br/>
/// }'
/// </remarks>
global::System.Threading.Tasks.Task<global::Baseten.RouteTeamSettingsV1> EditRoutesSettingsTeamsByTeamIdAsync(
Expand All @@ -41,7 +42,8 @@ public partial interface IBasetenClient
/// --url https://api.baseten.co/v1/routes/settings/teams/{team_id} \<br/>
/// --header "Authorization: Bearer $BASETEN_API_KEY" \<br/>
/// --data '{<br/>
/// "harness_defaults": null<br/>
/// "harness_defaults": null,<br/>
/// "spend_limit": null<br/>
/// }'
/// </remarks>
global::System.Threading.Tasks.Task<global::Baseten.AutoSDKHttpResponse<global::Baseten.RouteTeamSettingsV1>> EditRoutesSettingsTeamsByTeamIdAsResponseAsync(
Expand All @@ -59,12 +61,17 @@ public partial interface IBasetenClient
/// Harnesses to change; harnesses left out are unchanged. Pass null to clear every harness, so each role uses the team's default.<br/>
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464
/// </param>
/// <param name="spendLimit">
/// Spend limit fields to change. Pass null to remove the team's per-member limit; omit to leave it unchanged.<br/>
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464
/// </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::Baseten.RouteTeamSettingsV1> EditRoutesSettingsTeamsByTeamIdAsync(
string teamId,
global::Baseten.UpdateRouteHarnessDefaultsV1? harnessDefaults = default,
global::Baseten.UpdateRouteTeamSpendLimitSettingV1? spendLimit = default,
global::Baseten.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
Expand Down
Loading
Loading