diff --git a/src/libs/Speechify/Generated/Speechify.HostedApis.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.HostedApis.JsonSerializerContext.g.cs index 76457178..41331848 100644 --- a/src/libs/Speechify/Generated/Speechify.HostedApis.JsonSerializerContext.g.cs +++ b/src/libs/Speechify/Generated/Speechify.HostedApis.JsonSerializerContext.g.cs @@ -21,6 +21,7 @@ namespace Speechify [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(long))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode), TypeInfoPropertyName = "ErrorCode2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorDetail))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] @@ -39,18 +40,29 @@ namespace Speechify [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiUsageRoutesItems))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedAPIUsage))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity), TypeInfoPropertyName = "V1ApisApiIdAnalyticsGetParametersGranularity2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RequestAnalyticsTotals))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RequestAnalyticsBucket))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RequestTopPath))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RequestAnalyticsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedAPIUserTokenSecret))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(long?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime?))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiAuthMode?), TypeInfoPropertyName = "NullableHostedApiAuthMode2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateHostedApiRequestAuthMode?), TypeInfoPropertyName = "NullableCreateHostedApiRequestAuthMode2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateHostedApiRequestAuthMode?), TypeInfoPropertyName = "NullableUpdateHostedApiRequestAuthMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity?), TypeInfoPropertyName = "NullableV1ApisApiIdAnalyticsGetParametersGranularity2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] internal sealed partial class HostedApisSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext { } @@ -131,7 +143,11 @@ public override bool CanConvert(global::System.Type typeToConvert) || typeToConvert == typeof(global::Speechify.UpdateHostedApiRequestAuthMode) - || typeToConvert == typeof(global::Speechify.UpdateHostedApiRequestAuthMode?); + || typeToConvert == typeof(global::Speechify.UpdateHostedApiRequestAuthMode?) + + || typeToConvert == typeof(global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity) + + || typeToConvert == typeof(global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity?); } public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( @@ -177,6 +193,16 @@ public override bool CanConvert(global::System.Type typeToConvert) { return new global::Speechify.JsonConverters.UpdateHostedApiRequestAuthModeNullableJsonConverter(); } + + if (typeToConvert == typeof(global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity)) + { + return new global::Speechify.JsonConverters.V1ApisApiIdAnalyticsGetParametersGranularityJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity?)) + { + return new global::Speechify.JsonConverters.V1ApisApiIdAnalyticsGetParametersGranularityNullableJsonConverter(); + } throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); } } diff --git a/src/libs/Speechify/Generated/Speechify.HostedApisClient.GetAnalytics.g.cs b/src/libs/Speechify/Generated/Speechify.HostedApisClient.GetAnalytics.g.cs new file mode 100644 index 00000000..dc35c75c --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.HostedApisClient.GetAnalytics.g.cs @@ -0,0 +1,725 @@ + +#nullable enable + +namespace Speechify +{ + public partial class HostedApisClient + { + + + private static readonly global::Speechify.EndPointSecurityRequirement s_GetAnalyticsSecurityRequirement0 = + new global::Speechify.EndPointSecurityRequirement + { + Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] + { new global::Speechify.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Speechify.EndPointSecurityRequirement[] s_GetAnalyticsSecurityRequirements = + new global::Speechify.EndPointSecurityRequirement[] + { s_GetAnalyticsSecurityRequirement0, + }; + partial void PrepareGetAnalyticsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string apiId, + ref global::System.DateTime? start, + ref global::System.DateTime? end, + ref global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity? granularity, + ref string? speechifyVersion); + partial void PrepareGetAnalyticsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string apiId, + global::System.DateTime? start, + global::System.DateTime? end, + global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity? granularity, + string? speechifyVersion); + partial void ProcessGetAnalyticsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetAnalyticsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get Hosted API Analytics
+ /// Requests the API served over time: volume split by status, success
+ /// rate, and p50/p95/p99 latency per time bucket, plus one `top_paths`
+ /// row per route, busiest first, naming the route by `route_id`. Every
+ /// request its host answered counts, including refusals such as a
+ /// missing key (401) or an exhausted rate limit (429); `top_paths` counts
+ /// only the requests that matched a route, including a route an MCP
+ /// client called by tool name.
+ /// The window defaults to the last 7 days and is capped at 30.
+ /// History starts at `history_starts_at`, the first request in the last
+ /// 30 days attributed to this API: requests before it cannot be
+ /// attributed, so a bucket before it is missing data, not a quiet period.
+ /// When `history_starts_at` is absent, no request to this API has been
+ /// attributed in the last 30 days, and no bucket is known to be complete.
+ /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + ///
+ /// + /// + /// + /// + /// Default Value: 1h + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetAnalyticsAsync( + string apiId, + global::System.DateTime? start = default, + global::System.DateTime? end = default, + global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity? granularity = default, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAnalyticsAsResponseAsync( + apiId: apiId, + start: start, + end: end, + granularity: granularity, + speechifyVersion: speechifyVersion, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Hosted API Analytics
+ /// Requests the API served over time: volume split by status, success
+ /// rate, and p50/p95/p99 latency per time bucket, plus one `top_paths`
+ /// row per route, busiest first, naming the route by `route_id`. Every
+ /// request its host answered counts, including refusals such as a
+ /// missing key (401) or an exhausted rate limit (429); `top_paths` counts
+ /// only the requests that matched a route, including a route an MCP
+ /// client called by tool name.
+ /// The window defaults to the last 7 days and is capped at 30.
+ /// History starts at `history_starts_at`, the first request in the last
+ /// 30 days attributed to this API: requests before it cannot be
+ /// attributed, so a bucket before it is missing data, not a quiet period.
+ /// When `history_starts_at` is absent, no request to this API has been
+ /// attributed in the last 30 days, and no bucket is known to be complete.
+ /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + ///
+ /// + /// + /// + /// + /// Default Value: 1h + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetAnalyticsAsResponseAsync( + string apiId, + global::System.DateTime? start = default, + global::System.DateTime? end = default, + global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity? granularity = default, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetAnalyticsArguments( + httpClient: HttpClient, + apiId: ref apiId, + start: ref start, + end: ref end, + granularity: ref granularity, + speechifyVersion: ref speechifyVersion); + + + var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetAnalyticsSecurityRequirements, + operationName: "GetAnalyticsAsync"); + + using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Speechify.PathBuilder( + path: $"/v1/apis/{apiId}/analytics", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("start", start?.ToString("yyyy-MM-ddTHH:mm:ssZ")) + .AddOptionalParameter("end", end?.ToString("yyyy-MM-ddTHH:mm:ssZ")) + .AddOptionalParameter("granularity", granularity?.ToValueString()) + ; + var __path = __pathBuilder.ToString(); + __path = global::Speechify.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (speechifyVersion != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Speechify-Version", speechifyVersion.ToString()); + } + + global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetAnalyticsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + apiId: apiId!, + start: start, + end: end, + granularity: granularity, + speechifyVersion: speechifyVersion); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetAnalytics", + methodName: "GetAnalyticsAsync", + pathTemplate: "$\"/v1/apis/{apiId}/analytics\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetAnalytics", + methodName: "GetAnalyticsAsync", + pathTemplate: "$\"/v1/apis/{apiId}/analytics\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetAnalytics", + methodName: "GetAnalyticsAsync", + pathTemplate: "$\"/v1/apis/{apiId}/analytics\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGetAnalyticsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetAnalytics", + methodName: "GetAnalyticsAsync", + pathTemplate: "$\"/v1/apis/{apiId}/analytics\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetAnalytics", + methodName: "GetAnalyticsAsync", + pathTemplate: "$\"/v1/apis/{apiId}/analytics\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // The request was malformed or failed validation. The response body is the standard `Error` envelope; for validation failures `error.fields` enumerates the offending fields as a `path -> message` map (code = `validation_failed`). + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::Speechify.Error? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::Speechify.Error.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::Speechify.Error.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Authentication is missing or invalid. The request did not carry a recognised credential (console session token, API key, or worker JWT). + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::Speechify.Error? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::Speechify.Error.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::Speechify.Error.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The workspace has insufficient credits, or the request needs a plan tier the workspace is not on (e.g. voice cloning). Distinct from `Forbidden` so SDK consumers can drive upgrade UX. + if ((int)__response.StatusCode == 402) + { + string? __content_402 = null; + global::System.Exception? __exception_402 = null; + global::Speechify.Error? __value_402 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_402 = global::Speechify.Error.FromJson(__content_402, JsonSerializerContext); + } + else + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_402 = global::Speechify.Error.FromJson(__content_402, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_402 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_402 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_402, + responseBody: __content_402, + responseObject: __value_402, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The referenced resource does not exist or is not visible to the caller's workspace. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Speechify.Error? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Speechify.Error.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Speechify.Error.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // An upstream dependency (the TTS composer or voice-metadata service) returned a 5xx. The raw upstream detail is not forwarded - the cause is in the server log; the response is a fixed `upstream_failure` envelope. Safe to retry. + if ((int)__response.StatusCode == 502) + { + string? __content_502 = null; + global::System.Exception? __exception_502 = null; + global::Speechify.Error? __value_502 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_502 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_502 = global::Speechify.Error.FromJson(__content_502, JsonSerializerContext); + } + else + { + __content_502 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_502 = global::Speechify.Error.FromJson(__content_502, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_502 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_502 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_502, + responseBody: __content_502, + responseObject: __value_502, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // A downstream dependency is degraded or the endpoint is intentionally disabled (e.g. phone-number purchase before ops setup). + if ((int)__response.StatusCode == 503) + { + string? __content_503 = null; + global::System.Exception? __exception_503 = null; + global::Speechify.Error? __value_503 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_503 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_503 = global::Speechify.Error.FromJson(__content_503, JsonSerializerContext); + } + else + { + __content_503 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_503 = global::Speechify.Error.FromJson(__content_503, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_503 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_503 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_503, + responseBody: __content_503, + responseObject: __value_503, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetAnalyticsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Speechify.RequestAnalyticsResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Speechify.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Speechify.RequestAnalyticsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Speechify.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IHostedApisClient.GetAnalytics.g.cs b/src/libs/Speechify/Generated/Speechify.IHostedApisClient.GetAnalytics.g.cs new file mode 100644 index 00000000..998519d9 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IHostedApisClient.GetAnalytics.g.cs @@ -0,0 +1,78 @@ +#nullable enable + +namespace Speechify +{ + public partial interface IHostedApisClient + { + /// + /// Get Hosted API Analytics
+ /// Requests the API served over time: volume split by status, success
+ /// rate, and p50/p95/p99 latency per time bucket, plus one `top_paths`
+ /// row per route, busiest first, naming the route by `route_id`. Every
+ /// request its host answered counts, including refusals such as a
+ /// missing key (401) or an exhausted rate limit (429); `top_paths` counts
+ /// only the requests that matched a route, including a route an MCP
+ /// client called by tool name.
+ /// The window defaults to the last 7 days and is capped at 30.
+ /// History starts at `history_starts_at`, the first request in the last
+ /// 30 days attributed to this API: requests before it cannot be
+ /// attributed, so a bucket before it is missing data, not a quiet period.
+ /// When `history_starts_at` is absent, no request to this API has been
+ /// attributed in the last 30 days, and no bucket is known to be complete.
+ /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + ///
+ /// + /// + /// + /// + /// Default Value: 1h + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetAnalyticsAsync( + string apiId, + global::System.DateTime? start = default, + global::System.DateTime? end = default, + global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity? granularity = default, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Hosted API Analytics
+ /// Requests the API served over time: volume split by status, success
+ /// rate, and p50/p95/p99 latency per time bucket, plus one `top_paths`
+ /// row per route, busiest first, naming the route by `route_id`. Every
+ /// request its host answered counts, including refusals such as a
+ /// missing key (401) or an exhausted rate limit (429); `top_paths` counts
+ /// only the requests that matched a route, including a route an MCP
+ /// client called by tool name.
+ /// The window defaults to the last 7 days and is capped at 30.
+ /// History starts at `history_starts_at`, the first request in the last
+ /// 30 days attributed to this API: requests before it cannot be
+ /// attributed, so a bucket before it is missing data, not a quiet period.
+ /// When `history_starts_at` is absent, no request to this API has been
+ /// attributed in the last 30 days, and no bucket is known to be complete.
+ /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + ///
+ /// + /// + /// + /// + /// Default Value: 1h + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetAnalyticsAsResponseAsync( + string apiId, + global::System.DateTime? start = default, + global::System.DateTime? end = default, + global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity? granularity = default, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IRunsClient.StreamEvents.g.cs b/src/libs/Speechify/Generated/Speechify.IRunsClient.StreamEvents.g.cs index f7c6ae50..8014d1ab 100644 --- a/src/libs/Speechify/Generated/Speechify.IRunsClient.StreamEvents.g.cs +++ b/src/libs/Speechify/Generated/Speechify.IRunsClient.StreamEvents.g.cs @@ -11,7 +11,7 @@ public partial interface IRunsClient /// Holds the connection open and tails the run's journal: a
/// `run.step.added` event per step (its `data` is a RunStep object, the
/// same shape List Run Steps returns), a `run.reply.delta` event for each
- /// piece of text the agent writes, as it writes it, a
+ /// piece of the agent's answer, as it writes it, a
/// `run.status.changed` event when the run's status moves, and a terminal
/// `run.ended` event carrying the final status and, when the run stopped
/// short, its `incomplete_reason`. Consumers must ignore unknown event
@@ -24,28 +24,30 @@ public partial interface IRunsClient /// `requires_action` and keeps tailing, so the client learns it has
/// something to decide.
/// ## The reply arrives as it is written
- /// `run.reply.delta` carries the agent's text piece by piece, so a chat
- /// built on runs shows the answer forming instead of a spinner. Each
- /// piece names the journal position it is written at (`seq`) and how
- /// many characters of that position's text precede it (`offset`). Keep
- /// one buffer per `seq`: append a piece whose `offset` equals what you
- /// hold, and on any other `offset` cut the buffer to it first (that only
- /// happens after a step was re-executed, and means the earlier text is
- /// void). Text is counted in Unicode code points.
- /// Which text a buffer turns out to be is settled by the event that
- /// closes it. A `run.step.added` at the same `seq` closes it as that
- /// step's `content` - the plan of a tool call, which the agent wrote
- /// before deciding to act - and the next piece starts a new buffer at a
- /// later `seq`. `run.ended` closes the open buffer as the reply, and its
- /// `output.reply` is the authoritative copy: replace the buffer with it.
- /// A `run.ended` with no `output` (the run failed, was cancelled, or
- /// stopped short) means the open buffer was abandoned mid-sentence -
- /// show it as such or drop it; it is not an answer. A run parked in
- /// `requires_action` never leaves a buffer open, because the text it
- /// wrote before parking lands as the plan step first. A client that
- /// never subscribes to `run.reply.delta` sees exactly the stream it saw
- /// before the event existed. An agent on a custom LLM endpoint answers
- /// whole, with no pieces before the step lands.
+ /// `run.reply.delta` carries the agent's answer piece by piece, so a chat
+ /// built on runs shows the answer forming instead of a spinner. It
+ /// carries the answer and nothing else: what the agent writes on the way
+ /// to it, such as the plan behind a tool call, never rides this event and
+ /// reaches the stream only as the `content` of a `run.step.added` plan
+ /// step. Appending the pieces in order gives the answer, so a piece can be
+ /// shown the moment it arrives.
+ /// Each piece names the journal position the answer is written at
+ /// (`seq`) and how many characters of it precede the piece (`offset`).
+ /// Append a piece whose `offset` equals what you hold; on any other
+ /// `offset`, or a different `seq`, cut what you hold to that `offset`
+ /// first. That only happens after a step was re-executed, and means the
+ /// earlier text is void. Text is counted in Unicode code points.
+ /// `run.ended` closes the answer, and its `output.reply` is the
+ /// authoritative copy: replace what you hold with it. A `run.ended` with
+ /// no `output` (the run failed, was cancelled, or stopped short) means the
+ /// answer was abandoned mid-sentence - show it as such or drop it. A
+ /// client that never subscribes to `run.reply.delta` sees exactly the
+ /// stream it saw before the event existed.
+ /// Not every run streams its answer, because not every model says which
+ /// of its text is the answer while writing it. The platform default
+ /// model does. An agent on another model or on a custom LLM endpoint, and
+ /// a run with an `output_schema` (whose answer is not final until it is
+ /// checked), answers whole: no pieces, and the reply on `run.ended`.
/// Following a run costs nothing beyond the run: the stream is not
/// metered, and its read load is a few small queries per second per
/// subscriber, a little more while the answer is being written.
diff --git a/src/libs/Speechify/Generated/Speechify.IRunsClient.StreamProjectEvents.g.cs b/src/libs/Speechify/Generated/Speechify.IRunsClient.StreamProjectEvents.g.cs new file mode 100644 index 00000000..4c0204c3 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IRunsClient.StreamProjectEvents.g.cs @@ -0,0 +1,70 @@ +#nullable enable + +namespace Speechify +{ + public partial interface IRunsClient + { + /// + /// Stream Project Run Events
+ /// Server-Sent Events stream of every run in one project, so an
+ /// application learns that work started, stopped for a person or
+ /// finished without naming a run or an agent, and without polling the
+ /// run list.
+ /// Each event carries a run's lifecycle: its `status`, who it acts for
+ /// (`user_identity`), its `metadata` - including `metadata.trigger`,
+ /// which says whether a caller, a schedule or a webhook started it - its
+ /// lineage, and while it waits on a person, the `pending_action` it is
+ /// asking about. It never carries what the run was asked or what it
+ /// answered: follow one run with Stream Run Events for its steps and its
+ /// reply as it is written, or read it with Get Run.
+ /// ## What arrives
+ /// On every connection, including a reconnect:
+ /// 1. `run.updated` for each run in the project that has not finished,
+ /// oldest first, so a client that connects late sees the work
+ /// already in flight.
+ /// 2. `runs.synced`, once. Every run that was live when the stream
+ /// opened has now been sent: replace the live runs you hold with the
+ /// ones this connection sent.
+ /// After that:
+ /// - `run.updated` when a run appears, whatever started it, and whenever
+ /// its `status` or `pending_action` changes. A run that parks again on
+ /// a new action arrives again, carrying the new `pending_action`.
+ /// - `run.ended` when a run settles (`succeeded`, `failed`, `canceled` or
+ /// `expired`). It is the run's last event on this stream.
+ /// Each event carries the run as it stands, not a change to apply: key
+ /// what you hold by `id` and replace it. The stream reports where a run
+ /// is rather than every status it passed through, so a status a run
+ /// entered and left within about a second may never appear. A delegated
+ /// child is its own run, with `parent_run_id` set. Ignore event types you
+ /// do not recognize.
+ /// ## The stream is expected to reconnect
+ /// **The server closes the connection after 4 minutes**, and a network
+ /// drop can close it sooner. The response opens with `retry: 2000`, so a
+ /// browser `EventSource` reconnects on its own; a hand-rolled client must
+ /// reconnect and send the id of the last event it received as
+ /// `Last-Event-ID`. The id is an opaque position: send it back unchanged.
+ /// A reconnect within 10 minutes is sent a `run.ended` for every run that
+ /// finished while it was away, so delivery is at least once: a
+ /// `run.ended` you already hold can arrive again. After a longer absence,
+ /// a run you held as live that is missing from the snapshot has finished;
+ /// read it with Get Run. A `: keepalive` comment arrives every 15 seconds
+ /// so an intermediary does not time the connection out on a quiet
+ /// project.
+ /// One connection covers every run in the project, and the stream is not
+ /// metered: its read load is one small query a second, plus a read of the
+ /// live runs when it connects.
+ /// Same read access as List Runs, and the same
+ /// `402 durable_runs_not_in_plan` on a workspace without the grant. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Collections.Generic.IAsyncEnumerable StreamProjectEventsAsync( + string projectId, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.ListApiRoutes.g.cs b/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.ListApiRoutes.g.cs new file mode 100644 index 00000000..038475d8 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.ListApiRoutes.g.cs @@ -0,0 +1,74 @@ +#nullable enable + +namespace Speechify +{ + public partial interface IToolDefinitionsClient + { + /// + /// List Tool API Routes
+ /// List the hosted API routes that call this tool, in the hosted APIs
+ /// you can reach, ordered by API name. A route calls one operation of
+ /// an `mcp` or `openapi` tool and answers only while that operation
+ /// exists, runs without approval, and reads (unless the route has
+ /// `allow_write`), and while the tool is in the API's project. So
+ /// deleting the tool, moving it to another project, or changing an
+ /// operation's class or approval can stop these routes answering:
+ /// check this list before such a change. A route in a project you
+ /// cannot reach is not listed; it already refuses its calls, because
+ /// the tool is not in its API's project. A tool of another kind is
+ /// used by no route and answers an empty list.
+ /// Cursor-paginated: omit `cursor` for the first page; walk pages while
+ /// `has_more` is true (default page size 50, max 200).
+ /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + ///
+ /// + /// + /// + /// Default Value: 50 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ListApiRoutesAsync( + string toolDefinitionId, + string? cursor = default, + int? limit = default, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Tool API Routes
+ /// List the hosted API routes that call this tool, in the hosted APIs
+ /// you can reach, ordered by API name. A route calls one operation of
+ /// an `mcp` or `openapi` tool and answers only while that operation
+ /// exists, runs without approval, and reads (unless the route has
+ /// `allow_write`), and while the tool is in the API's project. So
+ /// deleting the tool, moving it to another project, or changing an
+ /// operation's class or approval can stop these routes answering:
+ /// check this list before such a change. A route in a project you
+ /// cannot reach is not listed; it already refuses its calls, because
+ /// the tool is not in its API's project. A tool of another kind is
+ /// used by no route and answers an empty list.
+ /// Cursor-paginated: omit `cursor` for the first page; walk pages while
+ /// `has_more` is true (default page size 50, max 200).
+ /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + ///
+ /// + /// + /// + /// Default Value: 50 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListApiRoutesAsResponseAsync( + string toolDefinitionId, + string? cursor = default, + int? limit = default, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.AgentRunLifecycleStatus.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.AgentRunLifecycleStatus.g.cs new file mode 100644 index 00000000..65609020 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.AgentRunLifecycleStatus.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class AgentRunLifecycleStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.AgentRunLifecycleStatus 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::Speechify.AgentRunLifecycleStatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.AgentRunLifecycleStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.AgentRunLifecycleStatus); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.AgentRunLifecycleStatus value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Speechify.AgentRunLifecycleStatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.AgentRunLifecycleStatusNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.AgentRunLifecycleStatusNullable.g.cs new file mode 100644 index 00000000..459991af --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.AgentRunLifecycleStatusNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class AgentRunLifecycleStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.AgentRunLifecycleStatus? 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::Speechify.AgentRunLifecycleStatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.AgentRunLifecycleStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.AgentRunLifecycleStatus?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.AgentRunLifecycleStatus? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Speechify.AgentRunLifecycleStatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEvent.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEvent.g.cs new file mode 100644 index 00000000..fa457580 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEvent.g.cs @@ -0,0 +1,87 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Speechify.JsonConverters +{ + /// + public class ProjectRunStreamEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.ProjectRunStreamEvent Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.ProjectRunStreamEventDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Speechify.ProjectRunStreamEventDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::Speechify.ProjectRunStreamEventVariant1? runUpdated = default; + if (discriminator?.Type == global::Speechify.ProjectRunStreamEventDiscriminatorType.RunUpdated) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.ProjectRunStreamEventVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Speechify.ProjectRunStreamEventVariant1)}"); + runUpdated = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::Speechify.ProjectRunStreamEventVariant2? runEnded = default; + if (discriminator?.Type == global::Speechify.ProjectRunStreamEventDiscriminatorType.RunEnded) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.ProjectRunStreamEventVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Speechify.ProjectRunStreamEventVariant2)}"); + runEnded = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::Speechify.ProjectRunStreamEventVariant3? runsSynced = default; + if (discriminator?.Type == global::Speechify.ProjectRunStreamEventDiscriminatorType.RunsSynced) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.ProjectRunStreamEventVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Speechify.ProjectRunStreamEventVariant3)}"); + runsSynced = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var __value = new global::Speechify.ProjectRunStreamEvent( + discriminator?.Type, + runUpdated, + + runEnded, + + runsSynced + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.ProjectRunStreamEvent value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsRunUpdated) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.ProjectRunStreamEventVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.ProjectRunStreamEventVariant1).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.RunUpdated!, typeInfo); + } + else if (value.IsRunEnded) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.ProjectRunStreamEventVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.ProjectRunStreamEventVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.RunEnded!, typeInfo); + } + else if (value.IsRunsSynced) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.ProjectRunStreamEventVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.ProjectRunStreamEventVariant3).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.RunsSynced!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEventDiscriminatorType.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEventDiscriminatorType.g.cs new file mode 100644 index 00000000..fa9a9798 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEventDiscriminatorType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class ProjectRunStreamEventDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.ProjectRunStreamEventDiscriminatorType 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::Speechify.ProjectRunStreamEventDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.ProjectRunStreamEventDiscriminatorType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.ProjectRunStreamEventDiscriminatorType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.ProjectRunStreamEventDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Speechify.ProjectRunStreamEventDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEventDiscriminatorTypeNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEventDiscriminatorTypeNullable.g.cs new file mode 100644 index 00000000..3a4071ef --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEventDiscriminatorTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class ProjectRunStreamEventDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.ProjectRunStreamEventDiscriminatorType? 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::Speechify.ProjectRunStreamEventDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.ProjectRunStreamEventDiscriminatorType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.ProjectRunStreamEventDiscriminatorType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.ProjectRunStreamEventDiscriminatorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Speechify.ProjectRunStreamEventDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEventVariant1Type.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEventVariant1Type.g.cs new file mode 100644 index 00000000..ba5724ab --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEventVariant1Type.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class ProjectRunStreamEventVariant1TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.ProjectRunStreamEventVariant1Type 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::Speechify.ProjectRunStreamEventVariant1TypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.ProjectRunStreamEventVariant1Type)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.ProjectRunStreamEventVariant1Type); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.ProjectRunStreamEventVariant1Type value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Speechify.ProjectRunStreamEventVariant1TypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEventVariant1TypeNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEventVariant1TypeNullable.g.cs new file mode 100644 index 00000000..5a009d65 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEventVariant1TypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class ProjectRunStreamEventVariant1TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.ProjectRunStreamEventVariant1Type? 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::Speechify.ProjectRunStreamEventVariant1TypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.ProjectRunStreamEventVariant1Type)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.ProjectRunStreamEventVariant1Type?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.ProjectRunStreamEventVariant1Type? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Speechify.ProjectRunStreamEventVariant1TypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEventVariant2Type.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEventVariant2Type.g.cs new file mode 100644 index 00000000..cb5dc1bd --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEventVariant2Type.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class ProjectRunStreamEventVariant2TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.ProjectRunStreamEventVariant2Type 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::Speechify.ProjectRunStreamEventVariant2TypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.ProjectRunStreamEventVariant2Type)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.ProjectRunStreamEventVariant2Type); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.ProjectRunStreamEventVariant2Type value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Speechify.ProjectRunStreamEventVariant2TypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEventVariant2TypeNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEventVariant2TypeNullable.g.cs new file mode 100644 index 00000000..285ce29f --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEventVariant2TypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class ProjectRunStreamEventVariant2TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.ProjectRunStreamEventVariant2Type? 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::Speechify.ProjectRunStreamEventVariant2TypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.ProjectRunStreamEventVariant2Type)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.ProjectRunStreamEventVariant2Type?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.ProjectRunStreamEventVariant2Type? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Speechify.ProjectRunStreamEventVariant2TypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEventVariant3Type.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEventVariant3Type.g.cs new file mode 100644 index 00000000..8fc766eb --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEventVariant3Type.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class ProjectRunStreamEventVariant3TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.ProjectRunStreamEventVariant3Type 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::Speechify.ProjectRunStreamEventVariant3TypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.ProjectRunStreamEventVariant3Type)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.ProjectRunStreamEventVariant3Type); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.ProjectRunStreamEventVariant3Type value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Speechify.ProjectRunStreamEventVariant3TypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEventVariant3TypeNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEventVariant3TypeNullable.g.cs new file mode 100644 index 00000000..59e63588 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.ProjectRunStreamEventVariant3TypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class ProjectRunStreamEventVariant3TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.ProjectRunStreamEventVariant3Type? 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::Speechify.ProjectRunStreamEventVariant3TypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.ProjectRunStreamEventVariant3Type)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.ProjectRunStreamEventVariant3Type?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.ProjectRunStreamEventVariant3Type? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Speechify.ProjectRunStreamEventVariant3TypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.ToolApiRouteMethod.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.ToolApiRouteMethod.g.cs new file mode 100644 index 00000000..796717db --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.ToolApiRouteMethod.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class ToolApiRouteMethodJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.ToolApiRouteMethod 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::Speechify.ToolApiRouteMethodExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.ToolApiRouteMethod)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.ToolApiRouteMethod); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.ToolApiRouteMethod value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Speechify.ToolApiRouteMethodExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.ToolApiRouteMethodNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.ToolApiRouteMethodNullable.g.cs new file mode 100644 index 00000000..11ff3aa2 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.ToolApiRouteMethodNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class ToolApiRouteMethodNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.ToolApiRouteMethod? 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::Speechify.ToolApiRouteMethodExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.ToolApiRouteMethod)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.ToolApiRouteMethod?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.ToolApiRouteMethod? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Speechify.ToolApiRouteMethodExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.V1ApisApiIdAnalyticsGetParametersGranularity.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.V1ApisApiIdAnalyticsGetParametersGranularity.g.cs new file mode 100644 index 00000000..1ddc7925 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.V1ApisApiIdAnalyticsGetParametersGranularity.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class V1ApisApiIdAnalyticsGetParametersGranularityJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity 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::Speechify.V1ApisApiIdAnalyticsGetParametersGranularityExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularityExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.V1ApisApiIdAnalyticsGetParametersGranularityNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.V1ApisApiIdAnalyticsGetParametersGranularityNullable.g.cs new file mode 100644 index 00000000..0529769f --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.V1ApisApiIdAnalyticsGetParametersGranularityNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class V1ApisApiIdAnalyticsGetParametersGranularityNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity? 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::Speechify.V1ApisApiIdAnalyticsGetParametersGranularityExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularityExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.JsonSerializerContext.g.cs index d8145b1d..03b1f112 100644 --- a/src/libs/Speechify/Generated/Speechify.JsonSerializerContext.g.cs +++ b/src/libs/Speechify/Generated/Speechify.JsonSerializerContext.g.cs @@ -277,6 +277,18 @@ namespace Speechify [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListAgentRunsResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1AgentsRunsGetParametersStatus), TypeInfoPropertyName = "V1AgentsRunsGetParametersStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunLifecycleStatus), TypeInfoPropertyName = "AgentRunLifecycleStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunLifecycleError))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunLifecycle))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEvent), TypeInfoPropertyName = "ProjectRunStreamEvent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEventVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEventVariant1Type), TypeInfoPropertyName = "ProjectRunStreamEventVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEventVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEventVariant2Type), TypeInfoPropertyName = "ProjectRunStreamEventVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEventVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEventVariant3Type), TypeInfoPropertyName = "ProjectRunStreamEventVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEventDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEventDiscriminatorType), TypeInfoPropertyName = "ProjectRunStreamEventDiscriminatorType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SubmitAgentRunRequestDecision), TypeInfoPropertyName = "SubmitAgentRunRequestDecision2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SubmitAgentRunRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStepKind), TypeInfoPropertyName = "AgentRunStepKind2")] @@ -435,6 +447,11 @@ namespace Speechify [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolAttachedAgent))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListToolAttachedAgentsResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolApiRouteMethod), TypeInfoPropertyName = "ToolApiRouteMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolAPIRouteAPI))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolAPIRoute))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListToolAPIRoutesResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestMCPConnectionRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPProbeTool))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.McpProbeErrorDetailsStage), TypeInfoPropertyName = "McpProbeErrorDetailsStage2")] @@ -497,6 +514,18 @@ namespace Speechify [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.DataAssertion))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationConfig))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + internal sealed partial class SourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateAgentTestRequestConfig), TypeInfoPropertyName = "CreateAgentTestRequestConfig2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MockingStrategy), TypeInfoPropertyName = "MockingStrategy2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolMock))] @@ -514,18 +543,6 @@ namespace Speechify [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationToolCall))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationResultSentiment), TypeInfoPropertyName = "SimulationResultSentiment2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationCriterionResultStatus), TypeInfoPropertyName = "SimulationCriterionResultStatus2")] - internal sealed partial class SourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext - { - } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( - DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, - Converters = new global::System.Type[] - { - })] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationCriterionResult))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.DataAssertionResultMode), TypeInfoPropertyName = "DataAssertionResultMode2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.DataAssertionResult))] @@ -725,6 +742,13 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiUsageRoutesItems))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedAPIUsage))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity), TypeInfoPropertyName = "V1ApisApiIdAnalyticsGetParametersGranularity2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RequestAnalyticsTotals))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RequestAnalyticsBucket))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RequestTopPath))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RequestAnalyticsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiRouteMethod), TypeInfoPropertyName = "HostedApiRouteMethod2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiResolverType), TypeInfoPropertyName = "HostedApiResolverType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiResolverWriteMode), TypeInfoPropertyName = "HostedApiResolverWriteMode2")] @@ -896,6 +920,12 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PendingActionDefaultDecision?), TypeInfoPropertyName = "NullablePendingActionDefaultDecision2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1AgentsAgentIdRunsGetParametersStatus?), TypeInfoPropertyName = "NullableV1AgentsAgentIdRunsGetParametersStatus2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1AgentsRunsGetParametersStatus?), TypeInfoPropertyName = "NullableV1AgentsRunsGetParametersStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunLifecycleStatus?), TypeInfoPropertyName = "NullableAgentRunLifecycleStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEvent?), TypeInfoPropertyName = "NullableProjectRunStreamEvent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEventVariant1Type?), TypeInfoPropertyName = "NullableProjectRunStreamEventVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEventVariant2Type?), TypeInfoPropertyName = "NullableProjectRunStreamEventVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEventVariant3Type?), TypeInfoPropertyName = "NullableProjectRunStreamEventVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEventDiscriminatorType?), TypeInfoPropertyName = "NullableProjectRunStreamEventDiscriminatorType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SubmitAgentRunRequestDecision?), TypeInfoPropertyName = "NullableSubmitAgentRunRequestDecision2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStepKind?), TypeInfoPropertyName = "NullableAgentRunStepKind2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RunStepDelegationChildStatus?), TypeInfoPropertyName = "NullableRunStepDelegationChildStatus2")] @@ -939,6 +969,7 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolConfig?), TypeInfoPropertyName = "NullableToolConfig2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateToolRequestConfig?), TypeInfoPropertyName = "NullableCreateToolRequestConfig2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateToolRequestConfig?), TypeInfoPropertyName = "NullableUpdateToolRequestConfig2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolApiRouteMethod?), TypeInfoPropertyName = "NullableToolApiRouteMethod2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.McpProbeErrorDetailsStage?), TypeInfoPropertyName = "NullableMcpProbeErrorDetailsStage2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ImportOpenApiRequestSpec?), TypeInfoPropertyName = "NullableImportOpenApiRequestSpec2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestOpenApiCallResultOutcome?), TypeInfoPropertyName = "NullableTestOpenApiCallResultOutcome2")] @@ -987,6 +1018,7 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiAuthMode?), TypeInfoPropertyName = "NullableHostedApiAuthMode2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateHostedApiRequestAuthMode?), TypeInfoPropertyName = "NullableCreateHostedApiRequestAuthMode2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateHostedApiRequestAuthMode?), TypeInfoPropertyName = "NullableUpdateHostedApiRequestAuthMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity?), TypeInfoPropertyName = "NullableV1ApisApiIdAnalyticsGetParametersGranularity2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiRouteMethod?), TypeInfoPropertyName = "NullableHostedApiRouteMethod2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiResolverType?), TypeInfoPropertyName = "NullableHostedApiResolverType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiResolverWriteMode?), TypeInfoPropertyName = "NullableHostedApiResolverWriteMode2")] @@ -994,6 +1026,18 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiResolverOrderByDirection?), TypeInfoPropertyName = "NullableHostedApiResolverOrderByDirection2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateHostedApiRouteRequestMethod?), TypeInfoPropertyName = "NullableCreateHostedApiRouteRequestMethod2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiMountToolKind?), TypeInfoPropertyName = "NullableHostedApiMountToolKind2")] + internal sealed partial class SourceGenerationContextChunk1 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = new global::System.Type[] + { + })] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiMountOperationAction?), TypeInfoPropertyName = "NullableHostedApiMountOperationAction2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiMountOperationChangesItems?), TypeInfoPropertyName = "NullableHostedApiMountOperationChangesItems2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateHostedApiRouteRequestMethod?), TypeInfoPropertyName = "NullableUpdateHostedApiRouteRequestMethod2")] @@ -1026,18 +1070,6 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - internal sealed partial class SourceGenerationContextChunk1 : global::System.Text.Json.Serialization.JsonSerializerContext - { - } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( - DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, - Converters = new global::System.Type[] - { - })] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] @@ -1091,6 +1123,7 @@ internal sealed partial class SourceGenerationContextChunk1 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] @@ -1139,6 +1172,8 @@ internal sealed partial class SourceGenerationContextChunk1 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] @@ -1190,6 +1225,7 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) { options.Converters.Add(new global::Speechify.JsonConverters.SpeechStreamEventJsonConverter()); + options.Converters.Add(new global::Speechify.JsonConverters.ProjectRunStreamEventJsonConverter()); options.Converters.Add(new global::Speechify.JsonConverters.AgentRunStreamEventJsonConverter()); options.Converters.Add(new global::Speechify.JsonConverters.MCPAuthJsonConverter()); options.Converters.Add(new global::Speechify.JsonConverters.AgentToolConfigJsonConverter()); @@ -1472,6 +1508,26 @@ public override bool CanConvert(global::System.Type typeToConvert) || typeToConvert == typeof(global::Speechify.V1AgentsRunsGetParametersStatus?) + || typeToConvert == typeof(global::Speechify.AgentRunLifecycleStatus) + + || typeToConvert == typeof(global::Speechify.AgentRunLifecycleStatus?) + + || typeToConvert == typeof(global::Speechify.ProjectRunStreamEventVariant1Type) + + || typeToConvert == typeof(global::Speechify.ProjectRunStreamEventVariant1Type?) + + || typeToConvert == typeof(global::Speechify.ProjectRunStreamEventVariant2Type) + + || typeToConvert == typeof(global::Speechify.ProjectRunStreamEventVariant2Type?) + + || typeToConvert == typeof(global::Speechify.ProjectRunStreamEventVariant3Type) + + || typeToConvert == typeof(global::Speechify.ProjectRunStreamEventVariant3Type?) + + || typeToConvert == typeof(global::Speechify.ProjectRunStreamEventDiscriminatorType) + + || typeToConvert == typeof(global::Speechify.ProjectRunStreamEventDiscriminatorType?) + || typeToConvert == typeof(global::Speechify.SubmitAgentRunRequestDecision) || typeToConvert == typeof(global::Speechify.SubmitAgentRunRequestDecision?) @@ -1612,6 +1668,10 @@ public override bool CanConvert(global::System.Type typeToConvert) || typeToConvert == typeof(global::Speechify.ToolNameHolderKind?) + || typeToConvert == typeof(global::Speechify.ToolApiRouteMethod) + + || typeToConvert == typeof(global::Speechify.ToolApiRouteMethod?) + || typeToConvert == typeof(global::Speechify.McpProbeErrorDetailsStage) || typeToConvert == typeof(global::Speechify.McpProbeErrorDetailsStage?) @@ -1788,6 +1848,10 @@ public override bool CanConvert(global::System.Type typeToConvert) || typeToConvert == typeof(global::Speechify.UpdateHostedApiRequestAuthMode?) + || typeToConvert == typeof(global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity) + + || typeToConvert == typeof(global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity?) + || typeToConvert == typeof(global::Speechify.HostedApiRouteMethod) || typeToConvert == typeof(global::Speechify.HostedApiRouteMethod?) @@ -2497,6 +2561,56 @@ public override bool CanConvert(global::System.Type typeToConvert) return new global::Speechify.JsonConverters.V1AgentsRunsGetParametersStatusNullableJsonConverter(); } + if (typeToConvert == typeof(global::Speechify.AgentRunLifecycleStatus)) + { + return new global::Speechify.JsonConverters.AgentRunLifecycleStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunLifecycleStatus?)) + { + return new global::Speechify.JsonConverters.AgentRunLifecycleStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ProjectRunStreamEventVariant1Type)) + { + return new global::Speechify.JsonConverters.ProjectRunStreamEventVariant1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ProjectRunStreamEventVariant1Type?)) + { + return new global::Speechify.JsonConverters.ProjectRunStreamEventVariant1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ProjectRunStreamEventVariant2Type)) + { + return new global::Speechify.JsonConverters.ProjectRunStreamEventVariant2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ProjectRunStreamEventVariant2Type?)) + { + return new global::Speechify.JsonConverters.ProjectRunStreamEventVariant2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ProjectRunStreamEventVariant3Type)) + { + return new global::Speechify.JsonConverters.ProjectRunStreamEventVariant3TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ProjectRunStreamEventVariant3Type?)) + { + return new global::Speechify.JsonConverters.ProjectRunStreamEventVariant3TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ProjectRunStreamEventDiscriminatorType)) + { + return new global::Speechify.JsonConverters.ProjectRunStreamEventDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ProjectRunStreamEventDiscriminatorType?)) + { + return new global::Speechify.JsonConverters.ProjectRunStreamEventDiscriminatorTypeNullableJsonConverter(); + } + if (typeToConvert == typeof(global::Speechify.SubmitAgentRunRequestDecision)) { return new global::Speechify.JsonConverters.SubmitAgentRunRequestDecisionJsonConverter(); @@ -2847,6 +2961,16 @@ public override bool CanConvert(global::System.Type typeToConvert) return new global::Speechify.JsonConverters.ToolNameHolderKindNullableJsonConverter(); } + if (typeToConvert == typeof(global::Speechify.ToolApiRouteMethod)) + { + return new global::Speechify.JsonConverters.ToolApiRouteMethodJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolApiRouteMethod?)) + { + return new global::Speechify.JsonConverters.ToolApiRouteMethodNullableJsonConverter(); + } + if (typeToConvert == typeof(global::Speechify.McpProbeErrorDetailsStage)) { return new global::Speechify.JsonConverters.McpProbeErrorDetailsStageJsonConverter(); @@ -3287,6 +3411,16 @@ public override bool CanConvert(global::System.Type typeToConvert) return new global::Speechify.JsonConverters.UpdateHostedApiRequestAuthModeNullableJsonConverter(); } + if (typeToConvert == typeof(global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity)) + { + return new global::Speechify.JsonConverters.V1ApisApiIdAnalyticsGetParametersGranularityJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity?)) + { + return new global::Speechify.JsonConverters.V1ApisApiIdAnalyticsGetParametersGranularityNullableJsonConverter(); + } + if (typeToConvert == typeof(global::Speechify.HostedApiRouteMethod)) { return new global::Speechify.JsonConverters.HostedApiRouteMethodJsonConverter(); diff --git a/src/libs/Speechify/Generated/Speechify.JsonSerializerContextTypes.g.cs b/src/libs/Speechify/Generated/Speechify.JsonSerializerContextTypes.g.cs index 916be4bd..334c5bbe 100644 --- a/src/libs/Speechify/Generated/Speechify.JsonSerializerContextTypes.g.cs +++ b/src/libs/Speechify/Generated/Speechify.JsonSerializerContextTypes.g.cs @@ -1073,2159 +1073,2255 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Speechify.SubmitAgentRunRequestDecision? Type260 { get; set; } + public global::Speechify.AgentRunLifecycleStatus? Type260 { get; set; } /// /// /// - public global::Speechify.SubmitAgentRunRequest? Type261 { get; set; } + public global::Speechify.AgentRunLifecycleError? Type261 { get; set; } /// /// /// - public global::Speechify.AgentRunStepKind? Type262 { get; set; } + public global::Speechify.AgentRunLifecycle? Type262 { get; set; } /// /// /// - public global::Speechify.RunStepDelegationChildStatus? Type263 { get; set; } + public global::Speechify.ProjectRunStreamEvent? Type263 { get; set; } /// /// /// - public global::Speechify.RunStepDelegation? Type264 { get; set; } + public global::Speechify.ProjectRunStreamEventVariant1? Type264 { get; set; } /// /// /// - public global::Speechify.AgentRunStep? Type265 { get; set; } + public global::Speechify.ProjectRunStreamEventVariant1Type? Type265 { get; set; } /// /// /// - public global::Speechify.ListAgentRunStepsResponse? Type266 { get; set; } + public global::Speechify.ProjectRunStreamEventVariant2? Type266 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type267 { get; set; } + public global::Speechify.ProjectRunStreamEventVariant2Type? Type267 { get; set; } /// /// /// - public global::Speechify.AgentRunStepAddedEventKind? Type268 { get; set; } + public global::Speechify.ProjectRunStreamEventVariant3? Type268 { get; set; } /// /// /// - public global::Speechify.AgentRunStatusChangedEventStatus? Type269 { get; set; } + public global::Speechify.ProjectRunStreamEventVariant3Type? Type269 { get; set; } /// /// /// - public global::Speechify.AgentRunEndedEventStatus? Type270 { get; set; } + public global::Speechify.ProjectRunStreamEventDiscriminator? Type270 { get; set; } /// /// /// - public global::Speechify.AgentRunEndedEventOutput? Type271 { get; set; } + public global::Speechify.ProjectRunStreamEventDiscriminatorType? Type271 { get; set; } /// /// /// - public global::Speechify.AgentRunStreamEvent? Type272 { get; set; } + public global::Speechify.SubmitAgentRunRequestDecision? Type272 { get; set; } /// /// /// - public global::Speechify.AgentRunStreamEventVariant1? Type273 { get; set; } + public global::Speechify.SubmitAgentRunRequest? Type273 { get; set; } /// /// /// - public global::Speechify.AgentRunStreamEventVariant1Type? Type274 { get; set; } + public global::Speechify.AgentRunStepKind? Type274 { get; set; } /// /// /// - public global::Speechify.AgentRunStreamEventVariant2? Type275 { get; set; } + public global::Speechify.RunStepDelegationChildStatus? Type275 { get; set; } /// /// /// - public global::Speechify.AgentRunStreamEventVariant2Type? Type276 { get; set; } + public global::Speechify.RunStepDelegation? Type276 { get; set; } /// /// /// - public global::Speechify.AgentRunStreamEventVariant3? Type277 { get; set; } + public global::Speechify.AgentRunStep? Type277 { get; set; } /// /// /// - public global::Speechify.AgentRunStreamEventVariant3Type? Type278 { get; set; } + public global::Speechify.ListAgentRunStepsResponse? Type278 { get; set; } /// /// /// - public global::Speechify.AgentRunStreamEventVariant4? Type279 { get; set; } + public global::System.Collections.Generic.IList? Type279 { get; set; } /// /// /// - public global::Speechify.AgentRunStreamEventVariant4Type? Type280 { get; set; } + public global::Speechify.AgentRunStepAddedEventKind? Type280 { get; set; } /// /// /// - public global::Speechify.AgentRunStreamEventDiscriminator? Type281 { get; set; } + public global::Speechify.AgentRunStatusChangedEventStatus? Type281 { get; set; } /// /// /// - public global::Speechify.AgentRunStreamEventDiscriminatorType? Type282 { get; set; } + public global::Speechify.AgentRunEndedEventStatus? Type282 { get; set; } /// /// /// - public global::Speechify.KnowledgeBaseInjection? Type283 { get; set; } + public global::Speechify.AgentRunEndedEventOutput? Type283 { get; set; } /// /// /// - public global::Speechify.KnowledgeBase? Type284 { get; set; } + public global::Speechify.AgentRunStreamEvent? Type284 { get; set; } /// /// /// - public global::Speechify.ListKnowledgeBasesResponse? Type285 { get; set; } + public global::Speechify.AgentRunStreamEventVariant1? Type285 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type286 { get; set; } + public global::Speechify.AgentRunStreamEventVariant1Type? Type286 { get; set; } /// /// /// - public global::Speechify.CreateKnowledgeBaseRequest? Type287 { get; set; } + public global::Speechify.AgentRunStreamEventVariant2? Type287 { get; set; } /// /// /// - public global::Speechify.SearchKnowledgeBasesRequest? Type288 { get; set; } + public global::Speechify.AgentRunStreamEventVariant2Type? Type288 { get; set; } /// /// /// - public global::Speechify.KnowledgeBaseSearchHit? Type289 { get; set; } + public global::Speechify.AgentRunStreamEventVariant3? Type289 { get; set; } /// /// /// - public global::Speechify.SearchKnowledgeBasesResponse? Type290 { get; set; } + public global::Speechify.AgentRunStreamEventVariant3Type? Type290 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type291 { get; set; } + public global::Speechify.AgentRunStreamEventVariant4? Type291 { get; set; } /// /// /// - public global::Speechify.UpdateKnowledgeBaseRequest? Type292 { get; set; } + public global::Speechify.AgentRunStreamEventVariant4Type? Type292 { get; set; } /// /// /// - public global::Speechify.KnowledgeBaseCoverageHealth? Type293 { get; set; } + public global::Speechify.AgentRunStreamEventDiscriminator? Type293 { get; set; } /// /// /// - public global::Speechify.KnowledgeBaseCoverageGap? Type294 { get; set; } + public global::Speechify.AgentRunStreamEventDiscriminatorType? Type294 { get; set; } /// /// /// - public global::Speechify.KnowledgeBaseDocumentSourceKind? Type295 { get; set; } + public global::Speechify.KnowledgeBaseInjection? Type295 { get; set; } /// /// /// - public global::Speechify.KnowledgeBaseCoverageDocument? Type296 { get; set; } + public global::Speechify.KnowledgeBase? Type296 { get; set; } /// /// /// - public global::Speechify.KnowledgeBaseCoverage? Type297 { get; set; } + public global::Speechify.ListKnowledgeBasesResponse? Type297 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type298 { get; set; } + public global::System.Collections.Generic.IList? Type298 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type299 { get; set; } + public global::Speechify.CreateKnowledgeBaseRequest? Type299 { get; set; } /// /// /// - public global::Speechify.KnowledgeBaseEvalCase? Type300 { get; set; } + public global::Speechify.SearchKnowledgeBasesRequest? Type300 { get; set; } /// /// /// - public global::Speechify.ListKnowledgeBaseEvalCasesResponse? Type301 { get; set; } + public global::Speechify.KnowledgeBaseSearchHit? Type301 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type302 { get; set; } + public global::Speechify.SearchKnowledgeBasesResponse? Type302 { get; set; } /// /// /// - public global::Speechify.CreateKnowledgeBaseEvalCaseRequest? Type303 { get; set; } + public global::System.Collections.Generic.IList? Type303 { get; set; } /// /// /// - public global::Speechify.UpdateKnowledgeBaseEvalCaseRequest? Type304 { get; set; } + public global::Speechify.UpdateKnowledgeBaseRequest? Type304 { get; set; } /// /// /// - public global::Speechify.KnowledgeBaseEvaluationResults? Type305 { get; set; } + public global::Speechify.KnowledgeBaseCoverageHealth? Type305 { get; set; } /// /// /// - public global::Speechify.KnowledgeBaseEvaluationMetrics? Type306 { get; set; } + public global::Speechify.KnowledgeBaseCoverageGap? Type306 { get; set; } /// /// /// - public global::Speechify.KnowledgeBaseEvaluation? Type307 { get; set; } + public global::Speechify.KnowledgeBaseDocumentSourceKind? Type307 { get; set; } /// /// /// - public global::Speechify.ListKnowledgeBaseEvaluationsResponse? Type308 { get; set; } + public global::Speechify.KnowledgeBaseCoverageDocument? Type308 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type309 { get; set; } + public global::Speechify.KnowledgeBaseCoverage? Type309 { get; set; } /// /// /// - public global::Speechify.StartKnowledgeBaseEvaluationRequest? Type310 { get; set; } + public global::System.Collections.Generic.IList? Type310 { get; set; } /// /// /// - public global::Speechify.KnowledgeBaseEvaluationHit? Type311 { get; set; } + public global::System.Collections.Generic.IList? Type311 { get; set; } /// /// /// - public global::Speechify.KnowledgeBaseEvaluationResult? Type312 { get; set; } + public global::Speechify.KnowledgeBaseEvalCase? Type312 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type313 { get; set; } + public global::Speechify.ListKnowledgeBaseEvalCasesResponse? Type313 { get; set; } /// /// /// - public global::Speechify.ListKnowledgeBaseEvaluationResultsResponse? Type314 { get; set; } + public global::System.Collections.Generic.IList? Type314 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type315 { get; set; } + public global::Speechify.CreateKnowledgeBaseEvalCaseRequest? Type315 { get; set; } /// /// /// - public global::Speechify.KnowledgeBaseDocumentInjectionMode? Type316 { get; set; } + public global::Speechify.UpdateKnowledgeBaseEvalCaseRequest? Type316 { get; set; } /// /// /// - public global::Speechify.KnowledgeBaseDocumentStatus? Type317 { get; set; } + public global::Speechify.KnowledgeBaseEvaluationResults? Type317 { get; set; } /// /// /// - public global::Speechify.KnowledgeBaseDocument? Type318 { get; set; } + public global::Speechify.KnowledgeBaseEvaluationMetrics? Type318 { get; set; } /// /// /// - public global::Speechify.ListKnowledgeBaseDocumentsResponse? Type319 { get; set; } + public global::Speechify.KnowledgeBaseEvaluation? Type319 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type320 { get; set; } + public global::Speechify.ListKnowledgeBaseEvaluationsResponse? Type320 { get; set; } /// /// /// - public global::Speechify.KnowledgeBaseDocumentDetailInjectionMode? Type321 { get; set; } + public global::System.Collections.Generic.IList? Type321 { get; set; } /// /// /// - public global::Speechify.DependentAgent? Type322 { get; set; } + public global::Speechify.StartKnowledgeBaseEvaluationRequest? Type322 { get; set; } /// /// /// - public global::Speechify.RefreshConfig? Type323 { get; set; } + public global::Speechify.KnowledgeBaseEvaluationHit? Type323 { get; set; } /// /// /// - public global::Speechify.KnowledgeBaseDocumentDetail? Type324 { get; set; } + public global::Speechify.KnowledgeBaseEvaluationResult? Type324 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type325 { get; set; } + public global::System.Collections.Generic.IList? Type325 { get; set; } /// /// /// - public global::Speechify.V1AgentsKnowledgeBasesKbIdDocumentsDocumentIdPatchRequestBodyContentApplicationJsonSchemaInjectionMode? Type326 { get; set; } + public global::Speechify.ListKnowledgeBaseEvaluationResultsResponse? Type326 { get; set; } /// /// /// - public global::Speechify.KnowledgeBaseChunk? Type327 { get; set; } + public global::System.Collections.Generic.IList? Type327 { get; set; } /// /// /// - public global::Speechify.ListKnowledgeBaseChunksResponse? Type328 { get; set; } + public global::Speechify.KnowledgeBaseDocumentInjectionMode? Type328 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type329 { get; set; } + public global::Speechify.KnowledgeBaseDocumentStatus? Type329 { get; set; } /// /// /// - public global::Speechify.CreateCrawlImportRequest? Type330 { get; set; } + public global::Speechify.KnowledgeBaseDocument? Type330 { get; set; } /// /// /// - public global::Speechify.ImportJobKind? Type331 { get; set; } + public global::Speechify.ListKnowledgeBaseDocumentsResponse? Type331 { get; set; } /// /// /// - public global::Speechify.ImportJob? Type332 { get; set; } + public global::System.Collections.Generic.IList? Type332 { get; set; } /// /// /// - public global::Speechify.CreateSitemapImportRequest? Type333 { get; set; } + public global::Speechify.KnowledgeBaseDocumentDetailInjectionMode? Type333 { get; set; } /// /// /// - public global::Speechify.CreateTextDocumentRequest? Type334 { get; set; } + public global::Speechify.DependentAgent? Type334 { get; set; } /// /// /// - public global::Speechify.CreateURLDocumentRequest? Type335 { get; set; } + public global::Speechify.RefreshConfig? Type335 { get; set; } /// /// /// - public global::Speechify.CreateURLBatchImportRequest? Type336 { get; set; } + public global::Speechify.KnowledgeBaseDocumentDetail? Type336 { get; set; } /// /// /// - public global::Speechify.BatchDeleteDocumentsRequest? Type337 { get; set; } + public global::System.Collections.Generic.IList? Type337 { get; set; } /// /// /// - public global::Speechify.BatchMoveDocumentsRequest? Type338 { get; set; } + public global::Speechify.V1AgentsKnowledgeBasesKbIdDocumentsDocumentIdPatchRequestBodyContentApplicationJsonSchemaInjectionMode? Type338 { get; set; } /// /// /// - public global::Speechify.BatchMoveDocumentsResponse? Type339 { get; set; } + public global::Speechify.KnowledgeBaseChunk? Type339 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type340 { get; set; } + public global::Speechify.ListKnowledgeBaseChunksResponse? Type340 { get; set; } /// /// /// - public global::Speechify.UpdateRefreshConfigRequest? Type341 { get; set; } + public global::System.Collections.Generic.IList? Type341 { get; set; } /// /// /// - public global::Speechify.RefreshHistoryEntryStatus? Type342 { get; set; } + public global::Speechify.CreateCrawlImportRequest? Type342 { get; set; } /// /// /// - public global::Speechify.RefreshHistoryEntry? Type343 { get; set; } + public global::Speechify.ImportJobKind? Type343 { get; set; } /// /// /// - public global::Speechify.ListRefreshHistoryResponse? Type344 { get; set; } + public global::Speechify.ImportJob? Type344 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type345 { get; set; } + public global::Speechify.CreateSitemapImportRequest? Type345 { get; set; } /// /// /// - public global::Speechify.KnowledgeBaseFolder? Type346 { get; set; } + public global::Speechify.CreateTextDocumentRequest? Type346 { get; set; } /// /// /// - public global::Speechify.ListKnowledgeBaseFoldersResponse? Type347 { get; set; } + public global::Speechify.CreateURLDocumentRequest? Type347 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type348 { get; set; } + public global::Speechify.CreateURLBatchImportRequest? Type348 { get; set; } /// /// /// - public global::Speechify.CreateFolderRequest? Type349 { get; set; } + public global::Speechify.BatchDeleteDocumentsRequest? Type349 { get; set; } /// /// /// - public global::Speechify.UpdateFolderRequest? Type350 { get; set; } + public global::Speechify.BatchMoveDocumentsRequest? Type350 { get; set; } /// /// /// - public global::Speechify.ListImportJobsResponse? Type351 { get; set; } + public global::Speechify.BatchMoveDocumentsResponse? Type351 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type352 { get; set; } + public global::System.Collections.Generic.IList? Type352 { get; set; } /// /// /// - public global::Speechify.AttachedKnowledgeBasesResponseInjection? Type353 { get; set; } + public global::Speechify.UpdateRefreshConfigRequest? Type353 { get; set; } /// /// /// - public global::Speechify.AttachedKnowledgeBasesResponse? Type354 { get; set; } + public global::Speechify.RefreshHistoryEntryStatus? Type354 { get; set; } /// /// /// - public global::Speechify.ToolKind? Type355 { get; set; } + public global::Speechify.RefreshHistoryEntry? Type355 { get; set; } /// /// /// - public global::Speechify.ToolParamType? Type356 { get; set; } + public global::Speechify.ListRefreshHistoryResponse? Type356 { get; set; } /// /// /// - public global::Speechify.ToolParam? Type357 { get; set; } + public global::System.Collections.Generic.IList? Type357 { get; set; } /// /// /// - public global::Speechify.BuiltinToolConfig? Type358 { get; set; } + public global::Speechify.KnowledgeBaseFolder? Type358 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type359 { get; set; } + public global::Speechify.ListKnowledgeBaseFoldersResponse? Type359 { get; set; } /// /// /// - public global::Speechify.WebhookToolConfigMethod? Type360 { get; set; } + public global::System.Collections.Generic.IList? Type360 { get; set; } /// /// /// - public global::Speechify.LongRunningToolConfigWaitAudioPreset? Type361 { get; set; } + public global::Speechify.CreateFolderRequest? Type361 { get; set; } /// /// /// - public global::Speechify.LongRunningToolConfigWaitAudio? Type362 { get; set; } + public global::Speechify.UpdateFolderRequest? Type362 { get; set; } /// /// /// - public global::Speechify.LongRunningToolConfigOnDuplicate? Type363 { get; set; } + public global::Speechify.ListImportJobsResponse? Type363 { get; set; } /// /// /// - public global::Speechify.LongRunningToolConfig? Type364 { get; set; } + public global::System.Collections.Generic.IList? Type364 { get; set; } /// /// /// - public global::Speechify.WebhookToolConfig? Type365 { get; set; } + public global::Speechify.AttachedKnowledgeBasesResponseInjection? Type365 { get; set; } /// /// /// - public global::Speechify.ClientToolConfig? Type366 { get; set; } + public global::Speechify.AttachedKnowledgeBasesResponse? Type366 { get; set; } /// /// /// - public global::Speechify.MCPTransport? Type367 { get; set; } + public global::Speechify.ToolKind? Type367 { get; set; } /// /// /// - public global::Speechify.MCPAuth? Type368 { get; set; } + public global::Speechify.ToolParamType? Type368 { get; set; } /// /// /// - public global::Speechify.MCPAuthVariant1? Type369 { get; set; } + public global::Speechify.ToolParam? Type369 { get; set; } /// /// /// - public global::Speechify.MCPAuthVariant1Type? Type370 { get; set; } + public global::Speechify.BuiltinToolConfig? Type370 { get; set; } /// /// /// - public global::Speechify.MCPAuthVariant2? Type371 { get; set; } + public global::System.Collections.Generic.IList? Type371 { get; set; } /// /// /// - public global::Speechify.MCPAuthVariant2Type? Type372 { get; set; } + public global::Speechify.WebhookToolConfigMethod? Type372 { get; set; } /// /// /// - public global::Speechify.MCPAuthVariant3? Type373 { get; set; } + public global::Speechify.LongRunningToolConfigWaitAudioPreset? Type373 { get; set; } /// /// /// - public global::Speechify.MCPAuthVariant3Type? Type374 { get; set; } + public global::Speechify.LongRunningToolConfigWaitAudio? Type374 { get; set; } /// /// /// - public global::Speechify.MCPAuthDiscriminator? Type375 { get; set; } + public global::Speechify.LongRunningToolConfigOnDuplicate? Type375 { get; set; } /// /// /// - public global::Speechify.MCPAuthDiscriminatorType? Type376 { get; set; } + public global::Speechify.LongRunningToolConfig? Type376 { get; set; } /// /// /// - public global::Speechify.ToolActionClass? Type377 { get; set; } + public global::Speechify.WebhookToolConfig? Type377 { get; set; } /// /// /// - public global::Speechify.ToolResponseMapping? Type378 { get; set; } + public global::Speechify.ClientToolConfig? Type378 { get; set; } /// /// /// - public global::Speechify.MCPToolConfig? Type379 { get; set; } + public global::Speechify.MCPTransport? Type379 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type380 { get; set; } + public global::Speechify.MCPAuth? Type380 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type381 { get; set; } + public global::Speechify.MCPAuthVariant1? Type381 { get; set; } /// /// /// - public global::Speechify.OpenApiOperationMethod? Type382 { get; set; } + public global::Speechify.MCPAuthVariant1Type? Type382 { get; set; } /// /// /// - public global::Speechify.OpenApiParamIn? Type383 { get; set; } + public global::Speechify.MCPAuthVariant2? Type383 { get; set; } /// /// /// - public global::Speechify.OpenAPIParam? Type384 { get; set; } + public global::Speechify.MCPAuthVariant2Type? Type384 { get; set; } /// /// /// - public global::Speechify.OpenApiBodyContentType? Type385 { get; set; } + public global::Speechify.MCPAuthVariant3? Type385 { get; set; } /// /// /// - public global::Speechify.OpenAPIBody? Type386 { get; set; } + public global::Speechify.MCPAuthVariant3Type? Type386 { get; set; } /// /// /// - public global::Speechify.OpenAPIOperation? Type387 { get; set; } + public global::Speechify.MCPAuthDiscriminator? Type387 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type388 { get; set; } + public global::Speechify.MCPAuthDiscriminatorType? Type388 { get; set; } /// /// /// - public global::Speechify.OpenAPIToolConfig? Type389 { get; set; } + public global::Speechify.ToolActionClass? Type389 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type390 { get; set; } + public global::Speechify.ToolResponseMapping? Type390 { get; set; } /// /// /// - public global::Speechify.AgentToolConfig? Type391 { get; set; } + public global::Speechify.MCPToolConfig? Type391 { get; set; } /// /// /// - public global::Speechify.ToolApprovalClass? Type392 { get; set; } + public global::System.Collections.Generic.Dictionary? Type392 { get; set; } /// /// /// - public global::Speechify.ToolReach? Type393 { get; set; } + public global::System.Collections.Generic.Dictionary? Type393 { get; set; } /// /// /// - public global::Speechify.AgentTool? Type394 { get; set; } + public global::Speechify.OpenApiOperationMethod? Type394 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type395 { get; set; } + public global::Speechify.OpenApiParamIn? Type395 { get; set; } /// /// /// - public global::Speechify.ListAgentToolsResponse? Type396 { get; set; } + public global::Speechify.OpenAPIParam? Type396 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type397 { get; set; } + public global::Speechify.OpenApiBodyContentType? Type397 { get; set; } /// /// /// - public global::Speechify.CreateAgentToolRequestConfig? Type398 { get; set; } + public global::Speechify.OpenAPIBody? Type398 { get; set; } /// /// /// - public global::Speechify.CreateAgentToolRequest? Type399 { get; set; } + public global::Speechify.OpenAPIOperation? Type399 { get; set; } /// /// /// - public global::Speechify.ToolNameHolderKind? Type400 { get; set; } + public global::System.Collections.Generic.IList? Type400 { get; set; } /// /// /// - public global::Speechify.ToolNameHolder? Type401 { get; set; } + public global::Speechify.OpenAPIToolConfig? Type401 { get; set; } /// /// /// - public global::Speechify.ToolNameTakenErrorDetailDetails? Type402 { get; set; } + public global::System.Collections.Generic.IList? Type402 { get; set; } /// /// /// - public global::Speechify.ToolNameTakenErrorDetail? Type403 { get; set; } + public global::Speechify.AgentToolConfig? Type403 { get; set; } /// /// /// - public global::Speechify.ToolNameTakenError? Type404 { get; set; } + public global::Speechify.ToolApprovalClass? Type404 { get; set; } /// /// /// - public global::Speechify.UpdateAgentToolRequestConfig? Type405 { get; set; } + public global::Speechify.ToolReach? Type405 { get; set; } /// /// /// - public global::Speechify.UpdateAgentToolRequest? Type406 { get; set; } + public global::Speechify.AgentTool? Type406 { get; set; } /// /// /// - public global::Speechify.ToolConfig? Type407 { get; set; } + public global::System.Collections.Generic.IList? Type407 { get; set; } /// /// /// - public global::Speechify.Tool? Type408 { get; set; } + public global::Speechify.ListAgentToolsResponse? Type408 { get; set; } /// /// /// - public global::Speechify.ListToolsResponse? Type409 { get; set; } + public global::System.Collections.Generic.IList? Type409 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type410 { get; set; } + public global::Speechify.CreateAgentToolRequestConfig? Type410 { get; set; } /// /// /// - public global::Speechify.CreateToolRequestConfig? Type411 { get; set; } + public global::Speechify.CreateAgentToolRequest? Type411 { get; set; } /// /// /// - public global::Speechify.CreateToolRequest? Type412 { get; set; } + public global::Speechify.ToolNameHolderKind? Type412 { get; set; } /// /// /// - public global::Speechify.UpdateToolRequestConfig? Type413 { get; set; } + public global::Speechify.ToolNameHolder? Type413 { get; set; } /// /// /// - public global::Speechify.UpdateToolRequest? Type414 { get; set; } + public global::Speechify.ToolNameTakenErrorDetailDetails? Type414 { get; set; } /// /// /// - public global::Speechify.ToolAttachedAgent? Type415 { get; set; } + public global::Speechify.ToolNameTakenErrorDetail? Type415 { get; set; } /// /// /// - public global::Speechify.ListToolAttachedAgentsResponse? Type416 { get; set; } + public global::Speechify.ToolNameTakenError? Type416 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type417 { get; set; } + public global::Speechify.UpdateAgentToolRequestConfig? Type417 { get; set; } /// /// /// - public global::Speechify.TestMCPConnectionRequest? Type418 { get; set; } + public global::Speechify.UpdateAgentToolRequest? Type418 { get; set; } /// /// /// - public global::Speechify.MCPProbeTool? Type419 { get; set; } + public global::Speechify.ToolConfig? Type419 { get; set; } /// /// /// - public global::Speechify.McpProbeErrorDetailsStage? Type420 { get; set; } + public global::Speechify.Tool? Type420 { get; set; } /// /// /// - public global::Speechify.MCPProbeErrorDetails? Type421 { get; set; } + public global::Speechify.ListToolsResponse? Type421 { get; set; } /// /// /// - public global::Speechify.MCPProbeResult? Type422 { get; set; } + public global::System.Collections.Generic.IList? Type422 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type423 { get; set; } + public global::Speechify.CreateToolRequestConfig? Type423 { get; set; } /// /// /// - public global::Speechify.TestWebhookConnectionRequest? Type424 { get; set; } + public global::Speechify.CreateToolRequest? Type424 { get; set; } /// /// /// - public global::Speechify.WebhookProbeResult? Type425 { get; set; } + public global::Speechify.UpdateToolRequestConfig? Type425 { get; set; } /// /// /// - public global::Speechify.ImportOpenApiRequestSpec? Type426 { get; set; } + public global::Speechify.UpdateToolRequest? Type426 { get; set; } /// /// /// - public global::Speechify.ImportOpenAPIRequest? Type427 { get; set; } + public global::Speechify.ToolAttachedAgent? Type427 { get; set; } /// /// /// - public global::Speechify.ImportedOpenAPIDocument? Type428 { get; set; } + public global::Speechify.ListToolAttachedAgentsResponse? Type428 { get; set; } /// /// /// - public global::Speechify.SkippedOpenAPIOperation? Type429 { get; set; } + public global::System.Collections.Generic.IList? Type429 { get; set; } /// /// /// - public global::Speechify.ImportOpenAPIResult? Type430 { get; set; } + public global::Speechify.ToolApiRouteMethod? Type430 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type431 { get; set; } + public global::Speechify.ToolAPIRouteAPI? Type431 { get; set; } /// /// /// - public global::Speechify.TestOpenAPICallRequest? Type432 { get; set; } + public global::Speechify.ToolAPIRoute? Type432 { get; set; } /// /// /// - public global::Speechify.TestOpenApiCallResultOutcome? Type433 { get; set; } + public global::Speechify.ListToolAPIRoutesResponse? Type433 { get; set; } /// /// /// - public global::Speechify.TestOpenAPICallResult? Type434 { get; set; } + public global::System.Collections.Generic.IList? Type434 { get; set; } /// /// /// - public global::Speechify.SystemBuiltinInfoExecution? Type435 { get; set; } + public global::Speechify.TestMCPConnectionRequest? Type435 { get; set; } /// /// /// - public global::Speechify.SystemBuiltinInfo? Type436 { get; set; } + public global::Speechify.MCPProbeTool? Type436 { get; set; } /// /// /// - public global::Speechify.ListSystemBuiltinsResponse? Type437 { get; set; } + public global::Speechify.McpProbeErrorDetailsStage? Type437 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type438 { get; set; } + public global::Speechify.MCPProbeErrorDetails? Type438 { get; set; } /// /// /// - public global::Speechify.CredentialKind? Type439 { get; set; } + public global::Speechify.MCPProbeResult? Type439 { get; set; } /// /// /// - public global::Speechify.OAuth2TokenEndpointAuthMethod? Type440 { get; set; } + public global::System.Collections.Generic.IList? Type440 { get; set; } /// /// /// - public global::Speechify.CredentialConfigViewOauth2ClientCredentials? Type441 { get; set; } + public global::Speechify.TestWebhookConnectionRequest? Type441 { get; set; } /// /// /// - public global::Speechify.CredentialConfigViewOauth2Jwt? Type442 { get; set; } + public global::Speechify.WebhookProbeResult? Type442 { get; set; } /// /// /// - public global::Speechify.CredentialConfigViewBasic? Type443 { get; set; } + public global::Speechify.ImportOpenApiRequestSpec? Type443 { get; set; } /// /// /// - public global::Speechify.CredentialConfigViewBearer? Type444 { get; set; } + public global::Speechify.ImportOpenAPIRequest? Type444 { get; set; } /// /// /// - public global::Speechify.CredentialConfigViewSharedSecret? Type445 { get; set; } + public global::Speechify.ImportedOpenAPIDocument? Type445 { get; set; } /// /// /// - public global::Speechify.CredentialConfigViewCustomHeaders? Type446 { get; set; } + public global::Speechify.SkippedOpenAPIOperation? Type446 { get; set; } /// /// /// - public global::Speechify.CredentialConfigView? Type447 { get; set; } + public global::Speechify.ImportOpenAPIResult? Type447 { get; set; } /// /// /// - public global::Speechify.CredentialReferenceResourceType? Type448 { get; set; } + public global::System.Collections.Generic.IList? Type448 { get; set; } /// /// /// - public global::Speechify.CredentialReference? Type449 { get; set; } + public global::Speechify.TestOpenAPICallRequest? Type449 { get; set; } /// /// /// - public global::Speechify.CredentialUsedBy? Type450 { get; set; } + public global::Speechify.TestOpenApiCallResultOutcome? Type450 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type451 { get; set; } + public global::Speechify.TestOpenAPICallResult? Type451 { get; set; } /// /// /// - public global::Speechify.Credential? Type452 { get; set; } + public global::Speechify.SystemBuiltinInfoExecution? Type452 { get; set; } /// /// /// - public global::Speechify.ListCredentialsResponse? Type453 { get; set; } + public global::Speechify.SystemBuiltinInfo? Type453 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type454 { get; set; } + public global::Speechify.ListSystemBuiltinsResponse? Type454 { get; set; } /// /// /// - public global::Speechify.OAuth2ClientCredentialsConfig? Type455 { get; set; } + public global::System.Collections.Generic.IList? Type455 { get; set; } /// /// /// - public global::Speechify.OAuth2JWTConfig? Type456 { get; set; } + public global::Speechify.CredentialKind? Type456 { get; set; } /// /// /// - public global::Speechify.BasicAuthConfig? Type457 { get; set; } + public global::Speechify.OAuth2TokenEndpointAuthMethod? Type457 { get; set; } /// /// /// - public global::Speechify.BearerAuthConfig? Type458 { get; set; } + public global::Speechify.CredentialConfigViewOauth2ClientCredentials? Type458 { get; set; } /// /// /// - public global::Speechify.CustomHeadersConfig? Type459 { get; set; } + public global::Speechify.CredentialConfigViewOauth2Jwt? Type459 { get; set; } /// /// /// - public global::Speechify.SharedSecretConfig? Type460 { get; set; } + public global::Speechify.CredentialConfigViewBasic? Type460 { get; set; } /// /// /// - public global::Speechify.CredentialConfig? Type461 { get; set; } + public global::Speechify.CredentialConfigViewBearer? Type461 { get; set; } /// /// /// - public global::Speechify.CreateCredentialRequest? Type462 { get; set; } + public global::Speechify.CredentialConfigViewSharedSecret? Type462 { get; set; } /// /// /// - public global::Speechify.UpdateCredentialRequest? Type463 { get; set; } + public global::Speechify.CredentialConfigViewCustomHeaders? Type463 { get; set; } /// /// /// - public global::Speechify.CredentialInUseErrorDetailDetails? Type464 { get; set; } + public global::Speechify.CredentialConfigView? Type464 { get; set; } /// /// /// - public global::Speechify.CredentialInUseErrorDetail? Type465 { get; set; } + public global::Speechify.CredentialReferenceResourceType? Type465 { get; set; } /// /// /// - public global::Speechify.CredentialInUseError? Type466 { get; set; } + public global::Speechify.CredentialReference? Type466 { get; set; } /// /// /// - public global::Speechify.TestType? Type467 { get; set; } + public global::Speechify.CredentialUsedBy? Type467 { get; set; } /// /// /// - public global::Speechify.SimulationMessageRole? Type468 { get; set; } + public global::System.Collections.Generic.IList? Type468 { get; set; } /// /// /// - public global::Speechify.SimulationMessage? Type469 { get; set; } + public global::Speechify.Credential? Type469 { get; set; } /// /// /// - public global::Speechify.ReplyConfig? Type470 { get; set; } + public global::Speechify.ListCredentialsResponse? Type470 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type471 { get; set; } + public global::System.Collections.Generic.IList? Type471 { get; set; } /// /// /// - public global::Speechify.ParameterCheckMode? Type472 { get; set; } + public global::Speechify.OAuth2ClientCredentialsConfig? Type472 { get; set; } /// /// /// - public global::Speechify.ParameterCheck? Type473 { get; set; } + public global::Speechify.OAuth2JWTConfig? Type473 { get; set; } /// /// /// - public global::Speechify.ToolCallConfig? Type474 { get; set; } + public global::Speechify.BasicAuthConfig? Type474 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type475 { get; set; } + public global::Speechify.BearerAuthConfig? Type475 { get; set; } /// /// /// - public global::Speechify.DataAssertionMode? Type476 { get; set; } + public global::Speechify.CustomHeadersConfig? Type476 { get; set; } /// /// /// - public global::Speechify.DataAssertion? Type477 { get; set; } + public global::Speechify.SharedSecretConfig? Type477 { get; set; } /// /// /// - public global::Speechify.SimulationConfig? Type478 { get; set; } + public global::Speechify.CredentialConfig? Type478 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type479 { get; set; } + public global::Speechify.CreateCredentialRequest? Type479 { get; set; } /// /// /// - public global::Speechify.CreateAgentTestRequestConfig? Type480 { get; set; } + public global::Speechify.UpdateCredentialRequest? Type480 { get; set; } /// /// /// - public global::Speechify.MockingStrategy? Type481 { get; set; } + public global::Speechify.CredentialInUseErrorDetailDetails? Type481 { get; set; } /// /// /// - public global::Speechify.ToolMock? Type482 { get; set; } + public global::Speechify.CredentialInUseErrorDetail? Type482 { get; set; } /// /// /// - public global::Speechify.NoMatchBehavior? Type483 { get; set; } + public global::Speechify.CredentialInUseError? Type483 { get; set; } /// /// /// - public global::Speechify.ToolMockConfig? Type484 { get; set; } + public global::Speechify.TestType? Type484 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type485 { get; set; } + public global::Speechify.SimulationMessageRole? Type485 { get; set; } /// /// /// - public global::Speechify.CreateAgentTestRequest? Type486 { get; set; } + public global::Speechify.SimulationMessage? Type486 { get; set; } /// /// /// - public global::Speechify.AgentTestConfig? Type487 { get; set; } + public global::Speechify.ReplyConfig? Type487 { get; set; } /// /// /// - public global::Speechify.AgentTest? Type488 { get; set; } + public global::System.Collections.Generic.IList? Type488 { get; set; } /// /// /// - public global::Speechify.TestVerdict? Type489 { get; set; } + public global::Speechify.ParameterCheckMode? Type489 { get; set; } /// /// /// - public global::Speechify.ReplyResult? Type490 { get; set; } + public global::Speechify.ParameterCheck? Type490 { get; set; } /// /// /// - public global::Speechify.ParameterCheckResult? Type491 { get; set; } + public global::Speechify.ToolCallConfig? Type491 { get; set; } /// /// /// - public global::Speechify.ToolCallResult? Type492 { get; set; } + public global::System.Collections.Generic.IList? Type492 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type493 { get; set; } + public global::Speechify.DataAssertionMode? Type493 { get; set; } /// /// /// - public global::Speechify.SimulationToolCall? Type494 { get; set; } + public global::Speechify.DataAssertion? Type494 { get; set; } /// /// /// - public global::Speechify.SimulationResultSentiment? Type495 { get; set; } + public global::Speechify.SimulationConfig? Type495 { get; set; } /// /// /// - public global::Speechify.SimulationCriterionResultStatus? Type496 { get; set; } + public global::System.Collections.Generic.IList? Type496 { get; set; } /// /// /// - public global::Speechify.SimulationCriterionResult? Type497 { get; set; } + public global::Speechify.CreateAgentTestRequestConfig? Type497 { get; set; } /// /// /// - public global::Speechify.DataAssertionResultMode? Type498 { get; set; } + public global::Speechify.MockingStrategy? Type498 { get; set; } /// /// /// - public global::Speechify.DataAssertionResult? Type499 { get; set; } + public global::Speechify.ToolMock? Type499 { get; set; } /// /// /// - public global::Speechify.SimulationResult? Type500 { get; set; } + public global::Speechify.NoMatchBehavior? Type500 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type501 { get; set; } + public global::Speechify.ToolMockConfig? Type501 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type502 { get; set; } + public global::System.Collections.Generic.IList? Type502 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type503 { get; set; } + public global::Speechify.CreateAgentTestRequest? Type503 { get; set; } /// /// /// - public global::Speechify.TestRunResult? Type504 { get; set; } + public global::Speechify.AgentTestConfig? Type504 { get; set; } /// /// /// - public global::Speechify.AgentTestRun? Type505 { get; set; } + public global::Speechify.AgentTest? Type505 { get; set; } /// /// /// - public global::Speechify.AgentTestWithLastRun? Type506 { get; set; } + public global::Speechify.TestVerdict? Type506 { get; set; } /// /// /// - public global::Speechify.ListTestsResponse? Type507 { get; set; } + public global::Speechify.ReplyResult? Type507 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type508 { get; set; } + public global::Speechify.ParameterCheckResult? Type508 { get; set; } /// /// /// - public global::Speechify.UpdateAgentTestRequestConfig? Type509 { get; set; } + public global::Speechify.ToolCallResult? Type509 { get; set; } /// /// /// - public global::Speechify.UpdateAgentTestRequest? Type510 { get; set; } + public global::System.Collections.Generic.IList? Type510 { get; set; } /// /// /// - public global::Speechify.AgentTestFolder? Type511 { get; set; } + public global::Speechify.SimulationToolCall? Type511 { get; set; } /// /// /// - public global::Speechify.ListAgentTestFoldersResponse? Type512 { get; set; } + public global::Speechify.SimulationResultSentiment? Type512 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type513 { get; set; } + public global::Speechify.SimulationCriterionResultStatus? Type513 { get; set; } /// /// /// - public global::Speechify.CreateAgentTestFolderRequest? Type514 { get; set; } + public global::Speechify.SimulationCriterionResult? Type514 { get; set; } /// /// /// - public global::Speechify.UpdateAgentTestFolderRequest? Type515 { get; set; } + public global::Speechify.DataAssertionResultMode? Type515 { get; set; } /// /// /// - public global::Speechify.ListAgentTestRunsResponse? Type516 { get; set; } + public global::Speechify.DataAssertionResult? Type516 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type517 { get; set; } + public global::Speechify.SimulationResult? Type517 { get; set; } /// /// /// - public global::Speechify.RunTarget? Type518 { get; set; } + public global::System.Collections.Generic.IList? Type518 { get; set; } /// /// /// - public global::Speechify.TestRunConfigOverride? Type519 { get; set; } + public global::System.Collections.Generic.IList? Type519 { get; set; } /// /// /// - public global::Speechify.RunTargetedTestsRequest? Type520 { get; set; } + public global::System.Collections.Generic.IList? Type520 { get; set; } /// /// /// - public global::Speechify.SuiteRunTrigger? Type521 { get; set; } + public global::Speechify.TestRunResult? Type521 { get; set; } /// /// /// - public global::Speechify.AgentTestSuiteRunResults? Type522 { get; set; } + public global::Speechify.AgentTestRun? Type522 { get; set; } /// /// /// - public global::Speechify.AgentTestSuiteRun? Type523 { get; set; } + public global::Speechify.AgentTestWithLastRun? Type523 { get; set; } /// /// /// - public global::Speechify.RunAgentTestsResponse? Type524 { get; set; } + public global::Speechify.ListTestsResponse? Type524 { get; set; } /// /// /// - public global::Speechify.BatchRunEntry? Type525 { get; set; } + public global::System.Collections.Generic.IList? Type525 { get; set; } /// /// /// - public global::Speechify.RunBatchRequest? Type526 { get; set; } + public global::Speechify.UpdateAgentTestRequestConfig? Type526 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type527 { get; set; } + public global::Speechify.UpdateAgentTestRequest? Type527 { get; set; } /// /// /// - public global::Speechify.ListSuiteRunsResponse? Type528 { get; set; } + public global::Speechify.AgentTestFolder? Type528 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type529 { get; set; } + public global::Speechify.ListAgentTestFoldersResponse? Type529 { get; set; } /// /// /// - public global::Speechify.AgentTestSuiteRunWithRunsResults? Type530 { get; set; } + public global::System.Collections.Generic.IList? Type530 { get; set; } /// /// /// - public global::Speechify.SuiteChildRun? Type531 { get; set; } + public global::Speechify.CreateAgentTestFolderRequest? Type531 { get; set; } /// /// /// - public global::Speechify.AgentTestSuiteRunWithRuns? Type532 { get; set; } + public global::Speechify.UpdateAgentTestFolderRequest? Type532 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type533 { get; set; } + public global::Speechify.ListAgentTestRunsResponse? Type533 { get; set; } /// /// /// - public global::Speechify.RunAllTestsRequest? Type534 { get; set; } + public global::System.Collections.Generic.IList? Type534 { get; set; } /// /// /// - public global::Speechify.TestStatsBucket? Type535 { get; set; } + public global::Speechify.RunTarget? Type535 { get; set; } /// /// /// - public global::Speechify.TestStats? Type536 { get; set; } + public global::Speechify.TestRunConfigOverride? Type536 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type537 { get; set; } + public global::Speechify.RunTargetedTestsRequest? Type537 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type538 { get; set; } + public global::Speechify.SuiteRunTrigger? Type538 { get; set; } /// /// /// - public global::Speechify.ShareLinkStatus? Type539 { get; set; } + public global::Speechify.AgentTestSuiteRunResults? Type539 { get; set; } /// /// /// - public global::Speechify.ShareLink? Type540 { get; set; } + public global::Speechify.AgentTestSuiteRun? Type540 { get; set; } /// /// /// - public global::Speechify.ListShareLinksResponse? Type541 { get; set; } + public global::Speechify.RunAgentTestsResponse? Type541 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type542 { get; set; } + public global::Speechify.BatchRunEntry? Type542 { get; set; } /// /// /// - public global::Speechify.CreateShareLinkRequest? Type543 { get; set; } + public global::Speechify.RunBatchRequest? Type543 { get; set; } /// /// /// - public global::Speechify.CreateShareLinkResponseStatus? Type544 { get; set; } + public global::System.Collections.Generic.IList? Type544 { get; set; } /// /// /// - public global::Speechify.CreateShareLinkResponse? Type545 { get; set; } + public global::Speechify.ListSuiteRunsResponse? Type545 { get; set; } /// /// /// - public global::Speechify.RevealShareLinkTokenResponse? Type546 { get; set; } + public global::System.Collections.Generic.IList? Type546 { get; set; } /// /// /// - public global::Speechify.ShareLinkPreview? Type547 { get; set; } + public global::Speechify.AgentTestSuiteRunWithRunsResults? Type547 { get; set; } /// /// /// - public global::Speechify.CreateShareLinkSessionRequest? Type548 { get; set; } + public global::Speechify.SuiteChildRun? Type548 { get; set; } /// /// /// - public global::Speechify.ShareLinkSession? Type549 { get; set; } + public global::Speechify.AgentTestSuiteRunWithRuns? Type549 { get; set; } /// /// /// - public global::Speechify.PhoneNumberProvider? Type550 { get; set; } + public global::System.Collections.Generic.IList? Type550 { get; set; } /// /// /// - public global::Speechify.PhoneNumberCapability? Type551 { get; set; } + public global::Speechify.RunAllTestsRequest? Type551 { get; set; } /// /// /// - public global::Speechify.PhoneNumberReputationRisk? Type552 { get; set; } + public global::Speechify.TestStatsBucket? Type552 { get; set; } /// /// /// - public global::Speechify.PhoneNumberReputation? Type553 { get; set; } + public global::Speechify.TestStats? Type553 { get; set; } /// /// /// - public global::Speechify.PhoneNumber? Type554 { get; set; } + public global::System.Collections.Generic.IList? Type554 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type555 { get; set; } + public global::System.Collections.Generic.Dictionary? Type555 { get; set; } /// /// /// - public global::Speechify.ListPhoneNumbersResponse? Type556 { get; set; } + public global::Speechify.ShareLinkStatus? Type556 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type557 { get; set; } + public global::Speechify.ShareLink? Type557 { get; set; } /// /// /// - public global::Speechify.TwilioImportSpec? Type558 { get; set; } + public global::Speechify.ListShareLinksResponse? Type558 { get; set; } /// /// /// - public global::Speechify.TelnyxImportSpec? Type559 { get; set; } + public global::System.Collections.Generic.IList? Type559 { get; set; } /// /// /// - public global::Speechify.ImportPhoneNumberRequest? Type560 { get; set; } + public global::Speechify.CreateShareLinkRequest? Type560 { get; set; } /// /// /// - public global::Speechify.PurchasedPhoneNumberProvider? Type561 { get; set; } + public global::Speechify.CreateShareLinkResponseStatus? Type561 { get; set; } /// /// /// - public global::Speechify.AvailablePhoneNumber? Type562 { get; set; } + public global::Speechify.CreateShareLinkResponse? Type562 { get; set; } /// /// /// - public global::Speechify.SearchAvailablePhoneNumbersResponse? Type563 { get; set; } + public global::Speechify.RevealShareLinkTokenResponse? Type563 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type564 { get; set; } + public global::Speechify.ShareLinkPreview? Type564 { get; set; } /// /// /// - public global::Speechify.IntendedUseMarketingOrInformational? Type565 { get; set; } + public global::Speechify.CreateShareLinkSessionRequest? Type565 { get; set; } /// /// /// - public global::Speechify.IntendedUse? Type566 { get; set; } + public global::Speechify.ShareLinkSession? Type566 { get; set; } /// /// /// - public global::Speechify.PurchasePhoneNumberRequest? Type567 { get; set; } + public global::Speechify.PhoneNumberProvider? Type567 { get; set; } /// /// /// - public global::Speechify.UpdatePhoneNumberRequest? Type568 { get; set; } + public global::Speechify.PhoneNumberCapability? Type568 { get; set; } /// /// /// - public global::Speechify.CreateOutboundCallRequest? Type569 { get; set; } + public global::Speechify.PhoneNumberReputationRisk? Type569 { get; set; } /// /// /// - public global::Speechify.CreateOutboundCallResponse? Type570 { get; set; } + public global::Speechify.PhoneNumberReputation? Type570 { get; set; } /// /// /// - public global::Speechify.BatchCall? Type571 { get; set; } + public global::Speechify.PhoneNumber? Type571 { get; set; } /// /// /// - public global::Speechify.ListBatchCallsResponse? Type572 { get; set; } + public global::System.Collections.Generic.IList? Type572 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type573 { get; set; } + public global::Speechify.ListPhoneNumbersResponse? Type573 { get; set; } /// /// /// - public global::Speechify.BatchRecipientRequest? Type574 { get; set; } + public global::System.Collections.Generic.IList? Type574 { get; set; } /// /// /// - public global::Speechify.CreateBatchCallRequest? Type575 { get; set; } + public global::Speechify.TwilioImportSpec? Type575 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type576 { get; set; } + public global::Speechify.TelnyxImportSpec? Type576 { get; set; } /// /// /// - public global::Speechify.BatchRecipientStatus? Type577 { get; set; } + public global::Speechify.ImportPhoneNumberRequest? Type577 { get; set; } /// /// /// - public global::Speechify.BatchRecipient? Type578 { get; set; } + public global::Speechify.PurchasedPhoneNumberProvider? Type578 { get; set; } /// /// /// - public global::Speechify.ListBatchRecipientsResponse? Type579 { get; set; } + public global::Speechify.AvailablePhoneNumber? Type579 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type580 { get; set; } + public global::Speechify.SearchAvailablePhoneNumbersResponse? Type580 { get; set; } /// /// /// - public global::Speechify.IvrMenuListEntryMenuTree? Type581 { get; set; } + public global::System.Collections.Generic.IList? Type581 { get; set; } /// /// /// - public global::Speechify.IVRMenuListEntry? Type582 { get; set; } + public global::Speechify.IntendedUseMarketingOrInformational? Type582 { get; set; } /// /// /// - public global::Speechify.ListIVRMenusResponse? Type583 { get; set; } + public global::Speechify.IntendedUse? Type583 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type584 { get; set; } + public global::Speechify.PurchasePhoneNumberRequest? Type584 { get; set; } /// /// /// - public global::Speechify.IvrMenuMenuTree? Type585 { get; set; } + public global::Speechify.UpdatePhoneNumberRequest? Type585 { get; set; } /// /// /// - public global::Speechify.IVRMenu? Type586 { get; set; } + public global::Speechify.CreateOutboundCallRequest? Type586 { get; set; } /// /// /// - public global::Speechify.UpdateIVRMenuLabelRequest? Type587 { get; set; } + public global::Speechify.CreateOutboundCallResponse? Type587 { get; set; } /// /// /// - public global::Speechify.InvalidateIVRMenuRequest? Type588 { get; set; } + public global::Speechify.BatchCall? Type588 { get; set; } /// /// /// - public global::Speechify.SIPTrunkProvider? Type589 { get; set; } + public global::Speechify.ListBatchCallsResponse? Type589 { get; set; } /// /// /// - public global::Speechify.SIPTrunkDirection? Type590 { get; set; } + public global::System.Collections.Generic.IList? Type590 { get; set; } /// /// /// - public global::Speechify.SIPTransport? Type591 { get; set; } + public global::Speechify.BatchRecipientRequest? Type591 { get; set; } /// /// /// - public global::Speechify.SIPMediaEncryption? Type592 { get; set; } + public global::Speechify.CreateBatchCallRequest? Type592 { get; set; } /// /// /// - public global::Speechify.SIPTrunk? Type593 { get; set; } + public global::System.Collections.Generic.IList? Type593 { get; set; } /// /// /// - public global::Speechify.ListSIPTrunksResponse? Type594 { get; set; } + public global::Speechify.BatchRecipientStatus? Type594 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type595 { get; set; } + public global::Speechify.BatchRecipient? Type595 { get; set; } /// /// /// - public global::Speechify.CreateSipTrunkRequestCredentials? Type596 { get; set; } + public global::Speechify.ListBatchRecipientsResponse? Type596 { get; set; } /// /// /// - public global::Speechify.CreateSIPTrunkRequest? Type597 { get; set; } + public global::System.Collections.Generic.IList? Type597 { get; set; } /// /// /// - public global::Speechify.Caller? Type598 { get; set; } + public global::Speechify.IvrMenuListEntryMenuTree? Type598 { get; set; } /// /// /// - public global::Speechify.ListCallersResponse? Type599 { get; set; } + public global::Speechify.IVRMenuListEntry? Type599 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type600 { get; set; } + public global::Speechify.ListIVRMenusResponse? Type600 { get; set; } /// /// /// - public global::Speechify.UpdateCallerRequest? Type601 { get; set; } + public global::System.Collections.Generic.IList? Type601 { get; set; } /// /// /// - public global::Speechify.DeleteCallerResponse? Type602 { get; set; } + public global::Speechify.IvrMenuMenuTree? Type602 { get; set; } /// /// /// - public global::Speechify.ListCallerConversationsResponse? Type603 { get; set; } + public global::Speechify.IVRMenu? Type603 { get; set; } /// /// /// - public global::Speechify.ListCallerMemoriesResponse? Type604 { get; set; } + public global::Speechify.UpdateIVRMenuLabelRequest? Type604 { get; set; } /// /// /// - public global::Speechify.AudioAsset? Type605 { get; set; } + public global::Speechify.InvalidateIVRMenuRequest? Type605 { get; set; } /// /// /// - public global::Speechify.ListAudioAssetsResponse? Type606 { get; set; } + public global::Speechify.SIPTrunkProvider? Type606 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type607 { get; set; } + public global::Speechify.SIPTrunkDirection? Type607 { get; set; } /// /// /// - public global::Speechify.TeamMember? Type608 { get; set; } + public global::Speechify.SIPTransport? Type608 { get; set; } /// /// /// - public global::Speechify.Team? Type609 { get; set; } + public global::Speechify.SIPMediaEncryption? Type609 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type610 { get; set; } + public global::Speechify.SIPTrunk? Type610 { get; set; } /// /// /// - public global::Speechify.ListTeamsResponse? Type611 { get; set; } + public global::Speechify.ListSIPTrunksResponse? Type611 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type612 { get; set; } + public global::System.Collections.Generic.IList? Type612 { get; set; } /// /// /// - public global::Speechify.TeamMemberInput? Type613 { get; set; } + public global::Speechify.CreateSipTrunkRequestCredentials? Type613 { get; set; } /// /// /// - public global::Speechify.CreateTeamRequest? Type614 { get; set; } + public global::Speechify.CreateSIPTrunkRequest? Type614 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type615 { get; set; } + public global::Speechify.Caller? Type615 { get; set; } /// /// /// - public global::Speechify.UpdateTeamRequest? Type616 { get; set; } + public global::Speechify.ListCallersResponse? Type616 { get; set; } /// /// /// - public global::Speechify.CreateTeamRunRequest? Type617 { get; set; } + public global::System.Collections.Generic.IList? Type617 { get; set; } /// /// /// - public global::Speechify.AgentTriggerType? Type618 { get; set; } + public global::Speechify.UpdateCallerRequest? Type618 { get; set; } /// /// /// - public global::Speechify.TriggerRunSpec? Type619 { get; set; } + public global::Speechify.DeleteCallerResponse? Type619 { get; set; } /// /// /// - public global::Speechify.TriggerScheduleConfig? Type620 { get; set; } + public global::Speechify.ListCallerConversationsResponse? Type620 { get; set; } /// /// /// - public global::Speechify.TriggerWebhookConfigUserIdentitySource? Type621 { get; set; } + public global::Speechify.ListCallerMemoriesResponse? Type621 { get; set; } /// /// /// - public global::Speechify.TriggerWebhookConfig? Type622 { get; set; } + public global::Speechify.AudioAsset? Type622 { get; set; } /// /// /// - public global::Speechify.AgentTriggerLastFireStatus? Type623 { get; set; } + public global::Speechify.ListAudioAssetsResponse? Type623 { get; set; } /// /// /// - public global::Speechify.TriggerThread? Type624 { get; set; } + public global::System.Collections.Generic.IList? Type624 { get; set; } /// /// /// - public global::Speechify.AgentTrigger? Type625 { get; set; } + public global::Speechify.TeamMember? Type625 { get; set; } /// /// /// - public global::Speechify.ListAgentTriggersResponse? Type626 { get; set; } + public global::Speechify.Team? Type626 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type627 { get; set; } + public global::System.Collections.Generic.IList? Type627 { get; set; } /// /// /// - public global::Speechify.CreateAgentTriggerRequestType? Type628 { get; set; } + public global::Speechify.ListTeamsResponse? Type628 { get; set; } /// /// /// - public global::Speechify.CreateAgentTriggerRequest? Type629 { get; set; } + public global::System.Collections.Generic.IList? Type629 { get; set; } /// /// /// - public global::Speechify.UpdateAgentTriggerRequest? Type630 { get; set; } + public global::Speechify.TeamMemberInput? Type630 { get; set; } /// /// /// - public global::Speechify.AgentTriggerFireResponseStatus? Type631 { get; set; } + public global::Speechify.CreateTeamRequest? Type631 { get; set; } /// /// /// - public global::Speechify.AgentTriggerFireResponse? Type632 { get; set; } + public global::System.Collections.Generic.IList? Type632 { get; set; } /// /// /// - public global::Speechify.Skill? Type633 { get; set; } + public global::Speechify.UpdateTeamRequest? Type633 { get; set; } /// /// /// - public global::Speechify.ListSkillsResponse? Type634 { get; set; } + public global::Speechify.CreateTeamRunRequest? Type634 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type635 { get; set; } + public global::Speechify.AgentTriggerType? Type635 { get; set; } /// /// /// - public global::Speechify.CreateSkillRequest? Type636 { get; set; } + public global::Speechify.TriggerRunSpec? Type636 { get; set; } /// /// /// - public global::Speechify.UpdateSkillRequest? Type637 { get; set; } + public global::Speechify.TriggerScheduleConfig? Type637 { get; set; } /// /// /// - public global::Speechify.SkillVersion? Type638 { get; set; } + public global::Speechify.TriggerWebhookConfigUserIdentitySource? Type638 { get; set; } /// /// /// - public global::Speechify.ListSkillVersionsResponse? Type639 { get; set; } + public global::Speechify.TriggerWebhookConfig? Type639 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type640 { get; set; } + public global::Speechify.AgentTriggerLastFireStatus? Type640 { get; set; } /// /// /// - public global::Speechify.AgentSkill? Type641 { get; set; } + public global::Speechify.TriggerThread? Type641 { get; set; } /// /// /// - public global::Speechify.ListAgentSkillsResponse? Type642 { get; set; } + public global::Speechify.AgentTrigger? Type642 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type643 { get; set; } + public global::Speechify.ListAgentTriggersResponse? Type643 { get; set; } /// /// /// - public global::Speechify.AttachSkillRequest? Type644 { get; set; } + public global::System.Collections.Generic.IList? Type644 { get; set; } /// /// /// - public global::Speechify.UpdateAgentSkillRequest? Type645 { get; set; } + public global::Speechify.CreateAgentTriggerRequestType? Type645 { get; set; } /// /// /// - public global::Speechify.V1FilesGetParametersKind? Type646 { get; set; } + public global::Speechify.CreateAgentTriggerRequest? Type646 { get; set; } /// /// /// - public global::Speechify.ListFilesResponse? Type647 { get; set; } + public global::Speechify.UpdateAgentTriggerRequest? Type647 { get; set; } /// /// /// - public global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind? Type648 { get; set; } + public global::Speechify.AgentTriggerFireResponseStatus? Type648 { get; set; } /// /// /// - public global::Speechify.Store? Type649 { get; set; } + public global::Speechify.AgentTriggerFireResponse? Type649 { get; set; } /// /// /// - public global::Speechify.ListStoresResponse? Type650 { get; set; } + public global::Speechify.Skill? Type650 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type651 { get; set; } + public global::Speechify.ListSkillsResponse? Type651 { get; set; } /// /// /// - public global::Speechify.CreateStoreRequest? Type652 { get; set; } + public global::System.Collections.Generic.IList? Type652 { get; set; } /// /// /// - public global::Speechify.UpdateStoreRequest? Type653 { get; set; } + public global::Speechify.CreateSkillRequest? Type653 { get; set; } /// /// /// - public global::Speechify.StoreCollection? Type654 { get; set; } + public global::Speechify.UpdateSkillRequest? Type654 { get; set; } /// /// /// - public global::Speechify.ListStoreCollectionsResponse? Type655 { get; set; } + public global::Speechify.SkillVersion? Type655 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type656 { get; set; } + public global::Speechify.ListSkillVersionsResponse? Type656 { get; set; } /// /// /// - public global::Speechify.StoreDocumentSource? Type657 { get; set; } + public global::System.Collections.Generic.IList? Type657 { get; set; } /// /// /// - public global::Speechify.StoreDocument? Type658 { get; set; } + public global::Speechify.AgentSkill? Type658 { get; set; } /// /// /// - public global::Speechify.QueryStoreDocumentsResponse? Type659 { get; set; } + public global::Speechify.ListAgentSkillsResponse? Type659 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type660 { get; set; } + public global::System.Collections.Generic.IList? Type660 { get; set; } /// /// /// - public global::Speechify.WriteStoreDocumentRequest? Type661 { get; set; } + public global::Speechify.AttachSkillRequest? Type661 { get; set; } /// /// /// - public global::Speechify.StoreWhereClauseOp? Type662 { get; set; } + public global::Speechify.UpdateAgentSkillRequest? Type662 { get; set; } /// /// /// - public global::Speechify.StoreWhereClause? Type663 { get; set; } + public global::Speechify.V1FilesGetParametersKind? Type663 { get; set; } /// /// /// - public global::Speechify.StoreOrderByDirection? Type664 { get; set; } + public global::Speechify.ListFilesResponse? Type664 { get; set; } /// /// /// - public global::Speechify.StoreOrderBy? Type665 { get; set; } + public global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind? Type665 { get; set; } /// /// /// - public global::Speechify.StoreDocumentQuery? Type666 { get; set; } + public global::Speechify.Store? Type666 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type667 { get; set; } + public global::Speechify.ListStoresResponse? Type667 { get; set; } /// /// /// - public global::Speechify.StoreAggregateMetricOp? Type668 { get; set; } + public global::System.Collections.Generic.IList? Type668 { get; set; } /// /// /// - public global::Speechify.StoreAggregateMetric? Type669 { get; set; } + public global::Speechify.CreateStoreRequest? Type669 { get; set; } /// /// /// - public global::Speechify.StoreAggregateQuery? Type670 { get; set; } + public global::Speechify.UpdateStoreRequest? Type670 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type671 { get; set; } + public global::Speechify.StoreCollection? Type671 { get; set; } /// /// /// - public global::Speechify.StoreAggregateGroup? Type672 { get; set; } + public global::Speechify.ListStoreCollectionsResponse? Type672 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type673 { get; set; } + public global::System.Collections.Generic.IList? Type673 { get; set; } /// /// /// - public global::Speechify.StoreAggregateResponse? Type674 { get; set; } + public global::Speechify.StoreDocumentSource? Type674 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type675 { get; set; } + public global::Speechify.StoreDocument? Type675 { get; set; } /// /// /// - public global::Speechify.StoreBatchWriteOp? Type676 { get; set; } + public global::Speechify.QueryStoreDocumentsResponse? Type676 { get; set; } /// /// /// - public global::Speechify.StoreBatchWrite? Type677 { get; set; } + public global::System.Collections.Generic.IList? Type677 { get; set; } /// /// /// - public global::Speechify.StoreBatchRequest? Type678 { get; set; } + public global::Speechify.WriteStoreDocumentRequest? Type678 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type679 { get; set; } + public global::Speechify.StoreWhereClauseOp? Type679 { get; set; } /// /// /// - public global::Speechify.StoreBatchResultOp? Type680 { get; set; } + public global::Speechify.StoreWhereClause? Type680 { get; set; } /// /// /// - public global::Speechify.StoreBatchResult? Type681 { get; set; } + public global::Speechify.StoreOrderByDirection? Type681 { get; set; } /// /// /// - public global::Speechify.StoreBatchResponse? Type682 { get; set; } + public global::Speechify.StoreOrderBy? Type682 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type683 { get; set; } + public global::Speechify.StoreDocumentQuery? Type683 { get; set; } /// /// /// - public global::Speechify.ListAgentStoresResponse? Type684 { get; set; } + public global::System.Collections.Generic.IList? Type684 { get; set; } /// /// /// - public global::Speechify.HostedApiAuthMode? Type685 { get; set; } + public global::Speechify.StoreAggregateMetricOp? Type685 { get; set; } /// /// /// - public global::Speechify.HostedAPI? Type686 { get; set; } + public global::Speechify.StoreAggregateMetric? Type686 { get; set; } /// /// /// - public global::Speechify.ListHostedAPIsResponse? Type687 { get; set; } + public global::Speechify.StoreAggregateQuery? Type687 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type688 { get; set; } + public global::System.Collections.Generic.IList? Type688 { get; set; } /// /// /// - public global::Speechify.CreateHostedApiRequestAuthMode? Type689 { get; set; } + public global::Speechify.StoreAggregateGroup? Type689 { get; set; } /// /// /// - public global::Speechify.CreateHostedAPIRequest? Type690 { get; set; } + public global::System.Collections.Generic.Dictionary? Type690 { get; set; } /// /// /// - public global::Speechify.UpdateHostedApiRequestAuthMode? Type691 { get; set; } + public global::Speechify.StoreAggregateResponse? Type691 { get; set; } /// /// /// - public global::Speechify.UpdateHostedAPIRequest? Type692 { get; set; } + public global::System.Collections.Generic.IList? Type692 { get; set; } /// /// /// - public global::Speechify.HostedApiUsageRoutesItems? Type693 { get; set; } + public global::Speechify.StoreBatchWriteOp? Type693 { get; set; } /// /// /// - public global::Speechify.HostedAPIUsage? Type694 { get; set; } + public global::Speechify.StoreBatchWrite? Type694 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type695 { get; set; } + public global::Speechify.StoreBatchRequest? Type695 { get; set; } /// /// /// - public global::Speechify.HostedApiRouteMethod? Type696 { get; set; } + public global::System.Collections.Generic.IList? Type696 { get; set; } /// /// /// - public global::Speechify.HostedApiResolverType? Type697 { get; set; } + public global::Speechify.StoreBatchResultOp? Type697 { get; set; } /// /// /// - public global::Speechify.HostedApiResolverWriteMode? Type698 { get; set; } + public global::Speechify.StoreBatchResult? Type698 { get; set; } /// /// /// - public global::Speechify.HostedApiResolverWhereItemsOp? Type699 { get; set; } + public global::Speechify.StoreBatchResponse? Type699 { get; set; } /// /// /// - public global::Speechify.HostedApiResolverWhereItems? Type700 { get; set; } + public global::System.Collections.Generic.IList? Type700 { get; set; } /// /// /// - public global::Speechify.HostedApiResolverOrderByDirection? Type701 { get; set; } + public global::Speechify.ListAgentStoresResponse? Type701 { get; set; } /// /// /// - public global::Speechify.HostedApiResolverOrderBy? Type702 { get; set; } + public global::Speechify.HostedApiAuthMode? Type702 { get; set; } /// /// /// - public global::Speechify.HostedAPIResolver? Type703 { get; set; } + public global::Speechify.HostedAPI? Type703 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type704 { get; set; } + public global::Speechify.ListHostedAPIsResponse? Type704 { get; set; } /// /// /// - public global::Speechify.HostedAPIRoute? Type705 { get; set; } + public global::System.Collections.Generic.IList? Type705 { get; set; } /// /// /// - public global::Speechify.ListHostedAPIRoutesResponse? Type706 { get; set; } + public global::Speechify.CreateHostedApiRequestAuthMode? Type706 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type707 { get; set; } + public global::Speechify.CreateHostedAPIRequest? Type707 { get; set; } /// /// /// - public global::Speechify.CreateHostedApiRouteRequestMethod? Type708 { get; set; } + public global::Speechify.UpdateHostedApiRequestAuthMode? Type708 { get; set; } /// /// /// - public global::Speechify.CreateHostedAPIRouteRequest? Type709 { get; set; } + public global::Speechify.UpdateHostedAPIRequest? Type709 { get; set; } /// /// /// - public global::Speechify.MountHostedAPIRoutesRequest? Type710 { get; set; } + public global::Speechify.HostedApiUsageRoutesItems? Type710 { get; set; } /// /// /// - public global::Speechify.HostedApiMountToolKind? Type711 { get; set; } + public global::Speechify.HostedAPIUsage? Type711 { get; set; } /// /// /// - public global::Speechify.HostedApiMountOperationAction? Type712 { get; set; } + public global::System.Collections.Generic.IList? Type712 { get; set; } /// /// /// - public global::Speechify.HostedApiMountOperationChangesItems? Type713 { get; set; } + public global::Speechify.V1ApisApiIdAnalyticsGetParametersGranularity? Type713 { get; set; } /// /// /// - public global::Speechify.HostedAPIMountOperation? Type714 { get; set; } + public global::Speechify.RequestAnalyticsTotals? Type714 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type715 { get; set; } + public global::Speechify.RequestAnalyticsBucket? Type715 { get; set; } /// /// /// - public global::Speechify.HostedAPIMountSummary? Type716 { get; set; } + public global::Speechify.RequestTopPath? Type716 { get; set; } /// /// /// - public global::Speechify.HostedAPIMount? Type717 { get; set; } + public global::Speechify.RequestAnalyticsResponse? Type717 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type718 { get; set; } + public global::System.Collections.Generic.IList? Type718 { get; set; } /// /// /// - public global::Speechify.UpdateHostedApiRouteRequestMethod? Type719 { get; set; } + public global::System.Collections.Generic.IList? Type719 { get; set; } /// /// /// - public global::Speechify.UpdateHostedAPIRouteRequest? Type720 { get; set; } + public global::Speechify.HostedApiRouteMethod? Type720 { get; set; } /// /// /// - public global::Speechify.HostedAPIKey? Type721 { get; set; } + public global::Speechify.HostedApiResolverType? Type721 { get; set; } /// /// /// - public global::Speechify.ListHostedAPIKeysResponse? Type722 { get; set; } + public global::Speechify.HostedApiResolverWriteMode? Type722 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type723 { get; set; } + public global::Speechify.HostedApiResolverWhereItemsOp? Type723 { get; set; } /// /// /// - public global::Speechify.CreateHostedAPIKeyRequest? Type724 { get; set; } + public global::Speechify.HostedApiResolverWhereItems? Type724 { get; set; } /// /// /// - public global::Speechify.HostedAPIUserTokenSecret? Type725 { get; set; } + public global::Speechify.HostedApiResolverOrderByDirection? Type725 { get; set; } /// /// /// - public global::Speechify.ContactIdentifierKind? Type726 { get; set; } + public global::Speechify.HostedApiResolverOrderBy? Type726 { get; set; } /// /// /// - public global::Speechify.ContactIdentifierAssertedBy? Type727 { get; set; } + public global::Speechify.HostedAPIResolver? Type727 { get; set; } /// /// /// - public global::Speechify.ContactIdentifier? Type728 { get; set; } + public global::System.Collections.Generic.IList? Type728 { get; set; } /// /// /// - public global::Speechify.Contact? Type729 { get; set; } + public global::Speechify.HostedAPIRoute? Type729 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type730 { get; set; } + public global::Speechify.ListHostedAPIRoutesResponse? Type730 { get; set; } /// /// /// - public global::Speechify.ListContactsResponse? Type731 { get; set; } + public global::System.Collections.Generic.IList? Type731 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type732 { get; set; } + public global::Speechify.CreateHostedApiRouteRequestMethod? Type732 { get; set; } /// /// /// - public global::Speechify.UpdateContactRequest? Type733 { get; set; } + public global::Speechify.CreateHostedAPIRouteRequest? Type733 { get; set; } /// /// /// - public global::Speechify.DeleteContactResponse? Type734 { get; set; } + public global::Speechify.MountHostedAPIRoutesRequest? Type734 { get; set; } /// /// /// - public global::Speechify.AttachContactIdentifierRequestKind? Type735 { get; set; } + public global::Speechify.HostedApiMountToolKind? Type735 { get; set; } /// /// /// - public global::Speechify.AttachContactIdentifierRequest? Type736 { get; set; } + public global::Speechify.HostedApiMountOperationAction? Type736 { get; set; } /// /// /// - public global::Speechify.MergeContactsRequest? Type737 { get; set; } + public global::Speechify.HostedApiMountOperationChangesItems? Type737 { get; set; } /// /// /// - public global::Speechify.MergeContactsResponseMerged? Type738 { get; set; } + public global::Speechify.HostedAPIMountOperation? Type738 { get; set; } /// /// /// - public global::Speechify.MergeContactsResponse? Type739 { get; set; } + public global::System.Collections.Generic.IList? Type739 { get; set; } /// /// /// - public global::Speechify.BillingEntitlementsMaxLlmModelClass? Type740 { get; set; } + public global::Speechify.HostedAPIMountSummary? Type740 { get; set; } /// /// /// - public global::Speechify.BillingEntitlements? Type741 { get; set; } + public global::Speechify.HostedAPIMount? Type741 { get; set; } /// /// /// - public global::Speechify.EntitlementsResponse? Type742 { get; set; } + public global::System.Collections.Generic.IList? Type742 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type743 { get; set; } + public global::Speechify.UpdateHostedApiRouteRequestMethod? Type743 { get; set; } /// /// /// - public global::Speechify.ContactResolver? Type744 { get; set; } + public global::Speechify.UpdateHostedAPIRouteRequest? Type744 { get; set; } /// /// /// - public global::Speechify.PutContactResolverRequest? Type745 { get; set; } + public global::Speechify.HostedAPIKey? Type745 { get; set; } /// /// /// - public global::Speechify.WebhookEndpoint? Type746 { get; set; } + public global::Speechify.ListHostedAPIKeysResponse? Type746 { get; set; } /// /// /// - public global::Speechify.ListWebhookEndpointsResponse? Type747 { get; set; } + public global::System.Collections.Generic.IList? Type747 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type748 { get; set; } + public global::Speechify.CreateHostedAPIKeyRequest? Type748 { get; set; } /// /// /// - public global::Speechify.CreateWebhookEndpointRequest? Type749 { get; set; } + public global::Speechify.HostedAPIUserTokenSecret? Type749 { get; set; } /// /// /// - public global::Speechify.UpdateWebhookEndpointRequest? Type750 { get; set; } + public global::Speechify.ContactIdentifierKind? Type750 { get; set; } /// /// /// - public global::Speechify.WebhookEndpointDelivery? Type751 { get; set; } + public global::Speechify.ContactIdentifierAssertedBy? Type751 { get; set; } /// /// /// - public global::Speechify.ListWebhookEndpointDeliveriesResponse? Type752 { get; set; } + public global::Speechify.ContactIdentifier? Type752 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type753 { get; set; } + public global::Speechify.Contact? Type753 { get; set; } /// /// /// - public global::Speechify.ProjectMonthlyBudgetStatus? Type754 { get; set; } + public global::System.Collections.Generic.IList? Type754 { get; set; } /// /// /// - public global::Speechify.Project? Type755 { get; set; } + public global::Speechify.ListContactsResponse? Type755 { get; set; } /// /// /// - public global::Speechify.ListProjectsResponse? Type756 { get; set; } + public global::System.Collections.Generic.IList? Type756 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type757 { get; set; } + public global::Speechify.UpdateContactRequest? Type757 { get; set; } /// /// /// - public global::Speechify.CreateProjectRequest? Type758 { get; set; } + public global::Speechify.DeleteContactResponse? Type758 { get; set; } /// /// /// - public global::Speechify.UpdateProjectRequest? Type759 { get; set; } + public global::Speechify.AttachContactIdentifierRequestKind? Type759 { get; set; } /// /// /// - public global::Speechify.DeleteProjectRequestMode? Type760 { get; set; } + public global::Speechify.AttachContactIdentifierRequest? Type760 { get; set; } /// /// /// - public global::Speechify.DeleteProjectRequest? Type761 { get; set; } + public global::Speechify.MergeContactsRequest? Type761 { get; set; } /// /// /// - public global::Speechify.ProjectRestoredCounts? Type762 { get; set; } + public global::Speechify.MergeContactsResponseMerged? Type762 { get; set; } /// /// /// - public global::Speechify.ProjectStillRevokedCounts? Type763 { get; set; } + public global::Speechify.MergeContactsResponse? Type763 { get; set; } /// /// /// - public global::Speechify.ProjectRestore? Type764 { get; set; } + public global::Speechify.BillingEntitlementsMaxLlmModelClass? Type764 { get; set; } /// /// /// - public global::Speechify.ProjectTeardownBlockerKind? Type765 { get; set; } + public global::Speechify.BillingEntitlements? Type765 { get; set; } /// /// /// - public global::Speechify.ProjectTeardownBlockerBlocksItems? Type766 { get; set; } + public global::Speechify.EntitlementsResponse? Type766 { get; set; } /// /// /// - public global::Speechify.ProjectTeardownBlocker? Type767 { get; set; } + public global::System.Collections.Generic.Dictionary? Type767 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type768 { get; set; } + public global::Speechify.ContactResolver? Type768 { get; set; } /// /// /// - public global::Speechify.ProjectTeardownGroup? Type769 { get; set; } + public global::Speechify.PutContactResolverRequest? Type769 { get; set; } /// /// /// - public global::Speechify.ProjectTeardown? Type770 { get; set; } + public global::Speechify.WebhookEndpoint? Type770 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type771 { get; set; } + public global::Speechify.ListWebhookEndpointsResponse? Type771 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type772 { get; set; } + public global::System.Collections.Generic.IList? Type772 { get; set; } /// /// /// - public global::Speechify.ProjectResourceCounts? Type773 { get; set; } + public global::Speechify.CreateWebhookEndpointRequest? Type773 { get; set; } /// /// /// - public global::Speechify.ProjectStats? Type774 { get; set; } + public global::Speechify.UpdateWebhookEndpointRequest? Type774 { get; set; } /// /// /// - public global::Speechify.PromoteProjectRequest? Type775 { get; set; } + public global::Speechify.WebhookEndpointDelivery? Type775 { get; set; } /// /// /// - public global::Speechify.PromoteCreated? Type776 { get; set; } + public global::Speechify.ListWebhookEndpointDeliveriesResponse? Type776 { get; set; } /// /// /// - public global::Speechify.PromoteReused? Type777 { get; set; } + public global::System.Collections.Generic.IList? Type777 { get; set; } /// /// /// - public global::Speechify.PromoteAttentionKind? Type778 { get; set; } + public global::Speechify.ProjectMonthlyBudgetStatus? Type778 { get; set; } /// /// /// - public global::Speechify.PromoteAttentionReason? Type779 { get; set; } + public global::Speechify.Project? Type779 { get; set; } /// /// /// - public global::Speechify.PromoteAttention? Type780 { get; set; } + public global::Speechify.ListProjectsResponse? Type780 { get; set; } /// /// /// - public global::Speechify.PromoteProjectResponse? Type781 { get; set; } + public global::System.Collections.Generic.IList? Type781 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type782 { get; set; } + public global::Speechify.CreateProjectRequest? Type782 { get; set; } /// /// /// - public global::Speechify.ProjectAuditEventType? Type783 { get; set; } + public global::Speechify.UpdateProjectRequest? Type783 { get; set; } /// /// /// - public global::Speechify.ProjectAuditEvent? Type784 { get; set; } + public global::Speechify.DeleteProjectRequestMode? Type784 { get; set; } /// /// /// - public global::Speechify.ProjectAuditResponse? Type785 { get; set; } + public global::Speechify.DeleteProjectRequest? Type785 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type786 { get; set; } + public global::Speechify.ProjectRestoredCounts? Type786 { get; set; } /// /// /// - public global::Speechify.ProjectMember? Type787 { get; set; } + public global::Speechify.ProjectStillRevokedCounts? Type787 { get; set; } /// /// /// - public global::Speechify.ProjectMembersResponse? Type788 { get; set; } + public global::Speechify.ProjectRestore? Type788 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type789 { get; set; } + public global::Speechify.ProjectTeardownBlockerKind? Type789 { get; set; } /// /// /// - public global::Speechify.GrantProjectMemberRequest? Type790 { get; set; } + public global::Speechify.ProjectTeardownBlockerBlocksItems? Type790 { get; set; } /// /// /// - public global::Speechify.CreateRequest? Type791 { get; set; } + public global::Speechify.ProjectTeardownBlocker? Type791 { get; set; } /// /// /// - public global::Speechify.DetectRequest? Type792 { get; set; } + public global::System.Collections.Generic.IList? Type792 { get; set; } /// /// /// - public global::Speechify.VerifyRequest? Type793 { get; set; } + public global::Speechify.ProjectTeardownGroup? Type793 { get; set; } /// /// /// - public global::Speechify.UploadDocumentRequest? Type794 { get; set; } + public global::Speechify.ProjectTeardown? Type794 { get; set; } /// /// /// - public global::Speechify.UpdateDocumentRequest? Type795 { get; set; } + public global::System.Collections.Generic.IList? Type795 { get; set; } /// /// /// - public global::Speechify.RunTestRequest? Type796 { get; set; } + public global::System.Collections.Generic.IList? Type796 { get; set; } /// /// /// - public global::Speechify.UploadRequest? Type797 { get; set; } + public global::Speechify.ProjectResourceCounts? Type797 { get; set; } /// /// /// - public global::Speechify.UploadRequest2? Type798 { get; set; } + public global::Speechify.ProjectStats? Type798 { get; set; } + /// + /// + /// + public global::Speechify.PromoteProjectRequest? Type799 { get; set; } + /// + /// + /// + public global::Speechify.PromoteCreated? Type800 { get; set; } + /// + /// + /// + public global::Speechify.PromoteReused? Type801 { get; set; } + /// + /// + /// + public global::Speechify.PromoteAttentionKind? Type802 { get; set; } + /// + /// + /// + public global::Speechify.PromoteAttentionReason? Type803 { get; set; } + /// + /// + /// + public global::Speechify.PromoteAttention? Type804 { get; set; } + /// + /// + /// + public global::Speechify.PromoteProjectResponse? Type805 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type806 { get; set; } + /// + /// + /// + public global::Speechify.ProjectAuditEventType? Type807 { get; set; } + /// + /// + /// + public global::Speechify.ProjectAuditEvent? Type808 { get; set; } + /// + /// + /// + public global::Speechify.ProjectAuditResponse? Type809 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type810 { get; set; } + /// + /// + /// + public global::Speechify.ProjectMember? Type811 { get; set; } + /// + /// + /// + public global::Speechify.ProjectMembersResponse? Type812 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type813 { get; set; } + /// + /// + /// + public global::Speechify.GrantProjectMemberRequest? Type814 { get; set; } + /// + /// + /// + public global::Speechify.CreateRequest? Type815 { get; set; } + /// + /// + /// + public global::Speechify.DetectRequest? Type816 { get; set; } + /// + /// + /// + public global::Speechify.VerifyRequest? Type817 { get; set; } + /// + /// + /// + public global::Speechify.UploadDocumentRequest? Type818 { get; set; } + /// + /// + /// + public global::Speechify.UpdateDocumentRequest? Type819 { get; set; } + /// + /// + /// + public global::Speechify.RunTestRequest? Type820 { get; set; } + /// + /// + /// + public global::Speechify.UploadRequest? Type821 { get; set; } + /// + /// + /// + public global::Speechify.UploadRequest2? Type822 { get; set; } /// /// @@ -3518,258 +3614,270 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.List? ListType72 { get; set; } + public global::System.Collections.Generic.List? ListType72 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType73 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType74 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType75 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType73 { get; set; } + public global::System.Collections.Generic.List? ListType76 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType74 { get; set; } + public global::System.Collections.Generic.List? ListType77 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType75 { get; set; } + public global::System.Collections.Generic.List? ListType78 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType76 { get; set; } + public global::System.Collections.Generic.List? ListType79 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType77 { get; set; } + public global::System.Collections.Generic.List? ListType80 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType78 { get; set; } + public global::System.Collections.Generic.List? ListType81 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType79 { get; set; } + public global::System.Collections.Generic.List? ListType82 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType80 { get; set; } + public global::System.Collections.Generic.List? ListType83 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType81 { get; set; } + public global::System.Collections.Generic.List? ListType84 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType82 { get; set; } + public global::System.Collections.Generic.List? ListType85 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType83 { get; set; } + public global::System.Collections.Generic.List? ListType86 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType84 { get; set; } + public global::System.Collections.Generic.List? ListType87 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType85 { get; set; } + public global::System.Collections.Generic.List? ListType88 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType86 { get; set; } + public global::System.Collections.Generic.List? ListType89 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType87 { get; set; } + public global::System.Collections.Generic.List? ListType90 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType88 { get; set; } + public global::System.Collections.Generic.List? ListType91 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType89 { get; set; } + public global::System.Collections.Generic.List? ListType92 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType90 { get; set; } + public global::System.Collections.Generic.List? ListType93 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType91 { get; set; } + public global::System.Collections.Generic.List? ListType94 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType92 { get; set; } + public global::System.Collections.Generic.List? ListType95 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType93 { get; set; } + public global::System.Collections.Generic.List? ListType96 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType94 { get; set; } + public global::System.Collections.Generic.List? ListType97 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType95 { get; set; } + public global::System.Collections.Generic.List? ListType98 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType96 { get; set; } + public global::System.Collections.Generic.List? ListType99 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType97 { get; set; } + public global::System.Collections.Generic.List? ListType100 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType98 { get; set; } + public global::System.Collections.Generic.List? ListType101 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType99 { get; set; } + public global::System.Collections.Generic.List? ListType102 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType100 { get; set; } + public global::System.Collections.Generic.List? ListType103 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType101 { get; set; } + public global::System.Collections.Generic.List? ListType104 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType102 { get; set; } + public global::System.Collections.Generic.List? ListType105 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType103 { get; set; } + public global::System.Collections.Generic.List? ListType106 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType104 { get; set; } + public global::System.Collections.Generic.List? ListType107 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType105 { get; set; } + public global::System.Collections.Generic.List? ListType108 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType106 { get; set; } + public global::System.Collections.Generic.List? ListType109 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType107 { get; set; } + public global::System.Collections.Generic.List? ListType110 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType108 { get; set; } + public global::System.Collections.Generic.List? ListType111 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType109 { get; set; } + public global::System.Collections.Generic.List? ListType112 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType110 { get; set; } + public global::System.Collections.Generic.List? ListType113 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType111 { get; set; } + public global::System.Collections.Generic.List? ListType114 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType112 { get; set; } + public global::System.Collections.Generic.List? ListType115 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType113 { get; set; } + public global::System.Collections.Generic.List? ListType116 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType114 { get; set; } + public global::System.Collections.Generic.List? ListType117 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType115 { get; set; } + public global::System.Collections.Generic.List? ListType118 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType116 { get; set; } + public global::System.Collections.Generic.List? ListType119 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType117 { get; set; } + public global::System.Collections.Generic.List? ListType120 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType118 { get; set; } + public global::System.Collections.Generic.List? ListType121 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType119 { get; set; } + public global::System.Collections.Generic.List? ListType122 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType120 { get; set; } + public global::System.Collections.Generic.List? ListType123 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType121 { get; set; } + public global::System.Collections.Generic.List? ListType124 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType122 { get; set; } + public global::System.Collections.Generic.List? ListType125 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType123 { get; set; } + public global::System.Collections.Generic.List? ListType126 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType124 { get; set; } + public global::System.Collections.Generic.List? ListType127 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType125 { get; set; } + public global::System.Collections.Generic.List? ListType128 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType126 { get; set; } + public global::System.Collections.Generic.List? ListType129 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType127 { get; set; } + public global::System.Collections.Generic.List? ListType130 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType128 { get; set; } + public global::System.Collections.Generic.List? ListType131 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType129 { get; set; } + public global::System.Collections.Generic.List? ListType132 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType130 { get; set; } + public global::System.Collections.Generic.List? ListType133 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType131 { get; set; } + public global::System.Collections.Generic.List? ListType134 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType132 { get; set; } + public global::System.Collections.Generic.List? ListType135 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType133 { get; set; } + public global::System.Collections.Generic.List? ListType136 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType134 { get; set; } + public global::System.Collections.Generic.List? ListType137 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType135 { get; set; } + public global::System.Collections.Generic.List? ListType138 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.AgentRunLifecycle.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.AgentRunLifecycle.Json.g.cs new file mode 100644 index 00000000..af7493b0 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.AgentRunLifecycle.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class AgentRunLifecycle + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Speechify.AgentRunLifecycle? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.AgentRunLifecycle), + jsonSerializerContext) as global::Speechify.AgentRunLifecycle; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.AgentRunLifecycle? FromJson( + string json) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Speechify.AgentRunLifecycle? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Speechify.AgentRunLifecycle), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.AgentRunLifecycle; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.Models.AgentRunLifecycle.g.cs b/src/libs/Speechify/Generated/Speechify.Models.AgentRunLifecycle.g.cs new file mode 100644 index 00000000..7bb24a62 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.AgentRunLifecycle.g.cs @@ -0,0 +1,186 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// A run as the project run stream reports it: which run, whose, where it
+ /// stands and what it is waiting on. Each field means what it means on the
+ /// run object, except `user_identity`, which the run object carries under
+ /// `input`. What the run was asked and what it answered are never here. + ///
+ public sealed partial class AgentRunLifecycle + { + /// + /// Run id. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The agent running it. On a delegated child this is the member agent. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("agent_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string AgentId { get; set; } + + /// + /// The project the run belongs to; null in the Default project. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] + public string? ProjectId { get; set; } + + /// + /// Where the run stands. On `run.ended` it is one of `succeeded`, `failed`, `canceled` or `expired`; on `run.updated` it never is. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.AgentRunLifecycleStatusJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Speechify.AgentRunLifecycleStatus Status { get; set; } + + /// + /// The person the run acts for. Absent when it acts for nobody in particular. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("user_identity")] + public string? UserIdentity { get; set; } + + /// + /// A human approval a run is durably parked on (present on `AgentRun` only while `status` is `requires_action`). Rendered VERBATIM for the approver - never a summary the agent wrote - so an injected agent cannot misrepresent what it is about to do. Resolve it with `submitRun`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("pending_action")] + public global::Speechify.PendingAction? PendingAction { get; set; } + + /// + /// Why a settled run stopped short, as on the run object: `max_turns_exhausted`, `budget_exhausted` or `output_schema_violation`, or a sentence on an `expired` run. Absent when it finished its work. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("incomplete_reason")] + public string? IncompleteReason { get; set; } + + /// + /// How the run failed. Present only on a `failed` run. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("error")] + public global::Speechify.AgentRunLifecycleError? Error { get; set; } + + /// + /// The run's metadata. `trigger` says how the run started: `api`, `manual`, `schedule`, `webhook`, `team` or `delegation`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public global::System.Collections.Generic.Dictionary? Metadata { get; set; } + + /// + /// The run that delegated this one a sub-goal. Absent on a root run. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("parent_run_id")] + public string? ParentRunId { get; set; } + + /// + /// When the run was accepted and queued. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime CreatedAt { get; set; } + + /// + /// When a worker picked the run up. Absent while `queued`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("started_at")] + public global::System.DateTime? StartedAt { get; set; } + + /// + /// When the run settled. Present only on `run.ended`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("ended_at")] + public global::System.DateTime? EndedAt { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Run id. + /// + /// + /// The agent running it. On a delegated child this is the member agent. + /// + /// + /// Where the run stands. On `run.ended` it is one of `succeeded`, `failed`, `canceled` or `expired`; on `run.updated` it never is. + /// + /// + /// When the run was accepted and queued. + /// + /// + /// The project the run belongs to; null in the Default project. + /// + /// + /// The person the run acts for. Absent when it acts for nobody in particular. + /// + /// + /// A human approval a run is durably parked on (present on `AgentRun` only while `status` is `requires_action`). Rendered VERBATIM for the approver - never a summary the agent wrote - so an injected agent cannot misrepresent what it is about to do. Resolve it with `submitRun`. + /// + /// + /// Why a settled run stopped short, as on the run object: `max_turns_exhausted`, `budget_exhausted` or `output_schema_violation`, or a sentence on an `expired` run. Absent when it finished its work. + /// + /// + /// How the run failed. Present only on a `failed` run. + /// + /// + /// The run's metadata. `trigger` says how the run started: `api`, `manual`, `schedule`, `webhook`, `team` or `delegation`. + /// + /// + /// The run that delegated this one a sub-goal. Absent on a root run. + /// + /// + /// When a worker picked the run up. Absent while `queued`. + /// + /// + /// When the run settled. Present only on `run.ended`. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AgentRunLifecycle( + string id, + string agentId, + global::Speechify.AgentRunLifecycleStatus status, + global::System.DateTime createdAt, + string? projectId, + string? userIdentity, + global::Speechify.PendingAction? pendingAction, + string? incompleteReason, + global::Speechify.AgentRunLifecycleError? error, + global::System.Collections.Generic.Dictionary? metadata, + string? parentRunId, + global::System.DateTime? startedAt, + global::System.DateTime? endedAt) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.AgentId = agentId ?? throw new global::System.ArgumentNullException(nameof(agentId)); + this.ProjectId = projectId; + this.Status = status; + this.UserIdentity = userIdentity; + this.PendingAction = pendingAction; + this.IncompleteReason = incompleteReason; + this.Error = error; + this.Metadata = metadata; + this.ParentRunId = parentRunId; + this.CreatedAt = createdAt; + this.StartedAt = startedAt; + this.EndedAt = endedAt; + } + + /// + /// Initializes a new instance of the class. + /// + public AgentRunLifecycle() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.AgentRunLifecycleError.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.AgentRunLifecycleError.Json.g.cs new file mode 100644 index 00000000..228b7f31 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.AgentRunLifecycleError.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class AgentRunLifecycleError + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Speechify.AgentRunLifecycleError? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.AgentRunLifecycleError), + jsonSerializerContext) as global::Speechify.AgentRunLifecycleError; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.AgentRunLifecycleError? FromJson( + string json) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Speechify.AgentRunLifecycleError? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Speechify.AgentRunLifecycleError), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.AgentRunLifecycleError; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.Models.AgentRunLifecycleError.g.cs b/src/libs/Speechify/Generated/Speechify.Models.AgentRunLifecycleError.g.cs new file mode 100644 index 00000000..f9df59b4 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.AgentRunLifecycleError.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// How the run failed. Present only on a `failed` run. + /// + public sealed partial class AgentRunLifecycleError + { + /// + /// What class of failure this was. Branch on this, never on `message`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("code")] + public string? Code { get; set; } + + /// + /// A stable human-readable sentence for the class in `code`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + public string? Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// What class of failure this was. Branch on this, never on `message`. + /// + /// + /// A stable human-readable sentence for the class in `code`. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AgentRunLifecycleError( + string? code, + string? message) + { + this.Code = code; + this.Message = message; + } + + /// + /// Initializes a new instance of the class. + /// + public AgentRunLifecycleError() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.AgentRunLifecycleMetadata.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.AgentRunLifecycleMetadata.Json.g.cs new file mode 100644 index 00000000..418cbdc7 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.AgentRunLifecycleMetadata.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class AgentRunLifecycleMetadata + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Speechify.AgentRunLifecycleMetadata? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.AgentRunLifecycleMetadata), + jsonSerializerContext) as global::Speechify.AgentRunLifecycleMetadata; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.AgentRunLifecycleMetadata? FromJson( + string json) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Speechify.AgentRunLifecycleMetadata? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Speechify.AgentRunLifecycleMetadata), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.AgentRunLifecycleMetadata; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.Models.AgentRunLifecycleMetadata.g.cs b/src/libs/Speechify/Generated/Speechify.Models.AgentRunLifecycleMetadata.g.cs new file mode 100644 index 00000000..663a9498 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.AgentRunLifecycleMetadata.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// The run's metadata. `trigger` says how the run started: `api`, `manual`, `schedule`, `webhook`, `team` or `delegation`. + /// + public sealed partial class AgentRunLifecycleMetadata + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.AgentRunLifecycleStatus.g.cs b/src/libs/Speechify/Generated/Speechify.Models.AgentRunLifecycleStatus.g.cs new file mode 100644 index 00000000..0a430b0d --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.AgentRunLifecycleStatus.g.cs @@ -0,0 +1,87 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Where the run stands. On `run.ended` it is one of `succeeded`, `failed`, `canceled` or `expired`; on `run.updated` it never is. + /// + public enum AgentRunLifecycleStatus + { + /// + /// + /// + Canceled, + /// + /// + /// + Canceling, + /// + /// + /// + Expired, + /// + /// + /// + Failed, + /// + /// + /// + Queued, + /// + /// + /// + RequiresAction, + /// + /// + /// + Running, + /// + /// + /// + Succeeded, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class AgentRunLifecycleStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this AgentRunLifecycleStatus value) + { + return value switch + { + AgentRunLifecycleStatus.Canceled => "canceled", + AgentRunLifecycleStatus.Canceling => "canceling", + AgentRunLifecycleStatus.Expired => "expired", + AgentRunLifecycleStatus.Failed => "failed", + AgentRunLifecycleStatus.Queued => "queued", + AgentRunLifecycleStatus.RequiresAction => "requires_action", + AgentRunLifecycleStatus.Running => "running", + AgentRunLifecycleStatus.Succeeded => "succeeded", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static AgentRunLifecycleStatus? ToEnum(string value) + { + return value switch + { + "canceled" => AgentRunLifecycleStatus.Canceled, + "canceling" => AgentRunLifecycleStatus.Canceling, + "expired" => AgentRunLifecycleStatus.Expired, + "failed" => AgentRunLifecycleStatus.Failed, + "queued" => AgentRunLifecycleStatus.Queued, + "requires_action" => AgentRunLifecycleStatus.RequiresAction, + "running" => AgentRunLifecycleStatus.Running, + "succeeded" => AgentRunLifecycleStatus.Succeeded, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.AgentRunStep.g.cs b/src/libs/Speechify/Generated/Speechify.Models.AgentRunStep.g.cs index 652a6453..f9a5682e 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.AgentRunStep.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.AgentRunStep.g.cs @@ -4,7 +4,7 @@ namespace Speechify { /// - /// One iteration of a durable run's plan-act-observe loop, journaled in order. A `plan` step carries the agent's rationale (`content`); a `tool_call` step carries the tool it invoked (`tool`) and its rendered arguments (`args`); an `observation` step carries the tool's result (`content`) and, when the call it answers produced a file, that file (`files`); a `delegation` step carries the sub-goal it handed to a team member (`content`) and the member + child run that took it (`delegation`). The run's final answer is not a step - read it from the run object. Credential-shaped values in `args` and `content` are redacted. + /// One iteration of a durable run's plan-act-observe loop, journaled in order. A `plan` step carries the agent's rationale (`content`) and, when it is about to call a tool or asks approval to, that tool (`tool`); a `tool_call` step carries the tool it invoked (`tool`) and its rendered arguments (`args`); an `observation` step carries the tool's result (`content`) and, when the call it answers produced a file, that file (`files`); a `delegation` step carries the sub-goal it handed to a team member (`content`) and the member + child run that took it (`delegation`). The run's final answer is not a step - read it from the run object. Credential-shaped values in `args` and `content` are redacted. /// public sealed partial class AgentRunStep { @@ -24,13 +24,16 @@ public sealed partial class AgentRunStep public required global::Speechify.AgentRunStepKind Kind { get; set; } /// - /// The step's payload, per kind: a `plan`'s rationale, an `observation`'s result, or a `delegation`'s sub-goal (redacted). + /// The step's payload, per kind: a `plan`'s rationale, an `observation`'s result, or a `delegation`'s sub-goal (redacted). A `plan` carries only what the agent wrote, and has no `content` when the agent called a tool without writing anything. /// [global::System.Text.Json.Serialization.JsonPropertyName("content")] public string? Content { get; set; } /// - /// The tool a `tool_call` / `observation` step is about.
+ /// The tool a `plan` / `tool_call` / `observation` step is about.
+ /// On a `plan` it is the tool the agent is about to call, spelled exactly as
+ /// the `tool_call` step that follows it, or the tool it is asking approval
+ /// to call. Render progress from this field rather than from `content`.
/// It is not always one of your own tools. Platform tools appear under
/// their reserved names - `search_knowledge`, `fetch_url`, `run_code`,
/// `web_search`, `generate_image`, `edit_image`, `render_chart`,
@@ -132,10 +135,13 @@ public sealed partial class AgentRunStep /// When the step was committed to the journal. /// /// - /// The step's payload, per kind: a `plan`'s rationale, an `observation`'s result, or a `delegation`'s sub-goal (redacted). + /// The step's payload, per kind: a `plan`'s rationale, an `observation`'s result, or a `delegation`'s sub-goal (redacted). A `plan` carries only what the agent wrote, and has no `content` when the agent called a tool without writing anything. /// /// - /// The tool a `tool_call` / `observation` step is about.
+ /// The tool a `plan` / `tool_call` / `observation` step is about.
+ /// On a `plan` it is the tool the agent is about to call, spelled exactly as
+ /// the `tool_call` step that follows it, or the tool it is asking approval
+ /// to call. Render progress from this field rather than from `content`.
/// It is not always one of your own tools. Platform tools appear under
/// their reserved names - `search_knowledge`, `fetch_url`, `run_code`,
/// `web_search`, `generate_image`, `edit_image`, `render_chart`,
diff --git a/src/libs/Speechify/Generated/Speechify.Models.AgentRunStreamEvent.g.cs b/src/libs/Speechify/Generated/Speechify.Models.AgentRunStreamEvent.g.cs index 99a34ce0..7503bde6 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.AgentRunStreamEvent.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.AgentRunStreamEvent.g.cs @@ -59,15 +59,14 @@ public bool TryPickRunStepAdded( : throw new global::System.InvalidOperationException($"Expected union variant 'RunStepAdded' but the value was {ToString()}."); /// - /// A piece of the text the agent is writing, sent as it is written. `seq`
- /// is the journal position the text belongs to and `offset` the number of
- /// characters (Unicode code points) of that position's text before this
- /// piece; keep one buffer per `seq` and place the piece at its offset. The
- /// buffer is closed by a `run.step.added` at the same `seq` (it was the
- /// step's `content`) or by `run.ended` (it was the reply, and
- /// `output.reply` is the copy to keep). The SSE `id:` records the position
- /// reached, so a reconnect through `Last-Event-ID` resumes without
- /// replaying text already rendered. + /// A piece of the agent's answer, sent as it is written. It is only ever
+ /// the answer, never the agent's plan, so appending every piece in order
+ /// gives the reply. `seq` is the journal position the answer is written at
+ /// and `offset` the number of characters (Unicode code points) of it
+ /// before this piece; place the piece at its offset. `run.ended` closes
+ /// the answer, and its `output.reply` is the copy to keep. The SSE `id:`
+ /// records the position reached, so a reconnect through `Last-Event-ID`
+ /// resumes without replaying text already rendered. ///
#if NET6_0_OR_GREATER public global::Speechify.AgentRunStreamEventVariant2? RunReplyDelta { get; init; } diff --git a/src/libs/Speechify/Generated/Speechify.Models.AgentRunStreamEventVariant1.g.cs b/src/libs/Speechify/Generated/Speechify.Models.AgentRunStreamEventVariant1.g.cs index 5405bd2b..3f0313b4 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.AgentRunStreamEventVariant1.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.AgentRunStreamEventVariant1.g.cs @@ -34,13 +34,16 @@ public sealed partial class AgentRunStreamEventVariant1 public required global::Speechify.AgentRunStepAddedEventKind Kind { get; set; } /// - /// The step's payload, per kind: a `plan`'s rationale, an `observation`'s result, or a `delegation`'s sub-goal (redacted). + /// The step's payload, per kind: a `plan`'s rationale, an `observation`'s result, or a `delegation`'s sub-goal (redacted). A `plan` carries only what the agent wrote, and has no `content` when the agent called a tool without writing anything. /// [global::System.Text.Json.Serialization.JsonPropertyName("content")] public string? Content { get; set; } /// - /// The tool a `tool_call` / `observation` step is about.
+ /// The tool a `plan` / `tool_call` / `observation` step is about.
+ /// On a `plan` it is the tool the agent is about to call, spelled exactly as
+ /// the `tool_call` step that follows it, or the tool it is asking approval
+ /// to call. Render progress from this field rather than from `content`.
/// It is not always one of your own tools. Platform tools appear under
/// their reserved names - `search_knowledge`, `fetch_url`, `run_code`,
/// `web_search`, `generate_image`, `edit_image`, `render_chart`,
@@ -143,10 +146,13 @@ public sealed partial class AgentRunStreamEventVariant1 /// /// /// - /// The step's payload, per kind: a `plan`'s rationale, an `observation`'s result, or a `delegation`'s sub-goal (redacted). + /// The step's payload, per kind: a `plan`'s rationale, an `observation`'s result, or a `delegation`'s sub-goal (redacted). A `plan` carries only what the agent wrote, and has no `content` when the agent called a tool without writing anything. /// /// - /// The tool a `tool_call` / `observation` step is about.
+ /// The tool a `plan` / `tool_call` / `observation` step is about.
+ /// On a `plan` it is the tool the agent is about to call, spelled exactly as
+ /// the `tool_call` step that follows it, or the tool it is asking approval
+ /// to call. Render progress from this field rather than from `content`.
/// It is not always one of your own tools. Platform tools appear under
/// their reserved names - `search_knowledge`, `fetch_url`, `run_code`,
/// `web_search`, `generate_image`, `edit_image`, `render_chart`,
diff --git a/src/libs/Speechify/Generated/Speechify.Models.AgentRunStreamEventVariant2.g.cs b/src/libs/Speechify/Generated/Speechify.Models.AgentRunStreamEventVariant2.g.cs index bdd5fd23..5dd4e70b 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.AgentRunStreamEventVariant2.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.AgentRunStreamEventVariant2.g.cs @@ -4,15 +4,14 @@ namespace Speechify { /// - /// A piece of the text the agent is writing, sent as it is written. `seq`
- /// is the journal position the text belongs to and `offset` the number of
- /// characters (Unicode code points) of that position's text before this
- /// piece; keep one buffer per `seq` and place the piece at its offset. The
- /// buffer is closed by a `run.step.added` at the same `seq` (it was the
- /// step's `content`) or by `run.ended` (it was the reply, and
- /// `output.reply` is the copy to keep). The SSE `id:` records the position
- /// reached, so a reconnect through `Last-Event-ID` resumes without
- /// replaying text already rendered. + /// A piece of the agent's answer, sent as it is written. It is only ever
+ /// the answer, never the agent's plan, so appending every piece in order
+ /// gives the reply. `seq` is the journal position the answer is written at
+ /// and `offset` the number of characters (Unicode code points) of it
+ /// before this piece; place the piece at its offset. `run.ended` closes
+ /// the answer, and its `output.reply` is the copy to keep. The SSE `id:`
+ /// records the position reached, so a reconnect through `Last-Event-ID`
+ /// resumes without replaying text already rendered. ///
public sealed partial class AgentRunStreamEventVariant2 { @@ -24,14 +23,14 @@ public sealed partial class AgentRunStreamEventVariant2 public global::Speechify.AgentRunStreamEventVariant2Type Type { get; set; } /// - /// The journal position this text is being written at. + /// The journal position the answer is being written at. /// [global::System.Text.Json.Serialization.JsonPropertyName("seq")] [global::System.Text.Json.Serialization.JsonRequired] public required int Seq { get; set; } /// - /// Characters of this position's text that precede this piece. + /// Characters of the answer that precede this piece. /// [global::System.Text.Json.Serialization.JsonPropertyName("offset")] [global::System.Text.Json.Serialization.JsonRequired] @@ -54,10 +53,10 @@ public sealed partial class AgentRunStreamEventVariant2 /// Initializes a new instance of the class. ///
/// - /// The journal position this text is being written at. + /// The journal position the answer is being written at. /// /// - /// Characters of this position's text that precede this piece. + /// Characters of the answer that precede this piece. /// /// /// The piece itself, never empty. diff --git a/src/libs/Speechify/Generated/Speechify.Models.BillingEntitlements.g.cs b/src/libs/Speechify/Generated/Speechify.Models.BillingEntitlements.g.cs index 337829ce..693f4289 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.BillingEntitlements.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.BillingEntitlements.g.cs @@ -166,7 +166,8 @@ public sealed partial class BillingEntitlements /// and it is enabled per workspace. When false, WRITES to the
/// voice-agent surface return 402 voice_agents_not_in_plan; reads are
/// unaffected, so a workspace never loses sight of what it already
- /// built. + /// built. A workspace with hosted_apis_access still writes mcp and
+ /// openapi tool definitions, the connectors a hosted API mounts. ///
[global::System.Text.Json.Serialization.JsonPropertyName("voice_agent_access")] [global::System.Text.Json.Serialization.JsonRequired] @@ -410,7 +411,8 @@ public sealed partial class BillingEntitlements /// and it is enabled per workspace. When false, WRITES to the
/// voice-agent surface return 402 voice_agents_not_in_plan; reads are
/// unaffected, so a workspace never loses sight of what it already
- /// built. + /// built. A workspace with hosted_apis_access still writes mcp and
+ /// openapi tool definitions, the connectors a hosted API mounts. /// /// /// Whether the workspace may start and read durable async agent runs,
diff --git a/src/libs/Speechify/Generated/Speechify.Models.ListToolAPIRoutesResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ListToolAPIRoutesResponse.Json.g.cs new file mode 100644 index 00000000..f14960a7 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ListToolAPIRoutesResponse.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class ListToolAPIRoutesResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Speechify.ListToolAPIRoutesResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.ListToolAPIRoutesResponse), + jsonSerializerContext) as global::Speechify.ListToolAPIRoutesResponse; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.ListToolAPIRoutesResponse? FromJson( + string json) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Speechify.ListToolAPIRoutesResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Speechify.ListToolAPIRoutesResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.ListToolAPIRoutesResponse; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.Models.ListToolAPIRoutesResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ListToolAPIRoutesResponse.g.cs new file mode 100644 index 00000000..13db6abd --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ListToolAPIRoutesResponse.g.cs @@ -0,0 +1,75 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Response shape for GET /v1/agents/tool-definitions/{tool_definition_id}/api-routes.
+ /// Ordered by API name, then by route creation. + ///
+ public sealed partial class ListToolAPIRoutesResponse + { + /// + /// Opaque keyset cursor for the next page. Pass back as the
+ /// `cursor` request parameter. `null` when the caller has
+ /// reached the end of the list (`has_more` is also `false`
+ /// in that case). + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("next_cursor")] + public string? NextCursor { get; set; } + + /// + /// True when more rows exist beyond this page. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("routes")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Routes { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// True when more rows exist beyond this page. + /// + /// + /// + /// Opaque keyset cursor for the next page. Pass back as the
+ /// `cursor` request parameter. `null` when the caller has
+ /// reached the end of the list (`has_more` is also `false`
+ /// in that case). + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ListToolAPIRoutesResponse( + bool hasMore, + global::System.Collections.Generic.IList routes, + string? nextCursor) + { + this.NextCursor = nextCursor; + this.HasMore = hasMore; + this.Routes = routes ?? throw new global::System.ArgumentNullException(nameof(routes)); + } + + /// + /// Initializes a new instance of the class. + /// + public ListToolAPIRoutesResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEvent.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEvent.Json.g.cs new file mode 100644 index 00000000..8462ca0d --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEvent.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public readonly partial struct ProjectRunStreamEvent + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Speechify.ProjectRunStreamEvent? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.ProjectRunStreamEvent), + jsonSerializerContext) as global::Speechify.ProjectRunStreamEvent?; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.ProjectRunStreamEvent? FromJson( + string json) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Speechify.ProjectRunStreamEvent? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Speechify.ProjectRunStreamEvent), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.ProjectRunStreamEvent?; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEvent.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEvent.g.cs new file mode 100644 index 00000000..3f446c50 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEvent.g.cs @@ -0,0 +1,392 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace Speechify +{ + /// + /// One event on the project run stream. The `type` field discriminates the
+ /// variants and mirrors the SSE `event:` name, so an event is identifiable
+ /// from its `data:` payload alone. Ignore event types you do not recognize. + ///
+ public readonly partial struct ProjectRunStreamEvent : global::System.IEquatable + { + /// + /// + /// + public global::Speechify.ProjectRunStreamEventDiscriminatorType? Type { get; } + + /// + /// A run that has not finished, as it stands: sent for every live run when
+ /// the stream opens, when a run appears, and whenever its `status` or
+ /// `pending_action` changes. + ///
+#if NET6_0_OR_GREATER + public global::Speechify.ProjectRunStreamEventVariant1? RunUpdated { get; init; } +#else + public global::Speechify.ProjectRunStreamEventVariant1? RunUpdated { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RunUpdated))] +#endif + public bool IsRunUpdated => RunUpdated != null; + + /// + /// + /// + public bool TryPickRunUpdated( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Speechify.ProjectRunStreamEventVariant1? value) + { + value = RunUpdated; + return IsRunUpdated; + } + + /// + /// + /// + public global::Speechify.ProjectRunStreamEventVariant1 PickRunUpdated() => IsRunUpdated + ? RunUpdated! + : throw new global::System.InvalidOperationException($"Expected union variant 'RunUpdated' but the value was {ToString()}."); + + /// + /// A run settled. It is the run's last event on the stream; the answer is
+ /// not on it, so read the run with Get Run when you need what it produced. + ///
+#if NET6_0_OR_GREATER + public global::Speechify.ProjectRunStreamEventVariant2? RunEnded { get; init; } +#else + public global::Speechify.ProjectRunStreamEventVariant2? RunEnded { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RunEnded))] +#endif + public bool IsRunEnded => RunEnded != null; + + /// + /// + /// + public bool TryPickRunEnded( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Speechify.ProjectRunStreamEventVariant2? value) + { + value = RunEnded; + return IsRunEnded; + } + + /// + /// + /// + public global::Speechify.ProjectRunStreamEventVariant2 PickRunEnded() => IsRunEnded + ? RunEnded! + : throw new global::System.InvalidOperationException($"Expected union variant 'RunEnded' but the value was {ToString()}."); + + /// + /// Every run that was live when this connection opened has been sent.
+ /// Sent once per connection, after the opening `run.updated` events. + ///
+#if NET6_0_OR_GREATER + public global::Speechify.ProjectRunStreamEventVariant3? RunsSynced { get; init; } +#else + public global::Speechify.ProjectRunStreamEventVariant3? RunsSynced { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RunsSynced))] +#endif + public bool IsRunsSynced => RunsSynced != null; + + /// + /// + /// + public bool TryPickRunsSynced( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Speechify.ProjectRunStreamEventVariant3? value) + { + value = RunsSynced; + return IsRunsSynced; + } + + /// + /// + /// + public global::Speechify.ProjectRunStreamEventVariant3 PickRunsSynced() => IsRunsSynced + ? RunsSynced! + : throw new global::System.InvalidOperationException($"Expected union variant 'RunsSynced' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator ProjectRunStreamEvent(global::Speechify.ProjectRunStreamEventVariant1 value) => new ProjectRunStreamEvent((global::Speechify.ProjectRunStreamEventVariant1?)value); + + /// + /// + /// + public static implicit operator global::Speechify.ProjectRunStreamEventVariant1?(ProjectRunStreamEvent @this) => @this.RunUpdated; + + /// + /// + /// + public ProjectRunStreamEvent(global::Speechify.ProjectRunStreamEventVariant1? value) + { + RunUpdated = value; + } + + /// + /// + /// + public static ProjectRunStreamEvent FromRunUpdated(global::Speechify.ProjectRunStreamEventVariant1? value) => new ProjectRunStreamEvent(value); + + /// + /// + /// + public static implicit operator ProjectRunStreamEvent(global::Speechify.ProjectRunStreamEventVariant2 value) => new ProjectRunStreamEvent((global::Speechify.ProjectRunStreamEventVariant2?)value); + + /// + /// + /// + public static implicit operator global::Speechify.ProjectRunStreamEventVariant2?(ProjectRunStreamEvent @this) => @this.RunEnded; + + /// + /// + /// + public ProjectRunStreamEvent(global::Speechify.ProjectRunStreamEventVariant2? value) + { + RunEnded = value; + } + + /// + /// + /// + public static ProjectRunStreamEvent FromRunEnded(global::Speechify.ProjectRunStreamEventVariant2? value) => new ProjectRunStreamEvent(value); + + /// + /// + /// + public static implicit operator ProjectRunStreamEvent(global::Speechify.ProjectRunStreamEventVariant3 value) => new ProjectRunStreamEvent((global::Speechify.ProjectRunStreamEventVariant3?)value); + + /// + /// + /// + public static implicit operator global::Speechify.ProjectRunStreamEventVariant3?(ProjectRunStreamEvent @this) => @this.RunsSynced; + + /// + /// + /// + public ProjectRunStreamEvent(global::Speechify.ProjectRunStreamEventVariant3? value) + { + RunsSynced = value; + } + + /// + /// + /// + public static ProjectRunStreamEvent FromRunsSynced(global::Speechify.ProjectRunStreamEventVariant3? value) => new ProjectRunStreamEvent(value); + + /// + /// + /// + public ProjectRunStreamEvent( + global::Speechify.ProjectRunStreamEventDiscriminatorType? type, + global::Speechify.ProjectRunStreamEventVariant1? runUpdated, + global::Speechify.ProjectRunStreamEventVariant2? runEnded, + global::Speechify.ProjectRunStreamEventVariant3? runsSynced + ) + { + Type = type; + + RunUpdated = runUpdated; + RunEnded = runEnded; + RunsSynced = runsSynced; + } + + /// + /// + /// + public object? Object => + RunsSynced as object ?? + RunEnded as object ?? + RunUpdated as object + ; + + /// + /// + /// + public override string? ToString() => + RunUpdated?.ToString() ?? + RunEnded?.ToString() ?? + RunsSynced?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsRunUpdated && !IsRunEnded && !IsRunsSynced || !IsRunUpdated && IsRunEnded && !IsRunsSynced || !IsRunUpdated && !IsRunEnded && IsRunsSynced; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? runUpdated = null, + global::System.Func? runEnded = null, + global::System.Func? runsSynced = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsRunUpdated && runUpdated != null) + { + return runUpdated(RunUpdated!); + } + else if (IsRunEnded && runEnded != null) + { + return runEnded(RunEnded!); + } + else if (IsRunsSynced && runsSynced != null) + { + return runsSynced(RunsSynced!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? runUpdated = null, + + global::System.Action? runEnded = null, + + global::System.Action? runsSynced = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsRunUpdated) + { + runUpdated?.Invoke(RunUpdated!); + } + else if (IsRunEnded) + { + runEnded?.Invoke(RunEnded!); + } + else if (IsRunsSynced) + { + runsSynced?.Invoke(RunsSynced!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? runUpdated = null, + global::System.Action? runEnded = null, + global::System.Action? runsSynced = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsRunUpdated) + { + runUpdated?.Invoke(RunUpdated!); + } + else if (IsRunEnded) + { + runEnded?.Invoke(RunEnded!); + } + else if (IsRunsSynced) + { + runsSynced?.Invoke(RunsSynced!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + RunUpdated, + typeof(global::Speechify.ProjectRunStreamEventVariant1), + RunEnded, + typeof(global::Speechify.ProjectRunStreamEventVariant2), + RunsSynced, + typeof(global::Speechify.ProjectRunStreamEventVariant3), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ProjectRunStreamEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(RunUpdated, other.RunUpdated) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(RunEnded, other.RunEnded) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(RunsSynced, other.RunsSynced) + ; + } + + /// + /// + /// + public static bool operator ==(ProjectRunStreamEvent obj1, ProjectRunStreamEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ProjectRunStreamEvent obj1, ProjectRunStreamEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ProjectRunStreamEvent o && Equals(o); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventDiscriminator.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventDiscriminator.Json.g.cs new file mode 100644 index 00000000..b73f66be --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventDiscriminator.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class ProjectRunStreamEventDiscriminator + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Speechify.ProjectRunStreamEventDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.ProjectRunStreamEventDiscriminator), + jsonSerializerContext) as global::Speechify.ProjectRunStreamEventDiscriminator; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.ProjectRunStreamEventDiscriminator? FromJson( + string json) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Speechify.ProjectRunStreamEventDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Speechify.ProjectRunStreamEventDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.ProjectRunStreamEventDiscriminator; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventDiscriminator.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventDiscriminator.g.cs new file mode 100644 index 00000000..303b1187 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventDiscriminator.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// + /// + public sealed partial class ProjectRunStreamEventDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.ProjectRunStreamEventDiscriminatorTypeJsonConverter))] + public global::Speechify.ProjectRunStreamEventDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ProjectRunStreamEventDiscriminator( + global::Speechify.ProjectRunStreamEventDiscriminatorType? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ProjectRunStreamEventDiscriminator() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventDiscriminatorType.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventDiscriminatorType.g.cs new file mode 100644 index 00000000..21168c4e --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventDiscriminatorType.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// + /// + public enum ProjectRunStreamEventDiscriminatorType + { + /// + /// + /// + RunEnded, + /// + /// + /// + RunUpdated, + /// + /// + /// + RunsSynced, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ProjectRunStreamEventDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ProjectRunStreamEventDiscriminatorType value) + { + return value switch + { + ProjectRunStreamEventDiscriminatorType.RunEnded => "run.ended", + ProjectRunStreamEventDiscriminatorType.RunUpdated => "run.updated", + ProjectRunStreamEventDiscriminatorType.RunsSynced => "runs.synced", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ProjectRunStreamEventDiscriminatorType? ToEnum(string value) + { + return value switch + { + "run.ended" => ProjectRunStreamEventDiscriminatorType.RunEnded, + "run.updated" => ProjectRunStreamEventDiscriminatorType.RunUpdated, + "runs.synced" => ProjectRunStreamEventDiscriminatorType.RunsSynced, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant1.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant1.Json.g.cs new file mode 100644 index 00000000..4afa139f --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant1.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class ProjectRunStreamEventVariant1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Speechify.ProjectRunStreamEventVariant1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.ProjectRunStreamEventVariant1), + jsonSerializerContext) as global::Speechify.ProjectRunStreamEventVariant1; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.ProjectRunStreamEventVariant1? FromJson( + string json) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Speechify.ProjectRunStreamEventVariant1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Speechify.ProjectRunStreamEventVariant1), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.ProjectRunStreamEventVariant1; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant1.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant1.g.cs new file mode 100644 index 00000000..7cd28344 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant1.g.cs @@ -0,0 +1,65 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// A run that has not finished, as it stands: sent for every live run when
+ /// the stream opens, when a run appears, and whenever its `status` or
+ /// `pending_action` changes. + ///
+ public sealed partial class ProjectRunStreamEventVariant1 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.ProjectRunStreamEventVariant1TypeJsonConverter))] + public global::Speechify.ProjectRunStreamEventVariant1Type Type { get; set; } + + /// + /// A run as the project run stream reports it: which run, whose, where it
+ /// stands and what it is waiting on. Each field means what it means on the
+ /// run object, except `user_identity`, which the run object carries under
+ /// `input`. What the run was asked and what it answered are never here. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("run")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Speechify.AgentRunLifecycle Run { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// A run as the project run stream reports it: which run, whose, where it
+ /// stands and what it is waiting on. Each field means what it means on the
+ /// run object, except `user_identity`, which the run object carries under
+ /// `input`. What the run was asked and what it answered are never here. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ProjectRunStreamEventVariant1( + global::Speechify.AgentRunLifecycle run, + global::Speechify.ProjectRunStreamEventVariant1Type type) + { + this.Type = type; + this.Run = run ?? throw new global::System.ArgumentNullException(nameof(run)); + } + + /// + /// Initializes a new instance of the class. + /// + public ProjectRunStreamEventVariant1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant1Type.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant1Type.g.cs new file mode 100644 index 00000000..7488640e --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant1Type.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// + /// + public enum ProjectRunStreamEventVariant1Type + { + /// + /// + /// + RunUpdated, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ProjectRunStreamEventVariant1TypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ProjectRunStreamEventVariant1Type value) + { + return value switch + { + ProjectRunStreamEventVariant1Type.RunUpdated => "run.updated", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ProjectRunStreamEventVariant1Type? ToEnum(string value) + { + return value switch + { + "run.updated" => ProjectRunStreamEventVariant1Type.RunUpdated, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant2.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant2.Json.g.cs new file mode 100644 index 00000000..36fc5b9f --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant2.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class ProjectRunStreamEventVariant2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Speechify.ProjectRunStreamEventVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.ProjectRunStreamEventVariant2), + jsonSerializerContext) as global::Speechify.ProjectRunStreamEventVariant2; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.ProjectRunStreamEventVariant2? FromJson( + string json) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Speechify.ProjectRunStreamEventVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Speechify.ProjectRunStreamEventVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.ProjectRunStreamEventVariant2; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant2.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant2.g.cs new file mode 100644 index 00000000..f7a41fbd --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant2.g.cs @@ -0,0 +1,64 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// A run settled. It is the run's last event on the stream; the answer is
+ /// not on it, so read the run with Get Run when you need what it produced. + ///
+ public sealed partial class ProjectRunStreamEventVariant2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.ProjectRunStreamEventVariant2TypeJsonConverter))] + public global::Speechify.ProjectRunStreamEventVariant2Type Type { get; set; } + + /// + /// A run as the project run stream reports it: which run, whose, where it
+ /// stands and what it is waiting on. Each field means what it means on the
+ /// run object, except `user_identity`, which the run object carries under
+ /// `input`. What the run was asked and what it answered are never here. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("run")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Speechify.AgentRunLifecycle Run { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// A run as the project run stream reports it: which run, whose, where it
+ /// stands and what it is waiting on. Each field means what it means on the
+ /// run object, except `user_identity`, which the run object carries under
+ /// `input`. What the run was asked and what it answered are never here. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ProjectRunStreamEventVariant2( + global::Speechify.AgentRunLifecycle run, + global::Speechify.ProjectRunStreamEventVariant2Type type) + { + this.Type = type; + this.Run = run ?? throw new global::System.ArgumentNullException(nameof(run)); + } + + /// + /// Initializes a new instance of the class. + /// + public ProjectRunStreamEventVariant2() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant2Type.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant2Type.g.cs new file mode 100644 index 00000000..85514ae4 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant2Type.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// + /// + public enum ProjectRunStreamEventVariant2Type + { + /// + /// + /// + RunEnded, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ProjectRunStreamEventVariant2TypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ProjectRunStreamEventVariant2Type value) + { + return value switch + { + ProjectRunStreamEventVariant2Type.RunEnded => "run.ended", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ProjectRunStreamEventVariant2Type? ToEnum(string value) + { + return value switch + { + "run.ended" => ProjectRunStreamEventVariant2Type.RunEnded, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant3.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant3.Json.g.cs new file mode 100644 index 00000000..d0cab03d --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant3.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class ProjectRunStreamEventVariant3 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Speechify.ProjectRunStreamEventVariant3? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.ProjectRunStreamEventVariant3), + jsonSerializerContext) as global::Speechify.ProjectRunStreamEventVariant3; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.ProjectRunStreamEventVariant3? FromJson( + string json) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Speechify.ProjectRunStreamEventVariant3? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Speechify.ProjectRunStreamEventVariant3), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.ProjectRunStreamEventVariant3; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant3.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant3.g.cs new file mode 100644 index 00000000..4f391d99 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant3.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Every run that was live when this connection opened has been sent.
+ /// Sent once per connection, after the opening `run.updated` events. + ///
+ public sealed partial class ProjectRunStreamEventVariant3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.ProjectRunStreamEventVariant3TypeJsonConverter))] + public global::Speechify.ProjectRunStreamEventVariant3Type Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ProjectRunStreamEventVariant3( + global::Speechify.ProjectRunStreamEventVariant3Type type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public ProjectRunStreamEventVariant3() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant3Type.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant3Type.g.cs new file mode 100644 index 00000000..787f7830 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ProjectRunStreamEventVariant3Type.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// + /// + public enum ProjectRunStreamEventVariant3Type + { + /// + /// + /// + RunsSynced, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ProjectRunStreamEventVariant3TypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ProjectRunStreamEventVariant3Type value) + { + return value switch + { + ProjectRunStreamEventVariant3Type.RunsSynced => "runs.synced", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ProjectRunStreamEventVariant3Type? ToEnum(string value) + { + return value switch + { + "runs.synced" => ProjectRunStreamEventVariant3Type.RunsSynced, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.RequestAnalyticsBucket.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.RequestAnalyticsBucket.Json.g.cs new file mode 100644 index 00000000..54c9dbfc --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.RequestAnalyticsBucket.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class RequestAnalyticsBucket + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Speechify.RequestAnalyticsBucket? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.RequestAnalyticsBucket), + jsonSerializerContext) as global::Speechify.RequestAnalyticsBucket; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.RequestAnalyticsBucket? FromJson( + string json) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Speechify.RequestAnalyticsBucket? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Speechify.RequestAnalyticsBucket), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.RequestAnalyticsBucket; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.Models.RequestAnalyticsBucket.g.cs b/src/libs/Speechify/Generated/Speechify.Models.RequestAnalyticsBucket.g.cs new file mode 100644 index 00000000..a17fbb75 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.RequestAnalyticsBucket.g.cs @@ -0,0 +1,193 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// One granularity bucket of the request analytics series. + /// + public sealed partial class RequestAnalyticsBucket + { + /// + /// Start of the bucket. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("time")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime Time { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("requests")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Requests { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("errors")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Errors { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("server_errors")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int ServerErrors { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("success_rate")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double SuccessRate { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("avg_latency_ms")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double AvgLatencyMs { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("p50_latency_ms")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double P50LatencyMs { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("p95_latency_ms")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double P95LatencyMs { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("p99_latency_ms")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double P99LatencyMs { get; set; } + + /// + /// How many of `requests` were streaming synthesis (`POST
+ /// /v1/audio/stream`) and so reported a time-to-first-byte. Every other
+ /// route leaves the `p*_ttfb_ms` fields meaningless; when this is 0,
+ /// render a gap rather than a zero. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("ttfb_requests")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int TtfbRequests { get; set; } + + /// + /// Median time to first byte over the bucket's streaming requests. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("p50_ttfb_ms")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double P50TtfbMs { get; set; } + + /// + /// 95th-percentile time to first byte over the bucket's streaming
+ /// requests. This is also time to first *audio*: the streaming response
+ /// body is raw audio, so the first byte is the first audio byte.
+ /// Scoped to streaming on purpose. `POST /v1/audio/speech` returns the
+ /// whole audio Base64-encoded in one JSON response, so its TTFB is its
+ /// total latency (already reported as `p*_latency_ms`) and blending the
+ /// two would describe neither. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("p95_ttfb_ms")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double P95TtfbMs { get; set; } + + /// + /// 99th-percentile time to first byte over the bucket's streaming requests. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("p99_ttfb_ms")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double P99TtfbMs { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Start of the bucket. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// How many of `requests` were streaming synthesis (`POST
+ /// /v1/audio/stream`) and so reported a time-to-first-byte. Every other
+ /// route leaves the `p*_ttfb_ms` fields meaningless; when this is 0,
+ /// render a gap rather than a zero. + /// + /// + /// Median time to first byte over the bucket's streaming requests. + /// + /// + /// 95th-percentile time to first byte over the bucket's streaming
+ /// requests. This is also time to first *audio*: the streaming response
+ /// body is raw audio, so the first byte is the first audio byte.
+ /// Scoped to streaming on purpose. `POST /v1/audio/speech` returns the
+ /// whole audio Base64-encoded in one JSON response, so its TTFB is its
+ /// total latency (already reported as `p*_latency_ms`) and blending the
+ /// two would describe neither. + /// + /// + /// 99th-percentile time to first byte over the bucket's streaming requests. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RequestAnalyticsBucket( + global::System.DateTime time, + int requests, + int errors, + int serverErrors, + double successRate, + double avgLatencyMs, + double p50LatencyMs, + double p95LatencyMs, + double p99LatencyMs, + int ttfbRequests, + double p50TtfbMs, + double p95TtfbMs, + double p99TtfbMs) + { + this.Time = time; + this.Requests = requests; + this.Errors = errors; + this.ServerErrors = serverErrors; + this.SuccessRate = successRate; + this.AvgLatencyMs = avgLatencyMs; + this.P50LatencyMs = p50LatencyMs; + this.P95LatencyMs = p95LatencyMs; + this.P99LatencyMs = p99LatencyMs; + this.TtfbRequests = ttfbRequests; + this.P50TtfbMs = p50TtfbMs; + this.P95TtfbMs = p95TtfbMs; + this.P99TtfbMs = p99TtfbMs; + } + + /// + /// Initializes a new instance of the class. + /// + public RequestAnalyticsBucket() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.RequestAnalyticsResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.RequestAnalyticsResponse.Json.g.cs new file mode 100644 index 00000000..5a9587df --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.RequestAnalyticsResponse.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class RequestAnalyticsResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Speechify.RequestAnalyticsResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.RequestAnalyticsResponse), + jsonSerializerContext) as global::Speechify.RequestAnalyticsResponse; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.RequestAnalyticsResponse? FromJson( + string json) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Speechify.RequestAnalyticsResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Speechify.RequestAnalyticsResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.RequestAnalyticsResponse; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.Models.RequestAnalyticsResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.RequestAnalyticsResponse.g.cs new file mode 100644 index 00000000..82489197 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.RequestAnalyticsResponse.g.cs @@ -0,0 +1,129 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Aggregate request analytics over a window of the request log. + /// + public sealed partial class RequestAnalyticsResponse + { + /// + /// The time-bucket size of the series. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("granularity")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Granularity { get; set; } + + /// + /// Inclusive start of the resolved window. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("start")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime Start { get; set; } + + /// + /// Exclusive end of the resolved window. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("end")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime End { get; set; } + + /// + /// Window-wide rollups. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("totals")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Speechify.RequestAnalyticsTotals Totals { get; set; } + + /// + /// Per-bucket time series, oldest first. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("series")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Series { get; set; } + + /// + /// The most-called route patterns in the window, busiest first. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("top_paths")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList TopPaths { get; set; } + + /// + /// True when a `project_id` filter's pinned key set exceeded the cap this endpoint applies: the result reflects only the project's newest keys within the cap, not its full traffic. Omitted (false) when no project filter was requested or its key set fit under the cap. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("project_filter_truncated")] + public bool? ProjectFilterTruncated { get; set; } + + /// + /// Hosted API analytics only: the first request in the last 30 days the request log attributes to this API. Requests before it cannot be attributed, so a bucket before it is missing data rather than zero traffic. Absent when no such request exists, in which case no bucket is known to be complete. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("history_starts_at")] + public global::System.DateTime? HistoryStartsAt { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The time-bucket size of the series. + /// + /// + /// Inclusive start of the resolved window. + /// + /// + /// Exclusive end of the resolved window. + /// + /// + /// Window-wide rollups. + /// + /// + /// Per-bucket time series, oldest first. + /// + /// + /// The most-called route patterns in the window, busiest first. + /// + /// + /// True when a `project_id` filter's pinned key set exceeded the cap this endpoint applies: the result reflects only the project's newest keys within the cap, not its full traffic. Omitted (false) when no project filter was requested or its key set fit under the cap. + /// + /// + /// Hosted API analytics only: the first request in the last 30 days the request log attributes to this API. Requests before it cannot be attributed, so a bucket before it is missing data rather than zero traffic. Absent when no such request exists, in which case no bucket is known to be complete. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RequestAnalyticsResponse( + string granularity, + global::System.DateTime start, + global::System.DateTime end, + global::Speechify.RequestAnalyticsTotals totals, + global::System.Collections.Generic.IList series, + global::System.Collections.Generic.IList topPaths, + bool? projectFilterTruncated, + global::System.DateTime? historyStartsAt) + { + this.Granularity = granularity ?? throw new global::System.ArgumentNullException(nameof(granularity)); + this.Start = start; + this.End = end; + this.Totals = totals ?? throw new global::System.ArgumentNullException(nameof(totals)); + this.Series = series ?? throw new global::System.ArgumentNullException(nameof(series)); + this.TopPaths = topPaths ?? throw new global::System.ArgumentNullException(nameof(topPaths)); + this.ProjectFilterTruncated = projectFilterTruncated; + this.HistoryStartsAt = historyStartsAt; + } + + /// + /// Initializes a new instance of the class. + /// + public RequestAnalyticsResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.RequestAnalyticsTotals.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.RequestAnalyticsTotals.Json.g.cs new file mode 100644 index 00000000..db220da2 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.RequestAnalyticsTotals.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class RequestAnalyticsTotals + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Speechify.RequestAnalyticsTotals? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.RequestAnalyticsTotals), + jsonSerializerContext) as global::Speechify.RequestAnalyticsTotals; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.RequestAnalyticsTotals? FromJson( + string json) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Speechify.RequestAnalyticsTotals? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Speechify.RequestAnalyticsTotals), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.RequestAnalyticsTotals; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.Models.RequestAnalyticsTotals.g.cs b/src/libs/Speechify/Generated/Speechify.Models.RequestAnalyticsTotals.g.cs new file mode 100644 index 00000000..1b9eb8e4 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.RequestAnalyticsTotals.g.cs @@ -0,0 +1,95 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Window-wide rollups. + /// + public sealed partial class RequestAnalyticsTotals + { + /// + /// Total requests in the window. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("requests")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Requests { get; set; } + + /// + /// Responses with a 4xx or 5xx status. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("errors")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Errors { get; set; } + + /// + /// Responses with a 5xx status. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("server_errors")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int ServerErrors { get; set; } + + /// + /// Share of non-error responses, 0..1. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("success_rate")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double SuccessRate { get; set; } + + /// + /// Requests in the window that carried a Speechify SDK identity header, a subset of `requests`. Zero means no SDK traffic, which is a real answer rather than missing data. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sdk_requests")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int SdkRequests { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Total requests in the window. + /// + /// + /// Responses with a 4xx or 5xx status. + /// + /// + /// Responses with a 5xx status. + /// + /// + /// Share of non-error responses, 0..1. + /// + /// + /// Requests in the window that carried a Speechify SDK identity header, a subset of `requests`. Zero means no SDK traffic, which is a real answer rather than missing data. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RequestAnalyticsTotals( + int requests, + int errors, + int serverErrors, + double successRate, + int sdkRequests) + { + this.Requests = requests; + this.Errors = errors; + this.ServerErrors = serverErrors; + this.SuccessRate = successRate; + this.SdkRequests = sdkRequests; + } + + /// + /// Initializes a new instance of the class. + /// + public RequestAnalyticsTotals() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.RequestTopPath.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.RequestTopPath.Json.g.cs new file mode 100644 index 00000000..c63570cf --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.RequestTopPath.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class RequestTopPath + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Speechify.RequestTopPath? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.RequestTopPath), + jsonSerializerContext) as global::Speechify.RequestTopPath; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.RequestTopPath? FromJson( + string json) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Speechify.RequestTopPath? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Speechify.RequestTopPath), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.RequestTopPath; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.Models.RequestTopPath.g.cs b/src/libs/Speechify/Generated/Speechify.Models.RequestTopPath.g.cs new file mode 100644 index 00000000..8146b3d6 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.RequestTopPath.g.cs @@ -0,0 +1,68 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// A called route pattern and its request count in the window. + /// + public sealed partial class RequestTopPath + { + /// + /// The route pattern as the request log labels it. On a hosted API's analytics, the label of the route `route_id` names, and empty for a route since deleted. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("route")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Route { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("count")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Count { get; set; } + + /// + /// Hosted API analytics only - the route the row counts (`route_...`). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("route_id")] + public string? RouteId { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The route pattern as the request log labels it. On a hosted API's analytics, the label of the route `route_id` names, and empty for a route since deleted. + /// + /// + /// + /// Hosted API analytics only - the route the row counts (`route_...`). + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RequestTopPath( + string route, + int count, + string? routeId) + { + this.Route = route ?? throw new global::System.ArgumentNullException(nameof(route)); + this.Count = count; + this.RouteId = routeId; + } + + /// + /// Initializes a new instance of the class. + /// + public RequestTopPath() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.ToolAPIRoute.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ToolAPIRoute.Json.g.cs new file mode 100644 index 00000000..81066e91 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ToolAPIRoute.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class ToolAPIRoute + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Speechify.ToolAPIRoute? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.ToolAPIRoute), + jsonSerializerContext) as global::Speechify.ToolAPIRoute; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.ToolAPIRoute? FromJson( + string json) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Speechify.ToolAPIRoute? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Speechify.ToolAPIRoute), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.ToolAPIRoute; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.Models.ToolAPIRoute.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ToolAPIRoute.g.cs new file mode 100644 index 00000000..3877c31f --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ToolAPIRoute.g.cs @@ -0,0 +1,126 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// A hosted API route that calls a tool, with the API it answers on. + /// + public sealed partial class ToolAPIRoute + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The route's name; on an API with `mcp_enabled`, the MCP tool name comes from it. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("method")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.ToolApiRouteMethodJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Speechify.ToolApiRouteMethod Method { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("path")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Path { get; set; } + + /// + /// The operation the route calls, an `openapi` operation's id or an `mcp` server's tool name. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("operation")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Operation { get; set; } + + /// + /// Whether the route serves an operation that is not a read. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("allow_write")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool AllowWrite { get; set; } + + /// + /// Whether the route answers; a disabled route answers nothing whatever the tool does. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("enabled")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Enabled { get; set; } + + /// + /// The hosted API a route belongs to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("api")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Speechify.ToolAPIRouteAPI Api { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// The route's name; on an API with `mcp_enabled`, the MCP tool name comes from it. + /// + /// + /// + /// + /// The operation the route calls, an `openapi` operation's id or an `mcp` server's tool name. + /// + /// + /// Whether the route serves an operation that is not a read. + /// + /// + /// Whether the route answers; a disabled route answers nothing whatever the tool does. + /// + /// + /// The hosted API a route belongs to. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ToolAPIRoute( + string id, + string name, + global::Speechify.ToolApiRouteMethod method, + string path, + string operation, + bool allowWrite, + bool enabled, + global::Speechify.ToolAPIRouteAPI api) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Method = method; + this.Path = path ?? throw new global::System.ArgumentNullException(nameof(path)); + this.Operation = operation ?? throw new global::System.ArgumentNullException(nameof(operation)); + this.AllowWrite = allowWrite; + this.Enabled = enabled; + this.Api = api ?? throw new global::System.ArgumentNullException(nameof(api)); + } + + /// + /// Initializes a new instance of the class. + /// + public ToolAPIRoute() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.ToolAPIRouteAPI.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ToolAPIRouteAPI.Json.g.cs new file mode 100644 index 00000000..94cdec1a --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ToolAPIRouteAPI.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class ToolAPIRouteAPI + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Speechify.ToolAPIRouteAPI? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.ToolAPIRouteAPI), + jsonSerializerContext) as global::Speechify.ToolAPIRouteAPI; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.ToolAPIRouteAPI? FromJson( + string json) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Speechify.ToolAPIRouteAPI? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Speechify.ToolAPIRouteAPI), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.ToolAPIRouteAPI; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Speechify.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.Models.ToolAPIRouteAPI.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ToolAPIRouteAPI.g.cs new file mode 100644 index 00000000..a3de7df8 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ToolAPIRouteAPI.g.cs @@ -0,0 +1,66 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// The hosted API a route belongs to. + /// + public sealed partial class ToolAPIRouteAPI + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// The API's project; null for the Default project. A route answers only while its tool is in this project. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] + public string? ProjectId { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// The API's project; null for the Default project. A route answers only while its tool is in this project. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ToolAPIRouteAPI( + string id, + string name, + string? projectId) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.ProjectId = projectId; + } + + /// + /// Initializes a new instance of the class. + /// + public ToolAPIRouteAPI() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.ToolApiRouteMethod.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ToolApiRouteMethod.g.cs new file mode 100644 index 00000000..55ccccbd --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ToolApiRouteMethod.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// + /// + public enum ToolApiRouteMethod + { + /// + /// + /// + Get, + /// + /// + /// + Post, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ToolApiRouteMethodExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ToolApiRouteMethod value) + { + return value switch + { + ToolApiRouteMethod.Get => "GET", + ToolApiRouteMethod.Post => "POST", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ToolApiRouteMethod? ToEnum(string value) + { + return value switch + { + "GET" => ToolApiRouteMethod.Get, + "POST" => ToolApiRouteMethod.Post, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.V1ApisApiIdAnalyticsGetParametersGranularity.g.cs b/src/libs/Speechify/Generated/Speechify.Models.V1ApisApiIdAnalyticsGetParametersGranularity.g.cs new file mode 100644 index 00000000..acd3582c --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.V1ApisApiIdAnalyticsGetParametersGranularity.g.cs @@ -0,0 +1,87 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Default Value: 1h + /// + public enum V1ApisApiIdAnalyticsGetParametersGranularity + { + /// + /// + /// + x12h, + /// + /// + /// + x15m, + /// + /// + /// + x1d, + /// + /// + /// + x1h, + /// + /// + /// + x1m, + /// + /// + /// + x30m, + /// + /// + /// + x5m, + /// + /// + /// + x6h, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class V1ApisApiIdAnalyticsGetParametersGranularityExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this V1ApisApiIdAnalyticsGetParametersGranularity value) + { + return value switch + { + V1ApisApiIdAnalyticsGetParametersGranularity.x12h => "12h", + V1ApisApiIdAnalyticsGetParametersGranularity.x15m => "15m", + V1ApisApiIdAnalyticsGetParametersGranularity.x1d => "1d", + V1ApisApiIdAnalyticsGetParametersGranularity.x1h => "1h", + V1ApisApiIdAnalyticsGetParametersGranularity.x1m => "1m", + V1ApisApiIdAnalyticsGetParametersGranularity.x30m => "30m", + V1ApisApiIdAnalyticsGetParametersGranularity.x5m => "5m", + V1ApisApiIdAnalyticsGetParametersGranularity.x6h => "6h", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static V1ApisApiIdAnalyticsGetParametersGranularity? ToEnum(string value) + { + return value switch + { + "12h" => V1ApisApiIdAnalyticsGetParametersGranularity.x12h, + "15m" => V1ApisApiIdAnalyticsGetParametersGranularity.x15m, + "1d" => V1ApisApiIdAnalyticsGetParametersGranularity.x1d, + "1h" => V1ApisApiIdAnalyticsGetParametersGranularity.x1h, + "1m" => V1ApisApiIdAnalyticsGetParametersGranularity.x1m, + "30m" => V1ApisApiIdAnalyticsGetParametersGranularity.x30m, + "5m" => V1ApisApiIdAnalyticsGetParametersGranularity.x5m, + "6h" => V1ApisApiIdAnalyticsGetParametersGranularity.x6h, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Runs.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Runs.JsonSerializerContext.g.cs index e1f68fa4..360c43a9 100644 --- a/src/libs/Speechify/Generated/Speechify.Runs.JsonSerializerContext.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Runs.JsonSerializerContext.g.cs @@ -54,6 +54,18 @@ namespace Speechify [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListAgentRunsResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1AgentsRunsGetParametersStatus), TypeInfoPropertyName = "V1AgentsRunsGetParametersStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunLifecycleStatus), TypeInfoPropertyName = "AgentRunLifecycleStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunLifecycleError))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunLifecycle))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEvent), TypeInfoPropertyName = "ProjectRunStreamEvent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEventVariant1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEventVariant1Type), TypeInfoPropertyName = "ProjectRunStreamEventVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEventVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEventVariant2Type), TypeInfoPropertyName = "ProjectRunStreamEventVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEventVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEventVariant3Type), TypeInfoPropertyName = "ProjectRunStreamEventVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEventDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEventDiscriminatorType), TypeInfoPropertyName = "ProjectRunStreamEventDiscriminatorType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SubmitAgentRunRequestDecision), TypeInfoPropertyName = "SubmitAgentRunRequestDecision2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SubmitAgentRunRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStepKind), TypeInfoPropertyName = "AgentRunStepKind2")] @@ -88,6 +100,12 @@ namespace Speechify [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PendingActionDefaultDecision?), TypeInfoPropertyName = "NullablePendingActionDefaultDecision2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1AgentsAgentIdRunsGetParametersStatus?), TypeInfoPropertyName = "NullableV1AgentsAgentIdRunsGetParametersStatus2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1AgentsRunsGetParametersStatus?), TypeInfoPropertyName = "NullableV1AgentsRunsGetParametersStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunLifecycleStatus?), TypeInfoPropertyName = "NullableAgentRunLifecycleStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEvent?), TypeInfoPropertyName = "NullableProjectRunStreamEvent2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEventVariant1Type?), TypeInfoPropertyName = "NullableProjectRunStreamEventVariant1Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEventVariant2Type?), TypeInfoPropertyName = "NullableProjectRunStreamEventVariant2Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEventVariant3Type?), TypeInfoPropertyName = "NullableProjectRunStreamEventVariant3Type2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ProjectRunStreamEventDiscriminatorType?), TypeInfoPropertyName = "NullableProjectRunStreamEventDiscriminatorType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SubmitAgentRunRequestDecision?), TypeInfoPropertyName = "NullableSubmitAgentRunRequestDecision2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentRunStepKind?), TypeInfoPropertyName = "NullableAgentRunStepKind2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RunStepDelegationChildStatus?), TypeInfoPropertyName = "NullableRunStepDelegationChildStatus2")] @@ -152,6 +170,7 @@ private RunsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptio [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) { + options.Converters.Add(new global::Speechify.JsonConverters.ProjectRunStreamEventJsonConverter()); options.Converters.Add(new global::Speechify.JsonConverters.AgentRunStreamEventJsonConverter()); options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); options.Converters.Add(new LazyEnumJsonConverterFactory()); @@ -203,6 +222,26 @@ public override bool CanConvert(global::System.Type typeToConvert) || typeToConvert == typeof(global::Speechify.V1AgentsRunsGetParametersStatus?) + || typeToConvert == typeof(global::Speechify.AgentRunLifecycleStatus) + + || typeToConvert == typeof(global::Speechify.AgentRunLifecycleStatus?) + + || typeToConvert == typeof(global::Speechify.ProjectRunStreamEventVariant1Type) + + || typeToConvert == typeof(global::Speechify.ProjectRunStreamEventVariant1Type?) + + || typeToConvert == typeof(global::Speechify.ProjectRunStreamEventVariant2Type) + + || typeToConvert == typeof(global::Speechify.ProjectRunStreamEventVariant2Type?) + + || typeToConvert == typeof(global::Speechify.ProjectRunStreamEventVariant3Type) + + || typeToConvert == typeof(global::Speechify.ProjectRunStreamEventVariant3Type?) + + || typeToConvert == typeof(global::Speechify.ProjectRunStreamEventDiscriminatorType) + + || typeToConvert == typeof(global::Speechify.ProjectRunStreamEventDiscriminatorType?) + || typeToConvert == typeof(global::Speechify.SubmitAgentRunRequestDecision) || typeToConvert == typeof(global::Speechify.SubmitAgentRunRequestDecision?) @@ -322,6 +361,56 @@ public override bool CanConvert(global::System.Type typeToConvert) return new global::Speechify.JsonConverters.V1AgentsRunsGetParametersStatusNullableJsonConverter(); } + if (typeToConvert == typeof(global::Speechify.AgentRunLifecycleStatus)) + { + return new global::Speechify.JsonConverters.AgentRunLifecycleStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.AgentRunLifecycleStatus?)) + { + return new global::Speechify.JsonConverters.AgentRunLifecycleStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ProjectRunStreamEventVariant1Type)) + { + return new global::Speechify.JsonConverters.ProjectRunStreamEventVariant1TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ProjectRunStreamEventVariant1Type?)) + { + return new global::Speechify.JsonConverters.ProjectRunStreamEventVariant1TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ProjectRunStreamEventVariant2Type)) + { + return new global::Speechify.JsonConverters.ProjectRunStreamEventVariant2TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ProjectRunStreamEventVariant2Type?)) + { + return new global::Speechify.JsonConverters.ProjectRunStreamEventVariant2TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ProjectRunStreamEventVariant3Type)) + { + return new global::Speechify.JsonConverters.ProjectRunStreamEventVariant3TypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ProjectRunStreamEventVariant3Type?)) + { + return new global::Speechify.JsonConverters.ProjectRunStreamEventVariant3TypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ProjectRunStreamEventDiscriminatorType)) + { + return new global::Speechify.JsonConverters.ProjectRunStreamEventDiscriminatorTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ProjectRunStreamEventDiscriminatorType?)) + { + return new global::Speechify.JsonConverters.ProjectRunStreamEventDiscriminatorTypeNullableJsonConverter(); + } + if (typeToConvert == typeof(global::Speechify.SubmitAgentRunRequestDecision)) { return new global::Speechify.JsonConverters.SubmitAgentRunRequestDecisionJsonConverter(); diff --git a/src/libs/Speechify/Generated/Speechify.RunsClient.StreamEvents.g.cs b/src/libs/Speechify/Generated/Speechify.RunsClient.StreamEvents.g.cs index 6ffb604b..5bd2fa55 100644 --- a/src/libs/Speechify/Generated/Speechify.RunsClient.StreamEvents.g.cs +++ b/src/libs/Speechify/Generated/Speechify.RunsClient.StreamEvents.g.cs @@ -47,7 +47,7 @@ partial void ProcessStreamEventsResponse( /// Holds the connection open and tails the run's journal: a
/// `run.step.added` event per step (its `data` is a RunStep object, the
/// same shape List Run Steps returns), a `run.reply.delta` event for each
- /// piece of text the agent writes, as it writes it, a
+ /// piece of the agent's answer, as it writes it, a
/// `run.status.changed` event when the run's status moves, and a terminal
/// `run.ended` event carrying the final status and, when the run stopped
/// short, its `incomplete_reason`. Consumers must ignore unknown event
@@ -60,28 +60,30 @@ partial void ProcessStreamEventsResponse( /// `requires_action` and keeps tailing, so the client learns it has
/// something to decide.
/// ## The reply arrives as it is written
- /// `run.reply.delta` carries the agent's text piece by piece, so a chat
- /// built on runs shows the answer forming instead of a spinner. Each
- /// piece names the journal position it is written at (`seq`) and how
- /// many characters of that position's text precede it (`offset`). Keep
- /// one buffer per `seq`: append a piece whose `offset` equals what you
- /// hold, and on any other `offset` cut the buffer to it first (that only
- /// happens after a step was re-executed, and means the earlier text is
- /// void). Text is counted in Unicode code points.
- /// Which text a buffer turns out to be is settled by the event that
- /// closes it. A `run.step.added` at the same `seq` closes it as that
- /// step's `content` - the plan of a tool call, which the agent wrote
- /// before deciding to act - and the next piece starts a new buffer at a
- /// later `seq`. `run.ended` closes the open buffer as the reply, and its
- /// `output.reply` is the authoritative copy: replace the buffer with it.
- /// A `run.ended` with no `output` (the run failed, was cancelled, or
- /// stopped short) means the open buffer was abandoned mid-sentence -
- /// show it as such or drop it; it is not an answer. A run parked in
- /// `requires_action` never leaves a buffer open, because the text it
- /// wrote before parking lands as the plan step first. A client that
- /// never subscribes to `run.reply.delta` sees exactly the stream it saw
- /// before the event existed. An agent on a custom LLM endpoint answers
- /// whole, with no pieces before the step lands.
+ /// `run.reply.delta` carries the agent's answer piece by piece, so a chat
+ /// built on runs shows the answer forming instead of a spinner. It
+ /// carries the answer and nothing else: what the agent writes on the way
+ /// to it, such as the plan behind a tool call, never rides this event and
+ /// reaches the stream only as the `content` of a `run.step.added` plan
+ /// step. Appending the pieces in order gives the answer, so a piece can be
+ /// shown the moment it arrives.
+ /// Each piece names the journal position the answer is written at
+ /// (`seq`) and how many characters of it precede the piece (`offset`).
+ /// Append a piece whose `offset` equals what you hold; on any other
+ /// `offset`, or a different `seq`, cut what you hold to that `offset`
+ /// first. That only happens after a step was re-executed, and means the
+ /// earlier text is void. Text is counted in Unicode code points.
+ /// `run.ended` closes the answer, and its `output.reply` is the
+ /// authoritative copy: replace what you hold with it. A `run.ended` with
+ /// no `output` (the run failed, was cancelled, or stopped short) means the
+ /// answer was abandoned mid-sentence - show it as such or drop it. A
+ /// client that never subscribes to `run.reply.delta` sees exactly the
+ /// stream it saw before the event existed.
+ /// Not every run streams its answer, because not every model says which
+ /// of its text is the answer while writing it. The platform default
+ /// model does. An agent on another model or on a custom LLM endpoint, and
+ /// a run with an `output_schema` (whose answer is not final until it is
+ /// checked), answers whole: no pieces, and the reply on `run.ended`.
/// Following a run costs nothing beyond the run: the stream is not
/// metered, and its read load is a few small queries per second per
/// subscriber, a little more while the answer is being written.
diff --git a/src/libs/Speechify/Generated/Speechify.RunsClient.StreamProjectEvents.g.cs b/src/libs/Speechify/Generated/Speechify.RunsClient.StreamProjectEvents.g.cs new file mode 100644 index 00000000..44e3997c --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.RunsClient.StreamProjectEvents.g.cs @@ -0,0 +1,434 @@ + +#nullable enable + +namespace Speechify +{ + public partial class RunsClient + { + + + private static readonly global::Speechify.EndPointSecurityRequirement s_StreamProjectEventsSecurityRequirement0 = + new global::Speechify.EndPointSecurityRequirement + { + Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] + { new global::Speechify.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Speechify.EndPointSecurityRequirement[] s_StreamProjectEventsSecurityRequirements = + new global::Speechify.EndPointSecurityRequirement[] + { s_StreamProjectEventsSecurityRequirement0, + }; + partial void PrepareStreamProjectEventsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string projectId, + ref string? speechifyVersion); + partial void PrepareStreamProjectEventsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string projectId, + string? speechifyVersion); + partial void ProcessStreamProjectEventsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Stream Project Run Events
+ /// Server-Sent Events stream of every run in one project, so an
+ /// application learns that work started, stopped for a person or
+ /// finished without naming a run or an agent, and without polling the
+ /// run list.
+ /// Each event carries a run's lifecycle: its `status`, who it acts for
+ /// (`user_identity`), its `metadata` - including `metadata.trigger`,
+ /// which says whether a caller, a schedule or a webhook started it - its
+ /// lineage, and while it waits on a person, the `pending_action` it is
+ /// asking about. It never carries what the run was asked or what it
+ /// answered: follow one run with Stream Run Events for its steps and its
+ /// reply as it is written, or read it with Get Run.
+ /// ## What arrives
+ /// On every connection, including a reconnect:
+ /// 1. `run.updated` for each run in the project that has not finished,
+ /// oldest first, so a client that connects late sees the work
+ /// already in flight.
+ /// 2. `runs.synced`, once. Every run that was live when the stream
+ /// opened has now been sent: replace the live runs you hold with the
+ /// ones this connection sent.
+ /// After that:
+ /// - `run.updated` when a run appears, whatever started it, and whenever
+ /// its `status` or `pending_action` changes. A run that parks again on
+ /// a new action arrives again, carrying the new `pending_action`.
+ /// - `run.ended` when a run settles (`succeeded`, `failed`, `canceled` or
+ /// `expired`). It is the run's last event on this stream.
+ /// Each event carries the run as it stands, not a change to apply: key
+ /// what you hold by `id` and replace it. The stream reports where a run
+ /// is rather than every status it passed through, so a status a run
+ /// entered and left within about a second may never appear. A delegated
+ /// child is its own run, with `parent_run_id` set. Ignore event types you
+ /// do not recognize.
+ /// ## The stream is expected to reconnect
+ /// **The server closes the connection after 4 minutes**, and a network
+ /// drop can close it sooner. The response opens with `retry: 2000`, so a
+ /// browser `EventSource` reconnects on its own; a hand-rolled client must
+ /// reconnect and send the id of the last event it received as
+ /// `Last-Event-ID`. The id is an opaque position: send it back unchanged.
+ /// A reconnect within 10 minutes is sent a `run.ended` for every run that
+ /// finished while it was away, so delivery is at least once: a
+ /// `run.ended` you already hold can arrive again. After a longer absence,
+ /// a run you held as live that is missing from the snapshot has finished;
+ /// read it with Get Run. A `: keepalive` comment arrives every 15 seconds
+ /// so an intermediary does not time the connection out on a quiet
+ /// project.
+ /// One connection covers every run in the project, and the stream is not
+ /// metered: its read load is one small query a second, plus a read of the
+ /// live runs when it connects.
+ /// Same read access as List Runs, and the same
+ /// `402 durable_runs_not_in_plan` on a workspace without the grant. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Collections.Generic.IAsyncEnumerable StreamProjectEventsAsync( + string projectId, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareStreamProjectEventsArguments( + httpClient: HttpClient, + projectId: ref projectId, + speechifyVersion: ref speechifyVersion); + + + var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_StreamProjectEventsSecurityRequirements, + operationName: "StreamProjectEventsAsync"); + + using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Speechify.PathBuilder( + path: "/v1/agents/runs/events", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddRequiredParameter("project_id", projectId) + ; + var __path = __pathBuilder.ToString(); + __path = global::Speechify.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (speechifyVersion != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Speechify-Version", speechifyVersion.ToString()); + } + + global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareStreamProjectEventsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + projectId: projectId!, + speechifyVersion: speechifyVersion); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "StreamProjectEvents", + methodName: "StreamProjectEventsAsync", + pathTemplate: "\"/v1/agents/runs/events\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseHeadersRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "StreamProjectEvents", + methodName: "StreamProjectEventsAsync", + pathTemplate: "\"/v1/agents/runs/events\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "StreamProjectEvents", + methodName: "StreamProjectEventsAsync", + pathTemplate: "\"/v1/agents/runs/events\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessStreamProjectEventsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "StreamProjectEvents", + methodName: "StreamProjectEventsAsync", + pathTemplate: "\"/v1/agents/runs/events\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "StreamProjectEvents", + methodName: "StreamProjectEventsAsync", + pathTemplate: "\"/v1/agents/runs/events\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + using var __stream = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + await foreach (var __sseEvent in global::System.Net.ServerSentEvents.SseParser + .Create(__stream).EnumerateAsync(__effectiveCancellationToken)) + { + var __content = __sseEvent.Data; + if (__content == "[DONE]") + { + yield break; + } + + var __streamedResponse = global::Speechify.ProjectRunStreamEvent.FromJson(__content, JsonSerializerContext) ?? + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: $"Response deserialization failed for \"{__content}\" ", + innerException: null, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + + yield return __streamedResponse; + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ToolDefinitions.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.ToolDefinitions.JsonSerializerContext.g.cs index 8cd069c5..327b30ee 100644 --- a/src/libs/Speechify/Generated/Speechify.ToolDefinitions.JsonSerializerContext.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ToolDefinitions.JsonSerializerContext.g.cs @@ -82,6 +82,11 @@ namespace Speechify [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolAttachedAgent))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListToolAttachedAgentsResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolApiRouteMethod), TypeInfoPropertyName = "ToolApiRouteMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolAPIRouteAPI))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolAPIRoute))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListToolAPIRoutesResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestMCPConnectionRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPProbeTool))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.McpProbeErrorDetailsStage), TypeInfoPropertyName = "McpProbeErrorDetailsStage2")] @@ -125,6 +130,7 @@ namespace Speechify [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolConfig?), TypeInfoPropertyName = "NullableToolConfig2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateToolRequestConfig?), TypeInfoPropertyName = "NullableCreateToolRequestConfig2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateToolRequestConfig?), TypeInfoPropertyName = "NullableUpdateToolRequestConfig2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolApiRouteMethod?), TypeInfoPropertyName = "NullableToolApiRouteMethod2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.McpProbeErrorDetailsStage?), TypeInfoPropertyName = "NullableMcpProbeErrorDetailsStage2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ImportOpenApiRequestSpec?), TypeInfoPropertyName = "NullableImportOpenApiRequestSpec2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestOpenApiCallResultOutcome?), TypeInfoPropertyName = "NullableTestOpenApiCallResultOutcome2")] @@ -135,6 +141,7 @@ namespace Speechify [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] internal sealed partial class ToolDefinitionsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext @@ -280,6 +287,10 @@ public override bool CanConvert(global::System.Type typeToConvert) || typeToConvert == typeof(global::Speechify.ToolNameHolderKind?) + || typeToConvert == typeof(global::Speechify.ToolApiRouteMethod) + + || typeToConvert == typeof(global::Speechify.ToolApiRouteMethod?) + || typeToConvert == typeof(global::Speechify.McpProbeErrorDetailsStage) || typeToConvert == typeof(global::Speechify.McpProbeErrorDetailsStage?) @@ -473,6 +484,16 @@ public override bool CanConvert(global::System.Type typeToConvert) return new global::Speechify.JsonConverters.ToolNameHolderKindNullableJsonConverter(); } + if (typeToConvert == typeof(global::Speechify.ToolApiRouteMethod)) + { + return new global::Speechify.JsonConverters.ToolApiRouteMethodJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ToolApiRouteMethod?)) + { + return new global::Speechify.JsonConverters.ToolApiRouteMethodNullableJsonConverter(); + } + if (typeToConvert == typeof(global::Speechify.McpProbeErrorDetailsStage)) { return new global::Speechify.JsonConverters.McpProbeErrorDetailsStageJsonConverter(); diff --git a/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.ListApiRoutes.g.cs b/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.ListApiRoutes.g.cs new file mode 100644 index 00000000..f00a4d0a --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.ListApiRoutes.g.cs @@ -0,0 +1,678 @@ + +#nullable enable + +namespace Speechify +{ + public partial class ToolDefinitionsClient + { + + + private static readonly global::Speechify.EndPointSecurityRequirement s_ListApiRoutesSecurityRequirement0 = + new global::Speechify.EndPointSecurityRequirement + { + Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] + { new global::Speechify.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Speechify.EndPointSecurityRequirement[] s_ListApiRoutesSecurityRequirements = + new global::Speechify.EndPointSecurityRequirement[] + { s_ListApiRoutesSecurityRequirement0, + }; + partial void PrepareListApiRoutesArguments( + global::System.Net.Http.HttpClient httpClient, + ref string toolDefinitionId, + ref string? cursor, + ref int? limit, + ref string? speechifyVersion); + partial void PrepareListApiRoutesRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string toolDefinitionId, + string? cursor, + int? limit, + string? speechifyVersion); + partial void ProcessListApiRoutesResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListApiRoutesResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List Tool API Routes
+ /// List the hosted API routes that call this tool, in the hosted APIs
+ /// you can reach, ordered by API name. A route calls one operation of
+ /// an `mcp` or `openapi` tool and answers only while that operation
+ /// exists, runs without approval, and reads (unless the route has
+ /// `allow_write`), and while the tool is in the API's project. So
+ /// deleting the tool, moving it to another project, or changing an
+ /// operation's class or approval can stop these routes answering:
+ /// check this list before such a change. A route in a project you
+ /// cannot reach is not listed; it already refuses its calls, because
+ /// the tool is not in its API's project. A tool of another kind is
+ /// used by no route and answers an empty list.
+ /// Cursor-paginated: omit `cursor` for the first page; walk pages while
+ /// `has_more` is true (default page size 50, max 200).
+ /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + ///
+ /// + /// + /// + /// Default Value: 50 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListApiRoutesAsync( + string toolDefinitionId, + string? cursor = default, + int? limit = default, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListApiRoutesAsResponseAsync( + toolDefinitionId: toolDefinitionId, + cursor: cursor, + limit: limit, + speechifyVersion: speechifyVersion, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Tool API Routes
+ /// List the hosted API routes that call this tool, in the hosted APIs
+ /// you can reach, ordered by API name. A route calls one operation of
+ /// an `mcp` or `openapi` tool and answers only while that operation
+ /// exists, runs without approval, and reads (unless the route has
+ /// `allow_write`), and while the tool is in the API's project. So
+ /// deleting the tool, moving it to another project, or changing an
+ /// operation's class or approval can stop these routes answering:
+ /// check this list before such a change. A route in a project you
+ /// cannot reach is not listed; it already refuses its calls, because
+ /// the tool is not in its API's project. A tool of another kind is
+ /// used by no route and answers an empty list.
+ /// Cursor-paginated: omit `cursor` for the first page; walk pages while
+ /// `has_more` is true (default page size 50, max 200).
+ /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + ///
+ /// + /// + /// + /// Default Value: 50 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListApiRoutesAsResponseAsync( + string toolDefinitionId, + string? cursor = default, + int? limit = default, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListApiRoutesArguments( + httpClient: HttpClient, + toolDefinitionId: ref toolDefinitionId, + cursor: ref cursor, + limit: ref limit, + speechifyVersion: ref speechifyVersion); + + + var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListApiRoutesSecurityRequirements, + operationName: "ListApiRoutesAsync"); + + using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Speechify.PathBuilder( + path: $"/v1/agents/tool-definitions/{toolDefinitionId}/api-routes", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("cursor", cursor) + .AddOptionalParameter("limit", limit?.ToString()) + ; + var __path = __pathBuilder.ToString(); + __path = global::Speechify.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (speechifyVersion != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Speechify-Version", speechifyVersion.ToString()); + } + + global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListApiRoutesRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + toolDefinitionId: toolDefinitionId!, + cursor: cursor, + limit: limit, + speechifyVersion: speechifyVersion); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListApiRoutes", + methodName: "ListApiRoutesAsync", + pathTemplate: "$\"/v1/agents/tool-definitions/{toolDefinitionId}/api-routes\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListApiRoutes", + methodName: "ListApiRoutesAsync", + pathTemplate: "$\"/v1/agents/tool-definitions/{toolDefinitionId}/api-routes\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListApiRoutes", + methodName: "ListApiRoutesAsync", + pathTemplate: "$\"/v1/agents/tool-definitions/{toolDefinitionId}/api-routes\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListApiRoutesResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListApiRoutes", + methodName: "ListApiRoutesAsync", + pathTemplate: "$\"/v1/agents/tool-definitions/{toolDefinitionId}/api-routes\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListApiRoutes", + methodName: "ListApiRoutesAsync", + pathTemplate: "$\"/v1/agents/tool-definitions/{toolDefinitionId}/api-routes\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // The request was malformed or failed validation. The response body is the standard `Error` envelope; for validation failures `error.fields` enumerates the offending fields as a `path -> message` map (code = `validation_failed`). + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::Speechify.Error? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::Speechify.Error.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::Speechify.Error.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Authentication is missing or invalid. The request did not carry a recognised credential (console session token, API key, or worker JWT). + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::Speechify.Error? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::Speechify.Error.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::Speechify.Error.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The workspace has insufficient credits, or the request needs a plan tier the workspace is not on (e.g. voice cloning). Distinct from `Forbidden` so SDK consumers can drive upgrade UX. + if ((int)__response.StatusCode == 402) + { + string? __content_402 = null; + global::System.Exception? __exception_402 = null; + global::Speechify.Error? __value_402 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_402 = global::Speechify.Error.FromJson(__content_402, JsonSerializerContext); + } + else + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_402 = global::Speechify.Error.FromJson(__content_402, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_402 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_402 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_402, + responseBody: __content_402, + responseObject: __value_402, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // The referenced resource does not exist or is not visible to the caller's workspace. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Speechify.Error? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Speechify.Error.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Speechify.Error.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // A downstream dependency is degraded or the endpoint is intentionally disabled (e.g. phone-number purchase before ops setup). + if ((int)__response.StatusCode == 503) + { + string? __content_503 = null; + global::System.Exception? __exception_503 = null; + global::Speechify.Error? __value_503 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_503 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_503 = global::Speechify.Error.FromJson(__content_503, JsonSerializerContext); + } + else + { + __content_503 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_503 = global::Speechify.Error.FromJson(__content_503, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_503 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_503 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_503, + responseBody: __content_503, + responseObject: __value_503, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListApiRoutesResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Speechify.ListToolAPIRoutesResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Speechify.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Speechify.ListToolAPIRoutesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Speechify.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/openapi.yaml b/src/libs/Speechify/openapi.yaml index 729caae5..292d9825 100644 --- a/src/libs/Speechify/openapi.yaml +++ b/src/libs/Speechify/openapi.yaml @@ -1 +1 @@ -{"openapi":"3.1.0","info":{"title":"API Reference","version":"1.0.0"},"paths":{"/v1/audio/speech":{"post":{"operationId":"audio_speech","summary":"Create Speech","description":"Synthesize speech audio from text or SSML. Returns the complete audio\nfile plus billing and speech-mark metadata in a single JSON response.\nFor low-latency playback or long-form text, use POST /v1/audio/stream.\nSet `output_format` for explicit sample-rate/bitrate control (e.g.\n`pcm_16000` or `ulaw_8000` for telephony).","tags":["audio"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Synthesized speech audio for the requested input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSpeechResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has insufficient credits, or the request needs a\nplan tier the workspace is not on (e.g. voice cloning). Distinct\nfrom `Forbidden` so SDK consumers can drive upgrade UX.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential authenticated, but is not authorised for this\nresource - typically a workspace-role gate (owner / admin\nrequired) or a cross-tenant access attempt.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"An upstream dependency (the TTS composer or voice-metadata\nservice) returned a 5xx. The raw upstream detail is not\nforwarded - the cause is in the server log; the response is a\nfixed `upstream_failure` envelope. Safe to retry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A downstream dependency is degraded or the endpoint is\nintentionally disabled (e.g. phone-number purchase before\nops setup).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSpeechRequest"}}}}}},"/v1/audio/stream":{"post":{"operationId":"audio_stream","summary":"Stream Speech","description":"Synthesize speech and stream the audio back as it is generated, for\nlow-latency playback. Set `output_format` in the body for explicit\ncodec/sample-rate/bitrate control (e.g. `pcm_16000` or `ulaw_8000` for\ntelephony), or fall back to the Accept header for the container; the\nresponse is raw audio bytes (HTTP chunked). For Base64-encoded audio\nwith speech-mark metadata in a single JSON response, use\nPOST /v1/audio/speech.","tags":["audio"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"Selects the audio container/codec for the streamed response when\n`output_format` is not set in the request body. The response\nContent-Type echoes this value, except `audio/pcm` returns\n`audio/L16` with rate and channels parameters (raw 16-bit linear\nPCM, 24 kHz mono, little-endian). For explicit sample-rate/bitrate\ncontrol (e.g. `pcm_16000`, `ulaw_8000`), set `output_format` in the\nbody instead; it takes precedence over this header.","required":false,"schema":{"$ref":"#/components/schemas/V1AudioStreamPostParametersAccept"}}],"responses":{"200":{"description":"Streamed audio. When `output_format` is set it selects the\ncodec/sample rate; otherwise the Accept header does. The\nContent-Type reflects the selected format: it matches the Accept\nheader, except raw PCM returns `audio/L16` (with rate and channels\nparameters) and u-law returns `audio/basic`.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has insufficient credits, or the request needs a\nplan tier the workspace is not on (e.g. voice cloning). Distinct\nfrom `Forbidden` so SDK consumers can drive upgrade UX.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential authenticated, but is not authorised for this\nresource - typically a workspace-role gate (owner / admin\nrequired) or a cross-tenant access attempt.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"An upstream dependency (the TTS composer or voice-metadata\nservice) returned a 5xx. The raw upstream detail is not\nforwarded - the cause is in the server log; the response is a\nfixed `upstream_failure` envelope. Safe to retry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A downstream dependency is degraded or the endpoint is\nintentionally disabled (e.g. phone-number purchase before\nops setup).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetStreamRequest"}}}}}},"/v1/audio/stream/with-timestamps":{"post":{"operationId":"audio_streamWithTimestamps","summary":"Stream Speech With Timestamps","description":"Synthesize speech and stream it back together with word-level speech\nmarks, for text highlighting, captions and audio-text synchronization\nwhile the audio is still arriving.\n\nThe response is a Server-Sent Events stream. Each `speech.chunk` event\ncarries a Base64-encoded run of audio, the speech marks that became\nfinal with it, or both - a chunk may carry only one of the two, and the\nlast chunk of a stream is often marks-only. A terminal `speech.done`\nevent ends the stream; there is no `[DONE]` sentinel. Ignore any event\ntype you do not recognize, so that new event types do not break your\nintegration.\n\nSpeech-mark times are absolute milliseconds from the start of the\nsynthesis, so concatenate the audio chunks into one stream and apply the\nmarks against that single timeline. Which chunk a mark arrives on is a\ndelivery detail and carries no meaning. Times stay correct for every\n`output_format`: changing the codec or sample rate does not change the\nduration.\n\nSpeech marks are produced by the streaming-native models. The default\n`simba-3.0` and `simba-3.2` both serve this route. The legacy\n`simba-english` and `simba-multilingual` models never could: on a\nworkspace pinned before API version `2026-09-21` they return 400\n`speech_marks_unsupported` here, and from that version on they return\n400 `model_retired` on every synthesis route. Both are switched off\nentirely on 2026-11-21.\nFor Base64-encoded audio and speech marks in one non-streamed JSON\nresponse, on any model, use POST /v1/audio/speech.","tags":["audio"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"Selects the audio container/codec carried inside the events when\n`output_format` is not set in the request body. The selected media\ntype is echoed on the `Speechify-Audio-Content-Type` response\nheader, since the response's own Content-Type is `text/event-stream`.","required":false,"schema":{"$ref":"#/components/schemas/V1AudioStreamWithTimestampsPostParametersAccept"}}],"responses":{"200":{"description":"A Server-Sent Events stream of `speech.chunk` events followed by one\nterminal `speech.done` event. A failure after the stream has started\nis delivered as a `speech.error` event carrying the standard error\nenvelope, because the status code is already committed.\n\nThe transport is `text/event-stream`: each event is an\n`event:`/`data:` pair whose `data` is one JSON payload matching the\nschema below. The payload's `type` field mirrors the `event:` name,\nso the stream is also parseable from `data:` lines alone. Ignore\nevent types you do not recognize.","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/SpeechStreamEvent"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has insufficient credits, or the request needs a\nplan tier the workspace is not on (e.g. voice cloning). Distinct\nfrom `Forbidden` so SDK consumers can drive upgrade UX.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential authenticated, but is not authorised for this\nresource - typically a workspace-role gate (owner / admin\nrequired) or a cross-tenant access attempt.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"An upstream dependency (the TTS composer or voice-metadata\nservice) returned a 5xx. The raw upstream detail is not\nforwarded - the cause is in the server log; the response is a\nfixed `upstream_failure` envelope. Safe to retry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A downstream dependency is degraded or the endpoint is\nintentionally disabled (e.g. phone-number purchase before\nops setup).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetStreamRequest"}}}}}},"/v1/voices":{"get":{"operationId":"voices_list","summary":"List Voices","description":"Lists the voices available to the caller - the shared voice\ncatalog plus the cloned voices they can reach, whichever member or\nservice-account key created them. A clone filed under a project is\nlisted only for a caller who can reach that project; a clone no\nproject filed is shared with the whole workspace and is listed for\neveryone in it. By default\nthe full catalogue is returned in one response. Pagination is\nopt-in: pass `limit` (and then `cursor` from the previous\nresponse) to page through the list while `has_more` is true. Max\npage size is 200. Narrow the list with the `type` and `locale`\nfilters.\n\nA page can come back with fewer than `limit` voices, and a short\npage - an empty one included - is not the end of the list. Keep\nfollowing `next_cursor` while `has_more` is true.","tags":["voices"],"parameters":[{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max items per page (default 50, max 200).","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"type","in":"query","description":"Filter by voice type: `personal` (the workspace's cloned voices)\nor `shared` (the public catalogue). Omit to return both.","required":false,"schema":{"$ref":"#/components/schemas/V1VoicesGetParametersType"}},{"name":"locale","in":"query","description":"Filter to voices whose locale matches this BCP-47 language range,\nprefix-matched: `en` matches `en-US` and `en-GB`; `en-US` matches\nonly `en-US`. Case-insensitive. Omit to return all locales.","required":false,"schema":{"type":"string"}},{"name":"gender","in":"query","description":"Filter by voice gender. Omit to return all genders.","required":false,"schema":{"$ref":"#/components/schemas/V1VoicesGetParametersGender"}},{"name":"model","in":"query","description":"Filter to voices that support this model (as listed in each voice's\n`models[]`), e.g. `simba-3.2`. Omit to return voices for all models.","required":false,"schema":{"type":"string"}},{"name":"project_id","in":"query","description":"Filter cloned voices by workspace project: omit for every voice you\ncan reach, pass the literal `shared` for the clones no project\nfiled, or a `proj_...` id for the clones filed under that project.\nThe shared catalog carries no project and is returned either way.\n\nA clone is filed under a project when a project-pinned key created\nit. A clone with no project is shared with the whole workspace\nrather than sitting in a Default project, so the literal here is\n`shared`, never `default` - passing `default` is a 400. Returns 404\nproject_not_found for a malformed id and for any project outside\nyour reach: a project-pinned key reaches only its pinned project,\nand a member holding project grants reaches only the granted ones.\nThat 404 is the same in every case and does not reveal whether such\na project exists. `shared` is always inside your reach.\n","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The voice catalogue (or a page of it when `limit` is set).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListVoicesResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential authenticated, but is not authorised for this\nresource - typically a workspace-role gate (owner / admin\nrequired) or a cross-tenant access attempt.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"voices_create","summary":"Create Voice","description":"Create a cloned voice for the workspace from a 10-30 second audio sample, with verified consent from the speaker.\n\nCloning requires proof that the speaker agreed to it. Create a consent challenge with `POST /v1/voices/consent-challenges`, show the returned `phrase` to the speaker, record them reading it aloud, and send that recording here as `consent_recording` together with the challenge's `consent_challenge_id`. Speechify transcribes the recording, checks it against the phrase it issued, checks that its speaker is the speaker in your `sample`, and keeps it as the consent record for the voice. The person consenting therefore has to be the person being cloned. A challenge is single use and short-lived, so record and submit in one sitting.\n\nThe clone belongs to the workspace rather than the member who created it, and access follows the caller's workspace role and API-key scopes exactly as for any other voice: voices scopes to list it, audio scopes to synthesize with it, and the content-management permission plus a write scope on the key to delete it. Cloned voices are usable self-serve on `simba-3.0` (and, on a workspace pinned before API version `2026-09-21`, on the retired `simba-english` and `simba-multilingual` until they are switched off on 2026-11-21). `simba-3.2` also serves cloned voices.\n\nCallers pinned before `Speechify-Version: 2026-09-13` use the previous flow instead: no challenge, and a `consent` form field carrying the speaker's name and email as a JSON string. That flow is deprecated and will be removed after a sunset window announced in the changelog.","tags":["voices"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"A client-generated key (an opaque string, max 255 chars) that makes a\nside-effect POST safe to retry: the server runs the operation exactly\nonce and replays the first response (its status and body) for 24 hours.\nReusing a key with a different request body, or while the first request\nis still in flight, returns `409 idempotency_conflict`. A replayed\nresponse carries the `Idempotent-Replayed: true` header.\n","required":false,"schema":{"type":"string","maxLength":255}}],"responses":{"201":{"description":"A created voice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVoice"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has insufficient credits, or the request needs a\nplan tier the workspace is not on (e.g. voice cloning). Distinct\nfrom `Forbidden` so SDK consumers can drive upgrade UX.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential authenticated, but is not authorised for this\nresource - typically a workspace-role gate (owner / admin\nrequired) or a cross-tenant access attempt.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeded a per-endpoint size limit (e.g. the file\nupload cap, KB document upload cap, batch-call CSV cap).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request was well-formed but semantically rejected -\ntypically a referential integrity violation (e.g. flow node\nreferences an audio asset in another workspace) or a state\nmachine refusal.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"An upstream dependency (the TTS composer or voice-metadata\nservice) returned a 5xx. The raw upstream detail is not\nforwarded - the cause is in the server log; the response is a\nfixed `upstream_failure` envelope. Safe to retry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A downstream dependency is degraded or the endpoint is\nintentionally disabled (e.g. phone-number purchase before\nops setup).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name of the personal voice"},"locale":{"type":"string","default":"en-US","description":"Native language (locale) of the personal voice (e.g. en-US, es-ES, etc.)"},"gender":{"$ref":"#/components/schemas/V1VoicesPostRequestBodyContentMultipartFormDataSchemaGender","description":"Gender marker for the personal voice\nmale GenderMale\nfemale GenderFemale\nnot_specified GenderNotSpecified"},"sample":{"type":"string","format":"binary","description":"Audio sample of the voice to clone, 10-30 seconds of clean speech."},"avatar":{"type":"string","format":"binary","description":"Avatar image file"},"consent_challenge_id":{"type":"string","description":"The `id` of the consent challenge this create consumes, from\n`POST /v1/voices/consent-challenges`. Single use: once a\ncreate has consumed it, whether or not that create\nsucceeded, it cannot be used again."},"consent_recording":{"type":"string","format":"binary","description":"Recording of the speaker reading the challenge's `phrase`\naloud. This is the consent record for the voice, not a\nsecond voice sample: it must be the same person as in\n`sample`, and it is retained as evidence. 5-30 seconds, at\nmost 25 MB, in any common audio container."}},"required":["name","gender","sample","consent_challenge_id","consent_recording"]}}}}}},"/v1/voices/consent-challenges":{"post":{"operationId":"consentChallenges_create","summary":"Create Consent Challenge","description":"Start the consent check for a voice clone.\n\nReturns a `phrase` for the speaker to read aloud and an `id` that identifies this challenge. Show the phrase to the speaker exactly as returned, record them reading it, then send the recording and the `id` to `POST /v1/voices`, which verifies the recording against the phrase and against the voice sample being cloned, then keeps it as the consent record.\n\nA challenge is single use, is bound to the workspace that created it, and expires at `expires_at` - it is proof that a speaker was in front of a microphone just now, so create it when you are ready to record, not at the start of your flow. If it expires, create another one and record again.\n\nChallenge creation is rate limited per workspace at a few dozen per hour, far more tightly than the rest of the voice surface, because each one precedes a person recording themselves - mint it when your speaker is ready, not speculatively. Read the live ceiling off `RateLimit-*` rather than hard-coding it. **On a `429`, always honour `Retry-After` rather than a fixed backoff of your own**: the wait is measured in minutes and can run to most of an hour. `RateLimit-*` are omitted rather than reporting a bucket that is not the one refusing.","tags":["consentChallenges"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"A client-generated key (an opaque string, max 255 chars) that makes a\nside-effect POST safe to retry: the server runs the operation exactly\nonce and replays the first response (its status and body) for 24 hours.\nReusing a key with a different request body, or while the first request\nis still in flight, returns `409 idempotency_conflict`. A replayed\nresponse carries the `Idempotent-Replayed: true` header.\n","required":false,"schema":{"type":"string","maxLength":255}}],"responses":{"201":{"description":"The created consent challenge.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentChallenge"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has insufficient credits, or the request needs a\nplan tier the workspace is not on (e.g. voice cloning). Distinct\nfrom `Forbidden` so SDK consumers can drive upgrade UX.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential authenticated, but is not authorised for this\nresource - typically a workspace-role gate (owner / admin\nrequired) or a cross-tenant access attempt.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"An upstream dependency (the TTS composer or voice-metadata\nservice) returned a 5xx. The raw upstream detail is not\nforwarded - the cause is in the server log; the response is a\nfixed `upstream_failure` envelope. Safe to retry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A downstream dependency is degraded or the endpoint is\nintentionally disabled (e.g. phone-number purchase before\nops setup).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConsentChallengeRequest"}}}}}},"/v1/voices/{voice_id}":{"get":{"operationId":"voices_get","summary":"Get Voice","description":"Fetch a single voice by id - a shared catalogue voice or one of\nthe workspace's cloned voices. A cloned voice that belongs to\nanother workspace returns 404, identical to an unknown id, so\nvoice inventory is never enumerable across tenants.","tags":["voices"],"parameters":[{"name":"voice_id","in":"path","description":"The ID of the voice to fetch","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The voice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVoice"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"An upstream dependency (the TTS composer or voice-metadata\nservice) returned a 5xx. The raw upstream detail is not\nforwarded - the cause is in the server log; the response is a\nfixed `upstream_failure` envelope. Safe to retry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A downstream dependency is degraded or the endpoint is\nintentionally disabled (e.g. phone-number purchase before\nops setup).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"voices_delete","summary":"Delete Voice","description":"Delete one of the workspace's cloned voices. Requires the\n`content.manage` permission (owner, admin, or member); a\nservice-account key is authorized by its scopes instead.","tags":["voices"],"parameters":[{"name":"voice_id","in":"path","description":"The ID of the voice to delete","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"204":{"description":"Voice deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential authenticated, but is not authorised for this\nresource - typically a workspace-role gate (owner / admin\nrequired) or a cross-tenant access attempt.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"An upstream dependency (the TTS composer or voice-metadata\nservice) returned a 5xx. The raw upstream detail is not\nforwarded - the cause is in the server log; the response is a\nfixed `upstream_failure` envelope. Safe to retry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A downstream dependency is degraded or the endpoint is\nintentionally disabled (e.g. phone-number purchase before\nops setup).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/voices/{voice_id}/sample":{"get":{"operationId":"voices_downloadSample","summary":"Download Voice Sample","description":"Download a personal (cloned) voice sample","tags":["voices"],"parameters":[{"name":"voice_id","in":"path","description":"The ID of the voice to download sample for","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Voice sample audio file","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential authenticated, but is not authorised for this\nresource - typically a workspace-role gate (owner / admin\nrequired) or a cross-tenant access attempt.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"An upstream dependency (the TTS composer or voice-metadata\nservice) returned a 5xx. The raw upstream detail is not\nforwarded - the cause is in the server log; the response is a\nfixed `upstream_failure` envelope. Safe to retry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A downstream dependency is degraded or the endpoint is\nintentionally disabled (e.g. phone-number purchase before\nops setup).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/audio/models":{"get":{"operationId":"models_list","summary":"List Models","description":"List the text-to-speech models available for synthesis. Drive a model\npicker from this response, then pass a model `id` as the `model`\nparameter to POST /v1/audio/speech or /v1/audio/stream. The response\nmarks the default model (used when a request omits `model`), the\nroutes each model may be passed to, and which voices it accepts.\nMulti-speaker models arrive in a separate `dialogue_models` array\nbecause they are valid only on POST /v1/audio/dialogue. Returns\nthe full set in a single response: the model catalog is static\nplatform reference data, so it is intentionally not paginated.","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The available text-to-speech models.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelsResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential authenticated, but is not authorised for this\nresource - typically a workspace-role gate (owner / admin\nrequired) or a cross-tenant access attempt.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/audio/watermark/detect":{"post":{"operationId":"watermark_detect","summary":"Detect Watermark","description":"Check whether a clip carries the watermark Speechify seals into audio it\ngenerates. Upload the audio as `audio`; nothing about it is stored, and\nno voice is read or written.\n\nRead the answer carefully in one direction. A `watermarked: true` is\npositive evidence that the audio came from Speechify synthesis. A\n`watermarked: false` is NOT proof that it did not: only models\nredeployed since the watermark shipped mark their output, the detector\nneeds at least three seconds of clear speech to judge, and re-encoding\nor changing the speed of a clip degrades the mark. Treat a negative as\nthe absence of evidence rather than as evidence of absence.\n\nChecks are rate-limited well below the synthesis budget: this is a\nforensic question, not a data-plane call.","tags":["watermark"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The clip was checked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatermarkDetectionResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential authenticated, but is not authorised for this\nresource - typically a workspace-role gate (owner / admin\nrequired) or a cross-tenant access attempt.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeded a per-endpoint size limit (e.g. the file\nupload cap, KB document upload cap, batch-call CSV cap).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request was well-formed but semantically rejected -\ntypically a referential integrity violation (e.g. flow node\nreferences an audio asset in another workspace) or a state\nmachine refusal.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"An upstream dependency (the TTS composer or voice-metadata\nservice) returned a 5xx. The raw upstream detail is not\nforwarded - the cause is in the server log; the response is a\nfixed `upstream_failure` envelope. Safe to retry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"audio":{"type":"string","format":"binary","description":"The clip to check, at most 25MB. Give the detector at least\nthree seconds of clear speech; below that its confidence is\nnot worth acting on, and below half a second it always\nreports zero."}},"required":["audio"]}}}}}},"/v1/audio/watermark/verify":{"post":{"operationId":"watermark_verify","summary":"Verify Watermark","description":"The public AI detection tool. Ask whether a clip carries the watermark\nSpeechify seals into audio it generates, with no account, no API key and\nno credential of any kind.\n\n`verify` answers; `detect` measures. This route returns a bare yes or no,\nthe way verifying a signature does. Its sibling\n`POST /v1/audio/watermark/detect` takes an API key and returns the\ndetector's confidence alongside the verdict.\n\nThis is the programmatic half of the tool published at\n, and it exists so the tool can be invoked\nwithout visiting our website, as California's AI Transparency Act\n(BPC 22757.2) requires. Nothing about the clip is stored, and nothing\nidentifying about you is collected or retained.\n\nThe answer is a bare verdict. `watermarked: true` is positive evidence\nthat the audio came from Speechify synthesis. `watermarked: false` is\nNOT proof that it did not: only models redeployed since the watermark\nshipped mark their output, the detector needs at least three seconds of\nclear speech to judge, and re-encoding or changing the speed of a clip\ndegrades the mark. Treat a negative as the absence of evidence rather\nthan as evidence of absence.\n\nBecause the tool takes no credential, it is rate-limited per client\naddress and shares a platform-wide budget: expect a 429 under sustained\nautomated use, and retry after the interval the response advertises.\nUse `POST /v1/audio/watermark/detect` with an API key for the detector's\nconfidence score and a per-workspace allowance of its own.","tags":["watermark"],"parameters":[{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The clip was checked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatermarkVerificationResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeded a per-endpoint size limit (e.g. the file\nupload cap, KB document upload cap, batch-call CSV cap).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request was well-formed but semantically rejected -\ntypically a referential integrity violation (e.g. flow node\nreferences an audio asset in another workspace) or a state\nmachine refusal.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"An upstream dependency (the TTS composer or voice-metadata\nservice) returned a 5xx. The raw upstream detail is not\nforwarded - the cause is in the server log; the response is a\nfixed `upstream_failure` envelope. Safe to retry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"audio":{"type":"string","format":"binary","description":"The clip to check, at most 25MB. Give the detector at least\nthree seconds of clear speech; below that its answer is not\nworth acting on."}},"required":["audio"]}}}}}},"/v1/agents":{"get":{"operationId":"agent_list","summary":"List Agents","description":"List voice agents owned by the caller. Cursor-paginated: omit\n`cursor` for the first page; walk pages while `has_more` is true\n(default page size 50, max 200).","tags":["agent"],"parameters":[{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max items per page (default 50, max 200).","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"project_id","in":"query","description":"Filter by workspace project: omit for every project you can reach,\npass the literal `default` for resources in the implicit Default\nproject only, or a `proj_...` id for that project's resources.\nReturns 404 project_not_found for a malformed id and for any filter\noutside your reach: a project-pinned API key or service-account key\nreaches only its pinned project, and a member holding project grants\nreaches only the granted projects, so neither can name `default`.\nThat 404 is the same in every case and does not reveal whether such\na project exists - outside your reach a project is answered as\nnonexistent, never as forbidden. Inside it, a well-formed id that\nmatches no project yields an empty page.\n","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A list of voice agents.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAgentsResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"agent_create","summary":"Create Agent","description":"Create a voice agent.\n\nThe agent lands in the project named by `project_id`, or in the\nimplicit Default project when none is given. Each project holds at\nmost a fixed number of live agents; a create past that answers\n`409 agent_limit_reached` naming the ceiling, and deleting an agent\nin that project - or creating this one in another - frees a slot.\n","tags":["agent"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"201":{"description":"The created agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentRequest"}}}}}},"/v1/agents/voices":{"get":{"operationId":"agent_listAgentVoices","summary":"List Agent Voices","description":"List the voice catalogue available for voice agents: the curated\nshared catalogue plus your workspace's own cloned voices, each\nmarked by `type` (`shared` or `personal`). The same slug set is\naccepted by POST/PATCH /v1/agents, so any voice listed here can be\nassigned to an agent. Cloned voices are workspace-owned only - a\npersonal voice scoped to an individual is not selectable on an\nagent, which is a workspace-shared resource. The JSON layout\nintentionally mirrors the TTS `/v1/voices` shape so a single voice\npicker can consume both endpoints.\n\nCursor-paginated: pass `cursor` + `limit` and walk pages while\n`has_more` is true. From API version `2026-08-07` an omitted `limit`\nreturns the first page (default 50, max 200); a caller pinned before\nthat date keeps the historical whole-catalogue response until it opts\nin. The shared catalogue is served first, then your cloned voices.\n","tags":["agent"],"parameters":[{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max items per page (default 50, max 200).","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The curated agent voice catalogue.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAgentVoicesResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/tts-models":{"get":{"operationId":"agent_listTTSModels","summary":"List Agent TTS Models","description":"List the Simba text-to-speech models a voice agent can be pinned to\nwith `tts.model`.\n\nThe response is the whole catalog and is the same for every\nworkspace - which model serves an agent is a routing decision, not\nan entitlement, so nothing here is plan-gated. Whether a *particular*\nagent may select an entry depends on two facts this response\npublishes rather than resolving for you, because both change without\nthis list changing:\n\n- `english_only` - the model has no multilingual deployment, so an\n agent that declares `additional_languages` (or whose `language` is\n not English) cannot select it.\n- `requires_voice_curation` - deprecated and always false. No model\n asks a voice for a registration: every training conditions on the\n voice's own prompt audio, so every model is selectable on every\n voice we speak ourselves, cloned voices included.\n\nDrive a model picker from this and the agent's languages and it can\nonly offer combinations POST/PATCH /v1/agents will accept.\nReturns the full set in one response: bounded by the platform's\ncurated model catalog, so it is intentionally not paginated.\n","tags":["agent"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The TTS models selectable for voice agents.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTTSModelsResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{agent_id}":{"delete":{"operationId":"agent_delete","summary":"Delete Agent","description":"Delete an agent, and with it everything that belonged only to that\nagent.\n\n**Goes with the agent**, immediately unreadable through every\nendpoint: its runs and their step journals and approvals, its\nconversations and the transcripts, messages and recordings inside\nthem, what it learned about the people it spoke to, its triggers,\nshare links, channel bindings, team memberships and the batch\ncampaigns it dialled. A run that has not settled is asked to stop,\nincluding one parked waiting on a person or on a delegated child. These are removed for good 30 days\nlater; until then the delete can still be walked back by support.\n\n**Survives the agent**, because it belongs to the workspace rather\nthan to this agent: attached tools, knowledge bases, stores and\nskills (only the attachment is dropped), the agent's tests, phone\nnumbers, and the teams it belonged to.\n\n**Kept regardless**, because it is accounting rather than content:\nthe usage the workspace was billed for.\n\nRefused with `409 agent_in_use` while a live phone number still\nroutes to the agent, including the agent a webhook binding\nprovisioned for its number; `used_by` names the numbers. Unbind them\n(`DELETE /v1/agents/{agent_id}/phone-numbers/{phone_number_id}`,\nwhich also clears a webhook binding) and the delete proceeds.\n","tags":["agent"],"parameters":[{"name":"agent_id","in":"path","description":"Agent id (prefixed external id, `agent_...`).","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"204":{"description":"Agent deleted.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A live phone number still routes to the agent. `used_by` names\nthem so the caller can unbind first.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentInUseError"}}}}}},"get":{"operationId":"agent_get","summary":"Get Agent","description":"Retrieve a voice agent by ID.","tags":["agent"],"parameters":[{"name":"agent_id","in":"path","description":"Agent id (prefixed external id, `agent_...`).","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"agent_update","summary":"Update Agent","description":"Update a voice agent. Only fields present on the request body are changed.","tags":["agent"],"parameters":[{"name":"agent_id","in":"path","description":"Agent id (prefixed external id, `agent_...`).","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentRequest"}}}}}},"/v1/agents/{agent_id}/widget-config":{"get":{"operationId":"agent_getWidgetConfig","summary":"Get Agent Widget Config","description":"Return the embed-widget appearance config for an agent. Works\nunauthenticated for public agents; the body is cosmetic only.\n","tags":["agent"],"parameters":[{"name":"agent_id","in":"path","description":"Prefixed agent id.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The agent's widget configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetConfig"}}}},"403":{"description":"The credential authenticated, but is not authorised for this\nresource - typically a workspace-role gate (owner / admin\nrequired) or a cross-tenant access attempt.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/flow/schema":{"get":{"operationId":"flow_getSchema","summary":"Get Flow Graph Schema","description":"Return the JSON Schema describing the flow graph node taxonomy.\nUnauthenticated; flow editors fetch it to validate graphs client-side.\n","tags":["flow"],"parameters":[{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A JSON Schema document for the flow graph.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_flow_getSchema_Response_200"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{agent_id}/flow":{"get":{"operationId":"flow_getFlow","summary":"Get Agent Flow","description":"Return the agent's flow graph: the current draft (if any), the\nactive published graph (if any), and the version history.\n","tags":["flow"],"parameters":[{"name":"agent_id","in":"path","description":"Prefixed agent id.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The draft graph, active graph, and version history.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetFlowResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"flow_updateFlow","summary":"Update Agent Flow Draft","description":"Replace the agent's draft flow graph. The graph is validated\nbefore it is stored; publish it separately to make it active.\n","tags":["flow"],"parameters":[{"name":"agent_id","in":"path","description":"Prefixed agent id.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The stored draft graph.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowGraph"}}}},"400":{"description":"Flow validation failed (or the request body was undecodable). The\nstandard `Error` envelope plus an `issues` array locating each problem\nfor the editor. See the `FlowValidationError` schema.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowValidationError"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutFlowRequest"}}}}}},"/v1/agents/{agent_id}/flow/publish":{"post":{"operationId":"flow_publish","summary":"Publish Agent Flow","description":"Publish the agent's draft graph as a new active flow version.","tags":["flow"],"parameters":[{"name":"agent_id","in":"path","description":"Prefixed agent id.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The newly published flow version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowVersion"}}}},"400":{"description":"Flow validation failed (or the request body was undecodable). The\nstandard `Error` envelope plus an `issues` array locating each problem\nfor the editor. See the `FlowValidationError` schema.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowValidationError"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The behavioral-eval publish gate refused the publish, on one of two\ncodes the caller can FIX (neither is waited out):\n\n- `agent_publish_gate_failed`: the agent's configured suite did not\n pass. `error.details` carries the verdict (per-case, per-criterion).\n- `agent_publish_gate_tool_unreachable`: the checks never ran because\n a tool the agent is attached to could not be reached. Nothing was\n judged, and no retry helps while the endpoint is down;\n `error.message` names the tool, the endpoint and the reason.\n\nThe one publish failure that IS waited out is the `503`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The publish checks could not run (`agent_publish_gate_unavailable`):\nthe eval worker, the judge or the probe corpus errored, so nothing\nabout the agent was judged. This is OURS, and the only publish failure\na caller waits out: not a verdict on the configuration, retry after\n`Retry-After`. `error.details` lists the cases that could not run. A\ncheck that could not run because of the agent's own configuration is\nthe `422 agent_publish_gate_tool_unreachable` instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishFlowRequest"}}}}}},"/v1/agents/{agent_id}/flow/rollback":{"post":{"operationId":"flow_rollback","summary":"Roll Back Agent Flow","description":"Publish a prior flow version as the active graph.","tags":["flow"],"parameters":[{"name":"agent_id","in":"path","description":"Prefixed agent id.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The flow version that is now active.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowVersion"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The behavioral-eval publish gate refused the rollback, on one of two\ncodes the caller can FIX (neither is waited out):\n\n- `agent_publish_gate_failed`: the target version did not pass the\n agent's configured suite. `error.details` carries the verdict.\n- `agent_publish_gate_tool_unreachable`: the checks never ran because\n a tool the agent is attached to could not be reached;\n `error.message` names the tool, the endpoint and the reason.\n\nThe one rollback failure that IS waited out is the `503`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The gate's checks could not run on the rollback target\n(`agent_publish_gate_unavailable`): the eval worker, the judge or\nthe probe corpus errored, so nothing about the version was judged.\nThis is OURS, and the only rollback failure a caller waits out: not a\nverdict on it, retry after `Retry-After`. `error.details` lists the\ncases that could not run. A check that could not run because of the\nagent's own configuration is the `422\nagent_publish_gate_tool_unreachable` instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RollbackFlowRequest"}}}}}},"/v1/agents/{agent_id}/flow/deactivate":{"post":{"operationId":"flow_deactivate","summary":"Deactivate Agent Flow","description":"Deactivate the agent's published flow so the agent runs the synthesized default flow.","tags":["flow"],"parameters":[{"name":"agent_id","in":"path","description":"Prefixed agent id.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"204":{"description":"Flow deactivated.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{agent_id}/flow/draft":{"delete":{"operationId":"flow_discardDraft","summary":"Discard Agent Flow Draft","description":"Discard the agent's unpublished draft flow graph.","tags":["flow"],"parameters":[{"name":"agent_id","in":"path","description":"Prefixed agent id.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"204":{"description":"Draft discarded.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{agent_id}/flow/versions":{"get":{"operationId":"flow_listVersions","summary":"List Agent Flow Versions","description":"List every published flow version for the agent, newest first.\nCursor-paginated: omit `cursor` for the first page; walk pages\nwhile `has_more` is true (default page size 50, max 200).","tags":["flow"],"parameters":[{"name":"agent_id","in":"path","description":"Prefixed agent id.","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max items per page (default 50, max 200).","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The agent's flow version history.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFlowVersionsResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{agent_id}/flow/versions/{version_id}":{"get":{"operationId":"flow_getVersion","summary":"Get Agent Flow Version","description":"Return the full flow graph for a specific published version.","tags":["flow"],"parameters":[{"name":"agent_id","in":"path","description":"Prefixed agent id.","required":true,"schema":{"type":"string"}},{"name":"version_id","in":"path","description":"Prefixed flow version id (`fver_...`).","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested flow version's graph.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowGraph"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/flow/templates":{"get":{"operationId":"flow_listTemplates","summary":"List Flow Templates","description":"List the reusable flow templates available to the workspace.\nCursor-paginated: omit `cursor` for the first page; walk pages\nwhile `has_more` is true (default page size 50, max 200).","tags":["flow"],"parameters":[{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max items per page (default 50, max 200).","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The available flow templates.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFlowTemplatesResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"flow_createTemplate","summary":"Create Flow Template","description":"Create a reusable flow template from a graph.","tags":["flow"],"parameters":[{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"201":{"description":"The created flow template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowTemplate"}}}},"400":{"description":"Flow validation failed (or the request body was undecodable). The\nstandard `Error` envelope plus an `issues` array locating each problem\nfor the editor. See the `FlowValidationError` schema.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowValidationError"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFlowTemplateRequest"}}}}}},"/v1/agents/flow/templates/{flow_template_id}":{"get":{"operationId":"flow_getTemplate","summary":"Get Flow Template","description":"Retrieve a flow template by id.","tags":["flow"],"parameters":[{"name":"flow_template_id","in":"path","description":"Flow template id (prefixed external id, `tmpl_...`).","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested flow template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowTemplate"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"flow_updateTemplate","summary":"Update Flow Template","description":"Replace a flow template. The whole template is replaced, not patched field-by-field.","tags":["flow"],"parameters":[{"name":"flow_template_id","in":"path","description":"Flow template id (prefixed external id, `tmpl_...`).","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated flow template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowTemplate"}}}},"400":{"description":"Flow validation failed (or the request body was undecodable). The\nstandard `Error` envelope plus an `issues` array locating each problem\nfor the editor. See the `FlowValidationError` schema.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowValidationError"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFlowTemplateRequest"}}}}},"delete":{"operationId":"flow_deleteTemplate","summary":"Delete Flow Template","description":"Delete a flow template.","tags":["flow"],"parameters":[{"name":"flow_template_id","in":"path","description":"Flow template id (prefixed external id, `tmpl_...`).","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"204":{"description":"Template deleted.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/flow/templates/{flow_template_id}/clone":{"post":{"operationId":"flow_cloneTemplate","summary":"Clone Flow Template","description":"Clone a flow template onto an agent as a new draft graph.","tags":["flow"],"parameters":[{"name":"flow_template_id","in":"path","description":"Flow template id (prefixed external id, `tmpl_...`).","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The agent's new draft graph.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowGraph"}}}},"400":{"description":"Flow validation failed (or the request body was undecodable). The\nstandard `Error` envelope plus an `issues` array locating each problem\nfor the editor. See the `FlowValidationError` schema.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowValidationError"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected server-side error occurred. Safe to retry with\nexponential backoff for idempotent requests.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloneFlowTemplateRequest"}}}}}},"/v1/agents/{agent_id}/evaluation-config":{"get":{"operationId":"agent_getEvaluationConfig","summary":"Get Evaluation Config","description":"Retrieve the agent's post-call evaluation criteria + data-collection config.","tags":["agent"],"parameters":[{"name":"agent_id","in":"path","description":"Agent id (prefixed external id, `agent_...`).","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The evaluation config for the agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationConfig"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"agent_updateEvaluationConfig","summary":"Update Evaluation Config","description":"Replace the agent's evaluation criteria + data-collection fields.","tags":["agent"],"parameters":[{"name":"agent_id","in":"path","description":"Agent id (prefixed external id, `agent_...`).","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated evaluation config.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationConfig"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEvaluationConfigRequest"}}}}}},"/v1/agents/{agent_id}/variables":{"get":{"operationId":"agent_getDynamicVariables","summary":"Get Dynamic Variables","description":"Retrieve the agent's customer-scope dynamic variables and the read-only\ncatalogue of reserved `system__*` keys. The system variables list is\nprovided so editor UIs can render the reference list without maintaining\na client-side copy of the catalogue.\n","tags":["agent"],"parameters":[{"name":"agent_id","in":"path","description":"Agent id (prefixed external id, `agent_...`).","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The agent's variable catalogue.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDynamicVariablesResponse"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"agent_updateDynamicVariables","summary":"Update Dynamic Variables","description":"Replace the agent's customer-scope dynamic variable definitions.\nThe supplied list overwrites the stored list wholesale (same\nsemantics as `updateEvaluationConfig`). Pass an empty array to\nclear all variables. Up to 20 variables per agent. Keys must\nmatch `[a-zA-Z0-9_]+` and must not start with the reserved\n`system__` prefix.\n","tags":["agent"],"parameters":[{"name":"agent_id","in":"path","description":"Agent id (prefixed external id, `agent_...`).","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated variable catalogue.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDynamicVariablesResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDynamicVariablesRequest"}}}}}},"/v1/agents/{agent_id}/conversations":{"post":{"operationId":"agent_createConversation","summary":"Create Conversation","description":"Start a new voice conversation with the agent. Returns a realtime\nvoice session + short-lived client token so the caller can\nconnect the audio pipeline directly. The agent is dispatched\nserver-side; no additional client action required.\n\nPass `dynamic_variables` to supply per-session values that override\nthe agent's stored variable defaults for this one conversation.\nKeys in the `system__` namespace are rejected at this boundary.\n\nPass `user_identity` as the stable caller key your application uses\nfor memory and caller correlation. It is kept separate from the\nopaque, per-session realtime participant identity.\n\n`overrides.voice_id` replaces the configured voice for the entire\nconversation, including every configured language the voice can\nserve. The request is rejected when the voice is unavailable or\ncannot cover the agent's configured language set; the rejection\nnames `overrides.voice_id` in the error envelope's `fields` map.\nThe override belongs to this conversation only: if the call is\ntransferred to another agent mid-conversation, that agent speaks\nwith its own configured voice.\n","tags":["agent"],"parameters":[{"name":"agent_id","in":"path","description":"Agent id (prefixed external id, `agent_...`).","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"A client-generated key (an opaque string, max 255 chars) that makes a\nside-effect POST safe to retry: the server runs the operation exactly\nonce and replays the first response (its status and body) for 24 hours.\nReusing a key with a different request body, or while the first request\nis still in flight, returns `409 idempotency_conflict`. A replayed\nresponse carries the `Idempotent-Replayed: true` header.\n","required":false,"schema":{"type":"string","maxLength":255}}],"responses":{"201":{"description":"The created conversation with its realtime session token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConversationResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConversationRequest"}}}}}},"/v1/agents/{agent_id}/sessions":{"post":{"operationId":"agent_createSession","summary":"Create Session","description":"Mint a realtime voice session for the given agent. Widget-friendly\ncounterpart to `createConversation` \u2014 same response shape, dual\nauthentication:\n\n* **Authenticated (Bearer)**: works for any agent the caller\n owns. Typical server-to-server flow where the embedding\n site's backend mints a token and hands it to the browser so\n the API key never reaches the client.\n* **Unauthenticated**: works only when `agent.is_public = true`\n AND the request's `Origin` header matches `agent.allowed_origins`\n (or that list is empty). When `agent.hostname_allowlist` is\n non-empty, the `Origin` hostname must additionally be a\n member of that list. Used directly by the\n `` web component.\n\nResponds with the same `CreateConversationResponse` as\n`createConversation`.\n\n`Idempotency-Key` replay is scoped to the authenticated caller, so it\napplies to Bearer requests only: an unauthenticated mint has no scope\nto replay under, and retrying one mints a fresh session.\n","tags":["agent"],"parameters":[{"name":"agent_id","in":"path","description":"Agent id (prefixed external id, `agent_...`).","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"A client-generated key (an opaque string, max 255 chars) that makes a\nside-effect POST safe to retry: the server runs the operation exactly\nonce and replays the first response (its status and body) for 24 hours.\nReusing a key with a different request body, or while the first request\nis still in flight, returns `409 idempotency_conflict`. A replayed\nresponse carries the `Idempotent-Replayed: true` header.\n","required":false,"schema":{"type":"string","maxLength":255}}],"responses":{"201":{"description":"The created session with its realtime token + URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConversationResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace has insufficient credits, or the request needs a\nplan tier the workspace is not on (e.g. voice cloning). Distinct\nfrom `Forbidden` so SDK consumers can drive upgrade UX.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The credential authenticated, but is not authorised for this\nresource - typically a workspace-role gate (owner / admin\nrequired) or a cross-tenant access attempt.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The request conflicts with the current resource state - e.g.\nduplicate, optimistic-concurrency mismatch, or last-owner\nguard.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit exceeded. `error.code` says which\nceiling, and they need different responses: `rate_limited` is the\nrequest-rate budget (slow down), `concurrency_limit_reached` is a\nworkspace-wide concurrency ceiling (fewer at once, or raise it), and\n`conversation_turn_in_progress` is contention over one named\nconversation (keep one message in flight on it). Every 429 carries\n`Retry-After` and the request-rate budget headers; the active-call cap\nalso carries `RateLimit-Remaining-Calls: 0`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionRequest"}}}}}},"/v1/agents/conversations":{"get":{"operationId":"conversations_list","summary":"List Conversations","description":"List conversations owned by the caller, ordered by most recent.\nCursor-paginated: omit `cursor` to fetch the first page; pass the\nprevious response's `next_cursor` back to fetch the next page.\nWalk pages while `has_more` is true.\n\n`project_id` matches the project the call was DISPATCHED under, which\nis frozen when the conversation starts. Moving an agent to another\nproject therefore leaves its past calls attributed where they ran, the\nsame way per-project usage reports them.","tags":["conversations"],"parameters":[{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max items per page (default 50, max 200).","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"agent_id","in":"query","description":"Filter to conversations for this agent.","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","description":"Filter by conversation status.","required":false,"schema":{"$ref":"#/components/schemas/ConversationStatus"}},{"name":"transport","in":"query","description":"Filter by the runtime that carried the conversation. `phone`\nmatches calls in either direction.\n","required":false,"schema":{"$ref":"#/components/schemas/ConversationTransport"}},{"name":"channel","in":"query","description":"Filter by the front door the conversation arrived through.\nThis is the axis that separates two conversations sharing one\ntransport: `channel=slack` and `channel=text` both run the\n`text` transport. Combining it with `transport` narrows by\nboth.\n","required":false,"schema":{"$ref":"#/components/schemas/ConversationChannel"}},{"name":"live","in":"query","description":"Narrow to (`true`) or away from (`false`) the conversations that\nare a realtime session in progress: non-terminal AND holding a\nroom. A text or Slack thread holds no room, so it is open rather\nthan live however long it stays non-terminal - `status=active`\nalone matches it. This is the filter a live view asks for.\n","required":false,"schema":{"type":"boolean"}},{"name":"caller_identity","in":"query","description":"Filter by caller identity.","required":false,"schema":{"type":"string"}},{"name":"contact_id","in":"query","description":"Narrow to one person's conversations, whichever agent or channel\nreached them. Prefixed `contact_...` id.\n","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","description":"Free-text search across conversation content.","required":false,"schema":{"type":"string"}},{"name":"started_after","in":"query","description":"Only conversations started at or after this RFC 3339 timestamp.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"started_before","in":"query","description":"Only conversations started at or before this RFC 3339 timestamp.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"duration_min_ms","in":"query","description":"Minimum conversation duration in milliseconds.","required":false,"schema":{"type":"integer"}},{"name":"duration_max_ms","in":"query","description":"Maximum conversation duration in milliseconds.","required":false,"schema":{"type":"integer"}},{"name":"project_id","in":"query","description":"Filter by workspace project: omit for every project you can reach,\npass the literal `default` for resources in the implicit Default\nproject only, or a `proj_...` id for that project's resources.\nReturns 404 project_not_found for a malformed id and for any filter\noutside your reach: a project-pinned API key or service-account key\nreaches only its pinned project, and a member holding project grants\nreaches only the granted projects, so neither can name `default`.\nThat 404 is the same in every case and does not reveal whether such\na project exists - outside your reach a project is answered as\nnonexistent, never as forbidden. Inside it, a well-formed id that\nmatches no project yields an empty page.\n","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A list of conversations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListConversationsResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/conversations/{conversation_id}":{"get":{"operationId":"conversations_get","summary":"Get Conversation","description":"Retrieve a conversation by ID.","tags":["conversations"],"parameters":[{"name":"conversation_id","in":"path","description":"Conversation id (prefixed external id, `conv_...`).","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/conversations/recent-callees":{"get":{"operationId":"conversations_recent_callees","summary":"List recent callees","description":"Distinct phone numbers the caller's workspace has dialled on\noutbound calls, ordered by most recent. Feeds the batch-calls\ncomposer's \"Suggested from history\" surface. Cursor-paginated:\nomit `cursor` to fetch the first page. Default page size is 50\nand max is 200. Walk pages while `has_more` is true.\n","tags":["conversations"],"parameters":[{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max items per page (default 50, max 200).","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Recent callees for the caller's workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRecentCalleesResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/conversations/stats":{"get":{"operationId":"conversations_stats","summary":"Conversation stats","description":"Aggregated counts and averages over the caller's conversations, scoped\nby the same filters as the list endpoint, `project_id` included.","tags":["conversations"],"parameters":[{"name":"agent_id","in":"query","description":"Filter to conversations for this agent.","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","description":"Filter by conversation status.","required":false,"schema":{"$ref":"#/components/schemas/ConversationStatus"}},{"name":"transport","in":"query","description":"Filter by the runtime that carried the conversation. `phone`\nmatches calls in either direction.\n","required":false,"schema":{"$ref":"#/components/schemas/ConversationTransport"}},{"name":"channel","in":"query","description":"Filter by the front door the conversation arrived through.\nThis is the axis that separates two conversations sharing one\ntransport: `channel=slack` and `channel=text` both run the\n`text` transport. Combining it with `transport` narrows by\nboth.\n","required":false,"schema":{"$ref":"#/components/schemas/ConversationChannel"}},{"name":"live","in":"query","description":"Narrow to (`true`) or away from (`false`) the conversations that\nare a realtime session in progress: non-terminal AND holding a\nroom. A text or Slack thread holds no room, so it is open rather\nthan live however long it stays non-terminal - `status=active`\nalone matches it. This is the filter a live view asks for.\n","required":false,"schema":{"type":"boolean"}},{"name":"caller_identity","in":"query","description":"Filter by caller identity.","required":false,"schema":{"type":"string"}},{"name":"contact_id","in":"query","description":"Narrow to one person's conversations, whichever agent or channel\nreached them. Prefixed `contact_...` id.\n","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","description":"Free-text search across conversation content.","required":false,"schema":{"type":"string"}},{"name":"started_after","in":"query","description":"Only conversations started at or after this RFC 3339 timestamp.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"started_before","in":"query","description":"Only conversations started at or before this RFC 3339 timestamp.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"duration_min_ms","in":"query","description":"Minimum conversation duration in milliseconds.","required":false,"schema":{"type":"integer"}},{"name":"duration_max_ms","in":"query","description":"Maximum conversation duration in milliseconds.","required":false,"schema":{"type":"integer"}},{"name":"project_id","in":"query","description":"Filter by workspace project: omit for every project you can reach,\npass the literal `default` for resources in the implicit Default\nproject only, or a `proj_...` id for that project's resources.\nReturns 404 project_not_found for a malformed id and for any filter\noutside your reach: a project-pinned API key or service-account key\nreaches only its pinned project, and a member holding project grants\nreaches only the granted projects, so neither can name `default`.\nThat 404 is the same in every case and does not reveal whether such\na project exists - outside your reach a project is answered as\nnonexistent, never as forbidden. Inside it, a well-formed id that\nmatches no project yields an empty page.\n","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Stats for the matched conversations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationStats"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/conversations/{conversation_id}/messages":{"get":{"operationId":"conversations_listMessages","summary":"List Messages","description":"Retrieve the transcript for a conversation in started_at order\n(oldest first). Cursor-paginated: omit `cursor` to fetch the\nfirst page. Default page size is 50 and max is 200. Walk pages\nwhile `has_more` is true.","tags":["conversations"],"parameters":[{"name":"conversation_id","in":"path","description":"Conversation id (prefixed external id, `conv_...`).","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max items per page (default 50, max 200).","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"Authorization","in":"header","description":"Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.","required":true,"schema":{"type":"string"}},{"name":"Speechify-Version","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The messages for the conversation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMessagesResponse"}}}},"400":{"description":"The request was malformed or failed validation. The response\nbody is the standard `Error` envelope; for validation\nfailures `error.fields` enumerates the offending fields as\na `path -> message` map (code = `validation_failed`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is missing or invalid. The request did not\ncarry a recognised credential (console session token, API key,\nor worker JWT).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The referenced resource does not exist or is not visible to\nthe caller's workspace.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/conversations/{conversation_id}/recording":{"get":{"operationId":"conversations_streamRecording","summary":"Stream Recording","description":"Proxy the GCS-stored audio recording for a conversation through\nthe Cloud Run service identity. Returns OGG/Opus bytes (LiveKit\nroom-composite egress default). The response is streamed so a\nlong recording does not buffer in memory; `