diff --git a/src/libs/Speechify/Generated/Speechify.Agent.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Agent.JsonSerializerContext.g.cs index d2c9382d..9fbe6236 100644 --- a/src/libs/Speechify/Generated/Speechify.Agent.JsonSerializerContext.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Agent.JsonSerializerContext.g.cs @@ -164,8 +164,19 @@ namespace Speechify [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthDiscriminator))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthDiscriminatorType), TypeInfoPropertyName = "MCPAuthDiscriminatorType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolActionClass), TypeInfoPropertyName = "ToolActionClass2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolResponseMapping))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPToolConfig))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenApiOperationMethod), TypeInfoPropertyName = "OpenApiOperationMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenApiParamIn), TypeInfoPropertyName = "OpenApiParamIn2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenAPIParam))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenApiBodyContentType), TypeInfoPropertyName = "OpenApiBodyContentType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenAPIBody))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenAPIOperation))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenAPIToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentToolConfig), TypeInfoPropertyName = "AgentToolConfig2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolApprovalClass), TypeInfoPropertyName = "ToolApprovalClass2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolReach), TypeInfoPropertyName = "ToolReach2")] @@ -263,6 +274,9 @@ namespace Speechify [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthVariant3Type?), TypeInfoPropertyName = "NullableMCPAuthVariant3Type2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthDiscriminatorType?), TypeInfoPropertyName = "NullableMCPAuthDiscriminatorType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolActionClass?), TypeInfoPropertyName = "NullableToolActionClass2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenApiOperationMethod?), TypeInfoPropertyName = "NullableOpenApiOperationMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenApiParamIn?), TypeInfoPropertyName = "NullableOpenApiParamIn2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenApiBodyContentType?), TypeInfoPropertyName = "NullableOpenApiBodyContentType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentToolConfig?), TypeInfoPropertyName = "NullableAgentToolConfig2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolApprovalClass?), TypeInfoPropertyName = "NullableToolApprovalClass2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolReach?), TypeInfoPropertyName = "NullableToolReach2")] @@ -298,6 +312,8 @@ 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))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] @@ -545,6 +561,18 @@ public override bool CanConvert(global::System.Type typeToConvert) || typeToConvert == typeof(global::Speechify.ToolActionClass?) + || typeToConvert == typeof(global::Speechify.OpenApiOperationMethod) + + || typeToConvert == typeof(global::Speechify.OpenApiOperationMethod?) + + || typeToConvert == typeof(global::Speechify.OpenApiParamIn) + + || typeToConvert == typeof(global::Speechify.OpenApiParamIn?) + + || typeToConvert == typeof(global::Speechify.OpenApiBodyContentType) + + || typeToConvert == typeof(global::Speechify.OpenApiBodyContentType?) + || typeToConvert == typeof(global::Speechify.ToolApprovalClass) || typeToConvert == typeof(global::Speechify.ToolApprovalClass?) @@ -1018,6 +1046,36 @@ public override bool CanConvert(global::System.Type typeToConvert) return new global::Speechify.JsonConverters.ToolActionClassNullableJsonConverter(); } + if (typeToConvert == typeof(global::Speechify.OpenApiOperationMethod)) + { + return new global::Speechify.JsonConverters.OpenApiOperationMethodJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.OpenApiOperationMethod?)) + { + return new global::Speechify.JsonConverters.OpenApiOperationMethodNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.OpenApiParamIn)) + { + return new global::Speechify.JsonConverters.OpenApiParamInJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.OpenApiParamIn?)) + { + return new global::Speechify.JsonConverters.OpenApiParamInNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.OpenApiBodyContentType)) + { + return new global::Speechify.JsonConverters.OpenApiBodyContentTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.OpenApiBodyContentType?)) + { + return new global::Speechify.JsonConverters.OpenApiBodyContentTypeNullableJsonConverter(); + } + if (typeToConvert == typeof(global::Speechify.ToolApprovalClass)) { return new global::Speechify.JsonConverters.ToolApprovalClassJsonConverter(); diff --git a/src/libs/Speechify/Generated/Speechify.AgentClient.AttachTool.g.cs b/src/libs/Speechify/Generated/Speechify.AgentClient.AttachTool.g.cs index 518085cb..0aba9458 100644 --- a/src/libs/Speechify/Generated/Speechify.AgentClient.AttachTool.g.cs +++ b/src/libs/Speechify/Generated/Speechify.AgentClient.AttachTool.g.cs @@ -47,9 +47,9 @@ partial void ProcessAttachToolResponseContent( /// /// Attach Tool
- /// Attach an existing workspace tool definition (webhook / client /
- /// MCP) to the agent by its definition id. Idempotent. To create and
- /// attach in one step, POST to `/v1/agents/{agent_id}/tools` instead. + /// Attach an existing workspace tool definition (webhook, client,
+ /// MCP or OpenAPI) to the agent by its definition id. Idempotent. To
+ /// create and attach in one step, POST to `/v1/agents/{agent_id}/tools` instead. ///
/// /// @@ -76,9 +76,9 @@ partial void ProcessAttachToolResponseContent( } /// /// Attach Tool
- /// Attach an existing workspace tool definition (webhook / client /
- /// MCP) to the agent by its definition id. Idempotent. To create and
- /// attach in one step, POST to `/v1/agents/{agent_id}/tools` instead. + /// Attach an existing workspace tool definition (webhook, client,
+ /// MCP or OpenAPI) to the agent by its definition id. Idempotent. To
+ /// create and attach in one step, POST to `/v1/agents/{agent_id}/tools` instead. ///
/// /// diff --git a/src/libs/Speechify/Generated/Speechify.AgentClient.CreateTool.g.cs b/src/libs/Speechify/Generated/Speechify.AgentClient.CreateTool.g.cs index 98120fae..11beab21 100644 --- a/src/libs/Speechify/Generated/Speechify.AgentClient.CreateTool.g.cs +++ b/src/libs/Speechify/Generated/Speechify.AgentClient.CreateTool.g.cs @@ -50,12 +50,12 @@ partial void ProcessCreateToolResponseContent( /// Add a tool to the agent. With `kind=builtin` this creates a
/// per-agent built-in instance (e.g. `end_call`, `play_audio`); the
/// `builtin` capability name comes from `config.builtin`. With
- /// `kind=webhook`, `client`, or `mcp` this atomically creates a
+ /// `kind=webhook`, `client`, `mcp` or `openapi` this atomically creates a
/// workspace tool definition AND attaches it to the agent in one
/// call. To attach a definition that already exists, use
/// `PUT /v1/agents/{agent_id}/tools/{tool_id}` instead.
- /// Names are refused two ways: a `webhook` / `client` / `mcp` definition
- /// is unique per **project**, a `builtin` is unique per **agent**, and an
+ /// Names are refused two ways: a `webhook` / `client` / `mcp` /
+ /// `openapi` definition is unique per **project**, a `builtin` is unique per **agent**, and an
/// agent may not carry both under one name. Either refusal is `409
/// tool_name_taken` with `error.details.held_by` naming the holder, which
/// for a definition is not necessarily attached to this agent.
@@ -96,12 +96,12 @@ partial void ProcessCreateToolResponseContent( /// Add a tool to the agent. With `kind=builtin` this creates a
/// per-agent built-in instance (e.g. `end_call`, `play_audio`); the
/// `builtin` capability name comes from `config.builtin`. With
- /// `kind=webhook`, `client`, or `mcp` this atomically creates a
+ /// `kind=webhook`, `client`, `mcp` or `openapi` this atomically creates a
/// workspace tool definition AND attaches it to the agent in one
/// call. To attach a definition that already exists, use
/// `PUT /v1/agents/{agent_id}/tools/{tool_id}` instead.
- /// Names are refused two ways: a `webhook` / `client` / `mcp` definition
- /// is unique per **project**, a `builtin` is unique per **agent**, and an
+ /// Names are refused two ways: a `webhook` / `client` / `mcp` /
+ /// `openapi` definition is unique per **project**, a `builtin` is unique per **agent**, and an
/// agent may not carry both under one name. Either refusal is `409
/// tool_name_taken` with `error.details.held_by` naming the holder, which
/// for a definition is not necessarily attached to this agent.
@@ -644,12 +644,12 @@ partial void ProcessCreateToolResponseContent( /// Add a tool to the agent. With `kind=builtin` this creates a
/// per-agent built-in instance (e.g. `end_call`, `play_audio`); the
/// `builtin` capability name comes from `config.builtin`. With
- /// `kind=webhook`, `client`, or `mcp` this atomically creates a
+ /// `kind=webhook`, `client`, `mcp` or `openapi` this atomically creates a
/// workspace tool definition AND attaches it to the agent in one
/// call. To attach a definition that already exists, use
/// `PUT /v1/agents/{agent_id}/tools/{tool_id}` instead.
- /// Names are refused two ways: a `webhook` / `client` / `mcp` definition
- /// is unique per **project**, a `builtin` is unique per **agent**, and an
+ /// Names are refused two ways: a `webhook` / `client` / `mcp` /
+ /// `openapi` definition is unique per **project**, a `builtin` is unique per **agent**, and an
/// agent may not carry both under one name. Either refusal is `409
/// tool_name_taken` with `error.details.held_by` naming the holder, which
/// for a definition is not necessarily attached to this agent.
@@ -667,7 +667,8 @@ partial void ProcessCreateToolResponseContent( /// - `builtin`: a worker-resident platform capability (e.g. end_call, play_audio), configured per-agent
/// - `webhook`: worker signs a payload and POSTs it to your URL
/// - `client`: worker dispatches to the caller's browser/SDK via data channel
- /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls + /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls
+ /// - `openapi`: a REST API described by its OpenAPI document, pinned to the operations you selected; the control plane executes every call /// /// /// @@ -676,7 +677,7 @@ partial void ProcessCreateToolResponseContent( /// /// /// - /// The impact class for a shared kind (`webhook`/`client`/`mcp`),
+ /// The impact class for a shared kind (`webhook`/`client`/`mcp`/`openapi`),
/// whose definition is created here. Omitted, the server stamps the
/// verb default. Ignored for a built-in, whose class the platform fixes. /// diff --git a/src/libs/Speechify/Generated/Speechify.AgentClient.ListTools.g.cs b/src/libs/Speechify/Generated/Speechify.AgentClient.ListTools.g.cs index 0d35c9e1..fca230e1 100644 --- a/src/libs/Speechify/Generated/Speechify.AgentClient.ListTools.g.cs +++ b/src/libs/Speechify/Generated/Speechify.AgentClient.ListTools.g.cs @@ -50,7 +50,7 @@ partial void ProcessListToolsResponseContent( /// /// List Agent Tools
/// List everything this agent can do: built-in capabilities and
- /// attached external tool definitions (webhook / client / MCP) in
+ /// attached tool definitions (webhook, client, MCP and OpenAPI) in
/// one mixed-kind list. Each item carries its resolved config inline.
/// Cursor-paginated: omit `cursor` for the first page; walk pages while
/// `has_more` is true (default page size 50, max 200). @@ -86,7 +86,7 @@ partial void ProcessListToolsResponseContent( /// /// List Agent Tools
/// List everything this agent can do: built-in capabilities and
- /// attached external tool definitions (webhook / client / MCP) in
+ /// attached tool definitions (webhook, client, MCP and OpenAPI) in
/// one mixed-kind list. Each item carries its resolved config inline.
/// Cursor-paginated: omit `cursor` for the first page; walk pages while
/// `has_more` is true (default page size 50, max 200). diff --git a/src/libs/Speechify/Generated/Speechify.Credentials.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.Credentials.JsonSerializerContext.g.cs new file mode 100644 index 00000000..a31863e8 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Credentials.JsonSerializerContext.g.cs @@ -0,0 +1,243 @@ + +#nullable enable + +#pragma warning disable CS0618 // Type or member is obsolete +#pragma warning disable CS3016 // Arrays as attribute arguments is not CLS-compliant + +namespace Speechify +{ + /// + /// + /// + [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.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [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))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialKind), TypeInfoPropertyName = "CredentialKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OAuth2TokenEndpointAuthMethod), TypeInfoPropertyName = "OAuth2TokenEndpointAuthMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialConfigViewOauth2ClientCredentials))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialConfigViewOauth2Jwt))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialConfigViewBasic))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialConfigViewBearer))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialConfigViewSharedSecret))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialConfigViewCustomHeaders))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialConfigView))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialReferenceResourceType), TypeInfoPropertyName = "CredentialReferenceResourceType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialReference))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialUsedBy))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Credential))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListCredentialsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OAuth2ClientCredentialsConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OAuth2JWTConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.BasicAuthConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.BearerAuthConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CustomHeadersConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SharedSecretConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateCredentialRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateCredentialRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialInUseErrorDetailDetails))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialInUseErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialInUseError))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [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.CredentialKind?), TypeInfoPropertyName = "NullableCredentialKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OAuth2TokenEndpointAuthMethod?), TypeInfoPropertyName = "NullableOAuth2TokenEndpointAuthMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialReferenceResourceType?), TypeInfoPropertyName = "NullableCredentialReferenceResourceType2")] + [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 CredentialsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class CredentialsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static CredentialsSourceGenerationContext Default { get; } = new(DefaultOptions); + + private CredentialsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [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.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::Speechify.ErrorCode) + + || typeToConvert == typeof(global::Speechify.ErrorCode?) + + || typeToConvert == typeof(global::Speechify.CredentialKind) + + || typeToConvert == typeof(global::Speechify.CredentialKind?) + + || typeToConvert == typeof(global::Speechify.OAuth2TokenEndpointAuthMethod) + + || typeToConvert == typeof(global::Speechify.OAuth2TokenEndpointAuthMethod?) + + || typeToConvert == typeof(global::Speechify.CredentialReferenceResourceType) + + || typeToConvert == typeof(global::Speechify.CredentialReferenceResourceType?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::Speechify.ErrorCode)) + { + return new global::Speechify.JsonConverters.ErrorCodeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.ErrorCode?)) + { + return new global::Speechify.JsonConverters.ErrorCodeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.CredentialKind)) + { + return new global::Speechify.JsonConverters.CredentialKindJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.CredentialKind?)) + { + return new global::Speechify.JsonConverters.CredentialKindNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.OAuth2TokenEndpointAuthMethod)) + { + return new global::Speechify.JsonConverters.OAuth2TokenEndpointAuthMethodJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.OAuth2TokenEndpointAuthMethod?)) + { + return new global::Speechify.JsonConverters.OAuth2TokenEndpointAuthMethodNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.CredentialReferenceResourceType)) + { + return new global::Speechify.JsonConverters.CredentialReferenceResourceTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.CredentialReferenceResourceType?)) + { + return new global::Speechify.JsonConverters.CredentialReferenceResourceTypeNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new CredentialsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.CredentialsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.CredentialsClient.Authorizations.Bearer.g.cs new file mode 100644 index 00000000..40e3ac77 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.CredentialsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class CredentialsClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::Speechify.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.CredentialsClient.Constructors.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.CredentialsClient.Constructors.Bearer.g.cs new file mode 100644 index 00000000..37c84a9c --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.CredentialsClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace Speechify +{ + public sealed partial class CredentialsClient + { + /// + + public CredentialsClient( + string apiKey, + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) : this(httpClient, baseUri, authorizations, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + ref string apiKey); + partial void Authorized( + global::System.Net.Http.HttpClient client); + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.CredentialsClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.CredentialsClient.Create.g.cs new file mode 100644 index 00000000..d8179039 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.CredentialsClient.Create.g.cs @@ -0,0 +1,664 @@ + +#nullable enable + +namespace Speechify +{ + public partial class CredentialsClient + { + + + private static readonly global::Speechify.EndPointSecurityRequirement s_CreateSecurityRequirement0 = + 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_CreateSecurityRequirements = + new global::Speechify.EndPointSecurityRequirement[] + { s_CreateSecurityRequirement0, + }; + partial void PrepareCreateArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? speechifyVersion, + global::Speechify.CreateCredentialRequest request); + partial void PrepareCreateRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? speechifyVersion, + global::Speechify.CreateCredentialRequest request); + partial void ProcessCreateResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create Credential
+ /// Create a credential in the caller's workspace vault. `config` must
+ /// carry exactly the one kind-specific block named by `kind` (e.g.
+ /// `kind=bearer` requires `config.bearer`). Names are unique per
+ /// workspace among active credentials. The response never carries the
+ /// secret back: it returns the masked config with `*_set` markers.
+ /// This is the first step of connecting an MCP server or a vendor's REST
+ /// API: reference the returned `id` as `auth.credential_id` on an `mcp`
+ /// or `openapi` tool (and on `import-openapi` when the vendor's document
+ /// sits behind the same auth). A credential with no `project_id` is
+ /// shared by every project; one scoped to a project can only back tools
+ /// in that project. See `CredentialKind` for what each kind backs. + ///
+ /// + /// + /// 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 CreateAsync( + + global::Speechify.CreateCredentialRequest request, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateAsResponseAsync( + + request: request, + speechifyVersion: speechifyVersion, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Credential
+ /// Create a credential in the caller's workspace vault. `config` must
+ /// carry exactly the one kind-specific block named by `kind` (e.g.
+ /// `kind=bearer` requires `config.bearer`). Names are unique per
+ /// workspace among active credentials. The response never carries the
+ /// secret back: it returns the masked config with `*_set` markers.
+ /// This is the first step of connecting an MCP server or a vendor's REST
+ /// API: reference the returned `id` as `auth.credential_id` on an `mcp`
+ /// or `openapi` tool (and on `import-openapi` when the vendor's document
+ /// sits behind the same auth). A credential with no `project_id` is
+ /// shared by every project; one scoped to a project can only back tools
+ /// in that project. See `CredentialKind` for what each kind backs. + ///
+ /// + /// + /// 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> CreateAsResponseAsync( + + global::Speechify.CreateCredentialRequest request, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateArguments( + httpClient: HttpClient, + speechifyVersion: ref speechifyVersion, + request: request); + + + var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateSecurityRequirements, + operationName: "CreateAsync"); + + 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/credentials", + baseUri: HttpClient.BaseAddress); + 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.Post, + 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()); + } + + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + speechifyVersion: speechifyVersion, + request: request); + + 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: "Create", + methodName: "CreateAsync", + pathTemplate: "\"/v1/credentials\"", + httpMethod: "POST", + 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: "Create", + methodName: "CreateAsync", + pathTemplate: "\"/v1/credentials\"", + httpMethod: "POST", + 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: "Create", + methodName: "CreateAsync", + pathTemplate: "\"/v1/credentials\"", + httpMethod: "POST", + 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); + ProcessCreateResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Create", + methodName: "CreateAsync", + pathTemplate: "\"/v1/credentials\"", + httpMethod: "POST", + 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: "Create", + methodName: "CreateAsync", + pathTemplate: "\"/v1/credentials\"", + httpMethod: "POST", + 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 request conflicts with the current resource state - e.g. duplicate, optimistic-concurrency mismatch, or last-owner guard. + if ((int)__response.StatusCode == 409) + { + string? __content_409 = null; + global::System.Exception? __exception_409 = null; + global::Speechify.Error? __value_409 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_409 = global::Speechify.Error.FromJson(__content_409, JsonSerializerContext); + } + else + { + __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_409 = global::Speechify.Error.FromJson(__content_409, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_409 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_409, + responseBody: __content_409, + responseObject: __value_409, + 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); + ProcessCreateResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Speechify.Credential.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.Credential.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(); + } + } + /// + /// Create Credential
+ /// Create a credential in the caller's workspace vault. `config` must
+ /// carry exactly the one kind-specific block named by `kind` (e.g.
+ /// `kind=bearer` requires `config.bearer`). Names are unique per
+ /// workspace among active credentials. The response never carries the
+ /// secret back: it returns the masked config with `*_set` markers.
+ /// This is the first step of connecting an MCP server or a vendor's REST
+ /// API: reference the returned `id` as `auth.credential_id` on an `mcp`
+ /// or `openapi` tool (and on `import-openapi` when the vendor's document
+ /// sits behind the same auth). A credential with no `project_id` is
+ /// shared by every project; one scoped to a project can only back tools
+ /// in that project. See `CredentialKind` for what each kind backs. + ///
+ /// + /// + /// Human-readable label, unique per workspace. + /// + /// + /// Optional project to scope this credential to (prefixed
+ /// `proj_...` id): a scoped credential is referenceable only from
+ /// tools in that project. Omit (or null) for workspace-shared -
+ /// usable from every project. An unknown id returns 404
+ /// project_not_found. A project-pinned API key creates into its
+ /// own project and cannot name the shared tier. + /// + /// + /// Discriminates the auth flow a credential carries. The matching
+ /// `config.<kind>` block is the one that must be populated, and the only
+ /// one.
+ /// - `oauth2_client_credentials`: a `client_id` and `client_secret` the
+ /// platform exchanges at the vendor's `token_url` for a short-lived
+ /// access token (the OAuth2 client-credentials flow). Backs an `mcp` or
+ /// `openapi` tool whose `auth.type` is `oauth2_client_credentials`.
+ /// - `bearer`: a static token sent as `Authorization: Bearer <token>`.
+ /// Backs an `mcp` or `openapi` tool whose `auth.type` is `bearer`, an
+ /// agent's custom LLM endpoint key, a custom model's key, and a
+ /// messaging channel's bot token.
+ /// - `shared_secret`: a secret that is never sent anywhere; an inbound
+ /// callback's signature is verified against it, such as a messaging
+ /// channel's signing secret.
+ /// - `oauth2_jwt`: a signing key for the JWT-bearer flow (RFC 7523).
+ /// - `basic`: a username and password.
+ /// - `custom_headers`: a set of header names and values.
+ /// The vault stores `oauth2_jwt`, `basic` and `custom_headers`, but no
+ /// tool auth type references them yet: an `mcp` or `openapi` tool
+ /// authenticates with `bearer` or `oauth2_client_credentials` only. + /// + /// + /// Kind-specific credential payload, used on WRITES only (create and
+ /// rotate). Exactly one block is populated — the one named by the
+ /// credential's `kind`. The secret fields are write-only: they are
+ /// accepted here but are NEVER returned on reads — a read returns the
+ /// masked `CredentialConfigView` instead. + /// + /// 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 CreateAsync( + string name, + global::Speechify.CredentialKind kind, + global::Speechify.CredentialConfig config, + string? speechifyVersion = default, + string? projectId = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Speechify.CreateCredentialRequest + { + Name = name, + ProjectId = projectId, + Kind = kind, + Config = config, + }; + + return await CreateAsync( + speechifyVersion: speechifyVersion, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.CredentialsClient.Delete.g.cs b/src/libs/Speechify/Generated/Speechify.CredentialsClient.Delete.g.cs new file mode 100644 index 00000000..e771fcd3 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.CredentialsClient.Delete.g.cs @@ -0,0 +1,554 @@ + +#nullable enable + +namespace Speechify +{ + public partial class CredentialsClient + { + + + private static readonly global::Speechify.EndPointSecurityRequirement s_DeleteSecurityRequirement0 = + 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_DeleteSecurityRequirements = + new global::Speechify.EndPointSecurityRequirement[] + { s_DeleteSecurityRequirement0, + }; + partial void PrepareDeleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string credentialId, + ref string? speechifyVersion); + partial void PrepareDeleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string credentialId, + string? speechifyVersion); + partial void ProcessDeleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Delete Credential
+ /// Soft-delete a credential. Refused with `409 credential_in_use` while
+ /// any tool, agent or channel still references it; the response `used_by`
+ /// lists exactly what to detach first. Once unreferenced, the row is
+ /// soft-deleted (a future GC job hard-deletes orphaned rows). + ///
+ /// + /// + /// 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 DeleteAsync( + string credentialId, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteAsResponseAsync( + credentialId: credentialId, + speechifyVersion: speechifyVersion, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete Credential
+ /// Soft-delete a credential. Refused with `409 credential_in_use` while
+ /// any tool, agent or channel still references it; the response `used_by`
+ /// lists exactly what to detach first. Once unreferenced, the row is
+ /// soft-deleted (a future GC job hard-deletes orphaned rows). + ///
+ /// + /// + /// 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> DeleteAsResponseAsync( + string credentialId, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDeleteArguments( + httpClient: HttpClient, + credentialId: ref credentialId, + speechifyVersion: ref speechifyVersion); + + + var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_DeleteSecurityRequirements, + operationName: "DeleteAsync"); + + 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/credentials/{credentialId}", + baseUri: HttpClient.BaseAddress); + 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.Delete, + 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); + PrepareDeleteRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + credentialId: credentialId!, + 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: "Delete", + methodName: "DeleteAsync", + pathTemplate: "$\"/v1/credentials/{credentialId}\"", + httpMethod: "DELETE", + 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: "Delete", + methodName: "DeleteAsync", + pathTemplate: "$\"/v1/credentials/{credentialId}\"", + httpMethod: "DELETE", + 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: "Delete", + methodName: "DeleteAsync", + pathTemplate: "$\"/v1/credentials/{credentialId}\"", + httpMethod: "DELETE", + 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); + ProcessDeleteResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Delete", + methodName: "DeleteAsync", + pathTemplate: "$\"/v1/credentials/{credentialId}\"", + httpMethod: "DELETE", + 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: "Delete", + methodName: "DeleteAsync", + pathTemplate: "$\"/v1/credentials/{credentialId}\"", + httpMethod: "DELETE", + 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); + } + // 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 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)); + } + // The credential is still referenced by one or more tools or agents. `used_by` names them so the caller can detach first. + if ((int)__response.StatusCode == 409) + { + string? __content_409 = null; + global::System.Exception? __exception_409 = null; + global::Speechify.CredentialInUseError? __value_409 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_409 = global::Speechify.CredentialInUseError.FromJson(__content_409, JsonSerializerContext); + } + else + { + __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_409 = global::Speechify.CredentialInUseError.FromJson(__content_409, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_409 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_409, + responseBody: __content_409, + responseObject: __value_409, + 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); + ProcessDeleteResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return new global::Speechify.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); + } + 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(); + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return new global::Speechify.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); + } + 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.CredentialsClient.Get.g.cs b/src/libs/Speechify/Generated/Speechify.CredentialsClient.Get.g.cs new file mode 100644 index 00000000..5dca7cb3 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.CredentialsClient.Get.g.cs @@ -0,0 +1,523 @@ + +#nullable enable + +namespace Speechify +{ + public partial class CredentialsClient + { + + + private static readonly global::Speechify.EndPointSecurityRequirement s_GetSecurityRequirement0 = + 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_GetSecurityRequirements = + new global::Speechify.EndPointSecurityRequirement[] + { s_GetSecurityRequirement0, + }; + partial void PrepareGetArguments( + global::System.Net.Http.HttpClient httpClient, + ref string credentialId, + ref string? speechifyVersion); + partial void PrepareGetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string credentialId, + string? speechifyVersion); + partial void ProcessGetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get Credential
+ /// Fetch one credential by id, scoped to the caller's workspace.
+ /// `config` is the masked `CredentialConfigView` — secret values are
+ /// never returned. Returns 404 for missing, soft-deleted, or
+ /// foreign-workspace credentials — credential existence is never
+ /// leaked across workspaces. + ///
+ /// + /// + /// 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 GetAsync( + string credentialId, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAsResponseAsync( + credentialId: credentialId, + speechifyVersion: speechifyVersion, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Credential
+ /// Fetch one credential by id, scoped to the caller's workspace.
+ /// `config` is the masked `CredentialConfigView` — secret values are
+ /// never returned. Returns 404 for missing, soft-deleted, or
+ /// foreign-workspace credentials — credential existence is never
+ /// leaked across workspaces. + ///
+ /// + /// + /// 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> GetAsResponseAsync( + string credentialId, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetArguments( + httpClient: HttpClient, + credentialId: ref credentialId, + speechifyVersion: ref speechifyVersion); + + + var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetSecurityRequirements, + operationName: "GetAsync"); + + 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/credentials/{credentialId}", + baseUri: HttpClient.BaseAddress); + 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); + PrepareGetRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + credentialId: credentialId!, + 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: "Get", + methodName: "GetAsync", + pathTemplate: "$\"/v1/credentials/{credentialId}\"", + 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: "Get", + methodName: "GetAsync", + pathTemplate: "$\"/v1/credentials/{credentialId}\"", + 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: "Get", + methodName: "GetAsync", + pathTemplate: "$\"/v1/credentials/{credentialId}\"", + 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); + ProcessGetResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Get", + methodName: "GetAsync", + pathTemplate: "$\"/v1/credentials/{credentialId}\"", + 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: "Get", + methodName: "GetAsync", + pathTemplate: "$\"/v1/credentials/{credentialId}\"", + 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); + } + // 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 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)); + } + + 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); + ProcessGetResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Speechify.Credential.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.Credential.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.CredentialsClient.List.g.cs b/src/libs/Speechify/Generated/Speechify.CredentialsClient.List.g.cs new file mode 100644 index 00000000..cfe20396 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.CredentialsClient.List.g.cs @@ -0,0 +1,589 @@ + +#nullable enable + +namespace Speechify +{ + public partial class CredentialsClient + { + + + private static readonly global::Speechify.EndPointSecurityRequirement s_ListSecurityRequirement0 = + 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_ListSecurityRequirements = + new global::Speechify.EndPointSecurityRequirement[] + { s_ListSecurityRequirement0, + }; + partial void PrepareListArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? cursor, + ref int? limit, + ref string? projectId, + ref string? speechifyVersion); + partial void PrepareListRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? cursor, + int? limit, + string? projectId, + string? speechifyVersion); + partial void ProcessListResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List Credentials
+ /// List every active credential in the caller's workspace, newest
+ /// first. The vault is write-only: each `config` is the masked
+ /// `CredentialConfigView` (non-secret fields plus `*_set` markers) —
+ /// secret values are never returned. Soft-deleted credentials are
+ /// omitted. Cursor-paginated: omit `cursor` for the first page; walk
+ /// pages while `has_more` is true (default page size 50, max 200). + ///
+ /// + /// + /// 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 ListAsync( + string? cursor = default, + int? limit = default, + string? projectId = default, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListAsResponseAsync( + cursor: cursor, + limit: limit, + projectId: projectId, + speechifyVersion: speechifyVersion, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Credentials
+ /// List every active credential in the caller's workspace, newest
+ /// first. The vault is write-only: each `config` is the masked
+ /// `CredentialConfigView` (non-secret fields plus `*_set` markers) —
+ /// secret values are never returned. Soft-deleted credentials are
+ /// omitted. Cursor-paginated: omit `cursor` for the first page; walk
+ /// pages while `has_more` is true (default page size 50, max 200). + ///
+ /// + /// + /// 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> ListAsResponseAsync( + string? cursor = default, + int? limit = default, + string? projectId = default, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListArguments( + httpClient: HttpClient, + cursor: ref cursor, + limit: ref limit, + projectId: ref projectId, + speechifyVersion: ref speechifyVersion); + + + var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListSecurityRequirements, + operationName: "ListAsync"); + + 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/credentials", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("cursor", cursor) + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("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); + PrepareListRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + cursor: cursor, + limit: limit, + 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: "List", + methodName: "ListAsync", + pathTemplate: "\"/v1/credentials\"", + 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: "List", + methodName: "ListAsync", + pathTemplate: "\"/v1/credentials\"", + 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: "List", + methodName: "ListAsync", + pathTemplate: "\"/v1/credentials\"", + 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); + ProcessListResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "List", + methodName: "ListAsync", + pathTemplate: "\"/v1/credentials\"", + 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: "List", + methodName: "ListAsync", + pathTemplate: "\"/v1/credentials\"", + 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 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)); + } + + 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); + ProcessListResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Speechify.ListCredentialsResponse.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.ListCredentialsResponse.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.CredentialsClient.Update.g.cs b/src/libs/Speechify/Generated/Speechify.CredentialsClient.Update.g.cs new file mode 100644 index 00000000..b0732b5d --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.CredentialsClient.Update.g.cs @@ -0,0 +1,672 @@ + +#nullable enable + +namespace Speechify +{ + public partial class CredentialsClient + { + + + private static readonly global::Speechify.EndPointSecurityRequirement s_UpdateSecurityRequirement0 = + 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_UpdateSecurityRequirements = + new global::Speechify.EndPointSecurityRequirement[] + { s_UpdateSecurityRequirement0, + }; + partial void PrepareUpdateArguments( + global::System.Net.Http.HttpClient httpClient, + ref string credentialId, + ref string? speechifyVersion, + global::Speechify.UpdateCredentialRequest request); + partial void PrepareUpdateRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string credentialId, + string? speechifyVersion, + global::Speechify.UpdateCredentialRequest request); + partial void ProcessUpdateResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUpdateResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Update Credential
+ /// Rotate a credential's secret and/or rename it, in place, keeping the
+ /// same id so every referencing config picks up the change with no
+ /// re-wiring. Because the vault is write-only, rotation is the only way
+ /// to change a stored secret. The kind is immutable: a rotated `config`
+ /// must populate the same block as the credential's existing kind. + ///
+ /// + /// + /// + /// 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 UpdateAsync( + string credentialId, + + global::Speechify.UpdateCredentialRequest request, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateAsResponseAsync( + credentialId: credentialId, + + request: request, + speechifyVersion: speechifyVersion, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Credential
+ /// Rotate a credential's secret and/or rename it, in place, keeping the
+ /// same id so every referencing config picks up the change with no
+ /// re-wiring. Because the vault is write-only, rotation is the only way
+ /// to change a stored secret. The kind is immutable: a rotated `config`
+ /// must populate the same block as the credential's existing kind. + ///
+ /// + /// + /// + /// 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> UpdateAsResponseAsync( + string credentialId, + + global::Speechify.UpdateCredentialRequest request, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareUpdateArguments( + httpClient: HttpClient, + credentialId: ref credentialId, + speechifyVersion: ref speechifyVersion, + request: request); + + + var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UpdateSecurityRequirements, + operationName: "UpdateAsync"); + + 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/credentials/{credentialId}", + baseUri: HttpClient.BaseAddress); + 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: new global::System.Net.Http.HttpMethod("PATCH"), + 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()); + } + + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUpdateRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + credentialId: credentialId!, + speechifyVersion: speechifyVersion, + request: request); + + 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: "Update", + methodName: "UpdateAsync", + pathTemplate: "$\"/v1/credentials/{credentialId}\"", + httpMethod: "PATCH", + 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: "Update", + methodName: "UpdateAsync", + pathTemplate: "$\"/v1/credentials/{credentialId}\"", + httpMethod: "PATCH", + 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: "Update", + methodName: "UpdateAsync", + pathTemplate: "$\"/v1/credentials/{credentialId}\"", + httpMethod: "PATCH", + 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); + ProcessUpdateResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Update", + methodName: "UpdateAsync", + pathTemplate: "$\"/v1/credentials/{credentialId}\"", + httpMethod: "PATCH", + 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: "Update", + methodName: "UpdateAsync", + pathTemplate: "$\"/v1/credentials/{credentialId}\"", + httpMethod: "PATCH", + 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 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)); + } + // The request conflicts with the current resource state - e.g. duplicate, optimistic-concurrency mismatch, or last-owner guard. + if ((int)__response.StatusCode == 409) + { + string? __content_409 = null; + global::System.Exception? __exception_409 = null; + global::Speechify.Error? __value_409 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_409 = global::Speechify.Error.FromJson(__content_409, JsonSerializerContext); + } + else + { + __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_409 = global::Speechify.Error.FromJson(__content_409, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_409 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_409, + responseBody: __content_409, + responseObject: __value_409, + 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); + ProcessUpdateResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Speechify.Credential.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.Credential.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(); + } + } + /// + /// Update Credential
+ /// Rotate a credential's secret and/or rename it, in place, keeping the
+ /// same id so every referencing config picks up the change with no
+ /// re-wiring. Because the vault is write-only, rotation is the only way
+ /// to change a stored secret. The kind is immutable: a rotated `config`
+ /// must populate the same block as the credential's existing kind. + ///
+ /// + /// + /// + /// New human-readable label, unique per workspace. + /// + /// + /// Move the credential between scopes: a `proj_...` id scopes it to
+ /// that project, an explicit null makes it workspace-shared,
+ /// omitted leaves it unchanged. Scoping to a project is refused
+ /// with `409 cross_project_reference` while tools or agents outside
+ /// that project still reference the credential (the response lists
+ /// them); making it shared always succeeds. A project-pinned API
+ /// key may only scope a credential to its own project. + /// + /// + /// Kind-specific credential payload, used on WRITES only (create and
+ /// rotate). Exactly one block is populated — the one named by the
+ /// credential's `kind`. The secret fields are write-only: they are
+ /// accepted here but are NEVER returned on reads — a read returns the
+ /// masked `CredentialConfigView` instead. + /// + /// 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 UpdateAsync( + string credentialId, + string? speechifyVersion = default, + string? name = default, + string? projectId = default, + global::Speechify.CredentialConfig? config = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Speechify.UpdateCredentialRequest + { + Name = name, + ProjectId = projectId, + Config = config, + }; + + return await UpdateAsync( + credentialId: credentialId, + speechifyVersion: speechifyVersion, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.CredentialsClient.g.cs b/src/libs/Speechify/Generated/Speechify.CredentialsClient.g.cs new file mode 100644 index 00000000..4a40487d --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.CredentialsClient.g.cs @@ -0,0 +1,147 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class CredentialsClient : global::Speechify.ICredentialsClient, global::System.IDisposable + { + /// + /// https://api.speechify.ai + /// + public const string DefaultBaseUrl = "https://api.speechify.ai/"; + + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + public bool ReadResponseAsString { get; set; } +#if DEBUG + = true; +#endif + + /// + public global::Speechify.AutoSDKClientOptions Options { get; } + + + /// + public global::System.Func CreateIdempotencyKey { get; set; } = () => global::System.Guid.NewGuid().ToString("D"); + + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::Speechify.CredentialsSourceGenerationContext.Default); + + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext + { + get => JsonSerializerContextProvider.Value; + set => JsonSerializerContextProvider = new(() => value); + } + + + /// + /// Creates a new instance of the CredentialsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. + public CredentialsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) : this( + httpClient, + baseUri, + authorizations, + options: null, + disposeHttpClient: disposeHttpClient) + { + } + + /// + /// Creates a new instance of the CredentialsClient with explicit options but no base URL override. + /// Skips passing baseUri so the default base URL from the OpenAPI spec applies. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public CredentialsClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Collections.Generic.List? authorizations, + global::Speechify.AutoSDKClientOptions? options, + bool disposeHttpClient = true) : this( + httpClient, + baseUri: null, + authorizations, + options, + disposeHttpClient: disposeHttpClient) + { + } + + /// + /// Creates a new instance of the CredentialsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public CredentialsClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Speechify.AutoSDKClientOptions? options, + bool disposeHttpClient = true) + { + + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + Options = options ?? new global::Speechify.AutoSDKClientOptions(); + _disposeHttpClient = disposeHttpClient; + + Initialized(HttpClient); + } + + /// + public void Dispose() + { + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.HostedApisClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.HostedApisClient.Create.g.cs index 3089ac4d..a4314fcd 100644 --- a/src/libs/Speechify/Generated/Speechify.HostedApisClient.Create.g.cs +++ b/src/libs/Speechify/Generated/Speechify.HostedApisClient.Create.g.cs @@ -55,6 +55,13 @@ partial void ProcessCreateResponseContent( /// (anyone, reads only). A workspace can refuse `public` as policy (403
/// `hosted_api_public_refused`). Reads, runs and writes are each bounded
/// per UTC day (`daily_read_cap`, `daily_run_cap`, `daily_write_cap`).
+ /// `mcp_enabled: true` also serves the API's routes as an MCP server at
+ /// `POST <base_url>/mcp`, so an MCP client (Claude Code, Cursor) attaches
+ /// to one address and gets them as tools, under the same audience, keys
+ /// and caps. It is refused with `auth_mode: public`. On that face the
+ /// API's `name` is the server's title and its `description` is the
+ /// instructions the client's model reads, so describe what the tools are
+ /// for.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). /// /// @@ -94,6 +101,13 @@ partial void ProcessCreateResponseContent( /// (anyone, reads only). A workspace can refuse `public` as policy (403
/// `hosted_api_public_refused`). Reads, runs and writes are each bounded
/// per UTC day (`daily_read_cap`, `daily_run_cap`, `daily_write_cap`).
+ /// `mcp_enabled: true` also serves the API's routes as an MCP server at
+ /// `POST <base_url>/mcp`, so an MCP client (Claude Code, Cursor) attaches
+ /// to one address and gets them as tools, under the same audience, keys
+ /// and caps. It is refused with `auth_mode: public`. On that face the
+ /// API's `name` is the server's title and its `description` is the
+ /// instructions the client's model reads, so describe what the tools are
+ /// for.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). /// /// @@ -676,6 +690,13 @@ partial void ProcessCreateResponseContent( /// (anyone, reads only). A workspace can refuse `public` as policy (403
/// `hosted_api_public_refused`). Reads, runs and writes are each bounded
/// per UTC day (`daily_read_cap`, `daily_run_cap`, `daily_write_cap`).
+ /// `mcp_enabled: true` also serves the API's routes as an MCP server at
+ /// `POST <base_url>/mcp`, so an MCP client (Claude Code, Cursor) attaches
+ /// to one address and gets them as tools, under the same audience, keys
+ /// and caps. It is refused with `auth_mode: public`. On that face the
+ /// API's `name` is the server's title and its `description` is the
+ /// instructions the client's model reads, so describe what the tools are
+ /// for.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). /// /// @@ -686,7 +707,9 @@ partial void ProcessCreateResponseContent( /// 3-40 lowercase letters, digits or hyphens; a DNS label, unique on the shared domain; immutable. /// /// - /// + /// + /// What the API is for; also the instructions an MCP client hands its model when `mcp_enabled` is on. + /// /// /// consumer_key when omitted. `public` is refused with 403 `hosted_api_public_refused` where the workspace's policy does not allow internet-facing APIs. /// @@ -695,11 +718,16 @@ partial void ProcessCreateResponseContent( /// Runs the API may start per UTC day through its run routes; 1000 when omitted. /// /// - /// Reads the API may serve from storage per UTC day; 100000 when omitted. + /// Reads the API's store, file, run_latest and tool routes may serve per UTC day; 100000 when omitted. /// /// /// Documents the API's write routes may land per UTC day; 10000 when omitted. /// + /// + /// Serve the routes as an MCP server at `POST <base_url>/mcp` too;
+ /// false when omitted. Refused with `auth_mode: public` (400
+ /// `validation_failed` naming `mcp_enabled`). + /// /// /// /// Register the key set end-user tokens are verified against (an `https` URL on a public host). @@ -718,6 +746,7 @@ partial void ProcessCreateResponseContent( int? dailyRunCap = default, int? dailyReadCap = default, int? dailyWriteCap = default, + bool? mcpEnabled = default, string? projectId = default, string? userTokenJwksUrl = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, @@ -733,6 +762,7 @@ partial void ProcessCreateResponseContent( DailyRunCap = dailyRunCap, DailyReadCap = dailyReadCap, DailyWriteCap = dailyWriteCap, + McpEnabled = mcpEnabled, ProjectId = projectId, UserTokenJwksUrl = userTokenJwksUrl, }; diff --git a/src/libs/Speechify/Generated/Speechify.HostedApisClient.GetOpenApi.g.cs b/src/libs/Speechify/Generated/Speechify.HostedApisClient.GetOpenApi.g.cs index d2b8f7b0..4288a7d2 100644 --- a/src/libs/Speechify/Generated/Speechify.HostedApisClient.GetOpenApi.g.cs +++ b/src/libs/Speechify/Generated/Speechify.HostedApisClient.GetOpenApi.g.cs @@ -46,7 +46,12 @@ partial void ProcessGetOpenApiResponseContent( /// /// Get Hosted API OpenAPI Document
/// The OpenAPI 3.1 document describing the hosted API's routes - the same
- /// document the API serves to its consumers at `/openapi.json`.
+ /// document the API serves to its consumers at `/openapi.json`. A `tool`
+ /// route's request body is the operation's own argument schema. When
+ /// `mcp_enabled` is on, the document carries an `x-speechify-mcp` object
+ /// (`url`, `transport: streamable-http`, `description`) naming where an
+ /// MCP client attaches; the face speaks JSON-RPC, so it is an extension
+ /// rather than a path.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). ///
/// @@ -72,7 +77,12 @@ partial void ProcessGetOpenApiResponseContent( /// /// Get Hosted API OpenAPI Document
/// The OpenAPI 3.1 document describing the hosted API's routes - the same
- /// document the API serves to its consumers at `/openapi.json`.
+ /// document the API serves to its consumers at `/openapi.json`. A `tool`
+ /// route's request body is the operation's own argument schema. When
+ /// `mcp_enabled` is on, the document carries an `x-speechify-mcp` object
+ /// (`url`, `transport: streamable-http`, `description`) naming where an
+ /// MCP client attaches; the face speaks JSON-RPC, so it is an extension
+ /// rather than a path.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). ///
/// diff --git a/src/libs/Speechify/Generated/Speechify.HostedApisClient.Update.g.cs b/src/libs/Speechify/Generated/Speechify.HostedApisClient.Update.g.cs index 29af3be7..0ac78e27 100644 --- a/src/libs/Speechify/Generated/Speechify.HostedApisClient.Update.g.cs +++ b/src/libs/Speechify/Generated/Speechify.HostedApisClient.Update.g.cs @@ -54,7 +54,10 @@ partial void ProcessUpdateResponseContent( /// internet-facing APIs (403 `hosted_api_public_refused`). Switching to a
/// mode that names no caller (`consumer_key`, `public`) is refused while
/// a route binds `{{user.*}}`: only `user_token`, `workspace` and `owner`
- /// supply a person.
+ /// supply a person. Switching to `public` is also refused while a `tool`
+ /// route exists (a vendor call spends the workspace's vendor budget) and
+ /// while `mcp_enabled` is on, and switching the MCP face on is refused on
+ /// a `public` API (400 `validation_failed` naming `mcp_enabled`).
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). /// /// @@ -91,7 +94,10 @@ partial void ProcessUpdateResponseContent( /// internet-facing APIs (403 `hosted_api_public_refused`). Switching to a
/// mode that names no caller (`consumer_key`, `public`) is refused while
/// a route binds `{{user.*}}`: only `user_token`, `workspace` and `owner`
- /// supply a person.
+ /// supply a person. Switching to `public` is also refused while a `tool`
+ /// route exists (a vendor call spends the workspace's vendor budget) and
+ /// while `mcp_enabled` is on, and switching the MCP face on is refused on
+ /// a `public` API (400 `validation_failed` naming `mcp_enabled`).
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). /// /// @@ -630,13 +636,18 @@ partial void ProcessUpdateResponseContent( /// internet-facing APIs (403 `hosted_api_public_refused`). Switching to a
/// mode that names no caller (`consumer_key`, `public`) is refused while
/// a route binds `{{user.*}}`: only `user_token`, `workspace` and `owner`
- /// supply a person.
+ /// supply a person. Switching to `public` is also refused while a `tool`
+ /// route exists (a vendor call spends the workspace's vendor budget) and
+ /// while `mcp_enabled` is on, and switching the MCP face on is refused on
+ /// a `public` API (400 `validation_failed` naming `mcp_enabled`).
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). /// /// /// /// - /// + /// + /// What the API is for; also the instructions an MCP client hands its model when `mcp_enabled` is on. + /// /// /// /// @@ -645,6 +656,12 @@ partial void ProcessUpdateResponseContent( /// /// /// + /// + /// Switch the MCP face at `POST <base_url>/mcp` on or off. Refused with
+ /// 400 `validation_failed` naming `mcp_enabled` when the API is, or is
+ /// being made, `public`. Allow up to 15 seconds for the switch, like
+ /// any route change, to reach every server. + /// /// /// Replace the registered key set; an empty string removes it, after which the signing secret verifies tokens again. /// @@ -662,6 +679,7 @@ partial void ProcessUpdateResponseContent( int? dailyRunCap = default, int? dailyReadCap = default, int? dailyWriteCap = default, + bool? mcpEnabled = default, string? userTokenJwksUrl = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -676,6 +694,7 @@ partial void ProcessUpdateResponseContent( DailyRunCap = dailyRunCap, DailyReadCap = dailyReadCap, DailyWriteCap = dailyWriteCap, + McpEnabled = mcpEnabled, UserTokenJwksUrl = userTokenJwksUrl, }; diff --git a/src/libs/Speechify/Generated/Speechify.IAgentClient.AttachTool.g.cs b/src/libs/Speechify/Generated/Speechify.IAgentClient.AttachTool.g.cs index 74abb088..7ee274c1 100644 --- a/src/libs/Speechify/Generated/Speechify.IAgentClient.AttachTool.g.cs +++ b/src/libs/Speechify/Generated/Speechify.IAgentClient.AttachTool.g.cs @@ -6,9 +6,9 @@ public partial interface IAgentClient { /// /// Attach Tool
- /// Attach an existing workspace tool definition (webhook / client /
- /// MCP) to the agent by its definition id. Idempotent. To create and
- /// attach in one step, POST to `/v1/agents/{agent_id}/tools` instead. + /// Attach an existing workspace tool definition (webhook, client,
+ /// MCP or OpenAPI) to the agent by its definition id. Idempotent. To
+ /// create and attach in one step, POST to `/v1/agents/{agent_id}/tools` instead. ///
/// /// @@ -24,9 +24,9 @@ public partial interface IAgentClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Attach Tool
- /// Attach an existing workspace tool definition (webhook / client /
- /// MCP) to the agent by its definition id. Idempotent. To create and
- /// attach in one step, POST to `/v1/agents/{agent_id}/tools` instead. + /// Attach an existing workspace tool definition (webhook, client,
+ /// MCP or OpenAPI) to the agent by its definition id. Idempotent. To
+ /// create and attach in one step, POST to `/v1/agents/{agent_id}/tools` instead. ///
/// /// diff --git a/src/libs/Speechify/Generated/Speechify.IAgentClient.CreateTool.g.cs b/src/libs/Speechify/Generated/Speechify.IAgentClient.CreateTool.g.cs index fd4b2500..c38564ab 100644 --- a/src/libs/Speechify/Generated/Speechify.IAgentClient.CreateTool.g.cs +++ b/src/libs/Speechify/Generated/Speechify.IAgentClient.CreateTool.g.cs @@ -9,12 +9,12 @@ public partial interface IAgentClient /// Add a tool to the agent. With `kind=builtin` this creates a
/// per-agent built-in instance (e.g. `end_call`, `play_audio`); the
/// `builtin` capability name comes from `config.builtin`. With
- /// `kind=webhook`, `client`, or `mcp` this atomically creates a
+ /// `kind=webhook`, `client`, `mcp` or `openapi` this atomically creates a
/// workspace tool definition AND attaches it to the agent in one
/// call. To attach a definition that already exists, use
/// `PUT /v1/agents/{agent_id}/tools/{tool_id}` instead.
- /// Names are refused two ways: a `webhook` / `client` / `mcp` definition
- /// is unique per **project**, a `builtin` is unique per **agent**, and an
+ /// Names are refused two ways: a `webhook` / `client` / `mcp` /
+ /// `openapi` definition is unique per **project**, a `builtin` is unique per **agent**, and an
/// agent may not carry both under one name. Either refusal is `409
/// tool_name_taken` with `error.details.held_by` naming the holder, which
/// for a definition is not necessarily attached to this agent.
@@ -43,12 +43,12 @@ public partial interface IAgentClient /// Add a tool to the agent. With `kind=builtin` this creates a
/// per-agent built-in instance (e.g. `end_call`, `play_audio`); the
/// `builtin` capability name comes from `config.builtin`. With
- /// `kind=webhook`, `client`, or `mcp` this atomically creates a
+ /// `kind=webhook`, `client`, `mcp` or `openapi` this atomically creates a
/// workspace tool definition AND attaches it to the agent in one
/// call. To attach a definition that already exists, use
/// `PUT /v1/agents/{agent_id}/tools/{tool_id}` instead.
- /// Names are refused two ways: a `webhook` / `client` / `mcp` definition
- /// is unique per **project**, a `builtin` is unique per **agent**, and an
+ /// Names are refused two ways: a `webhook` / `client` / `mcp` /
+ /// `openapi` definition is unique per **project**, a `builtin` is unique per **agent**, and an
/// agent may not carry both under one name. Either refusal is `409
/// tool_name_taken` with `error.details.held_by` naming the holder, which
/// for a definition is not necessarily attached to this agent.
@@ -77,12 +77,12 @@ public partial interface IAgentClient /// Add a tool to the agent. With `kind=builtin` this creates a
/// per-agent built-in instance (e.g. `end_call`, `play_audio`); the
/// `builtin` capability name comes from `config.builtin`. With
- /// `kind=webhook`, `client`, or `mcp` this atomically creates a
+ /// `kind=webhook`, `client`, `mcp` or `openapi` this atomically creates a
/// workspace tool definition AND attaches it to the agent in one
/// call. To attach a definition that already exists, use
/// `PUT /v1/agents/{agent_id}/tools/{tool_id}` instead.
- /// Names are refused two ways: a `webhook` / `client` / `mcp` definition
- /// is unique per **project**, a `builtin` is unique per **agent**, and an
+ /// Names are refused two ways: a `webhook` / `client` / `mcp` /
+ /// `openapi` definition is unique per **project**, a `builtin` is unique per **agent**, and an
/// agent may not carry both under one name. Either refusal is `409
/// tool_name_taken` with `error.details.held_by` naming the holder, which
/// for a definition is not necessarily attached to this agent.
@@ -100,7 +100,8 @@ public partial interface IAgentClient /// - `builtin`: a worker-resident platform capability (e.g. end_call, play_audio), configured per-agent
/// - `webhook`: worker signs a payload and POSTs it to your URL
/// - `client`: worker dispatches to the caller's browser/SDK via data channel
- /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls + /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls
+ /// - `openapi`: a REST API described by its OpenAPI document, pinned to the operations you selected; the control plane executes every call /// /// /// @@ -109,7 +110,7 @@ public partial interface IAgentClient /// /// /// - /// The impact class for a shared kind (`webhook`/`client`/`mcp`),
+ /// The impact class for a shared kind (`webhook`/`client`/`mcp`/`openapi`),
/// whose definition is created here. Omitted, the server stamps the
/// verb default. Ignored for a built-in, whose class the platform fixes. /// diff --git a/src/libs/Speechify/Generated/Speechify.IAgentClient.ListTools.g.cs b/src/libs/Speechify/Generated/Speechify.IAgentClient.ListTools.g.cs index 3e1102af..bd37ceb6 100644 --- a/src/libs/Speechify/Generated/Speechify.IAgentClient.ListTools.g.cs +++ b/src/libs/Speechify/Generated/Speechify.IAgentClient.ListTools.g.cs @@ -7,7 +7,7 @@ public partial interface IAgentClient /// /// List Agent Tools
/// List everything this agent can do: built-in capabilities and
- /// attached external tool definitions (webhook / client / MCP) in
+ /// attached tool definitions (webhook, client, MCP and OpenAPI) in
/// one mixed-kind list. Each item carries its resolved config inline.
/// Cursor-paginated: omit `cursor` for the first page; walk pages while
/// `has_more` is true (default page size 50, max 200). @@ -31,7 +31,7 @@ public partial interface IAgentClient /// /// List Agent Tools
/// List everything this agent can do: built-in capabilities and
- /// attached external tool definitions (webhook / client / MCP) in
+ /// attached tool definitions (webhook, client, MCP and OpenAPI) in
/// one mixed-kind list. Each item carries its resolved config inline.
/// Cursor-paginated: omit `cursor` for the first page; walk pages while
/// `has_more` is true (default page size 50, max 200). diff --git a/src/libs/Speechify/Generated/Speechify.ICredentialsClient.Authorizations.Bearer.g.cs b/src/libs/Speechify/Generated/Speechify.ICredentialsClient.Authorizations.Bearer.g.cs new file mode 100644 index 00000000..09709e49 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ICredentialsClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace Speechify +{ + public partial interface ICredentialsClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ICredentialsClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.ICredentialsClient.Create.g.cs new file mode 100644 index 00000000..4c4e7991 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ICredentialsClient.Create.g.cs @@ -0,0 +1,124 @@ +#nullable enable + +namespace Speechify +{ + public partial interface ICredentialsClient + { + /// + /// Create Credential
+ /// Create a credential in the caller's workspace vault. `config` must
+ /// carry exactly the one kind-specific block named by `kind` (e.g.
+ /// `kind=bearer` requires `config.bearer`). Names are unique per
+ /// workspace among active credentials. The response never carries the
+ /// secret back: it returns the masked config with `*_set` markers.
+ /// This is the first step of connecting an MCP server or a vendor's REST
+ /// API: reference the returned `id` as `auth.credential_id` on an `mcp`
+ /// or `openapi` tool (and on `import-openapi` when the vendor's document
+ /// sits behind the same auth). A credential with no `project_id` is
+ /// shared by every project; one scoped to a project can only back tools
+ /// in that project. See `CredentialKind` for what each kind backs. + ///
+ /// + /// + /// 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 CreateAsync( + + global::Speechify.CreateCredentialRequest request, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Credential
+ /// Create a credential in the caller's workspace vault. `config` must
+ /// carry exactly the one kind-specific block named by `kind` (e.g.
+ /// `kind=bearer` requires `config.bearer`). Names are unique per
+ /// workspace among active credentials. The response never carries the
+ /// secret back: it returns the masked config with `*_set` markers.
+ /// This is the first step of connecting an MCP server or a vendor's REST
+ /// API: reference the returned `id` as `auth.credential_id` on an `mcp`
+ /// or `openapi` tool (and on `import-openapi` when the vendor's document
+ /// sits behind the same auth). A credential with no `project_id` is
+ /// shared by every project; one scoped to a project can only back tools
+ /// in that project. See `CredentialKind` for what each kind backs. + ///
+ /// + /// + /// 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> CreateAsResponseAsync( + + global::Speechify.CreateCredentialRequest request, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Credential
+ /// Create a credential in the caller's workspace vault. `config` must
+ /// carry exactly the one kind-specific block named by `kind` (e.g.
+ /// `kind=bearer` requires `config.bearer`). Names are unique per
+ /// workspace among active credentials. The response never carries the
+ /// secret back: it returns the masked config with `*_set` markers.
+ /// This is the first step of connecting an MCP server or a vendor's REST
+ /// API: reference the returned `id` as `auth.credential_id` on an `mcp`
+ /// or `openapi` tool (and on `import-openapi` when the vendor's document
+ /// sits behind the same auth). A credential with no `project_id` is
+ /// shared by every project; one scoped to a project can only back tools
+ /// in that project. See `CredentialKind` for what each kind backs. + ///
+ /// + /// + /// Human-readable label, unique per workspace. + /// + /// + /// Optional project to scope this credential to (prefixed
+ /// `proj_...` id): a scoped credential is referenceable only from
+ /// tools in that project. Omit (or null) for workspace-shared -
+ /// usable from every project. An unknown id returns 404
+ /// project_not_found. A project-pinned API key creates into its
+ /// own project and cannot name the shared tier. + /// + /// + /// Discriminates the auth flow a credential carries. The matching
+ /// `config.<kind>` block is the one that must be populated, and the only
+ /// one.
+ /// - `oauth2_client_credentials`: a `client_id` and `client_secret` the
+ /// platform exchanges at the vendor's `token_url` for a short-lived
+ /// access token (the OAuth2 client-credentials flow). Backs an `mcp` or
+ /// `openapi` tool whose `auth.type` is `oauth2_client_credentials`.
+ /// - `bearer`: a static token sent as `Authorization: Bearer <token>`.
+ /// Backs an `mcp` or `openapi` tool whose `auth.type` is `bearer`, an
+ /// agent's custom LLM endpoint key, a custom model's key, and a
+ /// messaging channel's bot token.
+ /// - `shared_secret`: a secret that is never sent anywhere; an inbound
+ /// callback's signature is verified against it, such as a messaging
+ /// channel's signing secret.
+ /// - `oauth2_jwt`: a signing key for the JWT-bearer flow (RFC 7523).
+ /// - `basic`: a username and password.
+ /// - `custom_headers`: a set of header names and values.
+ /// The vault stores `oauth2_jwt`, `basic` and `custom_headers`, but no
+ /// tool auth type references them yet: an `mcp` or `openapi` tool
+ /// authenticates with `bearer` or `oauth2_client_credentials` only. + /// + /// + /// Kind-specific credential payload, used on WRITES only (create and
+ /// rotate). Exactly one block is populated — the one named by the
+ /// credential's `kind`. The secret fields are write-only: they are
+ /// accepted here but are NEVER returned on reads — a read returns the
+ /// masked `CredentialConfigView` instead. + /// + /// 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 CreateAsync( + string name, + global::Speechify.CredentialKind kind, + global::Speechify.CredentialConfig config, + string? speechifyVersion = default, + string? projectId = 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.ICredentialsClient.Delete.g.cs b/src/libs/Speechify/Generated/Speechify.ICredentialsClient.Delete.g.cs new file mode 100644 index 00000000..dd78af5e --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ICredentialsClient.Delete.g.cs @@ -0,0 +1,42 @@ +#nullable enable + +namespace Speechify +{ + public partial interface ICredentialsClient + { + /// + /// Delete Credential
+ /// Soft-delete a credential. Refused with `409 credential_in_use` while
+ /// any tool, agent or channel still references it; the response `used_by`
+ /// lists exactly what to detach first. Once unreferenced, the row is
+ /// soft-deleted (a future GC job hard-deletes orphaned rows). + ///
+ /// + /// + /// 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 DeleteAsync( + string credentialId, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Credential
+ /// Soft-delete a credential. Refused with `409 credential_in_use` while
+ /// any tool, agent or channel still references it; the response `used_by`
+ /// lists exactly what to detach first. Once unreferenced, the row is
+ /// soft-deleted (a future GC job hard-deletes orphaned rows). + ///
+ /// + /// + /// 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> DeleteAsResponseAsync( + string credentialId, + 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.ICredentialsClient.Get.g.cs b/src/libs/Speechify/Generated/Speechify.ICredentialsClient.Get.g.cs new file mode 100644 index 00000000..37df8ed9 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ICredentialsClient.Get.g.cs @@ -0,0 +1,44 @@ +#nullable enable + +namespace Speechify +{ + public partial interface ICredentialsClient + { + /// + /// Get Credential
+ /// Fetch one credential by id, scoped to the caller's workspace.
+ /// `config` is the masked `CredentialConfigView` — secret values are
+ /// never returned. Returns 404 for missing, soft-deleted, or
+ /// foreign-workspace credentials — credential existence is never
+ /// leaked across workspaces. + ///
+ /// + /// + /// 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 GetAsync( + string credentialId, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Credential
+ /// Fetch one credential by id, scoped to the caller's workspace.
+ /// `config` is the masked `CredentialConfigView` — secret values are
+ /// never returned. Returns 404 for missing, soft-deleted, or
+ /// foreign-workspace credentials — credential existence is never
+ /// leaked across workspaces. + ///
+ /// + /// + /// 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> GetAsResponseAsync( + string credentialId, + 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.ICredentialsClient.List.g.cs b/src/libs/Speechify/Generated/Speechify.ICredentialsClient.List.g.cs new file mode 100644 index 00000000..9ec22911 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ICredentialsClient.List.g.cs @@ -0,0 +1,58 @@ +#nullable enable + +namespace Speechify +{ + public partial interface ICredentialsClient + { + /// + /// List Credentials
+ /// List every active credential in the caller's workspace, newest
+ /// first. The vault is write-only: each `config` is the masked
+ /// `CredentialConfigView` (non-secret fields plus `*_set` markers) —
+ /// secret values are never returned. Soft-deleted credentials are
+ /// omitted. Cursor-paginated: omit `cursor` for the first page; walk
+ /// pages while `has_more` is true (default page size 50, max 200). + ///
+ /// + /// + /// 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 ListAsync( + string? cursor = default, + int? limit = default, + string? projectId = default, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Credentials
+ /// List every active credential in the caller's workspace, newest
+ /// first. The vault is write-only: each `config` is the masked
+ /// `CredentialConfigView` (non-secret fields plus `*_set` markers) —
+ /// secret values are never returned. Soft-deleted credentials are
+ /// omitted. Cursor-paginated: omit `cursor` for the first page; walk
+ /// pages while `has_more` is true (default page size 50, max 200). + ///
+ /// + /// + /// 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> ListAsResponseAsync( + string? cursor = default, + int? limit = default, + string? projectId = 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.ICredentialsClient.Update.g.cs b/src/libs/Speechify/Generated/Speechify.ICredentialsClient.Update.g.cs new file mode 100644 index 00000000..b819cff9 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ICredentialsClient.Update.g.cs @@ -0,0 +1,90 @@ +#nullable enable + +namespace Speechify +{ + public partial interface ICredentialsClient + { + /// + /// Update Credential
+ /// Rotate a credential's secret and/or rename it, in place, keeping the
+ /// same id so every referencing config picks up the change with no
+ /// re-wiring. Because the vault is write-only, rotation is the only way
+ /// to change a stored secret. The kind is immutable: a rotated `config`
+ /// must populate the same block as the credential's existing kind. + ///
+ /// + /// + /// + /// 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 UpdateAsync( + string credentialId, + + global::Speechify.UpdateCredentialRequest request, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Credential
+ /// Rotate a credential's secret and/or rename it, in place, keeping the
+ /// same id so every referencing config picks up the change with no
+ /// re-wiring. Because the vault is write-only, rotation is the only way
+ /// to change a stored secret. The kind is immutable: a rotated `config`
+ /// must populate the same block as the credential's existing kind. + ///
+ /// + /// + /// + /// 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> UpdateAsResponseAsync( + string credentialId, + + global::Speechify.UpdateCredentialRequest request, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Credential
+ /// Rotate a credential's secret and/or rename it, in place, keeping the
+ /// same id so every referencing config picks up the change with no
+ /// re-wiring. Because the vault is write-only, rotation is the only way
+ /// to change a stored secret. The kind is immutable: a rotated `config`
+ /// must populate the same block as the credential's existing kind. + ///
+ /// + /// + /// + /// New human-readable label, unique per workspace. + /// + /// + /// Move the credential between scopes: a `proj_...` id scopes it to
+ /// that project, an explicit null makes it workspace-shared,
+ /// omitted leaves it unchanged. Scoping to a project is refused
+ /// with `409 cross_project_reference` while tools or agents outside
+ /// that project still reference the credential (the response lists
+ /// them); making it shared always succeeds. A project-pinned API
+ /// key may only scope a credential to its own project. + /// + /// + /// Kind-specific credential payload, used on WRITES only (create and
+ /// rotate). Exactly one block is populated — the one named by the
+ /// credential's `kind`. The secret fields are write-only: they are
+ /// accepted here but are NEVER returned on reads — a read returns the
+ /// masked `CredentialConfigView` instead. + /// + /// 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 UpdateAsync( + string credentialId, + string? speechifyVersion = default, + string? name = default, + string? projectId = default, + global::Speechify.CredentialConfig? config = 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.ICredentialsClient.g.cs b/src/libs/Speechify/Generated/Speechify.ICredentialsClient.g.cs new file mode 100644 index 00000000..9d8d7aaf --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ICredentialsClient.g.cs @@ -0,0 +1,52 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface ICredentialsClient : global::System.IDisposable + { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + /// Gets or sets a value indicating whether the response content should be read as a string. + /// True by default in debug builds, false otherwise. + /// When false, successful responses are deserialized directly from the response stream for better performance. + /// Error responses are always read as strings regardless of this setting, + /// ensuring is populated. + /// + public bool ReadResponseAsString { get; set; } + /// + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// + public global::Speechify.AutoSDKClientOptions Options { get; } + + /// + /// Creates idempotency keys for generated idempotent requests when the caller does not provide one. + /// + public global::System.Func CreateIdempotencyKey { get; set; } + + /// + /// + /// + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } + + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.IHostedApisClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.IHostedApisClient.Create.g.cs index afa83240..ae151262 100644 --- a/src/libs/Speechify/Generated/Speechify.IHostedApisClient.Create.g.cs +++ b/src/libs/Speechify/Generated/Speechify.IHostedApisClient.Create.g.cs @@ -14,6 +14,13 @@ public partial interface IHostedApisClient /// (anyone, reads only). A workspace can refuse `public` as policy (403
/// `hosted_api_public_refused`). Reads, runs and writes are each bounded
/// per UTC day (`daily_read_cap`, `daily_run_cap`, `daily_write_cap`).
+ /// `mcp_enabled: true` also serves the API's routes as an MCP server at
+ /// `POST <base_url>/mcp`, so an MCP client (Claude Code, Cursor) attaches
+ /// to one address and gets them as tools, under the same audience, keys
+ /// and caps. It is refused with `auth_mode: public`. On that face the
+ /// API's `name` is the server's title and its `description` is the
+ /// instructions the client's model reads, so describe what the tools are
+ /// for.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). ///
/// @@ -41,6 +48,13 @@ public partial interface IHostedApisClient /// (anyone, reads only). A workspace can refuse `public` as policy (403
/// `hosted_api_public_refused`). Reads, runs and writes are each bounded
/// per UTC day (`daily_read_cap`, `daily_run_cap`, `daily_write_cap`).
+ /// `mcp_enabled: true` also serves the API's routes as an MCP server at
+ /// `POST <base_url>/mcp`, so an MCP client (Claude Code, Cursor) attaches
+ /// to one address and gets them as tools, under the same audience, keys
+ /// and caps. It is refused with `auth_mode: public`. On that face the
+ /// API's `name` is the server's title and its `description` is the
+ /// instructions the client's model reads, so describe what the tools are
+ /// for.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). ///
/// @@ -68,6 +82,13 @@ public partial interface IHostedApisClient /// (anyone, reads only). A workspace can refuse `public` as policy (403
/// `hosted_api_public_refused`). Reads, runs and writes are each bounded
/// per UTC day (`daily_read_cap`, `daily_run_cap`, `daily_write_cap`).
+ /// `mcp_enabled: true` also serves the API's routes as an MCP server at
+ /// `POST <base_url>/mcp`, so an MCP client (Claude Code, Cursor) attaches
+ /// to one address and gets them as tools, under the same audience, keys
+ /// and caps. It is refused with `auth_mode: public`. On that face the
+ /// API's `name` is the server's title and its `description` is the
+ /// instructions the client's model reads, so describe what the tools are
+ /// for.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). /// /// @@ -78,7 +99,9 @@ public partial interface IHostedApisClient /// 3-40 lowercase letters, digits or hyphens; a DNS label, unique on the shared domain; immutable. /// /// - /// + /// + /// What the API is for; also the instructions an MCP client hands its model when `mcp_enabled` is on. + /// /// /// consumer_key when omitted. `public` is refused with 403 `hosted_api_public_refused` where the workspace's policy does not allow internet-facing APIs. /// @@ -87,11 +110,16 @@ public partial interface IHostedApisClient /// Runs the API may start per UTC day through its run routes; 1000 when omitted. /// /// - /// Reads the API may serve from storage per UTC day; 100000 when omitted. + /// Reads the API's store, file, run_latest and tool routes may serve per UTC day; 100000 when omitted. /// /// /// Documents the API's write routes may land per UTC day; 10000 when omitted. /// + /// + /// Serve the routes as an MCP server at `POST <base_url>/mcp` too;
+ /// false when omitted. Refused with `auth_mode: public` (400
+ /// `validation_failed` naming `mcp_enabled`). + /// /// /// /// Register the key set end-user tokens are verified against (an `https` URL on a public host). @@ -110,6 +138,7 @@ public partial interface IHostedApisClient int? dailyRunCap = default, int? dailyReadCap = default, int? dailyWriteCap = default, + bool? mcpEnabled = default, string? projectId = default, string? userTokenJwksUrl = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, diff --git a/src/libs/Speechify/Generated/Speechify.IHostedApisClient.GetOpenApi.g.cs b/src/libs/Speechify/Generated/Speechify.IHostedApisClient.GetOpenApi.g.cs index d60b0124..5cbf994f 100644 --- a/src/libs/Speechify/Generated/Speechify.IHostedApisClient.GetOpenApi.g.cs +++ b/src/libs/Speechify/Generated/Speechify.IHostedApisClient.GetOpenApi.g.cs @@ -7,7 +7,12 @@ public partial interface IHostedApisClient /// /// Get Hosted API OpenAPI Document
/// The OpenAPI 3.1 document describing the hosted API's routes - the same
- /// document the API serves to its consumers at `/openapi.json`.
+ /// document the API serves to its consumers at `/openapi.json`. A `tool`
+ /// route's request body is the operation's own argument schema. When
+ /// `mcp_enabled` is on, the document carries an `x-speechify-mcp` object
+ /// (`url`, `transport: streamable-http`, `description`) naming where an
+ /// MCP client attaches; the face speaks JSON-RPC, so it is an extension
+ /// rather than a path.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). ///
/// @@ -23,7 +28,12 @@ public partial interface IHostedApisClient /// /// Get Hosted API OpenAPI Document
/// The OpenAPI 3.1 document describing the hosted API's routes - the same
- /// document the API serves to its consumers at `/openapi.json`.
+ /// document the API serves to its consumers at `/openapi.json`. A `tool`
+ /// route's request body is the operation's own argument schema. When
+ /// `mcp_enabled` is on, the document carries an `x-speechify-mcp` object
+ /// (`url`, `transport: streamable-http`, `description`) naming where an
+ /// MCP client attaches; the face speaks JSON-RPC, so it is an extension
+ /// rather than a path.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). ///
/// diff --git a/src/libs/Speechify/Generated/Speechify.IHostedApisClient.Update.g.cs b/src/libs/Speechify/Generated/Speechify.IHostedApisClient.Update.g.cs index 23296758..e54e16ae 100644 --- a/src/libs/Speechify/Generated/Speechify.IHostedApisClient.Update.g.cs +++ b/src/libs/Speechify/Generated/Speechify.IHostedApisClient.Update.g.cs @@ -13,7 +13,10 @@ public partial interface IHostedApisClient /// internet-facing APIs (403 `hosted_api_public_refused`). Switching to a
/// mode that names no caller (`consumer_key`, `public`) is refused while
/// a route binds `{{user.*}}`: only `user_token`, `workspace` and `owner`
- /// supply a person.
+ /// supply a person. Switching to `public` is also refused while a `tool`
+ /// route exists (a vendor call spends the workspace's vendor budget) and
+ /// while `mcp_enabled` is on, and switching the MCP face on is refused on
+ /// a `public` API (400 `validation_failed` naming `mcp_enabled`).
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). /// /// @@ -38,7 +41,10 @@ public partial interface IHostedApisClient /// internet-facing APIs (403 `hosted_api_public_refused`). Switching to a
/// mode that names no caller (`consumer_key`, `public`) is refused while
/// a route binds `{{user.*}}`: only `user_token`, `workspace` and `owner`
- /// supply a person.
+ /// supply a person. Switching to `public` is also refused while a `tool`
+ /// route exists (a vendor call spends the workspace's vendor budget) and
+ /// while `mcp_enabled` is on, and switching the MCP face on is refused on
+ /// a `public` API (400 `validation_failed` naming `mcp_enabled`).
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). /// /// @@ -63,13 +69,18 @@ public partial interface IHostedApisClient /// internet-facing APIs (403 `hosted_api_public_refused`). Switching to a
/// mode that names no caller (`consumer_key`, `public`) is refused while
/// a route binds `{{user.*}}`: only `user_token`, `workspace` and `owner`
- /// supply a person.
+ /// supply a person. Switching to `public` is also refused while a `tool`
+ /// route exists (a vendor call spends the workspace's vendor budget) and
+ /// while `mcp_enabled` is on, and switching the MCP face on is refused on
+ /// a `public` API (400 `validation_failed` naming `mcp_enabled`).
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). /// /// /// /// - /// + /// + /// What the API is for; also the instructions an MCP client hands its model when `mcp_enabled` is on. + /// /// /// /// @@ -78,6 +89,12 @@ public partial interface IHostedApisClient /// /// /// + /// + /// Switch the MCP face at `POST <base_url>/mcp` on or off. Refused with
+ /// 400 `validation_failed` naming `mcp_enabled` when the API is, or is
+ /// being made, `public`. Allow up to 15 seconds for the switch, like
+ /// any route change, to reach every server. + /// /// /// Replace the registered key set; an empty string removes it, after which the signing secret verifies tokens again. /// @@ -95,6 +112,7 @@ public partial interface IHostedApisClient int? dailyRunCap = default, int? dailyReadCap = default, int? dailyWriteCap = default, + bool? mcpEnabled = default, string? userTokenJwksUrl = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Speechify/Generated/Speechify.IRoutesClient.CreateRoute.g.cs b/src/libs/Speechify/Generated/Speechify.IRoutesClient.CreateRoute.g.cs index 32a8b8be..619f3719 100644 --- a/src/libs/Speechify/Generated/Speechify.IRoutesClient.CreateRoute.g.cs +++ b/src/libs/Speechify/Generated/Speechify.IRoutesClient.CreateRoute.g.cs @@ -16,7 +16,13 @@ public partial interface IRoutesClient /// never on a public API) and waits up to `wait_seconds` before answering
/// 202 with a handle to poll at `/_runs/{run_id}`; `file` serves one
/// published file, or a whole published tree when the path ends in `*`
- /// (`/app/*` with `file_root` and `file_index`). Where-clause values and
+ /// (`/app/*` with `file_root` and `file_index`); `tool` calls one read
+ /// operation of an `openapi` tool definition in the API's project whose
+ /// `approval` is null or `auto` (POST only, never on a public API, counted
+ /// against `daily_read_cap`): the
+ /// consumer's JSON body is the operation's arguments and the vendor's
+ /// answer, after the operation's `response` mapping, is the response.
+ /// Where-clause values and
/// the document id may be `{{query.x}}`, `{{path.x}}` or `{{body.x}}`
/// templates bound from the consumer's request, or `{{user.x}}` claims of
/// the verified caller on a `user_token`, `workspace` or `owner` API; a
@@ -26,6 +32,17 @@ public partial interface IRoutesClient /// `{{user.*}}` on an API that names no caller, and a clause on
/// `user_identity` bound from a request template, which would let any
/// caller read any user's rows.
+ /// On an API with `mcp_enabled`, every enabled route except a `file`
+ /// route is also an MCP tool. The tool's name comes from the route's
+ /// `name`: every run of characters outside letters, digits, `_` and `-`
+ /// becomes `_`, leading and trailing `_` are dropped, and the result is
+ /// cut to 64 characters. A route with no name is listed under a name
+ /// built from its method and path (`post_issues_open`), and a name two
+ /// routes would share takes `_2`, `_3` in route order, so read the names
+ /// from the face's `tools/list` rather than deriving them. The route's
+ /// `description` is what the client's model reads to choose the tool,
+ /// falling back to the operation's summary on a `tool` route. Name and
+ /// describe a route for that reader.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). /// /// @@ -57,7 +74,13 @@ public partial interface IRoutesClient /// never on a public API) and waits up to `wait_seconds` before answering
/// 202 with a handle to poll at `/_runs/{run_id}`; `file` serves one
/// published file, or a whole published tree when the path ends in `*`
- /// (`/app/*` with `file_root` and `file_index`). Where-clause values and
+ /// (`/app/*` with `file_root` and `file_index`); `tool` calls one read
+ /// operation of an `openapi` tool definition in the API's project whose
+ /// `approval` is null or `auto` (POST only, never on a public API, counted
+ /// against `daily_read_cap`): the
+ /// consumer's JSON body is the operation's arguments and the vendor's
+ /// answer, after the operation's `response` mapping, is the response.
+ /// Where-clause values and
/// the document id may be `{{query.x}}`, `{{path.x}}` or `{{body.x}}`
/// templates bound from the consumer's request, or `{{user.x}}` claims of
/// the verified caller on a `user_token`, `workspace` or `owner` API; a
@@ -67,6 +90,17 @@ public partial interface IRoutesClient /// `{{user.*}}` on an API that names no caller, and a clause on
/// `user_identity` bound from a request template, which would let any
/// caller read any user's rows.
+ /// On an API with `mcp_enabled`, every enabled route except a `file`
+ /// route is also an MCP tool. The tool's name comes from the route's
+ /// `name`: every run of characters outside letters, digits, `_` and `-`
+ /// becomes `_`, leading and trailing `_` are dropped, and the result is
+ /// cut to 64 characters. A route with no name is listed under a name
+ /// built from its method and path (`post_issues_open`), and a name two
+ /// routes would share takes `_2`, `_3` in route order, so read the names
+ /// from the face's `tools/list` rather than deriving them. The route's
+ /// `description` is what the client's model reads to choose the tool,
+ /// falling back to the operation's summary on a `tool` route. Name and
+ /// describe a route for that reader.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). /// /// @@ -98,7 +132,13 @@ public partial interface IRoutesClient /// never on a public API) and waits up to `wait_seconds` before answering
/// 202 with a handle to poll at `/_runs/{run_id}`; `file` serves one
/// published file, or a whole published tree when the path ends in `*`
- /// (`/app/*` with `file_root` and `file_index`). Where-clause values and
+ /// (`/app/*` with `file_root` and `file_index`); `tool` calls one read
+ /// operation of an `openapi` tool definition in the API's project whose
+ /// `approval` is null or `auto` (POST only, never on a public API, counted
+ /// against `daily_read_cap`): the
+ /// consumer's JSON body is the operation's arguments and the vendor's
+ /// answer, after the operation's `response` mapping, is the response.
+ /// Where-clause values and
/// the document id may be `{{query.x}}`, `{{path.x}}` or `{{body.x}}`
/// templates bound from the consumer's request, or `{{user.x}}` claims of
/// the verified caller on a `user_token`, `workspace` or `owner` API; a
@@ -108,6 +148,17 @@ public partial interface IRoutesClient /// `{{user.*}}` on an API that names no caller, and a clause on
/// `user_identity` bound from a request template, which would let any
/// caller read any user's rows.
+ /// On an API with `mcp_enabled`, every enabled route except a `file`
+ /// route is also an MCP tool. The tool's name comes from the route's
+ /// `name`: every run of characters outside letters, digits, `_` and `-`
+ /// becomes `_`, leading and trailing `_` are dropped, and the result is
+ /// cut to 64 characters. A route with no name is listed under a name
+ /// built from its method and path (`post_issues_open`), and a name two
+ /// routes would share takes `_2`, `_3` in route order, so read the names
+ /// from the face's `tools/list` rather than deriving them. The route's
+ /// `description` is what the client's model reads to choose the tool,
+ /// falling back to the operation's summary on a `tool` route. Name and
+ /// describe a route for that reader.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). /// /// @@ -117,10 +168,24 @@ public partial interface IRoutesClient /// /// /// - /// Lowercase segments of letters, digits, `. _ -` or a `{param}`; `/openapi.json` and `/_runs` are reserved. + /// Lowercase segments of letters, digits, `. _ -` or a `{param}`; `/openapi.json`, `/_runs` and `/mcp` are reserved. + /// + /// + /// The route's name, 1-128 letters, digits, spaces, `.`, `_` or `-`.
+ /// On an API with `mcp_enabled` the MCP tool's name comes from it:
+ /// each run of other characters (a space included) becomes `_`,
+ /// leading and trailing `_` are dropped, and the result is cut to 64
+ /// characters. A route with no name is listed under a name built from
+ /// its method and path, and a name two routes would share takes `_2`,
+ /// `_3` in route order; the face's `tools/list` is the authority. Pick
+ /// a verb-first name a model can choose by. + /// + /// + /// What the route does. On an API with `mcp_enabled` it is the MCP
+ /// tool description a client's model reads to choose the tool, so say
+ /// what it returns and when to call it; a `tool` route with none falls
+ /// back to the operation's summary. /// - /// - /// /// /// What answers a route. `type` selects the fields that apply:
/// `store_query` (store_id, collection, where, order_by, limit),
@@ -136,7 +201,28 @@ public partial interface IRoutesClient /// `run_latest` (trigger_id of a schedule trigger),
/// `run` (trigger_id of a webhook trigger, wait_seconds),
/// `file` (file_path of one published file; or, on a route whose path
- /// ends in `*`, file_root and file_index for a whole published tree). + /// ends in `*`, file_root and file_index for a whole published tree),
+ /// `tool` (tool_id of an `openapi` tool definition and the `operation`
+ /// on it: the POST body is the operation's arguments, held to its
+ /// argument schema, and the vendor's answer after the operation's
+ /// `response` mapping is the response, or `{"text": ...}` when the vendor
+ /// answered text. Only an operation whose effective class is `read`, on a
+ /// tool whose `approval` is null or `auto`, may be served, and never on a
+ /// public API; a route write that names anything else is refused with 400
+ /// `validation_failed` on `resolver.tool_id`. Because a definition can
+ /// change after its route is written, every call re-checks it: an
+ /// operation no longer classified `read`, or a tool whose `approval` is no
+ /// longer null or `auto`, answers 403 `route_tool_not_readable`; a tool
+ /// deleted, moved to another project, no longer of kind `openapi` or
+ /// without the operation answers 409 `route_tool_unavailable`, which no
+ /// retry clears until the route or the tool is fixed. Arguments that do
+ /// not fit the schema answer 400 `validation_failed`; the definition's
+ /// `max_requests_per_minute` and the vendor's own throttle both answer 429
+ /// `route_upstream_rate_limited` with `Retry-After`; a vendor error
+ /// answers 502 `route_upstream_error` with the vendor's status in
+ /// `error.details.upstream_status`, and an unreachable vendor or a
+ /// credential that no longer resolves answers 502 `route_upstream_error`
+ /// without it). /// /// /// diff --git a/src/libs/Speechify/Generated/Speechify.IRoutesClient.UpdateRoute.g.cs b/src/libs/Speechify/Generated/Speechify.IRoutesClient.UpdateRoute.g.cs index c3274fb6..e0d3205d 100644 --- a/src/libs/Speechify/Generated/Speechify.IRoutesClient.UpdateRoute.g.cs +++ b/src/libs/Speechify/Generated/Speechify.IRoutesClient.UpdateRoute.g.cs @@ -54,8 +54,22 @@ public partial interface IRoutesClient /// /// /// - /// - /// + /// + /// The route's name, 1-128 letters, digits, spaces, `.`, `_` or `-`.
+ /// On an API with `mcp_enabled` the MCP tool's name comes from it:
+ /// each run of other characters (a space included) becomes `_`,
+ /// leading and trailing `_` are dropped, and the result is cut to 64
+ /// characters. A route with no name is listed under a name built from
+ /// its method and path, and a name two routes would share takes `_2`,
+ /// `_3` in route order; the face's `tools/list` is the authority. Pick
+ /// a verb-first name a model can choose by. + /// + /// + /// What the route does. On an API with `mcp_enabled` it is the MCP
+ /// tool description a client's model reads to choose the tool, so say
+ /// what it returns and when to call it; a `tool` route with none falls
+ /// back to the operation's summary. + /// /// /// What answers a route. `type` selects the fields that apply:
/// `store_query` (store_id, collection, where, order_by, limit),
@@ -71,7 +85,28 @@ public partial interface IRoutesClient /// `run_latest` (trigger_id of a schedule trigger),
/// `run` (trigger_id of a webhook trigger, wait_seconds),
/// `file` (file_path of one published file; or, on a route whose path
- /// ends in `*`, file_root and file_index for a whole published tree). + /// ends in `*`, file_root and file_index for a whole published tree),
+ /// `tool` (tool_id of an `openapi` tool definition and the `operation`
+ /// on it: the POST body is the operation's arguments, held to its
+ /// argument schema, and the vendor's answer after the operation's
+ /// `response` mapping is the response, or `{"text": ...}` when the vendor
+ /// answered text. Only an operation whose effective class is `read`, on a
+ /// tool whose `approval` is null or `auto`, may be served, and never on a
+ /// public API; a route write that names anything else is refused with 400
+ /// `validation_failed` on `resolver.tool_id`. Because a definition can
+ /// change after its route is written, every call re-checks it: an
+ /// operation no longer classified `read`, or a tool whose `approval` is no
+ /// longer null or `auto`, answers 403 `route_tool_not_readable`; a tool
+ /// deleted, moved to another project, no longer of kind `openapi` or
+ /// without the operation answers 409 `route_tool_unavailable`, which no
+ /// retry clears until the route or the tool is fixed. Arguments that do
+ /// not fit the schema answer 400 `validation_failed`; the definition's
+ /// `max_requests_per_minute` and the vendor's own throttle both answer 429
+ /// `route_upstream_rate_limited` with `Retry-After`; a vendor error
+ /// answers 502 `route_upstream_error` with the vendor's status in
+ /// `error.details.upstream_status`, and an unreachable vendor or a
+ /// credential that no longer resolves answers 502 `route_upstream_error`
+ /// without it). /// /// /// diff --git a/src/libs/Speechify/Generated/Speechify.IShareLinksClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.IShareLinksClient.Create.g.cs index 1ddb7e91..f803bc08 100644 --- a/src/libs/Speechify/Generated/Speechify.IShareLinksClient.Create.g.cs +++ b/src/libs/Speechify/Generated/Speechify.IShareLinksClient.Create.g.cs @@ -108,8 +108,8 @@ public partial interface IShareLinksClient /// /// Tools to opt this link into, by id — the same `tool_…` ids
/// `listAgentTools` returns. Omit for the default posture (call
- /// controls and knowledge search only). Opting a webhook or MCP
- /// tool in lets a stranger drive it, so it is an explicit act
+ /// controls and knowledge search only). Opting a webhook, MCP or
+ /// OpenAPI tool in lets a stranger drive it, so it is an explicit act
/// rather than something inherited from the agent. Every id must
/// name a tool attached to this agent; anything else is a 400. /// diff --git a/src/libs/Speechify/Generated/Speechify.ISkillsClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.ISkillsClient.Create.g.cs index 30867585..30787754 100644 --- a/src/libs/Speechify/Generated/Speechify.ISkillsClient.Create.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ISkillsClient.Create.g.cs @@ -71,7 +71,15 @@ public partial interface ISkillsClient /// every agent that attaches it, so the limit is a per-turn token bill
/// rather than a storage bound. /// - /// + /// + /// Tool definitions (`tool_...`) the skill contributes to every agent
+ /// that attaches it, unioned with the agent's own tools: any kind a
+ /// `POST /v1/agents/tool-definitions` create makes (`webhook`,
+ /// `client`, `mcp` or `openapi`, where an `openapi` tool contributes
+ /// each of its operations). The tools do not have to be attached to
+ /// the agent; an attach is refused with 409 `skill_tool_name_conflict`
+ /// when one of their names collides with a tool the agent already has. + /// /// /// /// Default token values. Keys in the reserved `system__` namespace are refused. diff --git a/src/libs/Speechify/Generated/Speechify.ISkillsClient.Update.g.cs b/src/libs/Speechify/Generated/Speechify.ISkillsClient.Update.g.cs index 3dcc333f..a59bd253 100644 --- a/src/libs/Speechify/Generated/Speechify.ISkillsClient.Update.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ISkillsClient.Update.g.cs @@ -68,7 +68,16 @@ public partial interface ISkillsClient /// /// /// - /// + /// + /// Replaces the skill's tool definitions and mints a new version.
+ /// Tool definitions (`tool_...`) the skill contributes to every agent
+ /// that attaches it, unioned with the agent's own tools: any kind a
+ /// `POST /v1/agents/tool-definitions` create makes (`webhook`,
+ /// `client`, `mcp` or `openapi`, where an `openapi` tool contributes
+ /// each of its operations). The tools do not have to be attached to
+ /// the agent; an attach is refused with 409 `skill_tool_name_conflict`
+ /// when one of their names collides with a tool the agent already has. + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Speechify/Generated/Speechify.ISpeechifyClient.g.cs b/src/libs/Speechify/Generated/Speechify.ISpeechifyClient.g.cs index 1dce4668..1fc701fd 100644 --- a/src/libs/Speechify/Generated/Speechify.ISpeechifyClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ISpeechifyClient.g.cs @@ -98,6 +98,11 @@ public partial interface ISpeechifyClient : global::System.IDisposable /// public ConversationsClient Conversations { get; } + /// + /// + /// + public CredentialsClient Credentials { get; } + /// /// /// diff --git a/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.Create.g.cs index a458ae69..8b76789e 100644 --- a/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.Create.g.cs +++ b/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.Create.g.cs @@ -7,8 +7,20 @@ public partial interface IToolDefinitionsClient /// /// Create Tool
/// Create a tool. For webhook tools, the response includes the HMAC
- /// `webhook_secret` exactly once — store it immediately; subsequent
+ /// `webhook_secret` exactly once - store it immediately; subsequent
/// reads return a masked placeholder.
+ /// An `mcp` or `openapi` tool that authenticates references a vault
+ /// credential by `auth.credential_id`: create it first with
+ /// `POST /v1/credentials`. For an `mcp` tool,
+ /// `POST /v1/agents/tool-definitions/test-mcp-connection` lists the
+ /// server's tools before you save. For an `openapi` tool, compile the
+ /// vendor's document with
+ /// `POST /v1/agents/tool-definitions/import-openapi`, choose and classify
+ /// the operations the agent needs, preview one with
+ /// `POST /v1/agents/tool-definitions/test-openapi-call`, then send the
+ /// chosen operations here. The tool is usable once it is attached to an
+ /// agent (`PUT /v1/agents/{agent_id}/tools/{tool_id}`) or named in a
+ /// skill's `tool_ids`.
/// A field this endpoint does not define is refused with `400
/// validation_failed` naming every unknown field, rather than accepted
/// and silently dropped.
@@ -30,8 +42,20 @@ public partial interface IToolDefinitionsClient /// /// Create Tool
/// Create a tool. For webhook tools, the response includes the HMAC
- /// `webhook_secret` exactly once — store it immediately; subsequent
+ /// `webhook_secret` exactly once - store it immediately; subsequent
/// reads return a masked placeholder.
+ /// An `mcp` or `openapi` tool that authenticates references a vault
+ /// credential by `auth.credential_id`: create it first with
+ /// `POST /v1/credentials`. For an `mcp` tool,
+ /// `POST /v1/agents/tool-definitions/test-mcp-connection` lists the
+ /// server's tools before you save. For an `openapi` tool, compile the
+ /// vendor's document with
+ /// `POST /v1/agents/tool-definitions/import-openapi`, choose and classify
+ /// the operations the agent needs, preview one with
+ /// `POST /v1/agents/tool-definitions/test-openapi-call`, then send the
+ /// chosen operations here. The tool is usable once it is attached to an
+ /// agent (`PUT /v1/agents/{agent_id}/tools/{tool_id}`) or named in a
+ /// skill's `tool_ids`.
/// A field this endpoint does not define is refused with `400
/// validation_failed` naming every unknown field, rather than accepted
/// and silently dropped.
@@ -53,8 +77,20 @@ public partial interface IToolDefinitionsClient /// /// Create Tool
/// Create a tool. For webhook tools, the response includes the HMAC
- /// `webhook_secret` exactly once — store it immediately; subsequent
+ /// `webhook_secret` exactly once - store it immediately; subsequent
/// reads return a masked placeholder.
+ /// An `mcp` or `openapi` tool that authenticates references a vault
+ /// credential by `auth.credential_id`: create it first with
+ /// `POST /v1/credentials`. For an `mcp` tool,
+ /// `POST /v1/agents/tool-definitions/test-mcp-connection` lists the
+ /// server's tools before you save. For an `openapi` tool, compile the
+ /// vendor's document with
+ /// `POST /v1/agents/tool-definitions/import-openapi`, choose and classify
+ /// the operations the agent needs, preview one with
+ /// `POST /v1/agents/tool-definitions/test-openapi-call`, then send the
+ /// chosen operations here. The tool is usable once it is attached to an
+ /// agent (`PUT /v1/agents/{agent_id}/tools/{tool_id}`) or named in a
+ /// skill's `tool_ids`.
/// A field this endpoint does not define is refused with `400
/// validation_failed` naming every unknown field, rather than accepted
/// and silently dropped.
@@ -75,14 +111,18 @@ public partial interface IToolDefinitionsClient /// - `builtin`: a worker-resident platform capability (e.g. end_call, play_audio), configured per-agent
/// - `webhook`: worker signs a payload and POSTs it to your URL
/// - `client`: worker dispatches to the caller's browser/SDK via data channel
- /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls + /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls
+ /// - `openapi`: a REST API described by its OpenAPI document, pinned to the operations you selected; the control plane executes every call /// /// /// /// The impact class. Omit it and the tool's impact is read off its
/// shape instead, and keeps tracking it: a `GET` webhook reads, a
- /// `POST` webhook reaches outside your team, an MCP or client tool can
- /// do anything its author wired.
+ /// `POST` webhook reaches outside your team, an MCP, client or OpenAPI
+ /// tool can do anything its author wired.
+ /// On an OpenAPI tool it is the class of every operation that declares
+ /// none of its own and is not a GET or HEAD; classify operations one by
+ /// one with `OpenAPIOperation.action_class` instead of setting it here.
/// On an MCP tool it is also the ceiling for what the server may claim
/// about its own tools: a class a `tools/list` entry declares under
/// `_meta["speechify/action_class"]` is honoured when it is at least
diff --git a/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.ImportOpenAPI.g.cs b/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.ImportOpenAPI.g.cs new file mode 100644 index 00000000..794372d8 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.ImportOpenAPI.g.cs @@ -0,0 +1,181 @@ +#nullable enable + +namespace Speechify +{ + public partial interface IToolDefinitionsClient + { + /// + /// Import OpenAPI Operations
+ /// Compile a vendor's OpenAPI 3.x document into the operations an
+ /// `openapi` tool can carry, without persisting anything. It is the
+ /// second step of connecting a REST API: store the vendor credential
+ /// with `POST /v1/credentials`, import the document here, choose and
+ /// classify the operations the agent needs, preview one with
+ /// `POST /v1/agents/tool-definitions/test-openapi-call`, then create the
+ /// tool with `POST /v1/agents/tool-definitions`.
+ /// Pass the document by `spec_url` (an https URL fetched server-side,
+ /// with the headers of the credential `auth` names when the document
+ /// sits behind the vendor's own auth) or inline as `spec`, never both.
+ /// Each entry of `operations` is already in the shape
+ /// `OpenAPIToolConfig.operations` takes, in document order: copy the ones
+ /// the agent should have (at most 40 per tool), and add `action_class`
+ /// and `response` where you need them. Use each returned `id` verbatim
+ /// rather than deriving it: it is the document's operationId made safe
+ /// for a function name (a run of other characters becomes one `_`, a
+ /// leading digit gains `op_`, at most 64 characters), or a name built
+ /// from the method and path when the document has none, and an id two
+ /// operations would share takes a numeric suffix. You may rename an id
+ /// before saving. The agent calls each operation as
+ /// `<tool name>__<id>`, which must fit 64 characters, so shorten the tool
+ /// name or rename the id when it does not. `skipped` lists every
+ /// operation that could not be represented, with the reason.
+ /// The document's security schemes are not imported: the tool's own
+ /// `auth` is `none`, `bearer` or `oauth2_client_credentials`. Never
+ /// select an API key the document declares as a header or query
+ /// parameter as a parameter, since the agent would have to supply its
+ /// value.
+ /// A refused `spec_url`, a credential that does not resolve or cannot
+ /// mint a token, a fetch that fails and a document that does not parse
+ /// all answer 200 with `error` set and `operations` empty. Only a
+ /// malformed request is a 400: neither or both of `spec` and `spec_url`,
+ /// or a field this endpoint does not define, which is refused naming
+ /// every unknown field.
+ /// Needs the `content.manage` permission, as creating a tool does: the
+ /// fetch sends a referenced credential's headers to `spec_url`. + ///
+ /// + /// + /// 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 ImportOpenAPIAsync( + + global::Speechify.ImportOpenAPIRequest request, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Import OpenAPI Operations
+ /// Compile a vendor's OpenAPI 3.x document into the operations an
+ /// `openapi` tool can carry, without persisting anything. It is the
+ /// second step of connecting a REST API: store the vendor credential
+ /// with `POST /v1/credentials`, import the document here, choose and
+ /// classify the operations the agent needs, preview one with
+ /// `POST /v1/agents/tool-definitions/test-openapi-call`, then create the
+ /// tool with `POST /v1/agents/tool-definitions`.
+ /// Pass the document by `spec_url` (an https URL fetched server-side,
+ /// with the headers of the credential `auth` names when the document
+ /// sits behind the vendor's own auth) or inline as `spec`, never both.
+ /// Each entry of `operations` is already in the shape
+ /// `OpenAPIToolConfig.operations` takes, in document order: copy the ones
+ /// the agent should have (at most 40 per tool), and add `action_class`
+ /// and `response` where you need them. Use each returned `id` verbatim
+ /// rather than deriving it: it is the document's operationId made safe
+ /// for a function name (a run of other characters becomes one `_`, a
+ /// leading digit gains `op_`, at most 64 characters), or a name built
+ /// from the method and path when the document has none, and an id two
+ /// operations would share takes a numeric suffix. You may rename an id
+ /// before saving. The agent calls each operation as
+ /// `<tool name>__<id>`, which must fit 64 characters, so shorten the tool
+ /// name or rename the id when it does not. `skipped` lists every
+ /// operation that could not be represented, with the reason.
+ /// The document's security schemes are not imported: the tool's own
+ /// `auth` is `none`, `bearer` or `oauth2_client_credentials`. Never
+ /// select an API key the document declares as a header or query
+ /// parameter as a parameter, since the agent would have to supply its
+ /// value.
+ /// A refused `spec_url`, a credential that does not resolve or cannot
+ /// mint a token, a fetch that fails and a document that does not parse
+ /// all answer 200 with `error` set and `operations` empty. Only a
+ /// malformed request is a 400: neither or both of `spec` and `spec_url`,
+ /// or a field this endpoint does not define, which is refused naming
+ /// every unknown field.
+ /// Needs the `content.manage` permission, as creating a tool does: the
+ /// fetch sends a referenced credential's headers to `spec_url`. + ///
+ /// + /// + /// 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> ImportOpenAPIAsResponseAsync( + + global::Speechify.ImportOpenAPIRequest request, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Import OpenAPI Operations
+ /// Compile a vendor's OpenAPI 3.x document into the operations an
+ /// `openapi` tool can carry, without persisting anything. It is the
+ /// second step of connecting a REST API: store the vendor credential
+ /// with `POST /v1/credentials`, import the document here, choose and
+ /// classify the operations the agent needs, preview one with
+ /// `POST /v1/agents/tool-definitions/test-openapi-call`, then create the
+ /// tool with `POST /v1/agents/tool-definitions`.
+ /// Pass the document by `spec_url` (an https URL fetched server-side,
+ /// with the headers of the credential `auth` names when the document
+ /// sits behind the vendor's own auth) or inline as `spec`, never both.
+ /// Each entry of `operations` is already in the shape
+ /// `OpenAPIToolConfig.operations` takes, in document order: copy the ones
+ /// the agent should have (at most 40 per tool), and add `action_class`
+ /// and `response` where you need them. Use each returned `id` verbatim
+ /// rather than deriving it: it is the document's operationId made safe
+ /// for a function name (a run of other characters becomes one `_`, a
+ /// leading digit gains `op_`, at most 64 characters), or a name built
+ /// from the method and path when the document has none, and an id two
+ /// operations would share takes a numeric suffix. You may rename an id
+ /// before saving. The agent calls each operation as
+ /// `<tool name>__<id>`, which must fit 64 characters, so shorten the tool
+ /// name or rename the id when it does not. `skipped` lists every
+ /// operation that could not be represented, with the reason.
+ /// The document's security schemes are not imported: the tool's own
+ /// `auth` is `none`, `bearer` or `oauth2_client_credentials`. Never
+ /// select an API key the document declares as a header or query
+ /// parameter as a parameter, since the agent would have to supply its
+ /// value.
+ /// A refused `spec_url`, a credential that does not resolve or cannot
+ /// mint a token, a fetch that fails and a document that does not parse
+ /// all answer 200 with `error` set and `operations` empty. Only a
+ /// malformed request is a 400: neither or both of `spec` and `spec_url`,
+ /// or a field this endpoint does not define, which is refused naming
+ /// every unknown field.
+ /// Needs the `content.manage` permission, as creating a tool does: the
+ /// fetch sends a referenced credential's headers to `spec_url`. + ///
+ /// + /// + /// An https URL the server fetches the document from, with the headers
+ /// of the credential `auth` names when it names one. A private or
+ /// loopback address is refused. At most 2 MiB. Keep it as the tool's
+ /// `spec_url` so a later import can refresh the operations. + /// + /// + /// The document inline: a JSON object, or a string holding the JSON
+ /// or YAML text. At most 2 MiB. + /// + /// + /// How the platform authenticates to an MCP server or an OpenAPI tool's
+ /// REST API: `none`, `bearer` or `oauth2_client_credentials`, a
+ /// discriminated union over `type`. Other credential kinds (an API key
+ /// in a custom header or query parameter, HTTP Basic) are not supported
+ /// here. + /// + /// + /// Overrides the document's `servers` in the result's `base_url`: the
+ /// regional or tenant host this workspace signed up to. The create
+ /// endpoint requires https. + /// + /// 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 ImportOpenAPIAsync( + string? speechifyVersion = default, + string? specUrl = default, + global::Speechify.ImportOpenApiRequestSpec? spec = default, + global::Speechify.MCPAuth? auth = default, + string? baseUrl = 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.TestMCPConnection.g.cs b/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.TestMCPConnection.g.cs index c5b763d6..e5686906 100644 --- a/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.TestMCPConnection.g.cs +++ b/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.TestMCPConnection.g.cs @@ -13,6 +13,8 @@ public partial interface IToolDefinitionsClient /// `tool_id` from the edit-form flow when the auth payload carries
/// `_set` markers but no plaintext, so the server can hydrate the
/// stored secret from the encrypted column before probing.
+ /// Needs the `content.manage` permission, as creating a tool does: the
+ /// probe sends a referenced credential to the endpoint in the request.
/// A field this endpoint does not define is refused with `400
/// validation_failed` naming every unknown field, rather than accepted
/// and silently dropped. @@ -37,6 +39,8 @@ public partial interface IToolDefinitionsClient /// `tool_id` from the edit-form flow when the auth payload carries
/// `_set` markers but no plaintext, so the server can hydrate the
/// stored secret from the encrypted column before probing.
+ /// Needs the `content.manage` permission, as creating a tool does: the
+ /// probe sends a referenced credential to the endpoint in the request.
/// A field this endpoint does not define is refused with `400
/// validation_failed` naming every unknown field, rather than accepted
/// and silently dropped. @@ -61,6 +65,8 @@ public partial interface IToolDefinitionsClient /// `tool_id` from the edit-form flow when the auth payload carries
/// `_set` markers but no plaintext, so the server can hydrate the
/// stored secret from the encrypted column before probing.
+ /// Needs the `content.manage` permission, as creating a tool does: the
+ /// probe sends a referenced credential to the endpoint in the request.
/// A field this endpoint does not define is refused with `400
/// validation_failed` naming every unknown field, rather than accepted
/// and silently dropped. diff --git a/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.TestOpenAPICall.g.cs b/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.TestOpenAPICall.g.cs new file mode 100644 index 00000000..6189240f --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.TestOpenAPICall.g.cs @@ -0,0 +1,138 @@ +#nullable enable + +namespace Speechify +{ + public partial interface IToolDefinitionsClient + { + /// + /// Test OpenAPI Operation
+ /// Call one operation of an `openapi` tool config that is not saved yet,
+ /// through the same path a run and a live session execute it, and answer
+ /// what the agent would read. Use it after
+ /// `POST /v1/agents/tool-definitions/import-openapi` and before
+ /// `POST /v1/agents/tool-definitions`, to check that the arguments reach
+ /// the vendor and that a `pick` / `derive` / `max_items` mapping keeps
+ /// what the agent needs.
+ /// Read the result in this order. `error` is set only when no call was
+ /// made: a config the create endpoint would refuse, an operation the
+ /// config does not have, a write operation, or a credential that does not
+ /// resolve or cannot mint a token. Otherwise `outcome` says how the call
+ /// ended, and only `ok` is a preview that worked. On `ok` with a JSON answer, `raw` is the
+ /// vendor's answer and `mapped` is the same answer after the operation's
+ /// `response` mapping, so one call shows both sides; `observation` is
+ /// what the agent reads, trimmed to its observation window.
+ /// Only a read operation runs (declared `read`, or a GET or HEAD that
+ /// declares no class): nobody approves a test call, so a write is
+ /// answered with `error` set and never reaches the vendor. Nothing is
+ /// persisted and the tool's own `max_requests_per_minute` does not apply,
+ /// but the call does reach the vendor and counts against the vendor's
+ /// own limits. It acts with a workspace credential, so it needs the
+ /// `content.manage` permission a tool create does.
+ /// A malformed request is a 400: a missing `operation`, `arguments` that
+ /// are not an object, or a field this endpoint does not define, which is
+ /// refused naming every unknown field. + ///
+ /// + /// + /// 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 TestOpenAPICallAsync( + + global::Speechify.TestOpenAPICallRequest request, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Test OpenAPI Operation
+ /// Call one operation of an `openapi` tool config that is not saved yet,
+ /// through the same path a run and a live session execute it, and answer
+ /// what the agent would read. Use it after
+ /// `POST /v1/agents/tool-definitions/import-openapi` and before
+ /// `POST /v1/agents/tool-definitions`, to check that the arguments reach
+ /// the vendor and that a `pick` / `derive` / `max_items` mapping keeps
+ /// what the agent needs.
+ /// Read the result in this order. `error` is set only when no call was
+ /// made: a config the create endpoint would refuse, an operation the
+ /// config does not have, a write operation, or a credential that does not
+ /// resolve or cannot mint a token. Otherwise `outcome` says how the call
+ /// ended, and only `ok` is a preview that worked. On `ok` with a JSON answer, `raw` is the
+ /// vendor's answer and `mapped` is the same answer after the operation's
+ /// `response` mapping, so one call shows both sides; `observation` is
+ /// what the agent reads, trimmed to its observation window.
+ /// Only a read operation runs (declared `read`, or a GET or HEAD that
+ /// declares no class): nobody approves a test call, so a write is
+ /// answered with `error` set and never reaches the vendor. Nothing is
+ /// persisted and the tool's own `max_requests_per_minute` does not apply,
+ /// but the call does reach the vendor and counts against the vendor's
+ /// own limits. It acts with a workspace credential, so it needs the
+ /// `content.manage` permission a tool create does.
+ /// A malformed request is a 400: a missing `operation`, `arguments` that
+ /// are not an object, or a field this endpoint does not define, which is
+ /// refused naming every unknown field. + ///
+ /// + /// + /// 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> TestOpenAPICallAsResponseAsync( + + global::Speechify.TestOpenAPICallRequest request, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Test OpenAPI Operation
+ /// Call one operation of an `openapi` tool config that is not saved yet,
+ /// through the same path a run and a live session execute it, and answer
+ /// what the agent would read. Use it after
+ /// `POST /v1/agents/tool-definitions/import-openapi` and before
+ /// `POST /v1/agents/tool-definitions`, to check that the arguments reach
+ /// the vendor and that a `pick` / `derive` / `max_items` mapping keeps
+ /// what the agent needs.
+ /// Read the result in this order. `error` is set only when no call was
+ /// made: a config the create endpoint would refuse, an operation the
+ /// config does not have, a write operation, or a credential that does not
+ /// resolve or cannot mint a token. Otherwise `outcome` says how the call
+ /// ended, and only `ok` is a preview that worked. On `ok` with a JSON answer, `raw` is the
+ /// vendor's answer and `mapped` is the same answer after the operation's
+ /// `response` mapping, so one call shows both sides; `observation` is
+ /// what the agent reads, trimmed to its observation window.
+ /// Only a read operation runs (declared `read`, or a GET or HEAD that
+ /// declares no class): nobody approves a test call, so a write is
+ /// answered with `error` set and never reaches the vendor. Nothing is
+ /// persisted and the tool's own `max_requests_per_minute` does not apply,
+ /// but the call does reach the vendor and counts against the vendor's
+ /// own limits. It acts with a workspace credential, so it needs the
+ /// `content.manage` permission a tool create does.
+ /// A malformed request is a 400: a missing `operation`, `arguments` that
+ /// are not an object, or a field this endpoint does not define, which is
+ /// refused naming every unknown field. + ///
+ /// + /// + /// The `openapi` config exactly as `POST /v1/agents/tool-definitions`
+ /// takes it, with the credential by reference. The whole config is
+ /// validated, not only the operation called. + /// + /// + /// The `id` of the operation to call, one of `config.operations[].id`;
+ /// the same value a hosted API `tool` route's `operation` names. + /// + /// + /// The arguments the agent would pass: each param by its `name`, plus
+ /// `body` when the operation takes one. Omitted, the call carries none. + /// + /// 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 TestOpenAPICallAsync( + global::Speechify.OpenAPIToolConfig config, + string operation, + string? speechifyVersion = default, + object? arguments = 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.TestWebhookConnection.g.cs b/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.TestWebhookConnection.g.cs index 1bd1161f..d1784b54 100644 --- a/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.TestWebhookConnection.g.cs +++ b/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.TestWebhookConnection.g.cs @@ -16,6 +16,8 @@ public partial interface IToolDefinitionsClient /// can recognise the test and skip its real side effect. Pass
/// `tool_id` from the edit-form flow so the server signs the probe
/// with the tool's stored HMAC secret.
+ /// Needs the `content.manage` permission, as creating a tool does: the
+ /// probe signs with a stored tool's secret for the URL in the request.
/// A field this endpoint does not define is refused with `400
/// validation_failed` naming every unknown field, rather than accepted
/// and silently dropped. @@ -43,6 +45,8 @@ public partial interface IToolDefinitionsClient /// can recognise the test and skip its real side effect. Pass
/// `tool_id` from the edit-form flow so the server signs the probe
/// with the tool's stored HMAC secret.
+ /// Needs the `content.manage` permission, as creating a tool does: the
+ /// probe signs with a stored tool's secret for the URL in the request.
/// A field this endpoint does not define is refused with `400
/// validation_failed` naming every unknown field, rather than accepted
/// and silently dropped. @@ -70,6 +74,8 @@ public partial interface IToolDefinitionsClient /// can recognise the test and skip its real side effect. Pass
/// `tool_id` from the edit-form flow so the server signs the probe
/// with the tool's stored HMAC secret.
+ /// Needs the `content.manage` permission, as creating a tool does: the
+ /// probe signs with a stored tool's secret for the URL in the request.
/// A field this endpoint does not define is refused with `400
/// validation_failed` naming every unknown field, rather than accepted
/// and silently dropped. diff --git a/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.Update.g.cs b/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.Update.g.cs index 710c6574..9ee832d3 100644 --- a/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.Update.g.cs +++ b/src/libs/Speechify/Generated/Speechify.IToolDefinitionsClient.Update.g.cs @@ -6,8 +6,12 @@ public partial interface IToolDefinitionsClient { /// /// Update Tool
- /// Update a tool. Tool kind is immutable — create a new tool to change
+ /// Update a tool. Tool kind is immutable - create a new tool to change
/// it.
+ /// `config` replaces the stored config whole; it is never merged. To
+ /// change one part of it (one `openapi` operation's `response` mapping,
+ /// say), read the tool with `GET`, edit that part, and send the full
+ /// config back.
/// A field this endpoint does not define is refused with `400
/// validation_failed` naming every unknown field, rather than accepted
/// and silently dropped.
@@ -30,8 +34,12 @@ public partial interface IToolDefinitionsClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Update Tool
- /// Update a tool. Tool kind is immutable — create a new tool to change
+ /// Update a tool. Tool kind is immutable - create a new tool to change
/// it.
+ /// `config` replaces the stored config whole; it is never merged. To
+ /// change one part of it (one `openapi` operation's `response` mapping,
+ /// say), read the tool with `GET`, edit that part, and send the full
+ /// config back.
/// A field this endpoint does not define is refused with `400
/// validation_failed` naming every unknown field, rather than accepted
/// and silently dropped.
@@ -54,8 +62,12 @@ public partial interface IToolDefinitionsClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Update Tool
- /// Update a tool. Tool kind is immutable — create a new tool to change
+ /// Update a tool. Tool kind is immutable - create a new tool to change
/// it.
+ /// `config` replaces the stored config whole; it is never merged. To
+ /// change one part of it (one `openapi` operation's `response` mapping,
+ /// say), read the tool with `GET`, edit that part, and send the full
+ /// config back.
/// A field this endpoint does not define is refused with `400
/// validation_failed` naming every unknown field, rather than accepted
/// and silently dropped.
diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.AgentToolConfig.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.AgentToolConfig.g.cs index 0b728ef3..fc79dfb9 100644 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.AgentToolConfig.g.cs +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.AgentToolConfig.g.cs @@ -67,19 +67,29 @@ public class AgentToolConfigJsonConverter : global::System.Text.Json.Serializati if (__jsonProps.Contains("long_running.filler_message")) __score3++; if (__jsonProps.Contains("long_running.on_duplicate")) __score3++; if (__jsonProps.Contains("long_running.wait_audio")) __score3++; + if (__jsonProps.Contains("response_mappings")) __score3++; if (__jsonProps.Contains("timeout_ms")) __score3++; if (__jsonProps.Contains("transport")) __score3++; + var __score4 = 0; + if (__jsonProps.Contains("auth")) __score4++; + if (__jsonProps.Contains("base_url")) __score4++; + if (__jsonProps.Contains("max_requests_per_minute")) __score4++; + if (__jsonProps.Contains("operations")) __score4++; + if (__jsonProps.Contains("spec_url")) __score4++; + if (__jsonProps.Contains("timeout_ms")) __score4++; var __bestScore = 0; var __bestIndex = -1; if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } if (__score2 > __bestScore) { __bestScore = __score2; __bestIndex = 2; } if (__score3 > __bestScore) { __bestScore = __score3; __bestIndex = 3; } + if (__score4 > __bestScore) { __bestScore = __score4; __bestIndex = 4; } global::Speechify.BuiltinToolConfig? builtinToolConfig = default; global::Speechify.WebhookToolConfig? webhookToolConfig = default; global::Speechify.ClientToolConfig? clientToolConfig = default; global::Speechify.MCPToolConfig? mCPToolConfig = default; + global::Speechify.OpenAPIToolConfig? openAPIToolConfig = default; if (__bestIndex >= 0) { if (__bestIndex == 0) @@ -142,9 +152,24 @@ public class AgentToolConfigJsonConverter : global::System.Text.Json.Serializati { } } + else if (__bestIndex == 4) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.OpenAPIToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.OpenAPIToolConfig).Name}"); + openAPIToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } } - if (builtinToolConfig == null && webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null) + if (builtinToolConfig == null && webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null && openAPIToolConfig == null) { try { @@ -161,7 +186,7 @@ public class AgentToolConfigJsonConverter : global::System.Text.Json.Serializati } } - if (builtinToolConfig == null && webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null) + if (builtinToolConfig == null && webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null && openAPIToolConfig == null) { try { @@ -178,7 +203,7 @@ public class AgentToolConfigJsonConverter : global::System.Text.Json.Serializati } } - if (builtinToolConfig == null && webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null) + if (builtinToolConfig == null && webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null && openAPIToolConfig == null) { try { @@ -195,7 +220,7 @@ public class AgentToolConfigJsonConverter : global::System.Text.Json.Serializati } } - if (builtinToolConfig == null && webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null) + if (builtinToolConfig == null && webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null && openAPIToolConfig == null) { try { @@ -212,6 +237,23 @@ public class AgentToolConfigJsonConverter : global::System.Text.Json.Serializati } } + if (builtinToolConfig == null && webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null && openAPIToolConfig == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.OpenAPIToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.OpenAPIToolConfig).Name}"); + openAPIToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + var __value = new global::Speechify.AgentToolConfig( builtinToolConfig, @@ -219,7 +261,9 @@ public class AgentToolConfigJsonConverter : global::System.Text.Json.Serializati clientToolConfig, - mCPToolConfig + mCPToolConfig, + + openAPIToolConfig ); return __value; @@ -258,6 +302,12 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.MCPToolConfig).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPToolConfig!, typeInfo); } + else if (value.IsOpenAPIToolConfig) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.OpenAPIToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.OpenAPIToolConfig).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAPIToolConfig!, typeInfo); + } } } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.CreateAgentToolRequestConfig.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.CreateAgentToolRequestConfig.g.cs index f2b12308..9aaa16fa 100644 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.CreateAgentToolRequestConfig.g.cs +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.CreateAgentToolRequestConfig.g.cs @@ -67,19 +67,29 @@ public class CreateAgentToolRequestConfigJsonConverter : global::System.Text.Jso if (__jsonProps.Contains("long_running.filler_message")) __score3++; if (__jsonProps.Contains("long_running.on_duplicate")) __score3++; if (__jsonProps.Contains("long_running.wait_audio")) __score3++; + if (__jsonProps.Contains("response_mappings")) __score3++; if (__jsonProps.Contains("timeout_ms")) __score3++; if (__jsonProps.Contains("transport")) __score3++; + var __score4 = 0; + if (__jsonProps.Contains("auth")) __score4++; + if (__jsonProps.Contains("base_url")) __score4++; + if (__jsonProps.Contains("max_requests_per_minute")) __score4++; + if (__jsonProps.Contains("operations")) __score4++; + if (__jsonProps.Contains("spec_url")) __score4++; + if (__jsonProps.Contains("timeout_ms")) __score4++; var __bestScore = 0; var __bestIndex = -1; if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } if (__score2 > __bestScore) { __bestScore = __score2; __bestIndex = 2; } if (__score3 > __bestScore) { __bestScore = __score3; __bestIndex = 3; } + if (__score4 > __bestScore) { __bestScore = __score4; __bestIndex = 4; } global::Speechify.BuiltinToolConfig? builtinToolConfig = default; global::Speechify.WebhookToolConfig? webhookToolConfig = default; global::Speechify.ClientToolConfig? clientToolConfig = default; global::Speechify.MCPToolConfig? mCPToolConfig = default; + global::Speechify.OpenAPIToolConfig? openAPIToolConfig = default; if (__bestIndex >= 0) { if (__bestIndex == 0) @@ -142,9 +152,24 @@ public class CreateAgentToolRequestConfigJsonConverter : global::System.Text.Jso { } } + else if (__bestIndex == 4) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.OpenAPIToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.OpenAPIToolConfig).Name}"); + openAPIToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } } - if (builtinToolConfig == null && webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null) + if (builtinToolConfig == null && webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null && openAPIToolConfig == null) { try { @@ -161,7 +186,7 @@ public class CreateAgentToolRequestConfigJsonConverter : global::System.Text.Jso } } - if (builtinToolConfig == null && webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null) + if (builtinToolConfig == null && webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null && openAPIToolConfig == null) { try { @@ -178,7 +203,7 @@ public class CreateAgentToolRequestConfigJsonConverter : global::System.Text.Jso } } - if (builtinToolConfig == null && webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null) + if (builtinToolConfig == null && webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null && openAPIToolConfig == null) { try { @@ -195,7 +220,7 @@ public class CreateAgentToolRequestConfigJsonConverter : global::System.Text.Jso } } - if (builtinToolConfig == null && webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null) + if (builtinToolConfig == null && webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null && openAPIToolConfig == null) { try { @@ -212,6 +237,23 @@ public class CreateAgentToolRequestConfigJsonConverter : global::System.Text.Jso } } + if (builtinToolConfig == null && webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null && openAPIToolConfig == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.OpenAPIToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.OpenAPIToolConfig).Name}"); + openAPIToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + var __value = new global::Speechify.CreateAgentToolRequestConfig( builtinToolConfig, @@ -219,7 +261,9 @@ public class CreateAgentToolRequestConfigJsonConverter : global::System.Text.Jso clientToolConfig, - mCPToolConfig + mCPToolConfig, + + openAPIToolConfig ); return __value; @@ -258,6 +302,12 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.MCPToolConfig).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPToolConfig!, typeInfo); } + else if (value.IsOpenAPIToolConfig) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.OpenAPIToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.OpenAPIToolConfig).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAPIToolConfig!, typeInfo); + } } } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.CreateToolRequestConfig.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.CreateToolRequestConfig.g.cs index 08a89a46..cda5f44c 100644 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.CreateToolRequestConfig.g.cs +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.CreateToolRequestConfig.g.cs @@ -63,17 +63,27 @@ public class CreateToolRequestConfigJsonConverter : global::System.Text.Json.Ser if (__jsonProps.Contains("long_running.filler_message")) __score2++; if (__jsonProps.Contains("long_running.on_duplicate")) __score2++; if (__jsonProps.Contains("long_running.wait_audio")) __score2++; + if (__jsonProps.Contains("response_mappings")) __score2++; if (__jsonProps.Contains("timeout_ms")) __score2++; if (__jsonProps.Contains("transport")) __score2++; + var __score3 = 0; + if (__jsonProps.Contains("auth")) __score3++; + if (__jsonProps.Contains("base_url")) __score3++; + if (__jsonProps.Contains("max_requests_per_minute")) __score3++; + if (__jsonProps.Contains("operations")) __score3++; + if (__jsonProps.Contains("spec_url")) __score3++; + if (__jsonProps.Contains("timeout_ms")) __score3++; var __bestScore = 0; var __bestIndex = -1; if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } if (__score2 > __bestScore) { __bestScore = __score2; __bestIndex = 2; } + if (__score3 > __bestScore) { __bestScore = __score3; __bestIndex = 3; } global::Speechify.WebhookToolConfig? webhookToolConfig = default; global::Speechify.ClientToolConfig? clientToolConfig = default; global::Speechify.MCPToolConfig? mCPToolConfig = default; + global::Speechify.OpenAPIToolConfig? openAPIToolConfig = default; if (__bestIndex >= 0) { if (__bestIndex == 0) @@ -121,9 +131,24 @@ public class CreateToolRequestConfigJsonConverter : global::System.Text.Json.Ser { } } + else if (__bestIndex == 3) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.OpenAPIToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.OpenAPIToolConfig).Name}"); + openAPIToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } } - if (webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null) + if (webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null && openAPIToolConfig == null) { try { @@ -140,7 +165,7 @@ public class CreateToolRequestConfigJsonConverter : global::System.Text.Json.Ser } } - if (webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null) + if (webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null && openAPIToolConfig == null) { try { @@ -157,7 +182,7 @@ public class CreateToolRequestConfigJsonConverter : global::System.Text.Json.Ser } } - if (webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null) + if (webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null && openAPIToolConfig == null) { try { @@ -174,12 +199,31 @@ public class CreateToolRequestConfigJsonConverter : global::System.Text.Json.Ser } } + if (webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null && openAPIToolConfig == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.OpenAPIToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.OpenAPIToolConfig).Name}"); + openAPIToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + var __value = new global::Speechify.CreateToolRequestConfig( webhookToolConfig, clientToolConfig, - mCPToolConfig + mCPToolConfig, + + openAPIToolConfig ); return __value; @@ -212,6 +256,12 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.MCPToolConfig).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPToolConfig!, typeInfo); } + else if (value.IsOpenAPIToolConfig) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.OpenAPIToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.OpenAPIToolConfig).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAPIToolConfig!, typeInfo); + } } } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.CredentialKind.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.CredentialKind.g.cs new file mode 100644 index 00000000..ff5ebf35 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.CredentialKind.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class CredentialKindJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.CredentialKind 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.CredentialKindExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.CredentialKind)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.CredentialKind); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.CredentialKind value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Speechify.CredentialKindExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.CredentialKindNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.CredentialKindNullable.g.cs new file mode 100644 index 00000000..11dcee2d --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.CredentialKindNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class CredentialKindNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.CredentialKind? 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.CredentialKindExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.CredentialKind)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.CredentialKind?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.CredentialKind? 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.CredentialKindExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.CredentialReferenceResourceType.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.CredentialReferenceResourceType.g.cs new file mode 100644 index 00000000..99d4c637 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.CredentialReferenceResourceType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class CredentialReferenceResourceTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.CredentialReferenceResourceType 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.CredentialReferenceResourceTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.CredentialReferenceResourceType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.CredentialReferenceResourceType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.CredentialReferenceResourceType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Speechify.CredentialReferenceResourceTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.CredentialReferenceResourceTypeNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.CredentialReferenceResourceTypeNullable.g.cs new file mode 100644 index 00000000..392fa476 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.CredentialReferenceResourceTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class CredentialReferenceResourceTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.CredentialReferenceResourceType? 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.CredentialReferenceResourceTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.CredentialReferenceResourceType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.CredentialReferenceResourceType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.CredentialReferenceResourceType? 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.CredentialReferenceResourceTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.ImportOpenApiRequestSpec.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.ImportOpenApiRequestSpec.g.cs new file mode 100644 index 00000000..688ac23d --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.ImportOpenApiRequestSpec.g.cs @@ -0,0 +1,162 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Speechify.JsonConverters +{ + /// + public class ImportOpenApiRequestSpecJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.ImportOpenApiRequestSpec 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."); + + + using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); + var __rawJson = __jsonDocument.RootElement.GetRawText(); + var __jsonProps = new global::System.Collections.Generic.HashSet(); + if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name); + } + } + + var __score0 = 0; + { + var __ti = typeInfoResolver.GetTypeInfo(typeof(object), options); + if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) + { + foreach (var __prop in __ti.Properties) + { + if (__jsonProps.Contains(__prop.Name)) __score0++; + } + } + } + var __score1 = 0; + { + var __ti = typeInfoResolver.GetTypeInfo(typeof(string), options); + if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) + { + foreach (var __prop in __ti.Properties) + { + if (__jsonProps.Contains(__prop.Name)) __score1++; + } + } + } + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + object? importOpenApiRequestSpecVariant1 = default; + string? importOpenApiRequestSpecVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(object), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(object).Name}"); + importOpenApiRequestSpecVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + else if (__bestIndex == 1) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + importOpenApiRequestSpecVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (importOpenApiRequestSpecVariant1 == null && importOpenApiRequestSpecVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(object), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(object).Name}"); + importOpenApiRequestSpecVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + if (importOpenApiRequestSpecVariant1 == null && importOpenApiRequestSpecVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + importOpenApiRequestSpecVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Speechify.ImportOpenApiRequestSpec( + importOpenApiRequestSpecVariant1, + + importOpenApiRequestSpecVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.ImportOpenApiRequestSpec 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.IsImportOpenApiRequestSpecVariant1) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(object), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(object).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImportOpenApiRequestSpecVariant1!, typeInfo); + } + else if (value.IsImportOpenApiRequestSpecVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImportOpenApiRequestSpecVariant2!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.OAuth2TokenEndpointAuthMethod.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.OAuth2TokenEndpointAuthMethod.g.cs new file mode 100644 index 00000000..112f3080 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.OAuth2TokenEndpointAuthMethod.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class OAuth2TokenEndpointAuthMethodJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.OAuth2TokenEndpointAuthMethod 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.OAuth2TokenEndpointAuthMethodExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.OAuth2TokenEndpointAuthMethod)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.OAuth2TokenEndpointAuthMethod); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.OAuth2TokenEndpointAuthMethod value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Speechify.OAuth2TokenEndpointAuthMethodExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.OAuth2TokenEndpointAuthMethodNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.OAuth2TokenEndpointAuthMethodNullable.g.cs new file mode 100644 index 00000000..975a588c --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.OAuth2TokenEndpointAuthMethodNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class OAuth2TokenEndpointAuthMethodNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.OAuth2TokenEndpointAuthMethod? 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.OAuth2TokenEndpointAuthMethodExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.OAuth2TokenEndpointAuthMethod)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.OAuth2TokenEndpointAuthMethod?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.OAuth2TokenEndpointAuthMethod? 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.OAuth2TokenEndpointAuthMethodExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.OpenApiBodyContentType.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.OpenApiBodyContentType.g.cs new file mode 100644 index 00000000..01a20993 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.OpenApiBodyContentType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class OpenApiBodyContentTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.OpenApiBodyContentType 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.OpenApiBodyContentTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.OpenApiBodyContentType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.OpenApiBodyContentType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.OpenApiBodyContentType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Speechify.OpenApiBodyContentTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.OpenApiBodyContentTypeNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.OpenApiBodyContentTypeNullable.g.cs new file mode 100644 index 00000000..06066ed6 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.OpenApiBodyContentTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class OpenApiBodyContentTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.OpenApiBodyContentType? 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.OpenApiBodyContentTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.OpenApiBodyContentType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.OpenApiBodyContentType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.OpenApiBodyContentType? 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.OpenApiBodyContentTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.OpenApiOperationMethod.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.OpenApiOperationMethod.g.cs new file mode 100644 index 00000000..85ab8811 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.OpenApiOperationMethod.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class OpenApiOperationMethodJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.OpenApiOperationMethod 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.OpenApiOperationMethodExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.OpenApiOperationMethod)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.OpenApiOperationMethod); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.OpenApiOperationMethod value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Speechify.OpenApiOperationMethodExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.OpenApiOperationMethodNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.OpenApiOperationMethodNullable.g.cs new file mode 100644 index 00000000..33302de8 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.OpenApiOperationMethodNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class OpenApiOperationMethodNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.OpenApiOperationMethod? 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.OpenApiOperationMethodExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.OpenApiOperationMethod)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.OpenApiOperationMethod?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.OpenApiOperationMethod? 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.OpenApiOperationMethodExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.OpenApiParamIn.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.OpenApiParamIn.g.cs new file mode 100644 index 00000000..3d3de161 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.OpenApiParamIn.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class OpenApiParamInJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.OpenApiParamIn 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.OpenApiParamInExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.OpenApiParamIn)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.OpenApiParamIn); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.OpenApiParamIn value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Speechify.OpenApiParamInExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.OpenApiParamInNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.OpenApiParamInNullable.g.cs new file mode 100644 index 00000000..bc165b61 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.OpenApiParamInNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class OpenApiParamInNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.OpenApiParamIn? 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.OpenApiParamInExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.OpenApiParamIn)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.OpenApiParamIn?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.OpenApiParamIn? 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.OpenApiParamInExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TestOpenApiCallResultOutcome.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TestOpenApiCallResultOutcome.g.cs new file mode 100644 index 00000000..73b88160 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.TestOpenApiCallResultOutcome.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class TestOpenApiCallResultOutcomeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.TestOpenApiCallResultOutcome 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.TestOpenApiCallResultOutcomeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.TestOpenApiCallResultOutcome)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.TestOpenApiCallResultOutcome); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.TestOpenApiCallResultOutcome value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Speechify.TestOpenApiCallResultOutcomeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.TestOpenApiCallResultOutcomeNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.TestOpenApiCallResultOutcomeNullable.g.cs new file mode 100644 index 00000000..36614b84 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.TestOpenApiCallResultOutcomeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class TestOpenApiCallResultOutcomeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.TestOpenApiCallResultOutcome? 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.TestOpenApiCallResultOutcomeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.TestOpenApiCallResultOutcome)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.TestOpenApiCallResultOutcome?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.TestOpenApiCallResultOutcome? 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.TestOpenApiCallResultOutcomeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.ToolConfig.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.ToolConfig.g.cs index ef94919e..c84455b2 100644 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.ToolConfig.g.cs +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.ToolConfig.g.cs @@ -63,17 +63,27 @@ public class ToolConfigJsonConverter : global::System.Text.Json.Serialization.Js if (__jsonProps.Contains("long_running.filler_message")) __score2++; if (__jsonProps.Contains("long_running.on_duplicate")) __score2++; if (__jsonProps.Contains("long_running.wait_audio")) __score2++; + if (__jsonProps.Contains("response_mappings")) __score2++; if (__jsonProps.Contains("timeout_ms")) __score2++; if (__jsonProps.Contains("transport")) __score2++; + var __score3 = 0; + if (__jsonProps.Contains("auth")) __score3++; + if (__jsonProps.Contains("base_url")) __score3++; + if (__jsonProps.Contains("max_requests_per_minute")) __score3++; + if (__jsonProps.Contains("operations")) __score3++; + if (__jsonProps.Contains("spec_url")) __score3++; + if (__jsonProps.Contains("timeout_ms")) __score3++; var __bestScore = 0; var __bestIndex = -1; if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } if (__score2 > __bestScore) { __bestScore = __score2; __bestIndex = 2; } + if (__score3 > __bestScore) { __bestScore = __score3; __bestIndex = 3; } global::Speechify.WebhookToolConfig? webhookToolConfig = default; global::Speechify.ClientToolConfig? clientToolConfig = default; global::Speechify.MCPToolConfig? mCPToolConfig = default; + global::Speechify.OpenAPIToolConfig? openAPIToolConfig = default; if (__bestIndex >= 0) { if (__bestIndex == 0) @@ -121,9 +131,24 @@ public class ToolConfigJsonConverter : global::System.Text.Json.Serialization.Js { } } + else if (__bestIndex == 3) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.OpenAPIToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.OpenAPIToolConfig).Name}"); + openAPIToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } } - if (webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null) + if (webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null && openAPIToolConfig == null) { try { @@ -140,7 +165,7 @@ public class ToolConfigJsonConverter : global::System.Text.Json.Serialization.Js } } - if (webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null) + if (webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null && openAPIToolConfig == null) { try { @@ -157,7 +182,7 @@ public class ToolConfigJsonConverter : global::System.Text.Json.Serialization.Js } } - if (webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null) + if (webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null && openAPIToolConfig == null) { try { @@ -174,12 +199,31 @@ public class ToolConfigJsonConverter : global::System.Text.Json.Serialization.Js } } + if (webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null && openAPIToolConfig == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.OpenAPIToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.OpenAPIToolConfig).Name}"); + openAPIToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + var __value = new global::Speechify.ToolConfig( webhookToolConfig, clientToolConfig, - mCPToolConfig + mCPToolConfig, + + openAPIToolConfig ); return __value; @@ -212,6 +256,12 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.MCPToolConfig).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPToolConfig!, typeInfo); } + else if (value.IsOpenAPIToolConfig) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.OpenAPIToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.OpenAPIToolConfig).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAPIToolConfig!, typeInfo); + } } } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.UpdateToolRequestConfig.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.UpdateToolRequestConfig.g.cs index 3df7d703..4208ec3f 100644 --- a/src/libs/Speechify/Generated/Speechify.JsonConverters.UpdateToolRequestConfig.g.cs +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.UpdateToolRequestConfig.g.cs @@ -63,17 +63,27 @@ public class UpdateToolRequestConfigJsonConverter : global::System.Text.Json.Ser if (__jsonProps.Contains("long_running.filler_message")) __score2++; if (__jsonProps.Contains("long_running.on_duplicate")) __score2++; if (__jsonProps.Contains("long_running.wait_audio")) __score2++; + if (__jsonProps.Contains("response_mappings")) __score2++; if (__jsonProps.Contains("timeout_ms")) __score2++; if (__jsonProps.Contains("transport")) __score2++; + var __score3 = 0; + if (__jsonProps.Contains("auth")) __score3++; + if (__jsonProps.Contains("base_url")) __score3++; + if (__jsonProps.Contains("max_requests_per_minute")) __score3++; + if (__jsonProps.Contains("operations")) __score3++; + if (__jsonProps.Contains("spec_url")) __score3++; + if (__jsonProps.Contains("timeout_ms")) __score3++; var __bestScore = 0; var __bestIndex = -1; if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } if (__score2 > __bestScore) { __bestScore = __score2; __bestIndex = 2; } + if (__score3 > __bestScore) { __bestScore = __score3; __bestIndex = 3; } global::Speechify.WebhookToolConfig? webhookToolConfig = default; global::Speechify.ClientToolConfig? clientToolConfig = default; global::Speechify.MCPToolConfig? mCPToolConfig = default; + global::Speechify.OpenAPIToolConfig? openAPIToolConfig = default; if (__bestIndex >= 0) { if (__bestIndex == 0) @@ -121,9 +131,24 @@ public class UpdateToolRequestConfigJsonConverter : global::System.Text.Json.Ser { } } + else if (__bestIndex == 3) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.OpenAPIToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.OpenAPIToolConfig).Name}"); + openAPIToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } } - if (webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null) + if (webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null && openAPIToolConfig == null) { try { @@ -140,7 +165,7 @@ public class UpdateToolRequestConfigJsonConverter : global::System.Text.Json.Ser } } - if (webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null) + if (webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null && openAPIToolConfig == null) { try { @@ -157,7 +182,7 @@ public class UpdateToolRequestConfigJsonConverter : global::System.Text.Json.Ser } } - if (webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null) + if (webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null && openAPIToolConfig == null) { try { @@ -174,12 +199,31 @@ public class UpdateToolRequestConfigJsonConverter : global::System.Text.Json.Ser } } + if (webhookToolConfig == null && clientToolConfig == null && mCPToolConfig == null && openAPIToolConfig == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.OpenAPIToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.OpenAPIToolConfig).Name}"); + openAPIToolConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + var __value = new global::Speechify.UpdateToolRequestConfig( webhookToolConfig, clientToolConfig, - mCPToolConfig + mCPToolConfig, + + openAPIToolConfig ); return __value; @@ -212,6 +256,12 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.MCPToolConfig).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.MCPToolConfig!, typeInfo); } + else if (value.IsOpenAPIToolConfig) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Speechify.OpenAPIToolConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Speechify.OpenAPIToolConfig).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAPIToolConfig!, typeInfo); + } } } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.JsonSerializerContext.g.cs index d4b4aed6..0bea24e0 100644 --- a/src/libs/Speechify/Generated/Speechify.JsonSerializerContext.g.cs +++ b/src/libs/Speechify/Generated/Speechify.JsonSerializerContext.g.cs @@ -395,8 +395,19 @@ namespace Speechify [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthDiscriminator))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthDiscriminatorType), TypeInfoPropertyName = "MCPAuthDiscriminatorType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolActionClass), TypeInfoPropertyName = "ToolActionClass2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolResponseMapping))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPToolConfig))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenApiOperationMethod), TypeInfoPropertyName = "OpenApiOperationMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenApiParamIn), TypeInfoPropertyName = "OpenApiParamIn2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenAPIParam))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenApiBodyContentType), TypeInfoPropertyName = "OpenApiBodyContentType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenAPIBody))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenAPIOperation))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenAPIToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentToolConfig), TypeInfoPropertyName = "AgentToolConfig2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolApprovalClass), TypeInfoPropertyName = "ToolApprovalClass2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolReach), TypeInfoPropertyName = "ToolReach2")] @@ -432,10 +443,47 @@ namespace Speechify [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestWebhookConnectionRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WebhookProbeResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ImportOpenApiRequestSpec), TypeInfoPropertyName = "ImportOpenApiRequestSpec2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ImportOpenAPIRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ImportedOpenAPIDocument))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SkippedOpenAPIOperation))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ImportOpenAPIResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestOpenAPICallRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestOpenApiCallResultOutcome), TypeInfoPropertyName = "TestOpenApiCallResultOutcome2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestOpenAPICallResult))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SystemBuiltinInfoExecution), TypeInfoPropertyName = "SystemBuiltinInfoExecution2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SystemBuiltinInfo))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListSystemBuiltinsResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialKind), TypeInfoPropertyName = "CredentialKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OAuth2TokenEndpointAuthMethod), TypeInfoPropertyName = "OAuth2TokenEndpointAuthMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialConfigViewOauth2ClientCredentials))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialConfigViewOauth2Jwt))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialConfigViewBasic))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialConfigViewBearer))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialConfigViewSharedSecret))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialConfigViewCustomHeaders))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialConfigView))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialReferenceResourceType), TypeInfoPropertyName = "CredentialReferenceResourceType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialReference))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialUsedBy))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Credential))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListCredentialsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OAuth2ClientCredentialsConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OAuth2JWTConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.BasicAuthConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.BearerAuthConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CustomHeadersConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SharedSecretConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateCredentialRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateCredentialRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialInUseErrorDetailDetails))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialInUseErrorDetail))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialInUseError))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestType), TypeInfoPropertyName = "TestType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationMessageRole), TypeInfoPropertyName = "SimulationMessageRole2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationMessage))] @@ -466,6 +514,18 @@ 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))] @@ -514,18 +574,6 @@ namespace Speechify [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateShareLinkRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateShareLinkResponseStatus), TypeInfoPropertyName = "CreateShareLinkResponseStatus2")] - 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.CreateShareLinkResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RevealShareLinkTokenResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ShareLinkPreview))] @@ -870,6 +918,9 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthVariant3Type?), TypeInfoPropertyName = "NullableMCPAuthVariant3Type2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthDiscriminatorType?), TypeInfoPropertyName = "NullableMCPAuthDiscriminatorType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolActionClass?), TypeInfoPropertyName = "NullableToolActionClass2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenApiOperationMethod?), TypeInfoPropertyName = "NullableOpenApiOperationMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenApiParamIn?), TypeInfoPropertyName = "NullableOpenApiParamIn2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenApiBodyContentType?), TypeInfoPropertyName = "NullableOpenApiBodyContentType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentToolConfig?), TypeInfoPropertyName = "NullableAgentToolConfig2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolApprovalClass?), TypeInfoPropertyName = "NullableToolApprovalClass2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolReach?), TypeInfoPropertyName = "NullableToolReach2")] @@ -880,7 +931,12 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [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.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")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SystemBuiltinInfoExecution?), TypeInfoPropertyName = "NullableSystemBuiltinInfoExecution2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialKind?), TypeInfoPropertyName = "NullableCredentialKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OAuth2TokenEndpointAuthMethod?), TypeInfoPropertyName = "NullableOAuth2TokenEndpointAuthMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CredentialReferenceResourceType?), TypeInfoPropertyName = "NullableCredentialReferenceResourceType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestType?), TypeInfoPropertyName = "NullableTestType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SimulationMessageRole?), TypeInfoPropertyName = "NullableSimulationMessageRole2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ParameterCheckMode?), TypeInfoPropertyName = "NullableParameterCheckMode2")] @@ -970,6 +1026,18 @@ 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))] @@ -1005,12 +1073,17 @@ 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))] + [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))] [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))] @@ -1026,18 +1099,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))] @@ -1123,6 +1184,7 @@ static void AddConverters(global::System.Text.Json.JsonSerializerOptions options options.Converters.Add(new global::Speechify.JsonConverters.ToolConfigJsonConverter()); options.Converters.Add(new global::Speechify.JsonConverters.CreateToolRequestConfigJsonConverter()); options.Converters.Add(new global::Speechify.JsonConverters.UpdateToolRequestConfigJsonConverter()); + options.Converters.Add(new global::Speechify.JsonConverters.ImportOpenApiRequestSpecJsonConverter()); options.Converters.Add(new global::Speechify.JsonConverters.CreateAgentTestRequestConfigJsonConverter()); options.Converters.Add(new global::Speechify.JsonConverters.AgentTestConfigJsonConverter()); options.Converters.Add(new global::Speechify.JsonConverters.UpdateAgentTestRequestConfigJsonConverter()); @@ -1512,6 +1574,18 @@ public override bool CanConvert(global::System.Type typeToConvert) || typeToConvert == typeof(global::Speechify.ToolActionClass?) + || typeToConvert == typeof(global::Speechify.OpenApiOperationMethod) + + || typeToConvert == typeof(global::Speechify.OpenApiOperationMethod?) + + || typeToConvert == typeof(global::Speechify.OpenApiParamIn) + + || typeToConvert == typeof(global::Speechify.OpenApiParamIn?) + + || typeToConvert == typeof(global::Speechify.OpenApiBodyContentType) + + || typeToConvert == typeof(global::Speechify.OpenApiBodyContentType?) + || typeToConvert == typeof(global::Speechify.ToolApprovalClass) || typeToConvert == typeof(global::Speechify.ToolApprovalClass?) @@ -1528,10 +1602,26 @@ public override bool CanConvert(global::System.Type typeToConvert) || typeToConvert == typeof(global::Speechify.McpProbeErrorDetailsStage?) + || typeToConvert == typeof(global::Speechify.TestOpenApiCallResultOutcome) + + || typeToConvert == typeof(global::Speechify.TestOpenApiCallResultOutcome?) + || typeToConvert == typeof(global::Speechify.SystemBuiltinInfoExecution) || typeToConvert == typeof(global::Speechify.SystemBuiltinInfoExecution?) + || typeToConvert == typeof(global::Speechify.CredentialKind) + + || typeToConvert == typeof(global::Speechify.CredentialKind?) + + || typeToConvert == typeof(global::Speechify.OAuth2TokenEndpointAuthMethod) + + || typeToConvert == typeof(global::Speechify.OAuth2TokenEndpointAuthMethod?) + + || typeToConvert == typeof(global::Speechify.CredentialReferenceResourceType) + + || typeToConvert == typeof(global::Speechify.CredentialReferenceResourceType?) + || typeToConvert == typeof(global::Speechify.TestType) || typeToConvert == typeof(global::Speechify.TestType?) @@ -2671,6 +2761,36 @@ public override bool CanConvert(global::System.Type typeToConvert) return new global::Speechify.JsonConverters.ToolActionClassNullableJsonConverter(); } + if (typeToConvert == typeof(global::Speechify.OpenApiOperationMethod)) + { + return new global::Speechify.JsonConverters.OpenApiOperationMethodJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.OpenApiOperationMethod?)) + { + return new global::Speechify.JsonConverters.OpenApiOperationMethodNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.OpenApiParamIn)) + { + return new global::Speechify.JsonConverters.OpenApiParamInJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.OpenApiParamIn?)) + { + return new global::Speechify.JsonConverters.OpenApiParamInNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.OpenApiBodyContentType)) + { + return new global::Speechify.JsonConverters.OpenApiBodyContentTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.OpenApiBodyContentType?)) + { + return new global::Speechify.JsonConverters.OpenApiBodyContentTypeNullableJsonConverter(); + } + if (typeToConvert == typeof(global::Speechify.ToolApprovalClass)) { return new global::Speechify.JsonConverters.ToolApprovalClassJsonConverter(); @@ -2711,6 +2831,16 @@ public override bool CanConvert(global::System.Type typeToConvert) return new global::Speechify.JsonConverters.McpProbeErrorDetailsStageNullableJsonConverter(); } + if (typeToConvert == typeof(global::Speechify.TestOpenApiCallResultOutcome)) + { + return new global::Speechify.JsonConverters.TestOpenApiCallResultOutcomeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.TestOpenApiCallResultOutcome?)) + { + return new global::Speechify.JsonConverters.TestOpenApiCallResultOutcomeNullableJsonConverter(); + } + if (typeToConvert == typeof(global::Speechify.SystemBuiltinInfoExecution)) { return new global::Speechify.JsonConverters.SystemBuiltinInfoExecutionJsonConverter(); @@ -2721,6 +2851,36 @@ public override bool CanConvert(global::System.Type typeToConvert) return new global::Speechify.JsonConverters.SystemBuiltinInfoExecutionNullableJsonConverter(); } + if (typeToConvert == typeof(global::Speechify.CredentialKind)) + { + return new global::Speechify.JsonConverters.CredentialKindJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.CredentialKind?)) + { + return new global::Speechify.JsonConverters.CredentialKindNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.OAuth2TokenEndpointAuthMethod)) + { + return new global::Speechify.JsonConverters.OAuth2TokenEndpointAuthMethodJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.OAuth2TokenEndpointAuthMethod?)) + { + return new global::Speechify.JsonConverters.OAuth2TokenEndpointAuthMethodNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.CredentialReferenceResourceType)) + { + return new global::Speechify.JsonConverters.CredentialReferenceResourceTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.CredentialReferenceResourceType?)) + { + return new global::Speechify.JsonConverters.CredentialReferenceResourceTypeNullableJsonConverter(); + } + if (typeToConvert == typeof(global::Speechify.TestType)) { return new global::Speechify.JsonConverters.TestTypeJsonConverter(); diff --git a/src/libs/Speechify/Generated/Speechify.JsonSerializerContextTypes.g.cs b/src/libs/Speechify/Generated/Speechify.JsonSerializerContextTypes.g.cs index 51d871b6..21edb256 100644 --- a/src/libs/Speechify/Generated/Speechify.JsonSerializerContextTypes.g.cs +++ b/src/libs/Speechify/Generated/Speechify.JsonSerializerContextTypes.g.cs @@ -1545,1459 +1545,1651 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Speechify.MCPToolConfig? Type378 { get; set; } + public global::Speechify.ToolResponseMapping? Type378 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type379 { get; set; } + public global::Speechify.MCPToolConfig? Type379 { get; set; } /// /// /// - public global::Speechify.AgentToolConfig? Type380 { get; set; } + public global::System.Collections.Generic.Dictionary? Type380 { get; set; } /// /// /// - public global::Speechify.ToolApprovalClass? Type381 { get; set; } + public global::System.Collections.Generic.Dictionary? Type381 { get; set; } /// /// /// - public global::Speechify.ToolReach? Type382 { get; set; } + public global::Speechify.OpenApiOperationMethod? Type382 { get; set; } /// /// /// - public global::Speechify.AgentTool? Type383 { get; set; } + public global::Speechify.OpenApiParamIn? Type383 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type384 { get; set; } + public global::Speechify.OpenAPIParam? Type384 { get; set; } /// /// /// - public global::Speechify.ListAgentToolsResponse? Type385 { get; set; } + public global::Speechify.OpenApiBodyContentType? Type385 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type386 { get; set; } + public global::Speechify.OpenAPIBody? Type386 { get; set; } /// /// /// - public global::Speechify.CreateAgentToolRequestConfig? Type387 { get; set; } + public global::Speechify.OpenAPIOperation? Type387 { get; set; } /// /// /// - public global::Speechify.CreateAgentToolRequest? Type388 { get; set; } + public global::System.Collections.Generic.IList? Type388 { get; set; } /// /// /// - public global::Speechify.ToolNameHolderKind? Type389 { get; set; } + public global::Speechify.OpenAPIToolConfig? Type389 { get; set; } /// /// /// - public global::Speechify.ToolNameHolder? Type390 { get; set; } + public global::System.Collections.Generic.IList? Type390 { get; set; } /// /// /// - public global::Speechify.ToolNameTakenErrorDetailDetails? Type391 { get; set; } + public global::Speechify.AgentToolConfig? Type391 { get; set; } /// /// /// - public global::Speechify.ToolNameTakenErrorDetail? Type392 { get; set; } + public global::Speechify.ToolApprovalClass? Type392 { get; set; } /// /// /// - public global::Speechify.ToolNameTakenError? Type393 { get; set; } + public global::Speechify.ToolReach? Type393 { get; set; } /// /// /// - public global::Speechify.UpdateAgentToolRequestConfig? Type394 { get; set; } + public global::Speechify.AgentTool? Type394 { get; set; } /// /// /// - public global::Speechify.UpdateAgentToolRequest? Type395 { get; set; } + public global::System.Collections.Generic.IList? Type395 { get; set; } /// /// /// - public global::Speechify.ToolConfig? Type396 { get; set; } + public global::Speechify.ListAgentToolsResponse? Type396 { get; set; } /// /// /// - public global::Speechify.Tool? Type397 { get; set; } + public global::System.Collections.Generic.IList? Type397 { get; set; } /// /// /// - public global::Speechify.ListToolsResponse? Type398 { get; set; } + public global::Speechify.CreateAgentToolRequestConfig? Type398 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type399 { get; set; } + public global::Speechify.CreateAgentToolRequest? Type399 { get; set; } /// /// /// - public global::Speechify.CreateToolRequestConfig? Type400 { get; set; } + public global::Speechify.ToolNameHolderKind? Type400 { get; set; } /// /// /// - public global::Speechify.CreateToolRequest? Type401 { get; set; } + public global::Speechify.ToolNameHolder? Type401 { get; set; } /// /// /// - public global::Speechify.UpdateToolRequestConfig? Type402 { get; set; } + public global::Speechify.ToolNameTakenErrorDetailDetails? Type402 { get; set; } /// /// /// - public global::Speechify.UpdateToolRequest? Type403 { get; set; } + public global::Speechify.ToolNameTakenErrorDetail? Type403 { get; set; } /// /// /// - public global::Speechify.ToolAttachedAgent? Type404 { get; set; } + public global::Speechify.ToolNameTakenError? Type404 { get; set; } /// /// /// - public global::Speechify.ListToolAttachedAgentsResponse? Type405 { get; set; } + public global::Speechify.UpdateAgentToolRequestConfig? Type405 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type406 { get; set; } + public global::Speechify.UpdateAgentToolRequest? Type406 { get; set; } /// /// /// - public global::Speechify.TestMCPConnectionRequest? Type407 { get; set; } + public global::Speechify.ToolConfig? Type407 { get; set; } /// /// /// - public global::Speechify.MCPProbeTool? Type408 { get; set; } + public global::Speechify.Tool? Type408 { get; set; } /// /// /// - public global::Speechify.McpProbeErrorDetailsStage? Type409 { get; set; } + public global::Speechify.ListToolsResponse? Type409 { get; set; } /// /// /// - public global::Speechify.MCPProbeErrorDetails? Type410 { get; set; } + public global::System.Collections.Generic.IList? Type410 { get; set; } /// /// /// - public global::Speechify.MCPProbeResult? Type411 { get; set; } + public global::Speechify.CreateToolRequestConfig? Type411 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type412 { get; set; } + public global::Speechify.CreateToolRequest? Type412 { get; set; } /// /// /// - public global::Speechify.TestWebhookConnectionRequest? Type413 { get; set; } + public global::Speechify.UpdateToolRequestConfig? Type413 { get; set; } /// /// /// - public global::Speechify.WebhookProbeResult? Type414 { get; set; } + public global::Speechify.UpdateToolRequest? Type414 { get; set; } /// /// /// - public global::Speechify.SystemBuiltinInfoExecution? Type415 { get; set; } + public global::Speechify.ToolAttachedAgent? Type415 { get; set; } /// /// /// - public global::Speechify.SystemBuiltinInfo? Type416 { get; set; } + public global::Speechify.ListToolAttachedAgentsResponse? Type416 { get; set; } /// /// /// - public global::Speechify.ListSystemBuiltinsResponse? Type417 { get; set; } + public global::System.Collections.Generic.IList? Type417 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type418 { get; set; } + public global::Speechify.TestMCPConnectionRequest? Type418 { get; set; } /// /// /// - public global::Speechify.TestType? Type419 { get; set; } + public global::Speechify.MCPProbeTool? Type419 { get; set; } /// /// /// - public global::Speechify.SimulationMessageRole? Type420 { get; set; } + public global::Speechify.McpProbeErrorDetailsStage? Type420 { get; set; } /// /// /// - public global::Speechify.SimulationMessage? Type421 { get; set; } + public global::Speechify.MCPProbeErrorDetails? Type421 { get; set; } /// /// /// - public global::Speechify.ReplyConfig? Type422 { get; set; } + public global::Speechify.MCPProbeResult? Type422 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type423 { get; set; } + public global::System.Collections.Generic.IList? Type423 { get; set; } /// /// /// - public global::Speechify.ParameterCheckMode? Type424 { get; set; } + public global::Speechify.TestWebhookConnectionRequest? Type424 { get; set; } /// /// /// - public global::Speechify.ParameterCheck? Type425 { get; set; } + public global::Speechify.WebhookProbeResult? Type425 { get; set; } /// /// /// - public global::Speechify.ToolCallConfig? Type426 { get; set; } + public global::Speechify.ImportOpenApiRequestSpec? Type426 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type427 { get; set; } + public global::Speechify.ImportOpenAPIRequest? Type427 { get; set; } /// /// /// - public global::Speechify.DataAssertionMode? Type428 { get; set; } + public global::Speechify.ImportedOpenAPIDocument? Type428 { get; set; } /// /// /// - public global::Speechify.DataAssertion? Type429 { get; set; } + public global::Speechify.SkippedOpenAPIOperation? Type429 { get; set; } /// /// /// - public global::Speechify.SimulationConfig? Type430 { get; set; } + public global::Speechify.ImportOpenAPIResult? Type430 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type431 { get; set; } + public global::System.Collections.Generic.IList? Type431 { get; set; } /// /// /// - public global::Speechify.CreateAgentTestRequestConfig? Type432 { get; set; } + public global::Speechify.TestOpenAPICallRequest? Type432 { get; set; } /// /// /// - public global::Speechify.MockingStrategy? Type433 { get; set; } + public global::Speechify.TestOpenApiCallResultOutcome? Type433 { get; set; } /// /// /// - public global::Speechify.ToolMock? Type434 { get; set; } + public global::Speechify.TestOpenAPICallResult? Type434 { get; set; } /// /// /// - public global::Speechify.NoMatchBehavior? Type435 { get; set; } + public global::Speechify.SystemBuiltinInfoExecution? Type435 { get; set; } /// /// /// - public global::Speechify.ToolMockConfig? Type436 { get; set; } + public global::Speechify.SystemBuiltinInfo? Type436 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type437 { get; set; } + public global::Speechify.ListSystemBuiltinsResponse? Type437 { get; set; } /// /// /// - public global::Speechify.CreateAgentTestRequest? Type438 { get; set; } + public global::System.Collections.Generic.IList? Type438 { get; set; } /// /// /// - public global::Speechify.AgentTestConfig? Type439 { get; set; } + public global::Speechify.CredentialKind? Type439 { get; set; } /// /// /// - public global::Speechify.AgentTest? Type440 { get; set; } + public global::Speechify.OAuth2TokenEndpointAuthMethod? Type440 { get; set; } /// /// /// - public global::Speechify.TestVerdict? Type441 { get; set; } + public global::Speechify.CredentialConfigViewOauth2ClientCredentials? Type441 { get; set; } /// /// /// - public global::Speechify.ReplyResult? Type442 { get; set; } + public global::Speechify.CredentialConfigViewOauth2Jwt? Type442 { get; set; } /// /// /// - public global::Speechify.ParameterCheckResult? Type443 { get; set; } + public global::Speechify.CredentialConfigViewBasic? Type443 { get; set; } /// /// /// - public global::Speechify.ToolCallResult? Type444 { get; set; } + public global::Speechify.CredentialConfigViewBearer? Type444 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type445 { get; set; } + public global::Speechify.CredentialConfigViewSharedSecret? Type445 { get; set; } /// /// /// - public global::Speechify.SimulationToolCall? Type446 { get; set; } + public global::Speechify.CredentialConfigViewCustomHeaders? Type446 { get; set; } /// /// /// - public global::Speechify.SimulationResultSentiment? Type447 { get; set; } + public global::Speechify.CredentialConfigView? Type447 { get; set; } /// /// /// - public global::Speechify.SimulationCriterionResultStatus? Type448 { get; set; } + public global::Speechify.CredentialReferenceResourceType? Type448 { get; set; } /// /// /// - public global::Speechify.SimulationCriterionResult? Type449 { get; set; } + public global::Speechify.CredentialReference? Type449 { get; set; } /// /// /// - public global::Speechify.DataAssertionResultMode? Type450 { get; set; } + public global::Speechify.CredentialUsedBy? Type450 { get; set; } /// /// /// - public global::Speechify.DataAssertionResult? Type451 { get; set; } + public global::System.Collections.Generic.IList? Type451 { get; set; } /// /// /// - public global::Speechify.SimulationResult? Type452 { get; set; } + public global::Speechify.Credential? Type452 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type453 { get; set; } + public global::Speechify.ListCredentialsResponse? Type453 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type454 { get; set; } + public global::System.Collections.Generic.IList? Type454 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type455 { get; set; } + public global::Speechify.OAuth2ClientCredentialsConfig? Type455 { get; set; } /// /// /// - public global::Speechify.TestRunResult? Type456 { get; set; } + public global::Speechify.OAuth2JWTConfig? Type456 { get; set; } /// /// /// - public global::Speechify.AgentTestRun? Type457 { get; set; } + public global::Speechify.BasicAuthConfig? Type457 { get; set; } /// /// /// - public global::Speechify.AgentTestWithLastRun? Type458 { get; set; } + public global::Speechify.BearerAuthConfig? Type458 { get; set; } /// /// /// - public global::Speechify.ListTestsResponse? Type459 { get; set; } + public global::Speechify.CustomHeadersConfig? Type459 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type460 { get; set; } + public global::Speechify.SharedSecretConfig? Type460 { get; set; } /// /// /// - public global::Speechify.UpdateAgentTestRequestConfig? Type461 { get; set; } + public global::Speechify.CredentialConfig? Type461 { get; set; } /// /// /// - public global::Speechify.UpdateAgentTestRequest? Type462 { get; set; } + public global::Speechify.CreateCredentialRequest? Type462 { get; set; } /// /// /// - public global::Speechify.AgentTestFolder? Type463 { get; set; } + public global::Speechify.UpdateCredentialRequest? Type463 { get; set; } /// /// /// - public global::Speechify.ListAgentTestFoldersResponse? Type464 { get; set; } + public global::Speechify.CredentialInUseErrorDetailDetails? Type464 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type465 { get; set; } + public global::Speechify.CredentialInUseErrorDetail? Type465 { get; set; } /// /// /// - public global::Speechify.CreateAgentTestFolderRequest? Type466 { get; set; } + public global::Speechify.CredentialInUseError? Type466 { get; set; } /// /// /// - public global::Speechify.UpdateAgentTestFolderRequest? Type467 { get; set; } + public global::Speechify.TestType? Type467 { get; set; } /// /// /// - public global::Speechify.ListAgentTestRunsResponse? Type468 { get; set; } + public global::Speechify.SimulationMessageRole? Type468 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type469 { get; set; } + public global::Speechify.SimulationMessage? Type469 { get; set; } /// /// /// - public global::Speechify.RunTarget? Type470 { get; set; } + public global::Speechify.ReplyConfig? Type470 { get; set; } /// /// /// - public global::Speechify.TestRunConfigOverride? Type471 { get; set; } + public global::System.Collections.Generic.IList? Type471 { get; set; } /// /// /// - public global::Speechify.RunTargetedTestsRequest? Type472 { get; set; } + public global::Speechify.ParameterCheckMode? Type472 { get; set; } /// /// /// - public global::Speechify.SuiteRunTrigger? Type473 { get; set; } + public global::Speechify.ParameterCheck? Type473 { get; set; } /// /// /// - public global::Speechify.AgentTestSuiteRunResults? Type474 { get; set; } + public global::Speechify.ToolCallConfig? Type474 { get; set; } /// /// /// - public global::Speechify.AgentTestSuiteRun? Type475 { get; set; } + public global::System.Collections.Generic.IList? Type475 { get; set; } /// /// /// - public global::Speechify.RunAgentTestsResponse? Type476 { get; set; } + public global::Speechify.DataAssertionMode? Type476 { get; set; } /// /// /// - public global::Speechify.BatchRunEntry? Type477 { get; set; } + public global::Speechify.DataAssertion? Type477 { get; set; } /// /// /// - public global::Speechify.RunBatchRequest? Type478 { get; set; } + public global::Speechify.SimulationConfig? Type478 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type479 { get; set; } + public global::System.Collections.Generic.IList? Type479 { get; set; } /// /// /// - public global::Speechify.ListSuiteRunsResponse? Type480 { get; set; } + public global::Speechify.CreateAgentTestRequestConfig? Type480 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type481 { get; set; } + public global::Speechify.MockingStrategy? Type481 { get; set; } /// /// /// - public global::Speechify.AgentTestSuiteRunWithRunsResults? Type482 { get; set; } + public global::Speechify.ToolMock? Type482 { get; set; } /// /// /// - public global::Speechify.SuiteChildRun? Type483 { get; set; } + public global::Speechify.NoMatchBehavior? Type483 { get; set; } /// /// /// - public global::Speechify.AgentTestSuiteRunWithRuns? Type484 { get; set; } + public global::Speechify.ToolMockConfig? Type484 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type485 { get; set; } + public global::System.Collections.Generic.IList? Type485 { get; set; } /// /// /// - public global::Speechify.RunAllTestsRequest? Type486 { get; set; } + public global::Speechify.CreateAgentTestRequest? Type486 { get; set; } /// /// /// - public global::Speechify.TestStatsBucket? Type487 { get; set; } + public global::Speechify.AgentTestConfig? Type487 { get; set; } /// /// /// - public global::Speechify.TestStats? Type488 { get; set; } + public global::Speechify.AgentTest? Type488 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type489 { get; set; } + public global::Speechify.TestVerdict? Type489 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type490 { get; set; } + public global::Speechify.ReplyResult? Type490 { get; set; } /// /// /// - public global::Speechify.ShareLinkStatus? Type491 { get; set; } + public global::Speechify.ParameterCheckResult? Type491 { get; set; } /// /// /// - public global::Speechify.ShareLink? Type492 { get; set; } + public global::Speechify.ToolCallResult? Type492 { get; set; } /// /// /// - public global::Speechify.ListShareLinksResponse? Type493 { get; set; } + public global::System.Collections.Generic.IList? Type493 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type494 { get; set; } + public global::Speechify.SimulationToolCall? Type494 { get; set; } /// /// /// - public global::Speechify.CreateShareLinkRequest? Type495 { get; set; } + public global::Speechify.SimulationResultSentiment? Type495 { get; set; } /// /// /// - public global::Speechify.CreateShareLinkResponseStatus? Type496 { get; set; } + public global::Speechify.SimulationCriterionResultStatus? Type496 { get; set; } /// /// /// - public global::Speechify.CreateShareLinkResponse? Type497 { get; set; } + public global::Speechify.SimulationCriterionResult? Type497 { get; set; } /// /// /// - public global::Speechify.RevealShareLinkTokenResponse? Type498 { get; set; } + public global::Speechify.DataAssertionResultMode? Type498 { get; set; } /// /// /// - public global::Speechify.ShareLinkPreview? Type499 { get; set; } + public global::Speechify.DataAssertionResult? Type499 { get; set; } /// /// /// - public global::Speechify.CreateShareLinkSessionRequest? Type500 { get; set; } + public global::Speechify.SimulationResult? Type500 { get; set; } /// /// /// - public global::Speechify.ShareLinkSession? Type501 { get; set; } + public global::System.Collections.Generic.IList? Type501 { get; set; } /// /// /// - public global::Speechify.PhoneNumberProvider? Type502 { get; set; } + public global::System.Collections.Generic.IList? Type502 { get; set; } /// /// /// - public global::Speechify.PhoneNumberCapability? Type503 { get; set; } + public global::System.Collections.Generic.IList? Type503 { get; set; } /// /// /// - public global::Speechify.PhoneNumberReputationRisk? Type504 { get; set; } + public global::Speechify.TestRunResult? Type504 { get; set; } /// /// /// - public global::Speechify.PhoneNumberReputation? Type505 { get; set; } + public global::Speechify.AgentTestRun? Type505 { get; set; } /// /// /// - public global::Speechify.PhoneNumber? Type506 { get; set; } + public global::Speechify.AgentTestWithLastRun? Type506 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type507 { get; set; } + public global::Speechify.ListTestsResponse? Type507 { get; set; } /// /// /// - public global::Speechify.ListPhoneNumbersResponse? Type508 { get; set; } + public global::System.Collections.Generic.IList? Type508 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type509 { get; set; } + public global::Speechify.UpdateAgentTestRequestConfig? Type509 { get; set; } /// /// /// - public global::Speechify.TwilioImportSpec? Type510 { get; set; } + public global::Speechify.UpdateAgentTestRequest? Type510 { get; set; } /// /// /// - public global::Speechify.TelnyxImportSpec? Type511 { get; set; } + public global::Speechify.AgentTestFolder? Type511 { get; set; } /// /// /// - public global::Speechify.ImportPhoneNumberRequest? Type512 { get; set; } + public global::Speechify.ListAgentTestFoldersResponse? Type512 { get; set; } /// /// /// - public global::Speechify.PurchasedPhoneNumberProvider? Type513 { get; set; } + public global::System.Collections.Generic.IList? Type513 { get; set; } /// /// /// - public global::Speechify.AvailablePhoneNumber? Type514 { get; set; } + public global::Speechify.CreateAgentTestFolderRequest? Type514 { get; set; } /// /// /// - public global::Speechify.SearchAvailablePhoneNumbersResponse? Type515 { get; set; } + public global::Speechify.UpdateAgentTestFolderRequest? Type515 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type516 { get; set; } + public global::Speechify.ListAgentTestRunsResponse? Type516 { get; set; } /// /// /// - public global::Speechify.IntendedUseMarketingOrInformational? Type517 { get; set; } + public global::System.Collections.Generic.IList? Type517 { get; set; } /// /// /// - public global::Speechify.IntendedUse? Type518 { get; set; } + public global::Speechify.RunTarget? Type518 { get; set; } /// /// /// - public global::Speechify.PurchasePhoneNumberRequest? Type519 { get; set; } + public global::Speechify.TestRunConfigOverride? Type519 { get; set; } /// /// /// - public global::Speechify.UpdatePhoneNumberRequest? Type520 { get; set; } + public global::Speechify.RunTargetedTestsRequest? Type520 { get; set; } /// /// /// - public global::Speechify.CreateOutboundCallRequest? Type521 { get; set; } + public global::Speechify.SuiteRunTrigger? Type521 { get; set; } /// /// /// - public global::Speechify.CreateOutboundCallResponse? Type522 { get; set; } + public global::Speechify.AgentTestSuiteRunResults? Type522 { get; set; } /// /// /// - public global::Speechify.BatchCall? Type523 { get; set; } + public global::Speechify.AgentTestSuiteRun? Type523 { get; set; } /// /// /// - public global::Speechify.ListBatchCallsResponse? Type524 { get; set; } + public global::Speechify.RunAgentTestsResponse? Type524 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type525 { get; set; } + public global::Speechify.BatchRunEntry? Type525 { get; set; } /// /// /// - public global::Speechify.BatchRecipientRequest? Type526 { get; set; } + public global::Speechify.RunBatchRequest? Type526 { get; set; } /// /// /// - public global::Speechify.CreateBatchCallRequest? Type527 { get; set; } + public global::System.Collections.Generic.IList? Type527 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type528 { get; set; } + public global::Speechify.ListSuiteRunsResponse? Type528 { get; set; } /// /// /// - public global::Speechify.BatchRecipientStatus? Type529 { get; set; } + public global::System.Collections.Generic.IList? Type529 { get; set; } /// /// /// - public global::Speechify.BatchRecipient? Type530 { get; set; } + public global::Speechify.AgentTestSuiteRunWithRunsResults? Type530 { get; set; } /// /// /// - public global::Speechify.ListBatchRecipientsResponse? Type531 { get; set; } + public global::Speechify.SuiteChildRun? Type531 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type532 { get; set; } + public global::Speechify.AgentTestSuiteRunWithRuns? Type532 { get; set; } /// /// /// - public global::Speechify.IvrMenuListEntryMenuTree? Type533 { get; set; } + public global::System.Collections.Generic.IList? Type533 { get; set; } /// /// /// - public global::Speechify.IVRMenuListEntry? Type534 { get; set; } + public global::Speechify.RunAllTestsRequest? Type534 { get; set; } /// /// /// - public global::Speechify.ListIVRMenusResponse? Type535 { get; set; } + public global::Speechify.TestStatsBucket? Type535 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type536 { get; set; } + public global::Speechify.TestStats? Type536 { get; set; } /// /// /// - public global::Speechify.IvrMenuMenuTree? Type537 { get; set; } + public global::System.Collections.Generic.IList? Type537 { get; set; } /// /// /// - public global::Speechify.IVRMenu? Type538 { get; set; } + public global::System.Collections.Generic.Dictionary? Type538 { get; set; } /// /// /// - public global::Speechify.UpdateIVRMenuLabelRequest? Type539 { get; set; } + public global::Speechify.ShareLinkStatus? Type539 { get; set; } /// /// /// - public global::Speechify.InvalidateIVRMenuRequest? Type540 { get; set; } + public global::Speechify.ShareLink? Type540 { get; set; } /// /// /// - public global::Speechify.SIPTrunkProvider? Type541 { get; set; } + public global::Speechify.ListShareLinksResponse? Type541 { get; set; } /// /// /// - public global::Speechify.SIPTrunkDirection? Type542 { get; set; } + public global::System.Collections.Generic.IList? Type542 { get; set; } /// /// /// - public global::Speechify.SIPTransport? Type543 { get; set; } + public global::Speechify.CreateShareLinkRequest? Type543 { get; set; } /// /// /// - public global::Speechify.SIPMediaEncryption? Type544 { get; set; } + public global::Speechify.CreateShareLinkResponseStatus? Type544 { get; set; } /// /// /// - public global::Speechify.SIPTrunk? Type545 { get; set; } + public global::Speechify.CreateShareLinkResponse? Type545 { get; set; } /// /// /// - public global::Speechify.ListSIPTrunksResponse? Type546 { get; set; } + public global::Speechify.RevealShareLinkTokenResponse? Type546 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type547 { get; set; } + public global::Speechify.ShareLinkPreview? Type547 { get; set; } /// /// /// - public global::Speechify.CreateSipTrunkRequestCredentials? Type548 { get; set; } + public global::Speechify.CreateShareLinkSessionRequest? Type548 { get; set; } /// /// /// - public global::Speechify.CreateSIPTrunkRequest? Type549 { get; set; } + public global::Speechify.ShareLinkSession? Type549 { get; set; } /// /// /// - public global::Speechify.Caller? Type550 { get; set; } + public global::Speechify.PhoneNumberProvider? Type550 { get; set; } /// /// /// - public global::Speechify.ListCallersResponse? Type551 { get; set; } + public global::Speechify.PhoneNumberCapability? Type551 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type552 { get; set; } + public global::Speechify.PhoneNumberReputationRisk? Type552 { get; set; } /// /// /// - public global::Speechify.UpdateCallerRequest? Type553 { get; set; } + public global::Speechify.PhoneNumberReputation? Type553 { get; set; } /// /// /// - public global::Speechify.DeleteCallerResponse? Type554 { get; set; } + public global::Speechify.PhoneNumber? Type554 { get; set; } /// /// /// - public global::Speechify.ListCallerConversationsResponse? Type555 { get; set; } + public global::System.Collections.Generic.IList? Type555 { get; set; } /// /// /// - public global::Speechify.ListCallerMemoriesResponse? Type556 { get; set; } + public global::Speechify.ListPhoneNumbersResponse? Type556 { get; set; } /// /// /// - public global::Speechify.AudioAsset? Type557 { get; set; } + public global::System.Collections.Generic.IList? Type557 { get; set; } /// /// /// - public global::Speechify.ListAudioAssetsResponse? Type558 { get; set; } + public global::Speechify.TwilioImportSpec? Type558 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type559 { get; set; } + public global::Speechify.TelnyxImportSpec? Type559 { get; set; } /// /// /// - public global::Speechify.TeamMember? Type560 { get; set; } + public global::Speechify.ImportPhoneNumberRequest? Type560 { get; set; } /// /// /// - public global::Speechify.Team? Type561 { get; set; } + public global::Speechify.PurchasedPhoneNumberProvider? Type561 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type562 { get; set; } + public global::Speechify.AvailablePhoneNumber? Type562 { get; set; } /// /// /// - public global::Speechify.ListTeamsResponse? Type563 { get; set; } + public global::Speechify.SearchAvailablePhoneNumbersResponse? Type563 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type564 { get; set; } + public global::System.Collections.Generic.IList? Type564 { get; set; } /// /// /// - public global::Speechify.TeamMemberInput? Type565 { get; set; } + public global::Speechify.IntendedUseMarketingOrInformational? Type565 { get; set; } /// /// /// - public global::Speechify.CreateTeamRequest? Type566 { get; set; } + public global::Speechify.IntendedUse? Type566 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type567 { get; set; } + public global::Speechify.PurchasePhoneNumberRequest? Type567 { get; set; } /// /// /// - public global::Speechify.UpdateTeamRequest? Type568 { get; set; } + public global::Speechify.UpdatePhoneNumberRequest? Type568 { get; set; } /// /// /// - public global::Speechify.CreateTeamRunRequest? Type569 { get; set; } + public global::Speechify.CreateOutboundCallRequest? Type569 { get; set; } /// /// /// - public global::Speechify.AgentTriggerType? Type570 { get; set; } + public global::Speechify.CreateOutboundCallResponse? Type570 { get; set; } /// /// /// - public global::Speechify.TriggerRunSpec? Type571 { get; set; } + public global::Speechify.BatchCall? Type571 { get; set; } /// /// /// - public global::Speechify.TriggerScheduleConfig? Type572 { get; set; } + public global::Speechify.ListBatchCallsResponse? Type572 { get; set; } /// /// /// - public global::Speechify.TriggerWebhookConfigUserIdentitySource? Type573 { get; set; } + public global::System.Collections.Generic.IList? Type573 { get; set; } /// /// /// - public global::Speechify.TriggerWebhookConfig? Type574 { get; set; } + public global::Speechify.BatchRecipientRequest? Type574 { get; set; } /// /// /// - public global::Speechify.AgentTriggerLastFireStatus? Type575 { get; set; } + public global::Speechify.CreateBatchCallRequest? Type575 { get; set; } /// /// /// - public global::Speechify.TriggerThread? Type576 { get; set; } + public global::System.Collections.Generic.IList? Type576 { get; set; } /// /// /// - public global::Speechify.AgentTrigger? Type577 { get; set; } + public global::Speechify.BatchRecipientStatus? Type577 { get; set; } /// /// /// - public global::Speechify.ListAgentTriggersResponse? Type578 { get; set; } + public global::Speechify.BatchRecipient? Type578 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type579 { get; set; } + public global::Speechify.ListBatchRecipientsResponse? Type579 { get; set; } /// /// /// - public global::Speechify.CreateAgentTriggerRequestType? Type580 { get; set; } + public global::System.Collections.Generic.IList? Type580 { get; set; } /// /// /// - public global::Speechify.CreateAgentTriggerRequest? Type581 { get; set; } + public global::Speechify.IvrMenuListEntryMenuTree? Type581 { get; set; } /// /// /// - public global::Speechify.UpdateAgentTriggerRequest? Type582 { get; set; } + public global::Speechify.IVRMenuListEntry? Type582 { get; set; } /// /// /// - public global::Speechify.AgentTriggerFireResponseStatus? Type583 { get; set; } + public global::Speechify.ListIVRMenusResponse? Type583 { get; set; } /// /// /// - public global::Speechify.AgentTriggerFireResponse? Type584 { get; set; } + public global::System.Collections.Generic.IList? Type584 { get; set; } /// /// /// - public global::Speechify.Skill? Type585 { get; set; } + public global::Speechify.IvrMenuMenuTree? Type585 { get; set; } /// /// /// - public global::Speechify.ListSkillsResponse? Type586 { get; set; } + public global::Speechify.IVRMenu? Type586 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type587 { get; set; } + public global::Speechify.UpdateIVRMenuLabelRequest? Type587 { get; set; } /// /// /// - public global::Speechify.CreateSkillRequest? Type588 { get; set; } + public global::Speechify.InvalidateIVRMenuRequest? Type588 { get; set; } /// /// /// - public global::Speechify.UpdateSkillRequest? Type589 { get; set; } + public global::Speechify.SIPTrunkProvider? Type589 { get; set; } /// /// /// - public global::Speechify.SkillVersion? Type590 { get; set; } + public global::Speechify.SIPTrunkDirection? Type590 { get; set; } /// /// /// - public global::Speechify.ListSkillVersionsResponse? Type591 { get; set; } + public global::Speechify.SIPTransport? Type591 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type592 { get; set; } + public global::Speechify.SIPMediaEncryption? Type592 { get; set; } /// /// /// - public global::Speechify.AgentSkill? Type593 { get; set; } + public global::Speechify.SIPTrunk? Type593 { get; set; } /// /// /// - public global::Speechify.ListAgentSkillsResponse? Type594 { get; set; } + public global::Speechify.ListSIPTrunksResponse? Type594 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type595 { get; set; } + public global::System.Collections.Generic.IList? Type595 { get; set; } /// /// /// - public global::Speechify.AttachSkillRequest? Type596 { get; set; } + public global::Speechify.CreateSipTrunkRequestCredentials? Type596 { get; set; } /// /// /// - public global::Speechify.UpdateAgentSkillRequest? Type597 { get; set; } + public global::Speechify.CreateSIPTrunkRequest? Type597 { get; set; } /// /// /// - public global::Speechify.V1FilesGetParametersKind? Type598 { get; set; } + public global::Speechify.Caller? Type598 { get; set; } /// /// /// - public global::Speechify.ListFilesResponse? Type599 { get; set; } + public global::Speechify.ListCallersResponse? Type599 { get; set; } /// /// /// - public global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind? Type600 { get; set; } + public global::System.Collections.Generic.IList? Type600 { get; set; } /// /// /// - public global::Speechify.Store? Type601 { get; set; } + public global::Speechify.UpdateCallerRequest? Type601 { get; set; } /// /// /// - public global::Speechify.ListStoresResponse? Type602 { get; set; } + public global::Speechify.DeleteCallerResponse? Type602 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type603 { get; set; } + public global::Speechify.ListCallerConversationsResponse? Type603 { get; set; } /// /// /// - public global::Speechify.CreateStoreRequest? Type604 { get; set; } + public global::Speechify.ListCallerMemoriesResponse? Type604 { get; set; } /// /// /// - public global::Speechify.UpdateStoreRequest? Type605 { get; set; } + public global::Speechify.AudioAsset? Type605 { get; set; } /// /// /// - public global::Speechify.StoreCollection? Type606 { get; set; } + public global::Speechify.ListAudioAssetsResponse? Type606 { get; set; } /// /// /// - public global::Speechify.ListStoreCollectionsResponse? Type607 { get; set; } + public global::System.Collections.Generic.IList? Type607 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type608 { get; set; } + public global::Speechify.TeamMember? Type608 { get; set; } /// /// /// - public global::Speechify.StoreDocumentSource? Type609 { get; set; } + public global::Speechify.Team? Type609 { get; set; } /// /// /// - public global::Speechify.StoreDocument? Type610 { get; set; } + public global::System.Collections.Generic.IList? Type610 { get; set; } /// /// /// - public global::Speechify.QueryStoreDocumentsResponse? Type611 { get; set; } + public global::Speechify.ListTeamsResponse? Type611 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type612 { get; set; } + public global::System.Collections.Generic.IList? Type612 { get; set; } /// /// /// - public global::Speechify.WriteStoreDocumentRequest? Type613 { get; set; } + public global::Speechify.TeamMemberInput? Type613 { get; set; } /// /// /// - public global::Speechify.StoreWhereClauseOp? Type614 { get; set; } + public global::Speechify.CreateTeamRequest? Type614 { get; set; } /// /// /// - public global::Speechify.StoreWhereClause? Type615 { get; set; } + public global::System.Collections.Generic.IList? Type615 { get; set; } /// /// /// - public global::Speechify.StoreOrderByDirection? Type616 { get; set; } + public global::Speechify.UpdateTeamRequest? Type616 { get; set; } /// /// /// - public global::Speechify.StoreOrderBy? Type617 { get; set; } + public global::Speechify.CreateTeamRunRequest? Type617 { get; set; } /// /// /// - public global::Speechify.StoreDocumentQuery? Type618 { get; set; } + public global::Speechify.AgentTriggerType? Type618 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type619 { get; set; } + public global::Speechify.TriggerRunSpec? Type619 { get; set; } /// /// /// - public global::Speechify.StoreAggregateMetricOp? Type620 { get; set; } + public global::Speechify.TriggerScheduleConfig? Type620 { get; set; } /// /// /// - public global::Speechify.StoreAggregateMetric? Type621 { get; set; } + public global::Speechify.TriggerWebhookConfigUserIdentitySource? Type621 { get; set; } /// /// /// - public global::Speechify.StoreAggregateQuery? Type622 { get; set; } + public global::Speechify.TriggerWebhookConfig? Type622 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type623 { get; set; } + public global::Speechify.AgentTriggerLastFireStatus? Type623 { get; set; } /// /// /// - public global::Speechify.StoreAggregateGroup? Type624 { get; set; } + public global::Speechify.TriggerThread? Type624 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type625 { get; set; } + public global::Speechify.AgentTrigger? Type625 { get; set; } /// /// /// - public global::Speechify.StoreAggregateResponse? Type626 { get; set; } + public global::Speechify.ListAgentTriggersResponse? Type626 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type627 { get; set; } + public global::System.Collections.Generic.IList? Type627 { get; set; } /// /// /// - public global::Speechify.StoreBatchWriteOp? Type628 { get; set; } + public global::Speechify.CreateAgentTriggerRequestType? Type628 { get; set; } /// /// /// - public global::Speechify.StoreBatchWrite? Type629 { get; set; } + public global::Speechify.CreateAgentTriggerRequest? Type629 { get; set; } /// /// /// - public global::Speechify.StoreBatchRequest? Type630 { get; set; } + public global::Speechify.UpdateAgentTriggerRequest? Type630 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type631 { get; set; } + public global::Speechify.AgentTriggerFireResponseStatus? Type631 { get; set; } /// /// /// - public global::Speechify.StoreBatchResultOp? Type632 { get; set; } + public global::Speechify.AgentTriggerFireResponse? Type632 { get; set; } /// /// /// - public global::Speechify.StoreBatchResult? Type633 { get; set; } + public global::Speechify.Skill? Type633 { get; set; } /// /// /// - public global::Speechify.StoreBatchResponse? Type634 { get; set; } + public global::Speechify.ListSkillsResponse? Type634 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type635 { get; set; } + public global::System.Collections.Generic.IList? Type635 { get; set; } /// /// /// - public global::Speechify.ListAgentStoresResponse? Type636 { get; set; } + public global::Speechify.CreateSkillRequest? Type636 { get; set; } /// /// /// - public global::Speechify.HostedApiAuthMode? Type637 { get; set; } + public global::Speechify.UpdateSkillRequest? Type637 { get; set; } /// /// /// - public global::Speechify.HostedAPI? Type638 { get; set; } + public global::Speechify.SkillVersion? Type638 { get; set; } /// /// /// - public global::Speechify.ListHostedAPIsResponse? Type639 { get; set; } + public global::Speechify.ListSkillVersionsResponse? Type639 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type640 { get; set; } + public global::System.Collections.Generic.IList? Type640 { get; set; } /// /// /// - public global::Speechify.CreateHostedApiRequestAuthMode? Type641 { get; set; } + public global::Speechify.AgentSkill? Type641 { get; set; } /// /// /// - public global::Speechify.CreateHostedAPIRequest? Type642 { get; set; } + public global::Speechify.ListAgentSkillsResponse? Type642 { get; set; } /// /// /// - public global::Speechify.UpdateHostedApiRequestAuthMode? Type643 { get; set; } + public global::System.Collections.Generic.IList? Type643 { get; set; } /// /// /// - public global::Speechify.UpdateHostedAPIRequest? Type644 { get; set; } + public global::Speechify.AttachSkillRequest? Type644 { get; set; } /// /// /// - public global::Speechify.HostedApiUsageRoutesItems? Type645 { get; set; } + public global::Speechify.UpdateAgentSkillRequest? Type645 { get; set; } /// /// /// - public global::Speechify.HostedAPIUsage? Type646 { get; set; } + public global::Speechify.V1FilesGetParametersKind? Type646 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type647 { get; set; } + public global::Speechify.ListFilesResponse? Type647 { get; set; } /// /// /// - public global::Speechify.HostedApiRouteMethod? Type648 { get; set; } + public global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind? Type648 { get; set; } /// /// /// - public global::Speechify.HostedApiResolverType? Type649 { get; set; } + public global::Speechify.Store? Type649 { get; set; } /// /// /// - public global::Speechify.HostedApiResolverWriteMode? Type650 { get; set; } + public global::Speechify.ListStoresResponse? Type650 { get; set; } /// /// /// - public global::Speechify.HostedApiResolverWhereItemsOp? Type651 { get; set; } + public global::System.Collections.Generic.IList? Type651 { get; set; } /// /// /// - public global::Speechify.HostedApiResolverWhereItems? Type652 { get; set; } + public global::Speechify.CreateStoreRequest? Type652 { get; set; } /// /// /// - public global::Speechify.HostedApiResolverOrderByDirection? Type653 { get; set; } + public global::Speechify.UpdateStoreRequest? Type653 { get; set; } /// /// /// - public global::Speechify.HostedApiResolverOrderBy? Type654 { get; set; } + public global::Speechify.StoreCollection? Type654 { get; set; } /// /// /// - public global::Speechify.HostedAPIResolver? Type655 { get; set; } + public global::Speechify.ListStoreCollectionsResponse? Type655 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type656 { get; set; } + public global::System.Collections.Generic.IList? Type656 { get; set; } /// /// /// - public global::Speechify.HostedAPIRoute? Type657 { get; set; } + public global::Speechify.StoreDocumentSource? Type657 { get; set; } /// /// /// - public global::Speechify.ListHostedAPIRoutesResponse? Type658 { get; set; } + public global::Speechify.StoreDocument? Type658 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type659 { get; set; } + public global::Speechify.QueryStoreDocumentsResponse? Type659 { get; set; } /// /// /// - public global::Speechify.CreateHostedApiRouteRequestMethod? Type660 { get; set; } + public global::System.Collections.Generic.IList? Type660 { get; set; } /// /// /// - public global::Speechify.CreateHostedAPIRouteRequest? Type661 { get; set; } + public global::Speechify.WriteStoreDocumentRequest? Type661 { get; set; } /// /// /// - public global::Speechify.UpdateHostedApiRouteRequestMethod? Type662 { get; set; } + public global::Speechify.StoreWhereClauseOp? Type662 { get; set; } /// /// /// - public global::Speechify.UpdateHostedAPIRouteRequest? Type663 { get; set; } + public global::Speechify.StoreWhereClause? Type663 { get; set; } /// /// /// - public global::Speechify.HostedAPIKey? Type664 { get; set; } + public global::Speechify.StoreOrderByDirection? Type664 { get; set; } /// /// /// - public global::Speechify.ListHostedAPIKeysResponse? Type665 { get; set; } + public global::Speechify.StoreOrderBy? Type665 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type666 { get; set; } + public global::Speechify.StoreDocumentQuery? Type666 { get; set; } /// /// /// - public global::Speechify.CreateHostedAPIKeyRequest? Type667 { get; set; } + public global::System.Collections.Generic.IList? Type667 { get; set; } /// /// /// - public global::Speechify.HostedAPIUserTokenSecret? Type668 { get; set; } + public global::Speechify.StoreAggregateMetricOp? Type668 { get; set; } /// /// /// - public global::Speechify.ContactIdentifierKind? Type669 { get; set; } + public global::Speechify.StoreAggregateMetric? Type669 { get; set; } /// /// /// - public global::Speechify.ContactIdentifierAssertedBy? Type670 { get; set; } + public global::Speechify.StoreAggregateQuery? Type670 { get; set; } /// /// /// - public global::Speechify.ContactIdentifier? Type671 { get; set; } + public global::System.Collections.Generic.IList? Type671 { get; set; } /// /// /// - public global::Speechify.Contact? Type672 { get; set; } + public global::Speechify.StoreAggregateGroup? Type672 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type673 { get; set; } + public global::System.Collections.Generic.Dictionary? Type673 { get; set; } /// /// /// - public global::Speechify.ListContactsResponse? Type674 { get; set; } + public global::Speechify.StoreAggregateResponse? Type674 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type675 { get; set; } + public global::System.Collections.Generic.IList? Type675 { get; set; } /// /// /// - public global::Speechify.UpdateContactRequest? Type676 { get; set; } + public global::Speechify.StoreBatchWriteOp? Type676 { get; set; } /// /// /// - public global::Speechify.DeleteContactResponse? Type677 { get; set; } + public global::Speechify.StoreBatchWrite? Type677 { get; set; } /// /// /// - public global::Speechify.AttachContactIdentifierRequestKind? Type678 { get; set; } + public global::Speechify.StoreBatchRequest? Type678 { get; set; } /// /// /// - public global::Speechify.AttachContactIdentifierRequest? Type679 { get; set; } + public global::System.Collections.Generic.IList? Type679 { get; set; } /// /// /// - public global::Speechify.MergeContactsRequest? Type680 { get; set; } + public global::Speechify.StoreBatchResultOp? Type680 { get; set; } /// /// /// - public global::Speechify.MergeContactsResponseMerged? Type681 { get; set; } + public global::Speechify.StoreBatchResult? Type681 { get; set; } /// /// /// - public global::Speechify.MergeContactsResponse? Type682 { get; set; } + public global::Speechify.StoreBatchResponse? Type682 { get; set; } /// /// /// - public global::Speechify.BillingEntitlementsMaxLlmModelClass? Type683 { get; set; } + public global::System.Collections.Generic.IList? Type683 { get; set; } /// /// /// - public global::Speechify.BillingEntitlements? Type684 { get; set; } + public global::Speechify.ListAgentStoresResponse? Type684 { get; set; } /// /// /// - public global::Speechify.EntitlementsResponse? Type685 { get; set; } + public global::Speechify.HostedApiAuthMode? Type685 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type686 { get; set; } + public global::Speechify.HostedAPI? Type686 { get; set; } /// /// /// - public global::Speechify.ContactResolver? Type687 { get; set; } + public global::Speechify.ListHostedAPIsResponse? Type687 { get; set; } /// /// /// - public global::Speechify.PutContactResolverRequest? Type688 { get; set; } + public global::System.Collections.Generic.IList? Type688 { get; set; } /// /// /// - public global::Speechify.WebhookEndpoint? Type689 { get; set; } + public global::Speechify.CreateHostedApiRequestAuthMode? Type689 { get; set; } /// /// /// - public global::Speechify.ListWebhookEndpointsResponse? Type690 { get; set; } + public global::Speechify.CreateHostedAPIRequest? Type690 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type691 { get; set; } + public global::Speechify.UpdateHostedApiRequestAuthMode? Type691 { get; set; } /// /// /// - public global::Speechify.CreateWebhookEndpointRequest? Type692 { get; set; } + public global::Speechify.UpdateHostedAPIRequest? Type692 { get; set; } /// /// /// - public global::Speechify.UpdateWebhookEndpointRequest? Type693 { get; set; } + public global::Speechify.HostedApiUsageRoutesItems? Type693 { get; set; } /// /// /// - public global::Speechify.WebhookEndpointDelivery? Type694 { get; set; } + public global::Speechify.HostedAPIUsage? Type694 { get; set; } /// /// /// - public global::Speechify.ListWebhookEndpointDeliveriesResponse? Type695 { get; set; } + public global::System.Collections.Generic.IList? Type695 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type696 { get; set; } + public global::Speechify.HostedApiRouteMethod? Type696 { get; set; } /// /// /// - public global::Speechify.ProjectMonthlyBudgetStatus? Type697 { get; set; } + public global::Speechify.HostedApiResolverType? Type697 { get; set; } /// /// /// - public global::Speechify.Project? Type698 { get; set; } + public global::Speechify.HostedApiResolverWriteMode? Type698 { get; set; } /// /// /// - public global::Speechify.ListProjectsResponse? Type699 { get; set; } + public global::Speechify.HostedApiResolverWhereItemsOp? Type699 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type700 { get; set; } + public global::Speechify.HostedApiResolverWhereItems? Type700 { get; set; } /// /// /// - public global::Speechify.CreateProjectRequest? Type701 { get; set; } + public global::Speechify.HostedApiResolverOrderByDirection? Type701 { get; set; } /// /// /// - public global::Speechify.UpdateProjectRequest? Type702 { get; set; } + public global::Speechify.HostedApiResolverOrderBy? Type702 { get; set; } /// /// /// - public global::Speechify.DeleteProjectRequestMode? Type703 { get; set; } + public global::Speechify.HostedAPIResolver? Type703 { get; set; } /// /// /// - public global::Speechify.DeleteProjectRequest? Type704 { get; set; } + public global::System.Collections.Generic.IList? Type704 { get; set; } /// /// /// - public global::Speechify.ProjectRestoredCounts? Type705 { get; set; } + public global::Speechify.HostedAPIRoute? Type705 { get; set; } /// /// /// - public global::Speechify.ProjectStillRevokedCounts? Type706 { get; set; } + public global::Speechify.ListHostedAPIRoutesResponse? Type706 { get; set; } /// /// /// - public global::Speechify.ProjectRestore? Type707 { get; set; } + public global::System.Collections.Generic.IList? Type707 { get; set; } /// /// /// - public global::Speechify.ProjectTeardownBlockerKind? Type708 { get; set; } + public global::Speechify.CreateHostedApiRouteRequestMethod? Type708 { get; set; } /// /// /// - public global::Speechify.ProjectTeardownBlockerBlocksItems? Type709 { get; set; } + public global::Speechify.CreateHostedAPIRouteRequest? Type709 { get; set; } /// /// /// - public global::Speechify.ProjectTeardownBlocker? Type710 { get; set; } + public global::Speechify.UpdateHostedApiRouteRequestMethod? Type710 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type711 { get; set; } + public global::Speechify.UpdateHostedAPIRouteRequest? Type711 { get; set; } /// /// /// - public global::Speechify.ProjectTeardownGroup? Type712 { get; set; } + public global::Speechify.HostedAPIKey? Type712 { get; set; } /// /// /// - public global::Speechify.ProjectTeardown? Type713 { get; set; } + public global::Speechify.ListHostedAPIKeysResponse? Type713 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type714 { get; set; } + public global::System.Collections.Generic.IList? Type714 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type715 { get; set; } + public global::Speechify.CreateHostedAPIKeyRequest? Type715 { get; set; } /// /// /// - public global::Speechify.ProjectResourceCounts? Type716 { get; set; } + public global::Speechify.HostedAPIUserTokenSecret? Type716 { get; set; } /// /// /// - public global::Speechify.ProjectStats? Type717 { get; set; } + public global::Speechify.ContactIdentifierKind? Type717 { get; set; } /// /// /// - public global::Speechify.PromoteProjectRequest? Type718 { get; set; } + public global::Speechify.ContactIdentifierAssertedBy? Type718 { get; set; } /// /// /// - public global::Speechify.PromoteCreated? Type719 { get; set; } + public global::Speechify.ContactIdentifier? Type719 { get; set; } /// /// /// - public global::Speechify.PromoteReused? Type720 { get; set; } + public global::Speechify.Contact? Type720 { get; set; } /// /// /// - public global::Speechify.PromoteAttentionKind? Type721 { get; set; } + public global::System.Collections.Generic.IList? Type721 { get; set; } /// /// /// - public global::Speechify.PromoteAttentionReason? Type722 { get; set; } + public global::Speechify.ListContactsResponse? Type722 { get; set; } /// /// /// - public global::Speechify.PromoteAttention? Type723 { get; set; } + public global::System.Collections.Generic.IList? Type723 { get; set; } /// /// /// - public global::Speechify.PromoteProjectResponse? Type724 { get; set; } + public global::Speechify.UpdateContactRequest? Type724 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type725 { get; set; } + public global::Speechify.DeleteContactResponse? Type725 { get; set; } /// /// /// - public global::Speechify.ProjectAuditEventType? Type726 { get; set; } + public global::Speechify.AttachContactIdentifierRequestKind? Type726 { get; set; } /// /// /// - public global::Speechify.ProjectAuditEvent? Type727 { get; set; } + public global::Speechify.AttachContactIdentifierRequest? Type727 { get; set; } /// /// /// - public global::Speechify.ProjectAuditResponse? Type728 { get; set; } + public global::Speechify.MergeContactsRequest? Type728 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type729 { get; set; } + public global::Speechify.MergeContactsResponseMerged? Type729 { get; set; } /// /// /// - public global::Speechify.ProjectMember? Type730 { get; set; } + public global::Speechify.MergeContactsResponse? Type730 { get; set; } /// /// /// - public global::Speechify.ProjectMembersResponse? Type731 { get; set; } + public global::Speechify.BillingEntitlementsMaxLlmModelClass? Type731 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type732 { get; set; } + public global::Speechify.BillingEntitlements? Type732 { get; set; } /// /// /// - public global::Speechify.GrantProjectMemberRequest? Type733 { get; set; } + public global::Speechify.EntitlementsResponse? Type733 { get; set; } /// /// /// - public global::Speechify.CreateRequest? Type734 { get; set; } + public global::System.Collections.Generic.Dictionary? Type734 { get; set; } /// /// /// - public global::Speechify.DetectRequest? Type735 { get; set; } + public global::Speechify.ContactResolver? Type735 { get; set; } /// /// /// - public global::Speechify.VerifyRequest? Type736 { get; set; } + public global::Speechify.PutContactResolverRequest? Type736 { get; set; } /// /// /// - public global::Speechify.UploadDocumentRequest? Type737 { get; set; } + public global::Speechify.WebhookEndpoint? Type737 { get; set; } /// /// /// - public global::Speechify.UpdateDocumentRequest? Type738 { get; set; } + public global::Speechify.ListWebhookEndpointsResponse? Type738 { get; set; } /// /// /// - public global::Speechify.RunTestRequest? Type739 { get; set; } + public global::System.Collections.Generic.IList? Type739 { get; set; } /// /// /// - public global::Speechify.UploadRequest? Type740 { get; set; } + public global::Speechify.CreateWebhookEndpointRequest? Type740 { get; set; } /// /// /// - public global::Speechify.UploadRequest2? Type741 { get; set; } + public global::Speechify.UpdateWebhookEndpointRequest? Type741 { get; set; } + /// + /// + /// + public global::Speechify.WebhookEndpointDelivery? Type742 { get; set; } + /// + /// + /// + public global::Speechify.ListWebhookEndpointDeliveriesResponse? Type743 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type744 { get; set; } + /// + /// + /// + public global::Speechify.ProjectMonthlyBudgetStatus? Type745 { get; set; } + /// + /// + /// + public global::Speechify.Project? Type746 { get; set; } + /// + /// + /// + public global::Speechify.ListProjectsResponse? Type747 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type748 { get; set; } + /// + /// + /// + public global::Speechify.CreateProjectRequest? Type749 { get; set; } + /// + /// + /// + public global::Speechify.UpdateProjectRequest? Type750 { get; set; } + /// + /// + /// + public global::Speechify.DeleteProjectRequestMode? Type751 { get; set; } + /// + /// + /// + public global::Speechify.DeleteProjectRequest? Type752 { get; set; } + /// + /// + /// + public global::Speechify.ProjectRestoredCounts? Type753 { get; set; } + /// + /// + /// + public global::Speechify.ProjectStillRevokedCounts? Type754 { get; set; } + /// + /// + /// + public global::Speechify.ProjectRestore? Type755 { get; set; } + /// + /// + /// + public global::Speechify.ProjectTeardownBlockerKind? Type756 { get; set; } + /// + /// + /// + public global::Speechify.ProjectTeardownBlockerBlocksItems? Type757 { get; set; } + /// + /// + /// + public global::Speechify.ProjectTeardownBlocker? Type758 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type759 { get; set; } + /// + /// + /// + public global::Speechify.ProjectTeardownGroup? Type760 { get; set; } + /// + /// + /// + public global::Speechify.ProjectTeardown? Type761 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type762 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type763 { get; set; } + /// + /// + /// + public global::Speechify.ProjectResourceCounts? Type764 { get; set; } + /// + /// + /// + public global::Speechify.ProjectStats? Type765 { get; set; } + /// + /// + /// + public global::Speechify.PromoteProjectRequest? Type766 { get; set; } + /// + /// + /// + public global::Speechify.PromoteCreated? Type767 { get; set; } + /// + /// + /// + public global::Speechify.PromoteReused? Type768 { get; set; } + /// + /// + /// + public global::Speechify.PromoteAttentionKind? Type769 { get; set; } + /// + /// + /// + public global::Speechify.PromoteAttentionReason? Type770 { get; set; } + /// + /// + /// + public global::Speechify.PromoteAttention? Type771 { get; set; } + /// + /// + /// + public global::Speechify.PromoteProjectResponse? Type772 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type773 { get; set; } + /// + /// + /// + public global::Speechify.ProjectAuditEventType? Type774 { get; set; } + /// + /// + /// + public global::Speechify.ProjectAuditEvent? Type775 { get; set; } + /// + /// + /// + public global::Speechify.ProjectAuditResponse? Type776 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type777 { get; set; } + /// + /// + /// + public global::Speechify.ProjectMember? Type778 { get; set; } + /// + /// + /// + public global::Speechify.ProjectMembersResponse? Type779 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type780 { get; set; } + /// + /// + /// + public global::Speechify.GrantProjectMemberRequest? Type781 { get; set; } + /// + /// + /// + public global::Speechify.CreateRequest? Type782 { get; set; } + /// + /// + /// + public global::Speechify.DetectRequest? Type783 { get; set; } + /// + /// + /// + public global::Speechify.VerifyRequest? Type784 { get; set; } + /// + /// + /// + public global::Speechify.UploadDocumentRequest? Type785 { get; set; } + /// + /// + /// + public global::Speechify.UpdateDocumentRequest? Type786 { get; set; } + /// + /// + /// + public global::Speechify.RunTestRequest? Type787 { get; set; } + /// + /// + /// + public global::Speechify.UploadRequest? Type788 { get; set; } + /// + /// + /// + public global::Speechify.UploadRequest2? Type789 { get; set; } /// /// @@ -3266,254 +3458,274 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.List? ListType66 { get; set; } + public global::System.Collections.Generic.List? ListType66 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType67 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType68 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType69 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType70 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType71 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType67 { get; set; } + public global::System.Collections.Generic.List? ListType72 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType68 { get; set; } + public global::System.Collections.Generic.List? ListType73 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType69 { get; set; } + public global::System.Collections.Generic.List? ListType74 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType70 { get; set; } + public global::System.Collections.Generic.List? ListType75 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType71 { get; set; } + public global::System.Collections.Generic.List? ListType76 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType72 { get; set; } + public global::System.Collections.Generic.List? ListType77 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType73 { get; set; } + public global::System.Collections.Generic.List? ListType78 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType74 { get; set; } + public global::System.Collections.Generic.List? ListType79 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType75 { get; set; } + public global::System.Collections.Generic.List? ListType80 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType76 { get; set; } + public global::System.Collections.Generic.List? ListType81 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType77 { get; set; } + public global::System.Collections.Generic.List? ListType82 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType78 { get; set; } + public global::System.Collections.Generic.List? ListType83 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType79 { get; set; } + public global::System.Collections.Generic.List? ListType84 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType80 { get; set; } + public global::System.Collections.Generic.List? ListType85 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType81 { get; set; } + public global::System.Collections.Generic.List? ListType86 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType82 { get; set; } + public global::System.Collections.Generic.List? ListType87 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType83 { get; set; } + public global::System.Collections.Generic.List? ListType88 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType84 { get; set; } + public global::System.Collections.Generic.List? ListType89 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType85 { get; set; } + public global::System.Collections.Generic.List? ListType90 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType86 { get; set; } + public global::System.Collections.Generic.List? ListType91 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType87 { get; set; } + public global::System.Collections.Generic.List? ListType92 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType88 { get; set; } + public global::System.Collections.Generic.List? ListType93 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType89 { get; set; } + public global::System.Collections.Generic.List? ListType94 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType90 { get; set; } + public global::System.Collections.Generic.List? ListType95 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType91 { get; set; } + public global::System.Collections.Generic.List? ListType96 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType92 { get; set; } + public global::System.Collections.Generic.List? ListType97 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType93 { get; set; } + public global::System.Collections.Generic.List? ListType98 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType94 { get; set; } + public global::System.Collections.Generic.List? ListType99 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType95 { get; set; } + public global::System.Collections.Generic.List? ListType100 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType96 { get; set; } + public global::System.Collections.Generic.List? ListType101 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType97 { get; set; } + public global::System.Collections.Generic.List? ListType102 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType98 { get; set; } + public global::System.Collections.Generic.List? ListType103 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType99 { get; set; } + public global::System.Collections.Generic.List? ListType104 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType100 { get; set; } + public global::System.Collections.Generic.List? ListType105 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType101 { get; set; } + public global::System.Collections.Generic.List? ListType106 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType102 { get; set; } + public global::System.Collections.Generic.List? ListType107 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType103 { get; set; } + public global::System.Collections.Generic.List? ListType108 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType104 { get; set; } + public global::System.Collections.Generic.List? ListType109 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType105 { get; set; } + public global::System.Collections.Generic.List? ListType110 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType106 { get; set; } + public global::System.Collections.Generic.List? ListType111 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType107 { get; set; } + public global::System.Collections.Generic.List? ListType112 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType108 { get; set; } + public global::System.Collections.Generic.List? ListType113 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType109 { get; set; } + public global::System.Collections.Generic.List? ListType114 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType110 { get; set; } + public global::System.Collections.Generic.List? ListType115 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType111 { get; set; } + public global::System.Collections.Generic.List? ListType116 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType112 { get; set; } + public global::System.Collections.Generic.List? ListType117 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType113 { get; set; } + public global::System.Collections.Generic.List? ListType118 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType114 { get; set; } + public global::System.Collections.Generic.List? ListType119 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType115 { get; set; } + public global::System.Collections.Generic.List? ListType120 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType116 { get; set; } + public global::System.Collections.Generic.List? ListType121 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType117 { get; set; } + public global::System.Collections.Generic.List? ListType122 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType118 { get; set; } + public global::System.Collections.Generic.List? ListType123 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType119 { get; set; } + public global::System.Collections.Generic.List? ListType124 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType120 { get; set; } + public global::System.Collections.Generic.List? ListType125 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType121 { get; set; } + public global::System.Collections.Generic.List? ListType126 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType122 { get; set; } + public global::System.Collections.Generic.List? ListType127 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType123 { get; set; } + public global::System.Collections.Generic.List? ListType128 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType124 { get; set; } + public global::System.Collections.Generic.List? ListType129 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType125 { get; set; } + public global::System.Collections.Generic.List? ListType130 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType126 { get; set; } + public global::System.Collections.Generic.List? ListType131 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType127 { get; set; } + public global::System.Collections.Generic.List? ListType132 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType128 { get; set; } + public global::System.Collections.Generic.List? ListType133 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.AgentTool.g.cs b/src/libs/Speechify/Generated/Speechify.Models.AgentTool.g.cs index 2b233b94..4d4ec901 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.AgentTool.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.AgentTool.g.cs @@ -6,7 +6,7 @@ namespace Speechify /// /// One thing an agent can do, in the unified per-agent view. Kind
/// discriminates a per-agent built-in instance (`builtin`) from an
- /// attached workspace tool definition (`webhook`/`client`/`mcp`).
+ /// attached workspace tool definition (`webhook`/`client`/`mcp`/`openapi`).
/// The config is resolved + embedded so consumers never have to fetch
/// the backing definition. `id` is a `tool_<...>` for every kind. ///
@@ -24,7 +24,8 @@ public sealed partial class AgentTool /// - `builtin`: a worker-resident platform capability (e.g. end_call, play_audio), configured per-agent
/// - `webhook`: worker signs a payload and POSTs it to your URL
/// - `client`: worker dispatches to the caller's browser/SDK via data channel
- /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls + /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls
+ /// - `openapi`: a REST API described by its OpenAPI document, pinned to the operations you selected; the control plane executes every call ///
[global::System.Text.Json.Serialization.JsonPropertyName("kind")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.ToolKindJsonConverter))] @@ -54,7 +55,7 @@ public sealed partial class AgentTool /// /// Provenance: the backing workspace tool definition id for
- /// shared kinds (webhook/client/mcp), or `null` for a built-in.
+ /// shared kinds (webhook/client/mcp/openapi), or `null` for a built-in.
/// Non-null ⟺ the tool's config is shared and edited at
/// `/v1/agents/tool-definitions/{tool_definition_id}`. ///
@@ -62,7 +63,7 @@ public sealed partial class AgentTool public string? DefinitionId { get; set; } /// - /// Resolved config - `BuiltinToolConfig`, `WebhookToolConfig`, `ClientToolConfig`, or `MCPToolConfig` depending on `kind`. + /// Resolved config - `BuiltinToolConfig`, `WebhookToolConfig`, `ClientToolConfig`, `MCPToolConfig` or `OpenAPIToolConfig` depending on `kind`. /// [global::System.Text.Json.Serialization.JsonPropertyName("config")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.AgentToolConfigJsonConverter))] @@ -152,7 +153,8 @@ public sealed partial class AgentTool /// - `builtin`: a worker-resident platform capability (e.g. end_call, play_audio), configured per-agent
/// - `webhook`: worker signs a payload and POSTs it to your URL
/// - `client`: worker dispatches to the caller's browser/SDK via data channel
- /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls + /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls
+ /// - `openapi`: a REST API described by its OpenAPI document, pinned to the operations you selected; the control plane executes every call /// /// /// @@ -160,7 +162,7 @@ public sealed partial class AgentTool /// When false the tool is configured but skipped at dispatch. /// /// - /// Resolved config - `BuiltinToolConfig`, `WebhookToolConfig`, `ClientToolConfig`, or `MCPToolConfig` depending on `kind`. + /// Resolved config - `BuiltinToolConfig`, `WebhookToolConfig`, `ClientToolConfig`, `MCPToolConfig` or `OpenAPIToolConfig` depending on `kind`. /// /// /// The impact the tool actually carries, derived from its shape when none was declared. @@ -169,7 +171,7 @@ public sealed partial class AgentTool /// /// /// Provenance: the backing workspace tool definition id for
- /// shared kinds (webhook/client/mcp), or `null` for a built-in.
+ /// shared kinds (webhook/client/mcp/openapi), or `null` for a built-in.
/// Non-null ⟺ the tool's config is shared and edited at
/// `/v1/agents/tool-definitions/{tool_definition_id}`. /// diff --git a/src/libs/Speechify/Generated/Speechify.Models.AgentToolConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.AgentToolConfig.g.cs index 1a9dc283..b66665a2 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.AgentToolConfig.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.AgentToolConfig.g.cs @@ -5,7 +5,7 @@ namespace Speechify { /// - /// Resolved config - `BuiltinToolConfig`, `WebhookToolConfig`, `ClientToolConfig`, or `MCPToolConfig` depending on `kind`. + /// Resolved config - `BuiltinToolConfig`, `WebhookToolConfig`, `ClientToolConfig`, `MCPToolConfig` or `OpenAPIToolConfig` depending on `kind`. /// public readonly partial struct AgentToolConfig : global::System.IEquatable { @@ -212,6 +212,57 @@ public bool TryPickMCPToolConfig( public global::Speechify.MCPToolConfig PickMCPToolConfig() => IsMCPToolConfig ? MCPToolConfig! : throw new global::System.InvalidOperationException($"Expected union variant 'MCPToolConfig' but the value was {ToString()}."); + + /// + /// Config shape for `kind=openapi`: a REST API described by its OpenAPI
+ /// document, pinned to the operations you selected. Get the operations
+ /// from `POST /v1/agents/tool-definitions/import-openapi`, which answers
+ /// them in exactly this shape, or write them by hand. The document itself
+ /// is never stored; the compiled operations are, so a vendor rename cannot
+ /// change a published agent's schemas until you re-import. Each operation
+ /// is offered to the agent as the function `<tool name>__<operation id>`
+ /// whose arguments are the operation's params by name plus `body` when it
+ /// takes one.
+ /// Speechify's servers make every call, on a durable run, a live voice
+ /// session, a text conversation and a hosted API `tool` route alike, so
+ /// the vendor credential never leaves them. `auth` is the same vault
+ /// reference the `mcp` kind takes; a `bearer` or
+ /// `oauth2_client_credentials` auth requires `credential_id`, whose
+ /// credential must be of the matching kind. + ///
+#if NET6_0_OR_GREATER + public global::Speechify.OpenAPIToolConfig? OpenAPIToolConfig { get; init; } +#else + public global::Speechify.OpenAPIToolConfig? OpenAPIToolConfig { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OpenAPIToolConfig))] +#endif + public bool IsOpenAPIToolConfig => OpenAPIToolConfig != null; + + /// + /// + /// + public bool TryPickOpenAPIToolConfig( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Speechify.OpenAPIToolConfig? value) + { + value = OpenAPIToolConfig; + return IsOpenAPIToolConfig; + } + + /// + /// + /// + public global::Speechify.OpenAPIToolConfig PickOpenAPIToolConfig() => IsOpenAPIToolConfig + ? OpenAPIToolConfig! + : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAPIToolConfig' but the value was {ToString()}."); /// /// /// @@ -304,6 +355,29 @@ public AgentToolConfig(global::Speechify.MCPToolConfig? value) /// public static AgentToolConfig FromMCPToolConfig(global::Speechify.MCPToolConfig? value) => new AgentToolConfig(value); + /// + /// + /// + public static implicit operator AgentToolConfig(global::Speechify.OpenAPIToolConfig value) => new AgentToolConfig((global::Speechify.OpenAPIToolConfig?)value); + + /// + /// + /// + public static implicit operator global::Speechify.OpenAPIToolConfig?(AgentToolConfig @this) => @this.OpenAPIToolConfig; + + /// + /// + /// + public AgentToolConfig(global::Speechify.OpenAPIToolConfig? value) + { + OpenAPIToolConfig = value; + } + + /// + /// + /// + public static AgentToolConfig FromOpenAPIToolConfig(global::Speechify.OpenAPIToolConfig? value) => new AgentToolConfig(value); + /// /// /// @@ -311,19 +385,22 @@ public AgentToolConfig( global::Speechify.BuiltinToolConfig? builtinToolConfig, global::Speechify.WebhookToolConfig? webhookToolConfig, global::Speechify.ClientToolConfig? clientToolConfig, - global::Speechify.MCPToolConfig? mCPToolConfig + global::Speechify.MCPToolConfig? mCPToolConfig, + global::Speechify.OpenAPIToolConfig? openAPIToolConfig ) { BuiltinToolConfig = builtinToolConfig; WebhookToolConfig = webhookToolConfig; ClientToolConfig = clientToolConfig; MCPToolConfig = mCPToolConfig; + OpenAPIToolConfig = openAPIToolConfig; } /// /// /// public object? Object => + OpenAPIToolConfig as object ?? MCPToolConfig as object ?? ClientToolConfig as object ?? WebhookToolConfig as object ?? @@ -337,7 +414,8 @@ BuiltinToolConfig as object BuiltinToolConfig?.ToString() ?? WebhookToolConfig?.ToString() ?? ClientToolConfig?.ToString() ?? - MCPToolConfig?.ToString() + MCPToolConfig?.ToString() ?? + OpenAPIToolConfig?.ToString() ; /// @@ -345,7 +423,7 @@ BuiltinToolConfig as object /// public bool Validate() { - return IsBuiltinToolConfig && !IsWebhookToolConfig && !IsClientToolConfig && !IsMCPToolConfig || !IsBuiltinToolConfig && IsWebhookToolConfig && !IsClientToolConfig && !IsMCPToolConfig || !IsBuiltinToolConfig && !IsWebhookToolConfig && IsClientToolConfig && !IsMCPToolConfig || !IsBuiltinToolConfig && !IsWebhookToolConfig && !IsClientToolConfig && IsMCPToolConfig; + return IsBuiltinToolConfig && !IsWebhookToolConfig && !IsClientToolConfig && !IsMCPToolConfig && !IsOpenAPIToolConfig || !IsBuiltinToolConfig && IsWebhookToolConfig && !IsClientToolConfig && !IsMCPToolConfig && !IsOpenAPIToolConfig || !IsBuiltinToolConfig && !IsWebhookToolConfig && IsClientToolConfig && !IsMCPToolConfig && !IsOpenAPIToolConfig || !IsBuiltinToolConfig && !IsWebhookToolConfig && !IsClientToolConfig && IsMCPToolConfig && !IsOpenAPIToolConfig || !IsBuiltinToolConfig && !IsWebhookToolConfig && !IsClientToolConfig && !IsMCPToolConfig && IsOpenAPIToolConfig; } /// @@ -356,6 +434,7 @@ public bool Validate() global::System.Func? webhookToolConfig = null, global::System.Func? clientToolConfig = null, global::System.Func? mCPToolConfig = null, + global::System.Func? openAPIToolConfig = null, bool validate = true) { if (validate) @@ -379,6 +458,10 @@ public bool Validate() { return mCPToolConfig(MCPToolConfig!); } + else if (IsOpenAPIToolConfig && openAPIToolConfig != null) + { + return openAPIToolConfig(OpenAPIToolConfig!); + } return default(TResult); } @@ -394,6 +477,8 @@ public void Match( global::System.Action? clientToolConfig = null, global::System.Action? mCPToolConfig = null, + + global::System.Action? openAPIToolConfig = null, bool validate = true) { if (validate) @@ -417,6 +502,10 @@ public void Match( { mCPToolConfig?.Invoke(MCPToolConfig!); } + else if (IsOpenAPIToolConfig) + { + openAPIToolConfig?.Invoke(OpenAPIToolConfig!); + } } /// @@ -427,6 +516,7 @@ public void Switch( global::System.Action? webhookToolConfig = null, global::System.Action? clientToolConfig = null, global::System.Action? mCPToolConfig = null, + global::System.Action? openAPIToolConfig = null, bool validate = true) { if (validate) @@ -450,6 +540,10 @@ public void Switch( { mCPToolConfig?.Invoke(MCPToolConfig!); } + else if (IsOpenAPIToolConfig) + { + openAPIToolConfig?.Invoke(OpenAPIToolConfig!); + } } /// @@ -467,6 +561,8 @@ public override int GetHashCode() typeof(global::Speechify.ClientToolConfig), MCPToolConfig, typeof(global::Speechify.MCPToolConfig), + OpenAPIToolConfig, + typeof(global::Speechify.OpenAPIToolConfig), }; const int offset = unchecked((int)2166136261); const int prime = 16777619; @@ -486,7 +582,8 @@ public bool Equals(AgentToolConfig other) global::System.Collections.Generic.EqualityComparer.Default.Equals(BuiltinToolConfig, other.BuiltinToolConfig) && global::System.Collections.Generic.EqualityComparer.Default.Equals(WebhookToolConfig, other.WebhookToolConfig) && global::System.Collections.Generic.EqualityComparer.Default.Equals(ClientToolConfig, other.ClientToolConfig) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPToolConfig, other.MCPToolConfig) + global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPToolConfig, other.MCPToolConfig) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(OpenAPIToolConfig, other.OpenAPIToolConfig) ; } diff --git a/src/libs/Speechify/Generated/Speechify.Models.AudioOutputFormat.g.cs b/src/libs/Speechify/Generated/Speechify.Models.AudioOutputFormat.g.cs index 857370cf..4b1a71e8 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.AudioOutputFormat.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.AudioOutputFormat.g.cs @@ -4,7 +4,7 @@ namespace Speechify { /// - /// Audio output format as a `codec_sampleRate_bitrate` string, giving explicit control over sample rate and bitrate. `pcm_*` and `ulaw_8000` are headerless raw audio; `pcm_16000` and `ulaw_8000` are the telephony formats Twilio/LiveKit SIP expect.
+ /// Audio output format as a `codec_sampleRate_bitrate` string, giving explicit control over sample rate and bitrate. `pcm_*` and `ulaw_8000` are headerless raw audio; `pcm_16000` and `ulaw_8000` are the telephony formats Twilio/LiveKit SIP expect. From API version `2026-09-30`, `pcm_16000` is 16 kHz audio; a workspace pinned to an earlier version keeps receiving 24 kHz audio for `pcm_16000`, as it always has.
/// 160 kbps is the highest bitrate an mp3 can carry at 22.05 and 24 kHz, so `mp3_22050_160` and `mp3_24000_160` are the maximum-fidelity mp3 formats; a request for `mp3_*_192` is encoded at 160 kbps and reported as the matching `mp3_*_160`. The two `mp3_*_160` formats are served by the Simba 3 models only. ///
public enum AudioOutputFormat diff --git a/src/libs/Speechify/Generated/Speechify.Models.AudioStreamOutputFormat.g.cs b/src/libs/Speechify/Generated/Speechify.Models.AudioStreamOutputFormat.g.cs index de7356a2..85e9c9ea 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.AudioStreamOutputFormat.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.AudioStreamOutputFormat.g.cs @@ -4,7 +4,7 @@ namespace Speechify { /// - /// Audio output format for the streaming endpoint (`POST /v1/audio/stream`), as a `codec_sampleRate_bitrate` string. Same as `AudioOutputFormat` minus the `wav_*` formats: wav is only available on `POST /v1/audio/speech`. `pcm_*` and `ulaw_8000` are headerless raw audio; `pcm_16000` and `ulaw_8000` are the telephony formats Twilio/LiveKit SIP expect.
+ /// Audio output format for the streaming endpoint (`POST /v1/audio/stream`), as a `codec_sampleRate_bitrate` string. Same as `AudioOutputFormat` minus the `wav_*` formats: wav is only available on `POST /v1/audio/speech`. `pcm_*` and `ulaw_8000` are headerless raw audio; `pcm_16000` and `ulaw_8000` are the telephony formats Twilio/LiveKit SIP expect. From API version `2026-09-30`, `pcm_16000` is 16 kHz audio; a workspace pinned to an earlier version keeps receiving 24 kHz audio for `pcm_16000`, as it always has.
/// 160 kbps is the highest bitrate an mp3 can carry at 22.05 and 24 kHz, so `mp3_22050_160` and `mp3_24000_160` are the maximum-fidelity mp3 formats; a request for `mp3_*_192` is encoded at 160 kbps. The two `mp3_*_160` formats are served by the Simba 3 models only. ///
public enum AudioStreamOutputFormat @@ -66,7 +66,7 @@ public enum AudioStreamOutputFormat ///
Ogg24000, /// - /// wav is only available on `POST /v1/audio/speech`. `pcm_*` and `ulaw_8000` are headerless raw audio; `pcm_16000` and `ulaw_8000` are the telephony formats Twilio/LiveKit SIP expect. + /// wav is only available on `POST /v1/audio/speech`. `pcm_*` and `ulaw_8000` are headerless raw audio; `pcm_16000` and `ulaw_8000` are the telephony formats Twilio/LiveKit SIP expect. From API version `2026-09-30`, `pcm_16000` is 16 kHz audio; a workspace pinned to an earlier version keeps receiving 24 kHz audio for `pcm_16000`, as it always has. /// Pcm16000, /// @@ -90,7 +90,7 @@ public enum AudioStreamOutputFormat /// Pcm8000, /// - /// wav is only available on `POST /v1/audio/speech`. `pcm_*` and `ulaw_8000` are headerless raw audio; `pcm_16000` and `ulaw_8000` are the telephony formats Twilio/LiveKit SIP expect. + /// wav is only available on `POST /v1/audio/speech`. `pcm_*` and `ulaw_8000` are headerless raw audio; `pcm_16000` and `ulaw_8000` are the telephony formats Twilio/LiveKit SIP expect. From API version `2026-09-30`, `pcm_16000` is 16 kHz audio; a workspace pinned to an earlier version keeps receiving 24 kHz audio for `pcm_16000`, as it always has. /// Ulaw8000, } diff --git a/src/libs/Speechify/Generated/Speechify.Models.BasicAuthConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.BasicAuthConfig.Json.g.cs new file mode 100644 index 00000000..106d7f70 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.BasicAuthConfig.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class BasicAuthConfig + { + /// + /// 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.BasicAuthConfig? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.BasicAuthConfig), + jsonSerializerContext) as global::Speechify.BasicAuthConfig; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.BasicAuthConfig? 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.BasicAuthConfig? 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.BasicAuthConfig), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.BasicAuthConfig; + } + + /// + /// 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.BasicAuthConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.BasicAuthConfig.g.cs new file mode 100644 index 00000000..ee2247e2 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.BasicAuthConfig.g.cs @@ -0,0 +1,55 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// HTTP Basic auth — username + password. + /// + public sealed partial class BasicAuthConfig + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("username")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Username { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("password")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Password { 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 BasicAuthConfig( + string username, + string password) + { + this.Username = username ?? throw new global::System.ArgumentNullException(nameof(username)); + this.Password = password ?? throw new global::System.ArgumentNullException(nameof(password)); + } + + /// + /// Initializes a new instance of the class. + /// + public BasicAuthConfig() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.BearerAuthConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.BearerAuthConfig.Json.g.cs new file mode 100644 index 00000000..70d601dd --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.BearerAuthConfig.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class BearerAuthConfig + { + /// + /// 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.BearerAuthConfig? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.BearerAuthConfig), + jsonSerializerContext) as global::Speechify.BearerAuthConfig; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.BearerAuthConfig? 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.BearerAuthConfig? 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.BearerAuthConfig), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.BearerAuthConfig; + } + + /// + /// 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.BearerAuthConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.BearerAuthConfig.g.cs new file mode 100644 index 00000000..60f42821 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.BearerAuthConfig.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// A static bearer token sent as `Authorization: Bearer …`. For
+ /// rotating tokens prefer one of the oauth2 kinds. + ///
+ public sealed partial class BearerAuthConfig + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("token")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Token { 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 BearerAuthConfig( + string token) + { + this.Token = token ?? throw new global::System.ArgumentNullException(nameof(token)); + } + + /// + /// Initializes a new instance of the class. + /// + public BearerAuthConfig() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.CreateAgentToolRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CreateAgentToolRequest.g.cs index 8d1cce47..19392bd5 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.CreateAgentToolRequest.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.CreateAgentToolRequest.g.cs @@ -6,7 +6,7 @@ namespace Speechify /// /// Add a tool to an agent. With `kind=builtin`, `config` carries a
/// `BuiltinToolConfig` and a per-agent built-in instance is created.
- /// With `kind=webhook`/`client`/`mcp`, `config` carries that kind's
+ /// With `kind=webhook`/`client`/`mcp`/`openapi`, `config` carries that kind's
/// config and a workspace definition is created AND attached in one
/// call. ///
@@ -17,7 +17,8 @@ public sealed partial class CreateAgentToolRequest /// - `builtin`: a worker-resident platform capability (e.g. end_call, play_audio), configured per-agent
/// - `webhook`: worker signs a payload and POSTs it to your URL
/// - `client`: worker dispatches to the caller's browser/SDK via data channel
- /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls + /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls
+ /// - `openapi`: a REST API described by its OpenAPI document, pinned to the operations you selected; the control plane executes every call ///
[global::System.Text.Json.Serialization.JsonPropertyName("kind")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.ToolKindJsonConverter))] @@ -52,7 +53,7 @@ public sealed partial class CreateAgentToolRequest public required global::Speechify.CreateAgentToolRequestConfig Config { get; set; } /// - /// The impact class for a shared kind (`webhook`/`client`/`mcp`),
+ /// The impact class for a shared kind (`webhook`/`client`/`mcp`/`openapi`),
/// whose definition is created here. Omitted, the server stamps the
/// verb default. Ignored for a built-in, whose class the platform fixes. ///
@@ -81,7 +82,8 @@ public sealed partial class CreateAgentToolRequest /// - `builtin`: a worker-resident platform capability (e.g. end_call, play_audio), configured per-agent
/// - `webhook`: worker signs a payload and POSTs it to your URL
/// - `client`: worker dispatches to the caller's browser/SDK via data channel
- /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls + /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls
+ /// - `openapi`: a REST API described by its OpenAPI document, pinned to the operations you selected; the control plane executes every call /// /// /// @@ -90,7 +92,7 @@ public sealed partial class CreateAgentToolRequest /// Defaults to true on the server when omitted. /// /// - /// The impact class for a shared kind (`webhook`/`client`/`mcp`),
+ /// The impact class for a shared kind (`webhook`/`client`/`mcp`/`openapi`),
/// whose definition is created here. Omitted, the server stamps the
/// verb default. Ignored for a built-in, whose class the platform fixes. /// diff --git a/src/libs/Speechify/Generated/Speechify.Models.CreateAgentToolRequestConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CreateAgentToolRequestConfig.g.cs index b96d6da3..9fb10b80 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.CreateAgentToolRequestConfig.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.CreateAgentToolRequestConfig.g.cs @@ -212,6 +212,57 @@ public bool TryPickMCPToolConfig( public global::Speechify.MCPToolConfig PickMCPToolConfig() => IsMCPToolConfig ? MCPToolConfig! : throw new global::System.InvalidOperationException($"Expected union variant 'MCPToolConfig' but the value was {ToString()}."); + + /// + /// Config shape for `kind=openapi`: a REST API described by its OpenAPI
+ /// document, pinned to the operations you selected. Get the operations
+ /// from `POST /v1/agents/tool-definitions/import-openapi`, which answers
+ /// them in exactly this shape, or write them by hand. The document itself
+ /// is never stored; the compiled operations are, so a vendor rename cannot
+ /// change a published agent's schemas until you re-import. Each operation
+ /// is offered to the agent as the function `<tool name>__<operation id>`
+ /// whose arguments are the operation's params by name plus `body` when it
+ /// takes one.
+ /// Speechify's servers make every call, on a durable run, a live voice
+ /// session, a text conversation and a hosted API `tool` route alike, so
+ /// the vendor credential never leaves them. `auth` is the same vault
+ /// reference the `mcp` kind takes; a `bearer` or
+ /// `oauth2_client_credentials` auth requires `credential_id`, whose
+ /// credential must be of the matching kind. + ///
+#if NET6_0_OR_GREATER + public global::Speechify.OpenAPIToolConfig? OpenAPIToolConfig { get; init; } +#else + public global::Speechify.OpenAPIToolConfig? OpenAPIToolConfig { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OpenAPIToolConfig))] +#endif + public bool IsOpenAPIToolConfig => OpenAPIToolConfig != null; + + /// + /// + /// + public bool TryPickOpenAPIToolConfig( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Speechify.OpenAPIToolConfig? value) + { + value = OpenAPIToolConfig; + return IsOpenAPIToolConfig; + } + + /// + /// + /// + public global::Speechify.OpenAPIToolConfig PickOpenAPIToolConfig() => IsOpenAPIToolConfig + ? OpenAPIToolConfig! + : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAPIToolConfig' but the value was {ToString()}."); /// /// /// @@ -304,6 +355,29 @@ public CreateAgentToolRequestConfig(global::Speechify.MCPToolConfig? value) ///
public static CreateAgentToolRequestConfig FromMCPToolConfig(global::Speechify.MCPToolConfig? value) => new CreateAgentToolRequestConfig(value); + /// + /// + /// + public static implicit operator CreateAgentToolRequestConfig(global::Speechify.OpenAPIToolConfig value) => new CreateAgentToolRequestConfig((global::Speechify.OpenAPIToolConfig?)value); + + /// + /// + /// + public static implicit operator global::Speechify.OpenAPIToolConfig?(CreateAgentToolRequestConfig @this) => @this.OpenAPIToolConfig; + + /// + /// + /// + public CreateAgentToolRequestConfig(global::Speechify.OpenAPIToolConfig? value) + { + OpenAPIToolConfig = value; + } + + /// + /// + /// + public static CreateAgentToolRequestConfig FromOpenAPIToolConfig(global::Speechify.OpenAPIToolConfig? value) => new CreateAgentToolRequestConfig(value); + /// /// /// @@ -311,19 +385,22 @@ public CreateAgentToolRequestConfig( global::Speechify.BuiltinToolConfig? builtinToolConfig, global::Speechify.WebhookToolConfig? webhookToolConfig, global::Speechify.ClientToolConfig? clientToolConfig, - global::Speechify.MCPToolConfig? mCPToolConfig + global::Speechify.MCPToolConfig? mCPToolConfig, + global::Speechify.OpenAPIToolConfig? openAPIToolConfig ) { BuiltinToolConfig = builtinToolConfig; WebhookToolConfig = webhookToolConfig; ClientToolConfig = clientToolConfig; MCPToolConfig = mCPToolConfig; + OpenAPIToolConfig = openAPIToolConfig; } /// /// /// public object? Object => + OpenAPIToolConfig as object ?? MCPToolConfig as object ?? ClientToolConfig as object ?? WebhookToolConfig as object ?? @@ -337,7 +414,8 @@ BuiltinToolConfig as object BuiltinToolConfig?.ToString() ?? WebhookToolConfig?.ToString() ?? ClientToolConfig?.ToString() ?? - MCPToolConfig?.ToString() + MCPToolConfig?.ToString() ?? + OpenAPIToolConfig?.ToString() ; /// @@ -345,7 +423,7 @@ BuiltinToolConfig as object /// public bool Validate() { - return IsBuiltinToolConfig && !IsWebhookToolConfig && !IsClientToolConfig && !IsMCPToolConfig || !IsBuiltinToolConfig && IsWebhookToolConfig && !IsClientToolConfig && !IsMCPToolConfig || !IsBuiltinToolConfig && !IsWebhookToolConfig && IsClientToolConfig && !IsMCPToolConfig || !IsBuiltinToolConfig && !IsWebhookToolConfig && !IsClientToolConfig && IsMCPToolConfig; + return IsBuiltinToolConfig && !IsWebhookToolConfig && !IsClientToolConfig && !IsMCPToolConfig && !IsOpenAPIToolConfig || !IsBuiltinToolConfig && IsWebhookToolConfig && !IsClientToolConfig && !IsMCPToolConfig && !IsOpenAPIToolConfig || !IsBuiltinToolConfig && !IsWebhookToolConfig && IsClientToolConfig && !IsMCPToolConfig && !IsOpenAPIToolConfig || !IsBuiltinToolConfig && !IsWebhookToolConfig && !IsClientToolConfig && IsMCPToolConfig && !IsOpenAPIToolConfig || !IsBuiltinToolConfig && !IsWebhookToolConfig && !IsClientToolConfig && !IsMCPToolConfig && IsOpenAPIToolConfig; } /// @@ -356,6 +434,7 @@ public bool Validate() global::System.Func? webhookToolConfig = null, global::System.Func? clientToolConfig = null, global::System.Func? mCPToolConfig = null, + global::System.Func? openAPIToolConfig = null, bool validate = true) { if (validate) @@ -379,6 +458,10 @@ public bool Validate() { return mCPToolConfig(MCPToolConfig!); } + else if (IsOpenAPIToolConfig && openAPIToolConfig != null) + { + return openAPIToolConfig(OpenAPIToolConfig!); + } return default(TResult); } @@ -394,6 +477,8 @@ public void Match( global::System.Action? clientToolConfig = null, global::System.Action? mCPToolConfig = null, + + global::System.Action? openAPIToolConfig = null, bool validate = true) { if (validate) @@ -417,6 +502,10 @@ public void Match( { mCPToolConfig?.Invoke(MCPToolConfig!); } + else if (IsOpenAPIToolConfig) + { + openAPIToolConfig?.Invoke(OpenAPIToolConfig!); + } } /// @@ -427,6 +516,7 @@ public void Switch( global::System.Action? webhookToolConfig = null, global::System.Action? clientToolConfig = null, global::System.Action? mCPToolConfig = null, + global::System.Action? openAPIToolConfig = null, bool validate = true) { if (validate) @@ -450,6 +540,10 @@ public void Switch( { mCPToolConfig?.Invoke(MCPToolConfig!); } + else if (IsOpenAPIToolConfig) + { + openAPIToolConfig?.Invoke(OpenAPIToolConfig!); + } } /// @@ -467,6 +561,8 @@ public override int GetHashCode() typeof(global::Speechify.ClientToolConfig), MCPToolConfig, typeof(global::Speechify.MCPToolConfig), + OpenAPIToolConfig, + typeof(global::Speechify.OpenAPIToolConfig), }; const int offset = unchecked((int)2166136261); const int prime = 16777619; @@ -486,7 +582,8 @@ public bool Equals(CreateAgentToolRequestConfig other) global::System.Collections.Generic.EqualityComparer.Default.Equals(BuiltinToolConfig, other.BuiltinToolConfig) && global::System.Collections.Generic.EqualityComparer.Default.Equals(WebhookToolConfig, other.WebhookToolConfig) && global::System.Collections.Generic.EqualityComparer.Default.Equals(ClientToolConfig, other.ClientToolConfig) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPToolConfig, other.MCPToolConfig) + global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPToolConfig, other.MCPToolConfig) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(OpenAPIToolConfig, other.OpenAPIToolConfig) ; } diff --git a/src/libs/Speechify/Generated/Speechify.Models.CreateCredentialRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CreateCredentialRequest.Json.g.cs new file mode 100644 index 00000000..30f10f29 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CreateCredentialRequest.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class CreateCredentialRequest + { + /// + /// 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.CreateCredentialRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.CreateCredentialRequest), + jsonSerializerContext) as global::Speechify.CreateCredentialRequest; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.CreateCredentialRequest? 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.CreateCredentialRequest? 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.CreateCredentialRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.CreateCredentialRequest; + } + + /// + /// 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.CreateCredentialRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CreateCredentialRequest.g.cs new file mode 100644 index 00000000..04e4802d --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CreateCredentialRequest.g.cs @@ -0,0 +1,139 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Body for `POST /v1/credentials`. + /// + public sealed partial class CreateCredentialRequest + { + /// + /// Human-readable label, unique per workspace. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// Optional project to scope this credential to (prefixed
+ /// `proj_...` id): a scoped credential is referenceable only from
+ /// tools in that project. Omit (or null) for workspace-shared -
+ /// usable from every project. An unknown id returns 404
+ /// project_not_found. A project-pinned API key creates into its
+ /// own project and cannot name the shared tier. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] + public string? ProjectId { get; set; } + + /// + /// Discriminates the auth flow a credential carries. The matching
+ /// `config.<kind>` block is the one that must be populated, and the only
+ /// one.
+ /// - `oauth2_client_credentials`: a `client_id` and `client_secret` the
+ /// platform exchanges at the vendor's `token_url` for a short-lived
+ /// access token (the OAuth2 client-credentials flow). Backs an `mcp` or
+ /// `openapi` tool whose `auth.type` is `oauth2_client_credentials`.
+ /// - `bearer`: a static token sent as `Authorization: Bearer <token>`.
+ /// Backs an `mcp` or `openapi` tool whose `auth.type` is `bearer`, an
+ /// agent's custom LLM endpoint key, a custom model's key, and a
+ /// messaging channel's bot token.
+ /// - `shared_secret`: a secret that is never sent anywhere; an inbound
+ /// callback's signature is verified against it, such as a messaging
+ /// channel's signing secret.
+ /// - `oauth2_jwt`: a signing key for the JWT-bearer flow (RFC 7523).
+ /// - `basic`: a username and password.
+ /// - `custom_headers`: a set of header names and values.
+ /// The vault stores `oauth2_jwt`, `basic` and `custom_headers`, but no
+ /// tool auth type references them yet: an `mcp` or `openapi` tool
+ /// authenticates with `bearer` or `oauth2_client_credentials` only. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("kind")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.CredentialKindJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Speechify.CredentialKind Kind { get; set; } + + /// + /// Kind-specific credential payload, used on WRITES only (create and
+ /// rotate). Exactly one block is populated — the one named by the
+ /// credential's `kind`. The secret fields are write-only: they are
+ /// accepted here but are NEVER returned on reads — a read returns the
+ /// masked `CredentialConfigView` instead. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("config")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Speechify.CredentialConfig Config { 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. + /// + /// + /// Human-readable label, unique per workspace. + /// + /// + /// Discriminates the auth flow a credential carries. The matching
+ /// `config.<kind>` block is the one that must be populated, and the only
+ /// one.
+ /// - `oauth2_client_credentials`: a `client_id` and `client_secret` the
+ /// platform exchanges at the vendor's `token_url` for a short-lived
+ /// access token (the OAuth2 client-credentials flow). Backs an `mcp` or
+ /// `openapi` tool whose `auth.type` is `oauth2_client_credentials`.
+ /// - `bearer`: a static token sent as `Authorization: Bearer <token>`.
+ /// Backs an `mcp` or `openapi` tool whose `auth.type` is `bearer`, an
+ /// agent's custom LLM endpoint key, a custom model's key, and a
+ /// messaging channel's bot token.
+ /// - `shared_secret`: a secret that is never sent anywhere; an inbound
+ /// callback's signature is verified against it, such as a messaging
+ /// channel's signing secret.
+ /// - `oauth2_jwt`: a signing key for the JWT-bearer flow (RFC 7523).
+ /// - `basic`: a username and password.
+ /// - `custom_headers`: a set of header names and values.
+ /// The vault stores `oauth2_jwt`, `basic` and `custom_headers`, but no
+ /// tool auth type references them yet: an `mcp` or `openapi` tool
+ /// authenticates with `bearer` or `oauth2_client_credentials` only. + /// + /// + /// Kind-specific credential payload, used on WRITES only (create and
+ /// rotate). Exactly one block is populated — the one named by the
+ /// credential's `kind`. The secret fields are write-only: they are
+ /// accepted here but are NEVER returned on reads — a read returns the
+ /// masked `CredentialConfigView` instead. + /// + /// + /// Optional project to scope this credential to (prefixed
+ /// `proj_...` id): a scoped credential is referenceable only from
+ /// tools in that project. Omit (or null) for workspace-shared -
+ /// usable from every project. An unknown id returns 404
+ /// project_not_found. A project-pinned API key creates into its
+ /// own project and cannot name the shared tier. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateCredentialRequest( + string name, + global::Speechify.CredentialKind kind, + global::Speechify.CredentialConfig config, + string? projectId) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.ProjectId = projectId; + this.Kind = kind; + this.Config = config ?? throw new global::System.ArgumentNullException(nameof(config)); + } + + /// + /// Initializes a new instance of the class. + /// + public CreateCredentialRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.CreateHostedAPIRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CreateHostedAPIRequest.g.cs index 583df849..4f045243 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.CreateHostedAPIRequest.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.CreateHostedAPIRequest.g.cs @@ -23,7 +23,7 @@ public sealed partial class CreateHostedAPIRequest public required string Name { get; set; } /// - /// + /// What the API is for; also the instructions an MCP client hands its model when `mcp_enabled` is on. /// [global::System.Text.Json.Serialization.JsonPropertyName("description")] public string? Description { get; set; } @@ -48,7 +48,7 @@ public sealed partial class CreateHostedAPIRequest public int? DailyRunCap { get; set; } /// - /// Reads the API may serve from storage per UTC day; 100000 when omitted. + /// Reads the API's store, file, run_latest and tool routes may serve per UTC day; 100000 when omitted. /// [global::System.Text.Json.Serialization.JsonPropertyName("daily_read_cap")] public int? DailyReadCap { get; set; } @@ -59,6 +59,14 @@ public sealed partial class CreateHostedAPIRequest [global::System.Text.Json.Serialization.JsonPropertyName("daily_write_cap")] public int? DailyWriteCap { get; set; } + /// + /// Serve the routes as an MCP server at `POST <base_url>/mcp` too;
+ /// false when omitted. Refused with `auth_mode: public` (400
+ /// `validation_failed` naming `mcp_enabled`). + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("mcp_enabled")] + public bool? McpEnabled { get; set; } + /// /// /// @@ -84,7 +92,9 @@ public sealed partial class CreateHostedAPIRequest /// 3-40 lowercase letters, digits or hyphens; a DNS label, unique on the shared domain; immutable. /// /// - /// + /// + /// What the API is for; also the instructions an MCP client hands its model when `mcp_enabled` is on. + /// /// /// consumer_key when omitted. `public` is refused with 403 `hosted_api_public_refused` where the workspace's policy does not allow internet-facing APIs. /// @@ -93,11 +103,16 @@ public sealed partial class CreateHostedAPIRequest /// Runs the API may start per UTC day through its run routes; 1000 when omitted. /// /// - /// Reads the API may serve from storage per UTC day; 100000 when omitted. + /// Reads the API's store, file, run_latest and tool routes may serve per UTC day; 100000 when omitted. /// /// /// Documents the API's write routes may land per UTC day; 10000 when omitted. /// + /// + /// Serve the routes as an MCP server at `POST <base_url>/mcp` too;
+ /// false when omitted. Refused with `auth_mode: public` (400
+ /// `validation_failed` naming `mcp_enabled`). + /// /// /// /// Register the key set end-user tokens are verified against (an `https` URL on a public host). @@ -114,6 +129,7 @@ public CreateHostedAPIRequest( int? dailyRunCap, int? dailyReadCap, int? dailyWriteCap, + bool? mcpEnabled, string? projectId, string? userTokenJwksUrl) { @@ -125,6 +141,7 @@ public CreateHostedAPIRequest( this.DailyRunCap = dailyRunCap; this.DailyReadCap = dailyReadCap; this.DailyWriteCap = dailyWriteCap; + this.McpEnabled = mcpEnabled; this.ProjectId = projectId; this.UserTokenJwksUrl = userTokenJwksUrl; } diff --git a/src/libs/Speechify/Generated/Speechify.Models.CreateHostedAPIRouteRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CreateHostedAPIRouteRequest.g.cs index bc3541c3..6163e8e4 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.CreateHostedAPIRouteRequest.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.CreateHostedAPIRouteRequest.g.cs @@ -17,20 +17,30 @@ public sealed partial class CreateHostedAPIRouteRequest public required global::Speechify.CreateHostedApiRouteRequestMethod Method { get; set; } /// - /// Lowercase segments of letters, digits, `. _ -` or a `{param}`; `/openapi.json` and `/_runs` are reserved. + /// Lowercase segments of letters, digits, `. _ -` or a `{param}`; `/openapi.json`, `/_runs` and `/mcp` are reserved. /// [global::System.Text.Json.Serialization.JsonPropertyName("path")] [global::System.Text.Json.Serialization.JsonRequired] public required string Path { get; set; } /// - /// + /// The route's name, 1-128 letters, digits, spaces, `.`, `_` or `-`.
+ /// On an API with `mcp_enabled` the MCP tool's name comes from it:
+ /// each run of other characters (a space included) becomes `_`,
+ /// leading and trailing `_` are dropped, and the result is cut to 64
+ /// characters. A route with no name is listed under a name built from
+ /// its method and path, and a name two routes would share takes `_2`,
+ /// `_3` in route order; the face's `tools/list` is the authority. Pick
+ /// a verb-first name a model can choose by. ///
[global::System.Text.Json.Serialization.JsonPropertyName("name")] public string? Name { get; set; } /// - /// + /// What the route does. On an API with `mcp_enabled` it is the MCP
+ /// tool description a client's model reads to choose the tool, so say
+ /// what it returns and when to call it; a `tool` route with none falls
+ /// back to the operation's summary. ///
[global::System.Text.Json.Serialization.JsonPropertyName("description")] public string? Description { get; set; } @@ -50,7 +60,28 @@ public sealed partial class CreateHostedAPIRouteRequest /// `run_latest` (trigger_id of a schedule trigger),
/// `run` (trigger_id of a webhook trigger, wait_seconds),
/// `file` (file_path of one published file; or, on a route whose path
- /// ends in `*`, file_root and file_index for a whole published tree). + /// ends in `*`, file_root and file_index for a whole published tree),
+ /// `tool` (tool_id of an `openapi` tool definition and the `operation`
+ /// on it: the POST body is the operation's arguments, held to its
+ /// argument schema, and the vendor's answer after the operation's
+ /// `response` mapping is the response, or `{"text": ...}` when the vendor
+ /// answered text. Only an operation whose effective class is `read`, on a
+ /// tool whose `approval` is null or `auto`, may be served, and never on a
+ /// public API; a route write that names anything else is refused with 400
+ /// `validation_failed` on `resolver.tool_id`. Because a definition can
+ /// change after its route is written, every call re-checks it: an
+ /// operation no longer classified `read`, or a tool whose `approval` is no
+ /// longer null or `auto`, answers 403 `route_tool_not_readable`; a tool
+ /// deleted, moved to another project, no longer of kind `openapi` or
+ /// without the operation answers 409 `route_tool_unavailable`, which no
+ /// retry clears until the route or the tool is fixed. Arguments that do
+ /// not fit the schema answer 400 `validation_failed`; the definition's
+ /// `max_requests_per_minute` and the vendor's own throttle both answer 429
+ /// `route_upstream_rate_limited` with `Retry-After`; a vendor error
+ /// answers 502 `route_upstream_error` with the vendor's status in
+ /// `error.details.upstream_status`, and an unreachable vendor or a
+ /// credential that no longer resolves answers 502 `route_upstream_error`
+ /// without it). ///
[global::System.Text.Json.Serialization.JsonPropertyName("resolver")] [global::System.Text.Json.Serialization.JsonRequired] @@ -85,7 +116,7 @@ public sealed partial class CreateHostedAPIRouteRequest ///
/// /// - /// Lowercase segments of letters, digits, `. _ -` or a `{param}`; `/openapi.json` and `/_runs` are reserved. + /// Lowercase segments of letters, digits, `. _ -` or a `{param}`; `/openapi.json`, `/_runs` and `/mcp` are reserved. /// /// /// What answers a route. `type` selects the fields that apply:
@@ -102,10 +133,45 @@ public sealed partial class CreateHostedAPIRouteRequest /// `run_latest` (trigger_id of a schedule trigger),
/// `run` (trigger_id of a webhook trigger, wait_seconds),
/// `file` (file_path of one published file; or, on a route whose path
- /// ends in `*`, file_root and file_index for a whole published tree). + /// ends in `*`, file_root and file_index for a whole published tree),
+ /// `tool` (tool_id of an `openapi` tool definition and the `operation`
+ /// on it: the POST body is the operation's arguments, held to its
+ /// argument schema, and the vendor's answer after the operation's
+ /// `response` mapping is the response, or `{"text": ...}` when the vendor
+ /// answered text. Only an operation whose effective class is `read`, on a
+ /// tool whose `approval` is null or `auto`, may be served, and never on a
+ /// public API; a route write that names anything else is refused with 400
+ /// `validation_failed` on `resolver.tool_id`. Because a definition can
+ /// change after its route is written, every call re-checks it: an
+ /// operation no longer classified `read`, or a tool whose `approval` is no
+ /// longer null or `auto`, answers 403 `route_tool_not_readable`; a tool
+ /// deleted, moved to another project, no longer of kind `openapi` or
+ /// without the operation answers 409 `route_tool_unavailable`, which no
+ /// retry clears until the route or the tool is fixed. Arguments that do
+ /// not fit the schema answer 400 `validation_failed`; the definition's
+ /// `max_requests_per_minute` and the vendor's own throttle both answer 429
+ /// `route_upstream_rate_limited` with `Retry-After`; a vendor error
+ /// answers 502 `route_upstream_error` with the vendor's status in
+ /// `error.details.upstream_status`, and an unreachable vendor or a
+ /// credential that no longer resolves answers 502 `route_upstream_error`
+ /// without it). + /// + /// + /// The route's name, 1-128 letters, digits, spaces, `.`, `_` or `-`.
+ /// On an API with `mcp_enabled` the MCP tool's name comes from it:
+ /// each run of other characters (a space included) becomes `_`,
+ /// leading and trailing `_` are dropped, and the result is cut to 64
+ /// characters. A route with no name is listed under a name built from
+ /// its method and path, and a name two routes would share takes `_2`,
+ /// `_3` in route order; the face's `tools/list` is the authority. Pick
+ /// a verb-first name a model can choose by. + /// + /// + /// What the route does. On an API with `mcp_enabled` it is the MCP
+ /// tool description a client's model reads to choose the tool, so say
+ /// what it returns and when to call it; a `tool` route with none falls
+ /// back to the operation's summary. /// - /// - /// /// /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Models.CreateShareLinkRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CreateShareLinkRequest.g.cs index 70dc94fa..37130d88 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.CreateShareLinkRequest.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.CreateShareLinkRequest.g.cs @@ -47,8 +47,8 @@ public sealed partial class CreateShareLinkRequest /// /// Tools to opt this link into, by id — the same `tool_…` ids
/// `listAgentTools` returns. Omit for the default posture (call
- /// controls and knowledge search only). Opting a webhook or MCP
- /// tool in lets a stranger drive it, so it is an explicit act
+ /// controls and knowledge search only). Opting a webhook, MCP or
+ /// OpenAPI tool in lets a stranger drive it, so it is an explicit act
/// rather than something inherited from the agent. Every id must
/// name a tool attached to this agent; anything else is a 400. ///
@@ -87,8 +87,8 @@ public sealed partial class CreateShareLinkRequest /// /// Tools to opt this link into, by id — the same `tool_…` ids
/// `listAgentTools` returns. Omit for the default posture (call
- /// controls and knowledge search only). Opting a webhook or MCP
- /// tool in lets a stranger drive it, so it is an explicit act
+ /// controls and knowledge search only). Opting a webhook, MCP or
+ /// OpenAPI tool in lets a stranger drive it, so it is an explicit act
/// rather than something inherited from the agent. Every id must
/// name a tool attached to this agent; anything else is a 400. /// diff --git a/src/libs/Speechify/Generated/Speechify.Models.CreateShareLinkResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CreateShareLinkResponse.g.cs index 0afae9da..ccaefdb3 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.CreateShareLinkResponse.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.CreateShareLinkResponse.g.cs @@ -115,8 +115,8 @@ public sealed partial class CreateShareLinkResponse /// Tools the owner opted this link into, by id — the same
/// `tool_…` ids `listAgentTools` returns. Empty means the
/// default posture: the agent's built-in call controls and
- /// knowledge search only, with no webhook, MCP or transfer tool —
- /// a link recipient is a stranger, not the owner's customer. + /// knowledge search only, with no webhook, MCP, OpenAPI or transfer
+ /// tool: a link recipient is a stranger, not the owner's customer. ///
[global::System.Text.Json.Serialization.JsonPropertyName("allowed_tool_ids")] [global::System.Text.Json.Serialization.JsonRequired] @@ -193,8 +193,8 @@ public sealed partial class CreateShareLinkResponse /// Tools the owner opted this link into, by id — the same
/// `tool_…` ids `listAgentTools` returns. Empty means the
/// default posture: the agent's built-in call controls and
- /// knowledge search only, with no webhook, MCP or transfer tool —
- /// a link recipient is a stranger, not the owner's customer. + /// knowledge search only, with no webhook, MCP, OpenAPI or transfer
+ /// tool: a link recipient is a stranger, not the owner's customer. /// /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Models.CreateSkillRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CreateSkillRequest.g.cs index 273f483f..bef69f02 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.CreateSkillRequest.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.CreateSkillRequest.g.cs @@ -31,7 +31,13 @@ public sealed partial class CreateSkillRequest public required string Instructions { get; set; } /// - /// + /// Tool definitions (`tool_...`) the skill contributes to every agent
+ /// that attaches it, unioned with the agent's own tools: any kind a
+ /// `POST /v1/agents/tool-definitions` create makes (`webhook`,
+ /// `client`, `mcp` or `openapi`, where an `openapi` tool contributes
+ /// each of its operations). The tools do not have to be attached to
+ /// the agent; an attach is refused with 409 `skill_tool_name_conflict`
+ /// when one of their names collides with a tool the agent already has. ///
[global::System.Text.Json.Serialization.JsonPropertyName("tool_ids")] public global::System.Collections.Generic.IList? ToolIds { get; set; } @@ -72,7 +78,15 @@ public sealed partial class CreateSkillRequest /// rather than a storage bound. /// /// - /// + /// + /// Tool definitions (`tool_...`) the skill contributes to every agent
+ /// that attaches it, unioned with the agent's own tools: any kind a
+ /// `POST /v1/agents/tool-definitions` create makes (`webhook`,
+ /// `client`, `mcp` or `openapi`, where an `openapi` tool contributes
+ /// each of its operations). The tools do not have to be attached to
+ /// the agent; an attach is refused with 409 `skill_tool_name_conflict`
+ /// when one of their names collides with a tool the agent already has. + /// /// /// /// Default token values. Keys in the reserved `system__` namespace are refused. diff --git a/src/libs/Speechify/Generated/Speechify.Models.CreateToolRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CreateToolRequest.g.cs index 695b0a81..0469f832 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.CreateToolRequest.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.CreateToolRequest.g.cs @@ -4,7 +4,8 @@ namespace Speechify { /// - /// Create a workspace tool definition (webhook / client / mcp only). + /// Create a workspace tool definition of kind `webhook`, `client`, `mcp`
+ /// or `openapi`. Built-ins are added per agent instead. ///
public sealed partial class CreateToolRequest { @@ -35,7 +36,8 @@ public sealed partial class CreateToolRequest /// - `builtin`: a worker-resident platform capability (e.g. end_call, play_audio), configured per-agent
/// - `webhook`: worker signs a payload and POSTs it to your URL
/// - `client`: worker dispatches to the caller's browser/SDK via data channel
- /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls + /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls
+ /// - `openapi`: a REST API described by its OpenAPI document, pinned to the operations you selected; the control plane executes every call /// [global::System.Text.Json.Serialization.JsonPropertyName("kind")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.ToolKindJsonConverter))] @@ -53,8 +55,11 @@ public sealed partial class CreateToolRequest /// /// The impact class. Omit it and the tool's impact is read off its
/// shape instead, and keeps tracking it: a `GET` webhook reads, a
- /// `POST` webhook reaches outside your team, an MCP or client tool can
- /// do anything its author wired.
+ /// `POST` webhook reaches outside your team, an MCP, client or OpenAPI
+ /// tool can do anything its author wired.
+ /// On an OpenAPI tool it is the class of every operation that declares
+ /// none of its own and is not a GET or HEAD; classify operations one by
+ /// one with `OpenAPIOperation.action_class` instead of setting it here.
/// On an MCP tool it is also the ceiling for what the server may claim
/// about its own tools: a class a `tools/list` entry declares under
/// `_meta["speechify/action_class"]` is honoured when it is at least
@@ -88,7 +93,8 @@ public sealed partial class CreateToolRequest /// - `builtin`: a worker-resident platform capability (e.g. end_call, play_audio), configured per-agent
/// - `webhook`: worker signs a payload and POSTs it to your URL
/// - `client`: worker dispatches to the caller's browser/SDK via data channel
- /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls + /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls
+ /// - `openapi`: a REST API described by its OpenAPI document, pinned to the operations you selected; the control plane executes every call /// /// /// @@ -99,8 +105,11 @@ public sealed partial class CreateToolRequest /// /// The impact class. Omit it and the tool's impact is read off its
/// shape instead, and keeps tracking it: a `GET` webhook reads, a
- /// `POST` webhook reaches outside your team, an MCP or client tool can
- /// do anything its author wired.
+ /// `POST` webhook reaches outside your team, an MCP, client or OpenAPI
+ /// tool can do anything its author wired.
+ /// On an OpenAPI tool it is the class of every operation that declares
+ /// none of its own and is not a GET or HEAD; classify operations one by
+ /// one with `OpenAPIOperation.action_class` instead of setting it here.
/// On an MCP tool it is also the ceiling for what the server may claim
/// about its own tools: a class a `tools/list` entry declares under
/// `_meta["speechify/action_class"]` is honoured when it is at least
diff --git a/src/libs/Speechify/Generated/Speechify.Models.CreateToolRequestConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CreateToolRequestConfig.g.cs index 1e2f2ed2..fff21fbf 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.CreateToolRequestConfig.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.CreateToolRequestConfig.g.cs @@ -169,6 +169,57 @@ public bool TryPickMCPToolConfig( public global::Speechify.MCPToolConfig PickMCPToolConfig() => IsMCPToolConfig ? MCPToolConfig! : throw new global::System.InvalidOperationException($"Expected union variant 'MCPToolConfig' but the value was {ToString()}."); + + /// + /// Config shape for `kind=openapi`: a REST API described by its OpenAPI
+ /// document, pinned to the operations you selected. Get the operations
+ /// from `POST /v1/agents/tool-definitions/import-openapi`, which answers
+ /// them in exactly this shape, or write them by hand. The document itself
+ /// is never stored; the compiled operations are, so a vendor rename cannot
+ /// change a published agent's schemas until you re-import. Each operation
+ /// is offered to the agent as the function `<tool name>__<operation id>`
+ /// whose arguments are the operation's params by name plus `body` when it
+ /// takes one.
+ /// Speechify's servers make every call, on a durable run, a live voice
+ /// session, a text conversation and a hosted API `tool` route alike, so
+ /// the vendor credential never leaves them. `auth` is the same vault
+ /// reference the `mcp` kind takes; a `bearer` or
+ /// `oauth2_client_credentials` auth requires `credential_id`, whose
+ /// credential must be of the matching kind. + ///
+#if NET6_0_OR_GREATER + public global::Speechify.OpenAPIToolConfig? OpenAPIToolConfig { get; init; } +#else + public global::Speechify.OpenAPIToolConfig? OpenAPIToolConfig { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OpenAPIToolConfig))] +#endif + public bool IsOpenAPIToolConfig => OpenAPIToolConfig != null; + + /// + /// + /// + public bool TryPickOpenAPIToolConfig( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Speechify.OpenAPIToolConfig? value) + { + value = OpenAPIToolConfig; + return IsOpenAPIToolConfig; + } + + /// + /// + /// + public global::Speechify.OpenAPIToolConfig PickOpenAPIToolConfig() => IsOpenAPIToolConfig + ? OpenAPIToolConfig! + : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAPIToolConfig' but the value was {ToString()}."); /// /// /// @@ -238,24 +289,50 @@ public CreateToolRequestConfig(global::Speechify.MCPToolConfig? value) ///
public static CreateToolRequestConfig FromMCPToolConfig(global::Speechify.MCPToolConfig? value) => new CreateToolRequestConfig(value); + /// + /// + /// + public static implicit operator CreateToolRequestConfig(global::Speechify.OpenAPIToolConfig value) => new CreateToolRequestConfig((global::Speechify.OpenAPIToolConfig?)value); + + /// + /// + /// + public static implicit operator global::Speechify.OpenAPIToolConfig?(CreateToolRequestConfig @this) => @this.OpenAPIToolConfig; + + /// + /// + /// + public CreateToolRequestConfig(global::Speechify.OpenAPIToolConfig? value) + { + OpenAPIToolConfig = value; + } + + /// + /// + /// + public static CreateToolRequestConfig FromOpenAPIToolConfig(global::Speechify.OpenAPIToolConfig? value) => new CreateToolRequestConfig(value); + /// /// /// public CreateToolRequestConfig( global::Speechify.WebhookToolConfig? webhookToolConfig, global::Speechify.ClientToolConfig? clientToolConfig, - global::Speechify.MCPToolConfig? mCPToolConfig + global::Speechify.MCPToolConfig? mCPToolConfig, + global::Speechify.OpenAPIToolConfig? openAPIToolConfig ) { WebhookToolConfig = webhookToolConfig; ClientToolConfig = clientToolConfig; MCPToolConfig = mCPToolConfig; + OpenAPIToolConfig = openAPIToolConfig; } /// /// /// public object? Object => + OpenAPIToolConfig as object ?? MCPToolConfig as object ?? ClientToolConfig as object ?? WebhookToolConfig as object @@ -267,7 +344,8 @@ WebhookToolConfig as object public override string? ToString() => WebhookToolConfig?.ToString() ?? ClientToolConfig?.ToString() ?? - MCPToolConfig?.ToString() + MCPToolConfig?.ToString() ?? + OpenAPIToolConfig?.ToString() ; /// @@ -275,7 +353,7 @@ WebhookToolConfig as object /// public bool Validate() { - return IsWebhookToolConfig && !IsClientToolConfig && !IsMCPToolConfig || !IsWebhookToolConfig && IsClientToolConfig && !IsMCPToolConfig || !IsWebhookToolConfig && !IsClientToolConfig && IsMCPToolConfig; + return IsWebhookToolConfig && !IsClientToolConfig && !IsMCPToolConfig && !IsOpenAPIToolConfig || !IsWebhookToolConfig && IsClientToolConfig && !IsMCPToolConfig && !IsOpenAPIToolConfig || !IsWebhookToolConfig && !IsClientToolConfig && IsMCPToolConfig && !IsOpenAPIToolConfig || !IsWebhookToolConfig && !IsClientToolConfig && !IsMCPToolConfig && IsOpenAPIToolConfig; } /// @@ -285,6 +363,7 @@ public bool Validate() global::System.Func? webhookToolConfig = null, global::System.Func? clientToolConfig = null, global::System.Func? mCPToolConfig = null, + global::System.Func? openAPIToolConfig = null, bool validate = true) { if (validate) @@ -304,6 +383,10 @@ public bool Validate() { return mCPToolConfig(MCPToolConfig!); } + else if (IsOpenAPIToolConfig && openAPIToolConfig != null) + { + return openAPIToolConfig(OpenAPIToolConfig!); + } return default(TResult); } @@ -317,6 +400,8 @@ public void Match( global::System.Action? clientToolConfig = null, global::System.Action? mCPToolConfig = null, + + global::System.Action? openAPIToolConfig = null, bool validate = true) { if (validate) @@ -336,6 +421,10 @@ public void Match( { mCPToolConfig?.Invoke(MCPToolConfig!); } + else if (IsOpenAPIToolConfig) + { + openAPIToolConfig?.Invoke(OpenAPIToolConfig!); + } } /// @@ -345,6 +434,7 @@ public void Switch( global::System.Action? webhookToolConfig = null, global::System.Action? clientToolConfig = null, global::System.Action? mCPToolConfig = null, + global::System.Action? openAPIToolConfig = null, bool validate = true) { if (validate) @@ -364,6 +454,10 @@ public void Switch( { mCPToolConfig?.Invoke(MCPToolConfig!); } + else if (IsOpenAPIToolConfig) + { + openAPIToolConfig?.Invoke(OpenAPIToolConfig!); + } } /// @@ -379,6 +473,8 @@ public override int GetHashCode() typeof(global::Speechify.ClientToolConfig), MCPToolConfig, typeof(global::Speechify.MCPToolConfig), + OpenAPIToolConfig, + typeof(global::Speechify.OpenAPIToolConfig), }; const int offset = unchecked((int)2166136261); const int prime = 16777619; @@ -397,7 +493,8 @@ public bool Equals(CreateToolRequestConfig other) return global::System.Collections.Generic.EqualityComparer.Default.Equals(WebhookToolConfig, other.WebhookToolConfig) && global::System.Collections.Generic.EqualityComparer.Default.Equals(ClientToolConfig, other.ClientToolConfig) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPToolConfig, other.MCPToolConfig) + global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPToolConfig, other.MCPToolConfig) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(OpenAPIToolConfig, other.OpenAPIToolConfig) ; } diff --git a/src/libs/Speechify/Generated/Speechify.Models.Credential.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.Credential.Json.g.cs new file mode 100644 index 00000000..6f0a2b04 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.Credential.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class Credential + { + /// + /// 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.Credential? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.Credential), + jsonSerializerContext) as global::Speechify.Credential; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.Credential? 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.Credential? 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.Credential), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.Credential; + } + + /// + /// 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.Credential.g.cs b/src/libs/Speechify/Generated/Speechify.Models.Credential.g.cs new file mode 100644 index 00000000..8749a6f0 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.Credential.g.cs @@ -0,0 +1,195 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// A secret in the workspace credentials vault. MCP and OpenAPI tools,
+ /// custom LLM endpoints and messaging channels reference a credential by
+ /// id rather than inlining a secret per row, so one secret is reused
+ /// across many of them and rotated centrally.
+ /// A credential is either workspace-shared (`project_id` null) -
+ /// referenceable from every project - or scoped to exactly one
+ /// project, referenceable only from tools in it.
+ /// The vault is write-only: `config` here is the masked
+ /// `CredentialConfigView` (non-secret fields plus `*_set` markers).
+ /// Secret values are never returned; rotate them via
+ /// `PATCH /v1/credentials/{credential_id}`. + ///
+ public sealed partial class Credential + { + /// + /// Workspace-scoped credential identifier (prefixed external id). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Human-readable label, unique per workspace among active
+ /// credentials. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// The project this credential is scoped to (prefixed external
+ /// id). Null means workspace-shared - usable from every project.
+ /// Credentials have no Default project. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] + public string? ProjectId { get; set; } + + /// + /// Discriminates the auth flow a credential carries. The matching
+ /// `config.<kind>` block is the one that must be populated, and the only
+ /// one.
+ /// - `oauth2_client_credentials`: a `client_id` and `client_secret` the
+ /// platform exchanges at the vendor's `token_url` for a short-lived
+ /// access token (the OAuth2 client-credentials flow). Backs an `mcp` or
+ /// `openapi` tool whose `auth.type` is `oauth2_client_credentials`.
+ /// - `bearer`: a static token sent as `Authorization: Bearer <token>`.
+ /// Backs an `mcp` or `openapi` tool whose `auth.type` is `bearer`, an
+ /// agent's custom LLM endpoint key, a custom model's key, and a
+ /// messaging channel's bot token.
+ /// - `shared_secret`: a secret that is never sent anywhere; an inbound
+ /// callback's signature is verified against it, such as a messaging
+ /// channel's signing secret.
+ /// - `oauth2_jwt`: a signing key for the JWT-bearer flow (RFC 7523).
+ /// - `basic`: a username and password.
+ /// - `custom_headers`: a set of header names and values.
+ /// The vault stores `oauth2_jwt`, `basic` and `custom_headers`, but no
+ /// tool auth type references them yet: an `mcp` or `openapi` tool
+ /// authenticates with `bearer` or `oauth2_client_credentials` only. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("kind")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.CredentialKindJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Speechify.CredentialKind Kind { get; set; } + + /// + /// The masked, read-safe projection of a credential's config. Returned
+ /// on every read (list / get / create / rotate response). Non-secret
+ /// fields (token URLs, client ids, issuer, header names) pass through;
+ /// each secret is replaced by a `*_set` boolean. Secret values are never
+ /// returned - to change one, rotate it via `PATCH /v1/credentials/{credential_id}`.
+ /// Exactly one block is populated, matching the credential's `kind`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("config")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Speechify.CredentialConfigView Config { get; set; } + + /// + /// Dependency tracking for a credential: the resources that reference it,
+ /// so a rotate/delete can't silently break a live integration. `count` is
+ /// the total; `references` lists them (empty when unreferenced). + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("used_by")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Speechify.CredentialUsedBy UsedBy { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime CreatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime UpdatedAt { 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. + /// + /// + /// Workspace-scoped credential identifier (prefixed external id). + /// + /// + /// Human-readable label, unique per workspace among active
+ /// credentials. + /// + /// + /// Discriminates the auth flow a credential carries. The matching
+ /// `config.<kind>` block is the one that must be populated, and the only
+ /// one.
+ /// - `oauth2_client_credentials`: a `client_id` and `client_secret` the
+ /// platform exchanges at the vendor's `token_url` for a short-lived
+ /// access token (the OAuth2 client-credentials flow). Backs an `mcp` or
+ /// `openapi` tool whose `auth.type` is `oauth2_client_credentials`.
+ /// - `bearer`: a static token sent as `Authorization: Bearer <token>`.
+ /// Backs an `mcp` or `openapi` tool whose `auth.type` is `bearer`, an
+ /// agent's custom LLM endpoint key, a custom model's key, and a
+ /// messaging channel's bot token.
+ /// - `shared_secret`: a secret that is never sent anywhere; an inbound
+ /// callback's signature is verified against it, such as a messaging
+ /// channel's signing secret.
+ /// - `oauth2_jwt`: a signing key for the JWT-bearer flow (RFC 7523).
+ /// - `basic`: a username and password.
+ /// - `custom_headers`: a set of header names and values.
+ /// The vault stores `oauth2_jwt`, `basic` and `custom_headers`, but no
+ /// tool auth type references them yet: an `mcp` or `openapi` tool
+ /// authenticates with `bearer` or `oauth2_client_credentials` only. + /// + /// + /// The masked, read-safe projection of a credential's config. Returned
+ /// on every read (list / get / create / rotate response). Non-secret
+ /// fields (token URLs, client ids, issuer, header names) pass through;
+ /// each secret is replaced by a `*_set` boolean. Secret values are never
+ /// returned - to change one, rotate it via `PATCH /v1/credentials/{credential_id}`.
+ /// Exactly one block is populated, matching the credential's `kind`. + /// + /// + /// Dependency tracking for a credential: the resources that reference it,
+ /// so a rotate/delete can't silently break a live integration. `count` is
+ /// the total; `references` lists them (empty when unreferenced). + /// + /// + /// + /// + /// The project this credential is scoped to (prefixed external
+ /// id). Null means workspace-shared - usable from every project.
+ /// Credentials have no Default project. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public Credential( + string id, + string name, + global::Speechify.CredentialKind kind, + global::Speechify.CredentialConfigView config, + global::Speechify.CredentialUsedBy usedBy, + global::System.DateTime createdAt, + global::System.DateTime updatedAt, + 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; + this.Kind = kind; + this.Config = config ?? throw new global::System.ArgumentNullException(nameof(config)); + this.UsedBy = usedBy ?? throw new global::System.ArgumentNullException(nameof(usedBy)); + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + } + + /// + /// Initializes a new instance of the class. + /// + public Credential() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.CredentialConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfig.Json.g.cs new file mode 100644 index 00000000..23b3ecd8 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfig.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class CredentialConfig + { + /// + /// 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.CredentialConfig? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.CredentialConfig), + jsonSerializerContext) as global::Speechify.CredentialConfig; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.CredentialConfig? 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.CredentialConfig? 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.CredentialConfig), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.CredentialConfig; + } + + /// + /// 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.CredentialConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfig.g.cs new file mode 100644 index 00000000..01f704bb --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfig.g.cs @@ -0,0 +1,133 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Kind-specific credential payload, used on WRITES only (create and
+ /// rotate). Exactly one block is populated — the one named by the
+ /// credential's `kind`. The secret fields are write-only: they are
+ /// accepted here but are NEVER returned on reads — a read returns the
+ /// masked `CredentialConfigView` instead. + ///
+ public sealed partial class CredentialConfig + { + /// + /// A `client_id` and `client_secret` for the OAuth2 client-credentials
+ /// flow. When a call needs a token, the platform POSTs
+ /// `grant_type=client_credentials` to `token_url`, with `scope` and
+ /// `audience` when they are set, authenticating the way
+ /// `token_endpoint_auth_method` says. It sends the access token that
+ /// comes back as `Authorization: Bearer <token>` and reuses it until it
+ /// nears expiry; rotating the secret mints a fresh one. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("oauth2_client_credentials")] + public global::Speechify.OAuth2ClientCredentialsConfig? Oauth2ClientCredentials { get; set; } + + /// + /// Issuer, audience, and signing key for the JWT-bearer flow
+ /// (RFC 7523) — e.g. Google service accounts that exchange a
+ /// signed JWT for an access token. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("oauth2_jwt")] + public global::Speechify.OAuth2JWTConfig? Oauth2Jwt { get; set; } + + /// + /// HTTP Basic auth — username + password. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("basic")] + public global::Speechify.BasicAuthConfig? Basic { get; set; } + + /// + /// A static bearer token sent as `Authorization: Bearer …`. For
+ /// rotating tokens prefer one of the oauth2 kinds. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("bearer")] + public global::Speechify.BearerAuthConfig? Bearer { get; set; } + + /// + /// An arbitrary set of headers sent on every outbound tool
+ /// request. Useful for vendor signature schemes that don't fit
+ /// Basic / Bearer. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("custom_headers")] + public global::Speechify.CustomHeadersConfig? CustomHeaders { get; set; } + + /// + /// One pre-shared secret. Unlike every other credential kind it is never
+ /// placed on an outbound request: it is the key an INBOUND callback's
+ /// signature is verified against, which is how a messaging provider
+ /// authenticates itself to a channel front door. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("shared_secret")] + public global::Speechify.SharedSecretConfig? SharedSecret { 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 `client_id` and `client_secret` for the OAuth2 client-credentials
+ /// flow. When a call needs a token, the platform POSTs
+ /// `grant_type=client_credentials` to `token_url`, with `scope` and
+ /// `audience` when they are set, authenticating the way
+ /// `token_endpoint_auth_method` says. It sends the access token that
+ /// comes back as `Authorization: Bearer <token>` and reuses it until it
+ /// nears expiry; rotating the secret mints a fresh one. + /// + /// + /// Issuer, audience, and signing key for the JWT-bearer flow
+ /// (RFC 7523) — e.g. Google service accounts that exchange a
+ /// signed JWT for an access token. + /// + /// + /// HTTP Basic auth — username + password. + /// + /// + /// A static bearer token sent as `Authorization: Bearer …`. For
+ /// rotating tokens prefer one of the oauth2 kinds. + /// + /// + /// An arbitrary set of headers sent on every outbound tool
+ /// request. Useful for vendor signature schemes that don't fit
+ /// Basic / Bearer. + /// + /// + /// One pre-shared secret. Unlike every other credential kind it is never
+ /// placed on an outbound request: it is the key an INBOUND callback's
+ /// signature is verified against, which is how a messaging provider
+ /// authenticates itself to a channel front door. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CredentialConfig( + global::Speechify.OAuth2ClientCredentialsConfig? oauth2ClientCredentials, + global::Speechify.OAuth2JWTConfig? oauth2Jwt, + global::Speechify.BasicAuthConfig? basic, + global::Speechify.BearerAuthConfig? bearer, + global::Speechify.CustomHeadersConfig? customHeaders, + global::Speechify.SharedSecretConfig? sharedSecret) + { + this.Oauth2ClientCredentials = oauth2ClientCredentials; + this.Oauth2Jwt = oauth2Jwt; + this.Basic = basic; + this.Bearer = bearer; + this.CustomHeaders = customHeaders; + this.SharedSecret = sharedSecret; + } + + /// + /// Initializes a new instance of the class. + /// + public CredentialConfig() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigView.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigView.Json.g.cs new file mode 100644 index 00000000..0e76689a --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigView.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class CredentialConfigView + { + /// + /// 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.CredentialConfigView? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.CredentialConfigView), + jsonSerializerContext) as global::Speechify.CredentialConfigView; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.CredentialConfigView? 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.CredentialConfigView? 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.CredentialConfigView), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.CredentialConfigView; + } + + /// + /// 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.CredentialConfigView.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigView.g.cs new file mode 100644 index 00000000..fccdcba7 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigView.g.cs @@ -0,0 +1,94 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// The masked, read-safe projection of a credential's config. Returned
+ /// on every read (list / get / create / rotate response). Non-secret
+ /// fields (token URLs, client ids, issuer, header names) pass through;
+ /// each secret is replaced by a `*_set` boolean. Secret values are never
+ /// returned - to change one, rotate it via `PATCH /v1/credentials/{credential_id}`.
+ /// Exactly one block is populated, matching the credential's `kind`. + ///
+ public sealed partial class CredentialConfigView + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("oauth2_client_credentials")] + public global::Speechify.CredentialConfigViewOauth2ClientCredentials? Oauth2ClientCredentials { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("oauth2_jwt")] + public global::Speechify.CredentialConfigViewOauth2Jwt? Oauth2Jwt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("basic")] + public global::Speechify.CredentialConfigViewBasic? Basic { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("bearer")] + public global::Speechify.CredentialConfigViewBearer? Bearer { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("shared_secret")] + public global::Speechify.CredentialConfigViewSharedSecret? SharedSecret { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("custom_headers")] + public global::Speechify.CredentialConfigViewCustomHeaders? CustomHeaders { 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 CredentialConfigView( + global::Speechify.CredentialConfigViewOauth2ClientCredentials? oauth2ClientCredentials, + global::Speechify.CredentialConfigViewOauth2Jwt? oauth2Jwt, + global::Speechify.CredentialConfigViewBasic? basic, + global::Speechify.CredentialConfigViewBearer? bearer, + global::Speechify.CredentialConfigViewSharedSecret? sharedSecret, + global::Speechify.CredentialConfigViewCustomHeaders? customHeaders) + { + this.Oauth2ClientCredentials = oauth2ClientCredentials; + this.Oauth2Jwt = oauth2Jwt; + this.Basic = basic; + this.Bearer = bearer; + this.SharedSecret = sharedSecret; + this.CustomHeaders = customHeaders; + } + + /// + /// Initializes a new instance of the class. + /// + public CredentialConfigView() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewBasic.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewBasic.Json.g.cs new file mode 100644 index 00000000..3606e2f7 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewBasic.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class CredentialConfigViewBasic + { + /// + /// 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.CredentialConfigViewBasic? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.CredentialConfigViewBasic), + jsonSerializerContext) as global::Speechify.CredentialConfigViewBasic; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.CredentialConfigViewBasic? 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.CredentialConfigViewBasic? 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.CredentialConfigViewBasic), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.CredentialConfigViewBasic; + } + + /// + /// 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.CredentialConfigViewBasic.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewBasic.g.cs new file mode 100644 index 00000000..4e26c744 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewBasic.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// + /// + public sealed partial class CredentialConfigViewBasic + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("username")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Username { get; set; } + + /// + /// Whether a password is stored. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("password_set")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool PasswordSet { 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. + /// + /// + /// + /// Whether a password is stored. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CredentialConfigViewBasic( + string username, + bool passwordSet) + { + this.Username = username ?? throw new global::System.ArgumentNullException(nameof(username)); + this.PasswordSet = passwordSet; + } + + /// + /// Initializes a new instance of the class. + /// + public CredentialConfigViewBasic() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewBearer.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewBearer.Json.g.cs new file mode 100644 index 00000000..3910cdd8 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewBearer.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class CredentialConfigViewBearer + { + /// + /// 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.CredentialConfigViewBearer? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.CredentialConfigViewBearer), + jsonSerializerContext) as global::Speechify.CredentialConfigViewBearer; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.CredentialConfigViewBearer? 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.CredentialConfigViewBearer? 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.CredentialConfigViewBearer), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.CredentialConfigViewBearer; + } + + /// + /// 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.CredentialConfigViewBearer.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewBearer.g.cs new file mode 100644 index 00000000..445535be --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewBearer.g.cs @@ -0,0 +1,47 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// + /// + public sealed partial class CredentialConfigViewBearer + { + /// + /// Whether a bearer token is stored. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("token_set")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool TokenSet { 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. + /// + /// + /// Whether a bearer token is stored. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CredentialConfigViewBearer( + bool tokenSet) + { + this.TokenSet = tokenSet; + } + + /// + /// Initializes a new instance of the class. + /// + public CredentialConfigViewBearer() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewCustomHeaders.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewCustomHeaders.Json.g.cs new file mode 100644 index 00000000..637309f7 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewCustomHeaders.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class CredentialConfigViewCustomHeaders + { + /// + /// 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.CredentialConfigViewCustomHeaders? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.CredentialConfigViewCustomHeaders), + jsonSerializerContext) as global::Speechify.CredentialConfigViewCustomHeaders; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.CredentialConfigViewCustomHeaders? 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.CredentialConfigViewCustomHeaders? 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.CredentialConfigViewCustomHeaders), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.CredentialConfigViewCustomHeaders; + } + + /// + /// 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.CredentialConfigViewCustomHeaders.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewCustomHeaders.g.cs new file mode 100644 index 00000000..fc77a54b --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewCustomHeaders.g.cs @@ -0,0 +1,47 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// + /// + public sealed partial class CredentialConfigViewCustomHeaders + { + /// + /// The configured header names; the values are write-only. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("header_names")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList HeaderNames { 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 configured header names; the values are write-only. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CredentialConfigViewCustomHeaders( + global::System.Collections.Generic.IList headerNames) + { + this.HeaderNames = headerNames ?? throw new global::System.ArgumentNullException(nameof(headerNames)); + } + + /// + /// Initializes a new instance of the class. + /// + public CredentialConfigViewCustomHeaders() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewOauth2ClientCredentials.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewOauth2ClientCredentials.Json.g.cs new file mode 100644 index 00000000..afca67b7 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewOauth2ClientCredentials.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class CredentialConfigViewOauth2ClientCredentials + { + /// + /// 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.CredentialConfigViewOauth2ClientCredentials? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.CredentialConfigViewOauth2ClientCredentials), + jsonSerializerContext) as global::Speechify.CredentialConfigViewOauth2ClientCredentials; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.CredentialConfigViewOauth2ClientCredentials? 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.CredentialConfigViewOauth2ClientCredentials? 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.CredentialConfigViewOauth2ClientCredentials), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.CredentialConfigViewOauth2ClientCredentials; + } + + /// + /// 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.CredentialConfigViewOauth2ClientCredentials.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewOauth2ClientCredentials.g.cs new file mode 100644 index 00000000..cb62b199 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewOauth2ClientCredentials.g.cs @@ -0,0 +1,111 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// + /// + public sealed partial class CredentialConfigViewOauth2ClientCredentials + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("token_url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string TokenUrl { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("client_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ClientId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("scopes")] + public global::System.Collections.Generic.IList? Scopes { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("audience")] + public string? Audience { get; set; } + + /// + /// How a client-credentials credential authenticates to its `token_url`
+ /// when an access token is minted. `client_secret_post` sends `client_id`
+ /// and `client_secret` as form parameters in the request body, and is what
+ /// a credential that omits this field uses. `client_secret_basic` sends
+ /// them in an HTTP Basic `Authorization` header instead (each value
+ /// form-urlencoded first, as RFC 6749 section 2.3.1 specifies) and neither
+ /// in the body. Most providers accept either; choose `client_secret_basic`
+ /// when the provider's documentation says so. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("token_endpoint_auth_method")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.OAuth2TokenEndpointAuthMethodJsonConverter))] + public global::Speechify.OAuth2TokenEndpointAuthMethod? TokenEndpointAuthMethod { get; set; } + + /// + /// Whether a client secret is stored. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("client_secret_set")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool ClientSecretSet { 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. + /// + /// + /// + /// + /// Whether a client secret is stored. + /// + /// + /// + /// + /// How a client-credentials credential authenticates to its `token_url`
+ /// when an access token is minted. `client_secret_post` sends `client_id`
+ /// and `client_secret` as form parameters in the request body, and is what
+ /// a credential that omits this field uses. `client_secret_basic` sends
+ /// them in an HTTP Basic `Authorization` header instead (each value
+ /// form-urlencoded first, as RFC 6749 section 2.3.1 specifies) and neither
+ /// in the body. Most providers accept either; choose `client_secret_basic`
+ /// when the provider's documentation says so. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CredentialConfigViewOauth2ClientCredentials( + string tokenUrl, + string clientId, + bool clientSecretSet, + global::System.Collections.Generic.IList? scopes, + string? audience, + global::Speechify.OAuth2TokenEndpointAuthMethod? tokenEndpointAuthMethod) + { + this.TokenUrl = tokenUrl ?? throw new global::System.ArgumentNullException(nameof(tokenUrl)); + this.ClientId = clientId ?? throw new global::System.ArgumentNullException(nameof(clientId)); + this.Scopes = scopes; + this.Audience = audience; + this.TokenEndpointAuthMethod = tokenEndpointAuthMethod; + this.ClientSecretSet = clientSecretSet; + } + + /// + /// Initializes a new instance of the class. + /// + public CredentialConfigViewOauth2ClientCredentials() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewOauth2Jwt.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewOauth2Jwt.Json.g.cs new file mode 100644 index 00000000..2d1a1385 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewOauth2Jwt.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class CredentialConfigViewOauth2Jwt + { + /// + /// 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.CredentialConfigViewOauth2Jwt? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.CredentialConfigViewOauth2Jwt), + jsonSerializerContext) as global::Speechify.CredentialConfigViewOauth2Jwt; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.CredentialConfigViewOauth2Jwt? 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.CredentialConfigViewOauth2Jwt? 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.CredentialConfigViewOauth2Jwt), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.CredentialConfigViewOauth2Jwt; + } + + /// + /// 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.CredentialConfigViewOauth2Jwt.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewOauth2Jwt.g.cs new file mode 100644 index 00000000..ed09a664 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewOauth2Jwt.g.cs @@ -0,0 +1,104 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// + /// + public sealed partial class CredentialConfigViewOauth2Jwt + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("token_url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string TokenUrl { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("issuer")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Issuer { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("subject")] + public string? Subject { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("audience")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Audience { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("scopes")] + public global::System.Collections.Generic.IList? Scopes { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("key_id")] + public string? KeyId { get; set; } + + /// + /// Whether a signing key is stored. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("private_key_set")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool PrivateKeySet { 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. + /// + /// + /// + /// + /// + /// Whether a signing key is stored. + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CredentialConfigViewOauth2Jwt( + string tokenUrl, + string issuer, + string audience, + bool privateKeySet, + string? subject, + global::System.Collections.Generic.IList? scopes, + string? keyId) + { + this.TokenUrl = tokenUrl ?? throw new global::System.ArgumentNullException(nameof(tokenUrl)); + this.Issuer = issuer ?? throw new global::System.ArgumentNullException(nameof(issuer)); + this.Subject = subject; + this.Audience = audience ?? throw new global::System.ArgumentNullException(nameof(audience)); + this.Scopes = scopes; + this.KeyId = keyId; + this.PrivateKeySet = privateKeySet; + } + + /// + /// Initializes a new instance of the class. + /// + public CredentialConfigViewOauth2Jwt() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewSharedSecret.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewSharedSecret.Json.g.cs new file mode 100644 index 00000000..07859b34 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewSharedSecret.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class CredentialConfigViewSharedSecret + { + /// + /// 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.CredentialConfigViewSharedSecret? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.CredentialConfigViewSharedSecret), + jsonSerializerContext) as global::Speechify.CredentialConfigViewSharedSecret; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.CredentialConfigViewSharedSecret? 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.CredentialConfigViewSharedSecret? 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.CredentialConfigViewSharedSecret), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.CredentialConfigViewSharedSecret; + } + + /// + /// 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.CredentialConfigViewSharedSecret.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewSharedSecret.g.cs new file mode 100644 index 00000000..0f5865f6 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialConfigViewSharedSecret.g.cs @@ -0,0 +1,47 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// + /// + public sealed partial class CredentialConfigViewSharedSecret + { + /// + /// Whether a shared secret is stored. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("secret_set")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool SecretSet { 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. + /// + /// + /// Whether a shared secret is stored. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CredentialConfigViewSharedSecret( + bool secretSet) + { + this.SecretSet = secretSet; + } + + /// + /// Initializes a new instance of the class. + /// + public CredentialConfigViewSharedSecret() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.CredentialInUseError.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialInUseError.Json.g.cs new file mode 100644 index 00000000..49639f48 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialInUseError.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class CredentialInUseError + { + /// + /// 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.CredentialInUseError? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.CredentialInUseError), + jsonSerializerContext) as global::Speechify.CredentialInUseError; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.CredentialInUseError? 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.CredentialInUseError? 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.CredentialInUseError), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.CredentialInUseError; + } + + /// + /// 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.CredentialInUseError.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialInUseError.g.cs new file mode 100644 index 00000000..839867b1 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialInUseError.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// 409 body when a credential delete is refused because it is still
+ /// referenced. The standard `Error` envelope (so clients read
+ /// `error.code` = `credential_in_use` and `request_id`); the referrers to
+ /// detach ride the structured `error.details.used_by` extension. + ///
+ public sealed partial class CredentialInUseError + { + /// + /// The error block on a credential-in-use 409: the standard `ErrorDetail`
+ /// (`code` = `credential_in_use`) whose structured `details.used_by` names
+ /// exactly what to detach first. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("error")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Speechify.CredentialInUseErrorDetail Error { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("request_id")] + public string? RequestId { 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 error block on a credential-in-use 409: the standard `ErrorDetail`
+ /// (`code` = `credential_in_use`) whose structured `details.used_by` names
+ /// exactly what to detach first. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CredentialInUseError( + global::Speechify.CredentialInUseErrorDetail error, + string? requestId) + { + this.Error = error ?? throw new global::System.ArgumentNullException(nameof(error)); + this.RequestId = requestId; + } + + /// + /// Initializes a new instance of the class. + /// + public CredentialInUseError() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.CredentialInUseErrorDetail.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialInUseErrorDetail.Json.g.cs new file mode 100644 index 00000000..445d55a6 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialInUseErrorDetail.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class CredentialInUseErrorDetail + { + /// + /// 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.CredentialInUseErrorDetail? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.CredentialInUseErrorDetail), + jsonSerializerContext) as global::Speechify.CredentialInUseErrorDetail; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.CredentialInUseErrorDetail? 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.CredentialInUseErrorDetail? 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.CredentialInUseErrorDetail), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.CredentialInUseErrorDetail; + } + + /// + /// 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.CredentialInUseErrorDetail.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialInUseErrorDetail.g.cs new file mode 100644 index 00000000..6ddbfa1d --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialInUseErrorDetail.g.cs @@ -0,0 +1,138 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// The error block on a credential-in-use 409: the standard `ErrorDetail`
+ /// (`code` = `credential_in_use`) whose structured `details.used_by` names
+ /// exactly what to detach first. + ///
+ public sealed partial class CredentialInUseErrorDetail + { + /// + /// Stable machine-readable error code. Additive only: codes are
+ /// never renamed, only deprecated. SDKs may map each code to a
+ /// typed exception class. Status-code semantics:
+ /// 4xx codes describe caller-fixable issues; 5xx codes describe
+ /// server-side failures and are safe to retry with backoff for
+ /// idempotent requests. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("code")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.ErrorCodeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Speechify.ErrorCode Code { get; set; } + + /// + /// Human-readable explanation of this specific occurrence.
+ /// Safe to surface in UI banners or pass to support. The
+ /// wording can change between releases; clients should
+ /// match on `code`, not on the message string. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("message")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Message { get; set; } + + /// + /// Per-field validation errors as `path -> message`. Only
+ /// present on 400 responses caused by request validation
+ /// (typically code=`validation_failed`). Keys are field
+ /// paths in dotted/bracket notation; values are short
+ /// human explanations safe to inline-surface next to the
+ /// offending form field. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("fields")] + public global::System.Collections.Generic.Dictionary? Fields { get; set; } + + /// + /// Structured, endpoint-specific context beyond the flat
+ /// `fields` map. Present only on the few errors that carry
+ /// it (e.g. the `used_by` referrer list on a credential
+ /// delete-conflict); its shape depends on the error `code`.
+ /// Clients that don't recognise a `details` shape can ignore
+ /// it - the `code` + `message` contract is unchanged. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("details")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Speechify.CredentialInUseErrorDetailDetails Details { get; set; } + + /// + /// Link to the documentation that resolves this class of
+ /// error, when a stable page exists. Rate and concurrency
+ /// 429s link the API limits reference, which lists each
+ /// plan's limits and how to raise them. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("docs_url")] + public string? DocsUrl { 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. + /// + /// + /// Stable machine-readable error code. Additive only: codes are
+ /// never renamed, only deprecated. SDKs may map each code to a
+ /// typed exception class. Status-code semantics:
+ /// 4xx codes describe caller-fixable issues; 5xx codes describe
+ /// server-side failures and are safe to retry with backoff for
+ /// idempotent requests. + /// + /// + /// Human-readable explanation of this specific occurrence.
+ /// Safe to surface in UI banners or pass to support. The
+ /// wording can change between releases; clients should
+ /// match on `code`, not on the message string. + /// + /// + /// Structured, endpoint-specific context beyond the flat
+ /// `fields` map. Present only on the few errors that carry
+ /// it (e.g. the `used_by` referrer list on a credential
+ /// delete-conflict); its shape depends on the error `code`.
+ /// Clients that don't recognise a `details` shape can ignore
+ /// it - the `code` + `message` contract is unchanged. + /// + /// + /// Per-field validation errors as `path -> message`. Only
+ /// present on 400 responses caused by request validation
+ /// (typically code=`validation_failed`). Keys are field
+ /// paths in dotted/bracket notation; values are short
+ /// human explanations safe to inline-surface next to the
+ /// offending form field. + /// + /// + /// Link to the documentation that resolves this class of
+ /// error, when a stable page exists. Rate and concurrency
+ /// 429s link the API limits reference, which lists each
+ /// plan's limits and how to raise them. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CredentialInUseErrorDetail( + global::Speechify.ErrorCode code, + string message, + global::Speechify.CredentialInUseErrorDetailDetails details, + global::System.Collections.Generic.Dictionary? fields, + string? docsUrl) + { + this.Code = code; + this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); + this.Fields = fields; + this.Details = details ?? throw new global::System.ArgumentNullException(nameof(details)); + this.DocsUrl = docsUrl; + } + + /// + /// Initializes a new instance of the class. + /// + public CredentialInUseErrorDetail() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.CredentialInUseErrorDetailDetails.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialInUseErrorDetailDetails.Json.g.cs new file mode 100644 index 00000000..892f97b7 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialInUseErrorDetailDetails.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class CredentialInUseErrorDetailDetails + { + /// + /// 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.CredentialInUseErrorDetailDetails? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.CredentialInUseErrorDetailDetails), + jsonSerializerContext) as global::Speechify.CredentialInUseErrorDetailDetails; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.CredentialInUseErrorDetailDetails? 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.CredentialInUseErrorDetailDetails? 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.CredentialInUseErrorDetailDetails), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.CredentialInUseErrorDetailDetails; + } + + /// + /// 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.CredentialInUseErrorDetailDetails.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialInUseErrorDetailDetails.g.cs new file mode 100644 index 00000000..008ab06d --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialInUseErrorDetailDetails.g.cs @@ -0,0 +1,56 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Structured, endpoint-specific context beyond the flat
+ /// `fields` map. Present only on the few errors that carry
+ /// it (e.g. the `used_by` referrer list on a credential
+ /// delete-conflict); its shape depends on the error `code`.
+ /// Clients that don't recognise a `details` shape can ignore
+ /// it - the `code` + `message` contract is unchanged. + ///
+ public sealed partial class CredentialInUseErrorDetailDetails + { + /// + /// Dependency tracking for a credential: the resources that reference it,
+ /// so a rotate/delete can't silently break a live integration. `count` is
+ /// the total; `references` lists them (empty when unreferenced). + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("used_by")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Speechify.CredentialUsedBy UsedBy { 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. + /// + /// + /// Dependency tracking for a credential: the resources that reference it,
+ /// so a rotate/delete can't silently break a live integration. `count` is
+ /// the total; `references` lists them (empty when unreferenced). + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CredentialInUseErrorDetailDetails( + global::Speechify.CredentialUsedBy usedBy) + { + this.UsedBy = usedBy ?? throw new global::System.ArgumentNullException(nameof(usedBy)); + } + + /// + /// Initializes a new instance of the class. + /// + public CredentialInUseErrorDetailDetails() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.CredentialInUseErrorDetailFields.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialInUseErrorDetailFields.Json.g.cs new file mode 100644 index 00000000..d38e729b --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialInUseErrorDetailFields.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class CredentialInUseErrorDetailFields + { + /// + /// 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.CredentialInUseErrorDetailFields? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.CredentialInUseErrorDetailFields), + jsonSerializerContext) as global::Speechify.CredentialInUseErrorDetailFields; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.CredentialInUseErrorDetailFields? 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.CredentialInUseErrorDetailFields? 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.CredentialInUseErrorDetailFields), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.CredentialInUseErrorDetailFields; + } + + /// + /// 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.CredentialInUseErrorDetailFields.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialInUseErrorDetailFields.g.cs new file mode 100644 index 00000000..af6aed7c --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialInUseErrorDetailFields.g.cs @@ -0,0 +1,24 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Per-field validation errors as `path -> message`. Only
+ /// present on 400 responses caused by request validation
+ /// (typically code=`validation_failed`). Keys are field
+ /// paths in dotted/bracket notation; values are short
+ /// human explanations safe to inline-surface next to the
+ /// offending form field. + ///
+ public sealed partial class CredentialInUseErrorDetailFields + { + + /// + /// 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.CredentialKind.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialKind.g.cs new file mode 100644 index 00000000..849d2819 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialKind.g.cs @@ -0,0 +1,94 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Discriminates the auth flow a credential carries. The matching
+ /// `config.<kind>` block is the one that must be populated, and the only
+ /// one.
+ /// - `oauth2_client_credentials`: a `client_id` and `client_secret` the
+ /// platform exchanges at the vendor's `token_url` for a short-lived
+ /// access token (the OAuth2 client-credentials flow). Backs an `mcp` or
+ /// `openapi` tool whose `auth.type` is `oauth2_client_credentials`.
+ /// - `bearer`: a static token sent as `Authorization: Bearer <token>`.
+ /// Backs an `mcp` or `openapi` tool whose `auth.type` is `bearer`, an
+ /// agent's custom LLM endpoint key, a custom model's key, and a
+ /// messaging channel's bot token.
+ /// - `shared_secret`: a secret that is never sent anywhere; an inbound
+ /// callback's signature is verified against it, such as a messaging
+ /// channel's signing secret.
+ /// - `oauth2_jwt`: a signing key for the JWT-bearer flow (RFC 7523).
+ /// - `basic`: a username and password.
+ /// - `custom_headers`: a set of header names and values.
+ /// The vault stores `oauth2_jwt`, `basic` and `custom_headers`, but no
+ /// tool auth type references them yet: an `mcp` or `openapi` tool
+ /// authenticates with `bearer` or `oauth2_client_credentials` only. + ///
+ public enum CredentialKind + { + /// + /// a username and password. + /// + Basic, + /// + /// a static token sent as `Authorization: Bearer <token>`. + /// + Bearer, + /// + /// a set of header names and values. + /// + CustomHeaders, + /// + /// a `client_id` and `client_secret` the + /// + Oauth2ClientCredentials, + /// + /// a signing key for the JWT-bearer flow (RFC 7523). + /// + Oauth2Jwt, + /// + /// a secret that is never sent anywhere; an inbound + /// + SharedSecret, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CredentialKindExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CredentialKind value) + { + return value switch + { + CredentialKind.Basic => "basic", + CredentialKind.Bearer => "bearer", + CredentialKind.CustomHeaders => "custom_headers", + CredentialKind.Oauth2ClientCredentials => "oauth2_client_credentials", + CredentialKind.Oauth2Jwt => "oauth2_jwt", + CredentialKind.SharedSecret => "shared_secret", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CredentialKind? ToEnum(string value) + { + return value switch + { + "basic" => CredentialKind.Basic, + "bearer" => CredentialKind.Bearer, + "custom_headers" => CredentialKind.CustomHeaders, + "oauth2_client_credentials" => CredentialKind.Oauth2ClientCredentials, + "oauth2_jwt" => CredentialKind.Oauth2Jwt, + "shared_secret" => CredentialKind.SharedSecret, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.CredentialReference.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialReference.Json.g.cs new file mode 100644 index 00000000..5b0df61e --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialReference.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class CredentialReference + { + /// + /// 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.CredentialReference? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.CredentialReference), + jsonSerializerContext) as global::Speechify.CredentialReference; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.CredentialReference? 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.CredentialReference? 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.CredentialReference), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.CredentialReference; + } + + /// + /// 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.CredentialReference.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialReference.g.cs new file mode 100644 index 00000000..595495d1 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialReference.g.cs @@ -0,0 +1,75 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// One resource that references a credential by id. Lets a customer see
+ /// exactly what would break before rotating or deleting the secret. + ///
+ public sealed partial class CredentialReference + { + /// + /// The kind of resource referencing the credential. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("resource_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.CredentialReferenceResourceTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Speechify.CredentialReferenceResourceType ResourceType { get; set; } + + /// + /// Prefixed external id of the referencing resource (`tool_...` for a
+ /// tool, `agent_...` for an agent, `chan_...` for a channel). + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Human-readable name of the referencing resource. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { 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 kind of resource referencing the credential. + /// + /// + /// Prefixed external id of the referencing resource (`tool_...` for a
+ /// tool, `agent_...` for an agent, `chan_...` for a channel). + /// + /// + /// Human-readable name of the referencing resource. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CredentialReference( + global::Speechify.CredentialReferenceResourceType resourceType, + string id, + string name) + { + this.ResourceType = resourceType; + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + } + + /// + /// Initializes a new instance of the class. + /// + public CredentialReference() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.CredentialReferenceResourceType.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialReferenceResourceType.g.cs new file mode 100644 index 00000000..a5385f72 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialReferenceResourceType.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// The kind of resource referencing the credential. + /// + public enum CredentialReferenceResourceType + { + /// + /// + /// + Agent, + /// + /// + /// + Channel, + /// + /// + /// + Tool, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CredentialReferenceResourceTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CredentialReferenceResourceType value) + { + return value switch + { + CredentialReferenceResourceType.Agent => "agent", + CredentialReferenceResourceType.Channel => "channel", + CredentialReferenceResourceType.Tool => "tool", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CredentialReferenceResourceType? ToEnum(string value) + { + return value switch + { + "agent" => CredentialReferenceResourceType.Agent, + "channel" => CredentialReferenceResourceType.Channel, + "tool" => CredentialReferenceResourceType.Tool, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.CredentialUsedBy.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialUsedBy.Json.g.cs new file mode 100644 index 00000000..8c85143d --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialUsedBy.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class CredentialUsedBy + { + /// + /// 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.CredentialUsedBy? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.CredentialUsedBy), + jsonSerializerContext) as global::Speechify.CredentialUsedBy; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.CredentialUsedBy? 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.CredentialUsedBy? 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.CredentialUsedBy), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.CredentialUsedBy; + } + + /// + /// 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.CredentialUsedBy.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CredentialUsedBy.g.cs new file mode 100644 index 00000000..79a80d5c --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CredentialUsedBy.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Dependency tracking for a credential: the resources that reference it,
+ /// so a rotate/delete can't silently break a live integration. `count` is
+ /// the total; `references` lists them (empty when unreferenced). + ///
+ public sealed partial class CredentialUsedBy + { + /// + /// Number of resources referencing this credential. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("count")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Count { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("references")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList References { 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. + /// + /// + /// Number of resources referencing this credential. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CredentialUsedBy( + int count, + global::System.Collections.Generic.IList references) + { + this.Count = count; + this.References = references ?? throw new global::System.ArgumentNullException(nameof(references)); + } + + /// + /// Initializes a new instance of the class. + /// + public CredentialUsedBy() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.CustomHeadersConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CustomHeadersConfig.Json.g.cs new file mode 100644 index 00000000..7e269db9 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CustomHeadersConfig.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class CustomHeadersConfig + { + /// + /// 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.CustomHeadersConfig? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.CustomHeadersConfig), + jsonSerializerContext) as global::Speechify.CustomHeadersConfig; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.CustomHeadersConfig? 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.CustomHeadersConfig? 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.CustomHeadersConfig), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.CustomHeadersConfig; + } + + /// + /// 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.CustomHeadersConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CustomHeadersConfig.g.cs new file mode 100644 index 00000000..b134b2cd --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CustomHeadersConfig.g.cs @@ -0,0 +1,47 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// An arbitrary set of headers sent on every outbound tool
+ /// request. Useful for vendor signature schemes that don't fit
+ /// Basic / Bearer. + ///
+ public sealed partial class CustomHeadersConfig + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("headers")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.Dictionary Headers { 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 CustomHeadersConfig( + global::System.Collections.Generic.Dictionary headers) + { + this.Headers = headers ?? throw new global::System.ArgumentNullException(nameof(headers)); + } + + /// + /// Initializes a new instance of the class. + /// + public CustomHeadersConfig() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.CustomHeadersConfigHeaders.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CustomHeadersConfigHeaders.Json.g.cs new file mode 100644 index 00000000..9c707736 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CustomHeadersConfigHeaders.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class CustomHeadersConfigHeaders + { + /// + /// 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.CustomHeadersConfigHeaders? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.CustomHeadersConfigHeaders), + jsonSerializerContext) as global::Speechify.CustomHeadersConfigHeaders; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.CustomHeadersConfigHeaders? 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.CustomHeadersConfigHeaders? 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.CustomHeadersConfigHeaders), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.CustomHeadersConfigHeaders; + } + + /// + /// 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.CustomHeadersConfigHeaders.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CustomHeadersConfigHeaders.g.cs new file mode 100644 index 00000000..bcd2730f --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.CustomHeadersConfigHeaders.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// + /// + public sealed partial class CustomHeadersConfigHeaders + { + + /// + /// 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.DeleteResponse17.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.DeleteResponse17.Json.g.cs new file mode 100644 index 00000000..ad75ecc6 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.DeleteResponse17.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class DeleteResponse17 + { + /// + /// 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.DeleteResponse17? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.DeleteResponse17), + jsonSerializerContext) as global::Speechify.DeleteResponse17; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.DeleteResponse17? 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.DeleteResponse17? 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.DeleteResponse17), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.DeleteResponse17; + } + + /// + /// 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.DeleteResponse17.g.cs b/src/libs/Speechify/Generated/Speechify.Models.DeleteResponse17.g.cs new file mode 100644 index 00000000..78c82709 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.DeleteResponse17.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// + /// + public sealed partial class DeleteResponse17 + { + + /// + /// 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.ErrorCode.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ErrorCode.g.cs index 5281fd95..59a4ad6d 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.ErrorCode.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.ErrorCode.g.cs @@ -280,6 +280,10 @@ public enum ErrorCode /// /// /// + HostedMcpNotEnabled, + /// + /// + /// IdempotencyConflict, /// /// @@ -440,6 +444,22 @@ public enum ErrorCode /// /// /// + RouteToolNotReadable, + /// + /// + /// + RouteToolUnavailable, + /// + /// + /// + RouteUpstreamError, + /// + /// + /// + RouteUpstreamRateLimited, + /// + /// + /// RouteWriteLimitReached, /// /// @@ -725,6 +745,7 @@ public static string ToValueString(this ErrorCode value) ErrorCode.HostedApiPublicRefused => "hosted_api_public_refused", ErrorCode.HostedApiSlugTaken => "hosted_api_slug_taken", ErrorCode.HostedApisNotInPlan => "hosted_apis_not_in_plan", + ErrorCode.HostedMcpNotEnabled => "hosted_mcp_not_enabled", ErrorCode.IdempotencyConflict => "idempotency_conflict", ErrorCode.InsufficientScope => "insufficient_scope", ErrorCode.IntendedUseRequired => "intended_use_required", @@ -765,6 +786,10 @@ public static string ToValueString(this ErrorCode value) ErrorCode.RouteRunFailed => "route_run_failed", ErrorCode.RouteRunLimitReached => "route_run_limit_reached", ErrorCode.RouteRunTimeout => "route_run_timeout", + ErrorCode.RouteToolNotReadable => "route_tool_not_readable", + ErrorCode.RouteToolUnavailable => "route_tool_unavailable", + ErrorCode.RouteUpstreamError => "route_upstream_error", + ErrorCode.RouteUpstreamRateLimited => "route_upstream_rate_limited", ErrorCode.RouteWriteLimitReached => "route_write_limit_reached", ErrorCode.ServiceAccountLimitReached => "service_account_limit_reached", ErrorCode.ServiceAccountsNotInPlan => "service_accounts_not_in_plan", @@ -893,6 +918,7 @@ public static string ToValueString(this ErrorCode value) "hosted_api_public_refused" => ErrorCode.HostedApiPublicRefused, "hosted_api_slug_taken" => ErrorCode.HostedApiSlugTaken, "hosted_apis_not_in_plan" => ErrorCode.HostedApisNotInPlan, + "hosted_mcp_not_enabled" => ErrorCode.HostedMcpNotEnabled, "idempotency_conflict" => ErrorCode.IdempotencyConflict, "insufficient_scope" => ErrorCode.InsufficientScope, "intended_use_required" => ErrorCode.IntendedUseRequired, @@ -933,6 +959,10 @@ public static string ToValueString(this ErrorCode value) "route_run_failed" => ErrorCode.RouteRunFailed, "route_run_limit_reached" => ErrorCode.RouteRunLimitReached, "route_run_timeout" => ErrorCode.RouteRunTimeout, + "route_tool_not_readable" => ErrorCode.RouteToolNotReadable, + "route_tool_unavailable" => ErrorCode.RouteToolUnavailable, + "route_upstream_error" => ErrorCode.RouteUpstreamError, + "route_upstream_rate_limited" => ErrorCode.RouteUpstreamRateLimited, "route_write_limit_reached" => ErrorCode.RouteWriteLimitReached, "service_account_limit_reached" => ErrorCode.ServiceAccountLimitReached, "service_accounts_not_in_plan" => ErrorCode.ServiceAccountsNotInPlan, diff --git a/src/libs/Speechify/Generated/Speechify.Models.HostedAPI.g.cs b/src/libs/Speechify/Generated/Speechify.Models.HostedAPI.g.cs index 6dd1ed86..f37929c9 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.HostedAPI.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.HostedAPI.g.cs @@ -39,14 +39,16 @@ public sealed partial class HostedAPI public required string BaseUrl { get; set; } /// - /// + /// The API's display name; the server title an MCP client shows when `mcp_enabled` is on. /// [global::System.Text.Json.Serialization.JsonPropertyName("name")] [global::System.Text.Json.Serialization.JsonRequired] public required string Name { get; set; } /// - /// + /// What the API is for. When `mcp_enabled` is on it is also the
+ /// instructions an MCP client hands its model, so say what the tools
+ /// are for and when to use them. ///
[global::System.Text.Json.Serialization.JsonPropertyName("description")] [global::System.Text.Json.Serialization.JsonRequired] @@ -95,9 +97,10 @@ public sealed partial class HostedAPI public required int DailyRunCap { get; set; } /// - /// Reads the API's store, file and run_latest routes may serve from
- /// storage per UTC day; the storage ceiling behind a hot path. Always
- /// present on a current API; optional on the wire so a reader built
+ /// Reads the API's store, file, run_latest and tool routes may serve
+ /// per UTC day; the ceiling behind a hot path, and for a tool route
+ /// behind the vendor budget its calls draw on. Always present on a
+ /// current API; optional on the wire so a reader built
/// before it existed keeps parsing. A
/// response served from the cache is not a read. Past the cap a read
/// route answers 429 `route_read_limit_reached`. Without Redis nothing
@@ -116,6 +119,24 @@ public sealed partial class HostedAPI [global::System.Text.Json.Serialization.JsonPropertyName("daily_write_cap")] public int? DailyWriteCap { get; set; } + /// + /// Whether the API also serves its routes as an MCP server at
+ /// `POST <base_url>/mcp` (streamable HTTP, stateless, POST only): every
+ /// enabled route except a file route is listed as a tool, named by the
+ /// route's `name` and described by its `description`, and a call runs
+ /// under the same audience, consumer keys, per-key limits, daily caps
+ /// and request log the route has. An MCP client authenticates with the
+ /// same bearer a plain consumer sends (a `ck_` consumer key, an
+ /// end-user token, or a Speechify API key on a `workspace` or `owner`
+ /// API); the API's OpenAPI document names the address under
+ /// `x-speechify-mcp.url`. Off for a new API, where `/mcp` answers 404
+ /// `hosted_mcp_not_enabled`; never true on a `public` API (refused
+ /// with 400 on either switch). Optional on the wire for the same
+ /// reason as `daily_read_cap`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("mcp_enabled")] + public bool? McpEnabled { get; set; } + /// /// /// @@ -166,8 +187,14 @@ public sealed partial class HostedAPI /// The public host, `<slug>.<hosted-api domain>`; empty where no domain is configured. /// /// - /// - /// + /// + /// The API's display name; the server title an MCP client shows when `mcp_enabled` is on. + /// + /// + /// What the API is for. When `mcp_enabled` is on it is also the
+ /// instructions an MCP client hands its model, so say what the tools
+ /// are for and when to use them. + /// /// /// Who the API answers, narrowest first. `owner`: only the API's owner,
/// with their own Speechify API key or console session. `workspace`:
@@ -194,9 +221,10 @@ public sealed partial class HostedAPI /// /// /// - /// Reads the API's store, file and run_latest routes may serve from
- /// storage per UTC day; the storage ceiling behind a hot path. Always
- /// present on a current API; optional on the wire so a reader built
+ /// Reads the API's store, file, run_latest and tool routes may serve
+ /// per UTC day; the ceiling behind a hot path, and for a tool route
+ /// behind the vendor budget its calls draw on. Always present on a
+ /// current API; optional on the wire so a reader built
/// before it existed keeps parsing. A
/// response served from the cache is not a read. Past the cap a read
/// route answers 429 `route_read_limit_reached`. Without Redis nothing
@@ -209,6 +237,21 @@ public sealed partial class HostedAPI /// route answers 429 `route_write_limit_reached`. Optional on the wire
/// for the same reason as `daily_read_cap`. /// + /// + /// Whether the API also serves its routes as an MCP server at
+ /// `POST <base_url>/mcp` (streamable HTTP, stateless, POST only): every
+ /// enabled route except a file route is listed as a tool, named by the
+ /// route's `name` and described by its `description`, and a call runs
+ /// under the same audience, consumer keys, per-key limits, daily caps
+ /// and request log the route has. An MCP client authenticates with the
+ /// same bearer a plain consumer sends (a `ck_` consumer key, an
+ /// end-user token, or a Speechify API key on a `workspace` or `owner`
+ /// API); the API's OpenAPI document names the address under
+ /// `x-speechify-mcp.url`. Off for a new API, where `/mcp` answers 404
+ /// `hosted_mcp_not_enabled`; never true on a `public` API (refused
+ /// with 400 on either switch). Optional on the wire for the same
+ /// reason as `daily_read_cap`. + /// /// /// /// The key set end-user tokens are verified against when set (an
@@ -237,6 +280,7 @@ public HostedAPI( global::System.DateTime updatedAt, int? dailyReadCap, int? dailyWriteCap, + bool? mcpEnabled, string? projectId, string? userTokenJwksUrl, string? userTokenSecretHint) @@ -253,6 +297,7 @@ public HostedAPI( this.DailyRunCap = dailyRunCap; this.DailyReadCap = dailyReadCap; this.DailyWriteCap = dailyWriteCap; + this.McpEnabled = mcpEnabled; this.ProjectId = projectId; this.UserTokenJwksUrl = userTokenJwksUrl; this.UserTokenSecretHint = userTokenSecretHint; diff --git a/src/libs/Speechify/Generated/Speechify.Models.HostedAPIResolver.g.cs b/src/libs/Speechify/Generated/Speechify.Models.HostedAPIResolver.g.cs index 540e2be7..c8d8f488 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.HostedAPIResolver.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.HostedAPIResolver.g.cs @@ -18,7 +18,28 @@ namespace Speechify /// `run_latest` (trigger_id of a schedule trigger),
/// `run` (trigger_id of a webhook trigger, wait_seconds),
/// `file` (file_path of one published file; or, on a route whose path
- /// ends in `*`, file_root and file_index for a whole published tree). + /// ends in `*`, file_root and file_index for a whole published tree),
+ /// `tool` (tool_id of an `openapi` tool definition and the `operation`
+ /// on it: the POST body is the operation's arguments, held to its
+ /// argument schema, and the vendor's answer after the operation's
+ /// `response` mapping is the response, or `{"text": ...}` when the vendor
+ /// answered text. Only an operation whose effective class is `read`, on a
+ /// tool whose `approval` is null or `auto`, may be served, and never on a
+ /// public API; a route write that names anything else is refused with 400
+ /// `validation_failed` on `resolver.tool_id`. Because a definition can
+ /// change after its route is written, every call re-checks it: an
+ /// operation no longer classified `read`, or a tool whose `approval` is no
+ /// longer null or `auto`, answers 403 `route_tool_not_readable`; a tool
+ /// deleted, moved to another project, no longer of kind `openapi` or
+ /// without the operation answers 409 `route_tool_unavailable`, which no
+ /// retry clears until the route or the tool is fixed. Arguments that do
+ /// not fit the schema answer 400 `validation_failed`; the definition's
+ /// `max_requests_per_minute` and the vendor's own throttle both answer 429
+ /// `route_upstream_rate_limited` with `Retry-After`; a vendor error
+ /// answers 502 `route_upstream_error` with the vendor's status in
+ /// `error.details.upstream_status`, and an unreachable vendor or a
+ /// credential that no longer resolves answers 502 `route_upstream_error`
+ /// without it). ///
public sealed partial class HostedAPIResolver { @@ -146,6 +167,29 @@ public sealed partial class HostedAPIResolver [global::System.Text.Json.Serialization.JsonPropertyName("wait_seconds")] public int? WaitSeconds { get; set; } + /// + /// For a `tool` route: the `openapi` tool definition whose operation
+ /// the route calls, as `POST /v1/agents/tool-definitions` returned
+ /// it. It must live in the API's project (409
+ /// `cross_project_reference` otherwise). The route refuses a definition
+ /// of another kind, an operation whose effective class is not `read`,
+ /// and a tool whose `approval` is set to anything but `auto`, since a
+ /// route has nobody to approve a call: set it to null or `auto` first. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("tool_id")] + public string? ToolId { get; set; } + + /// + /// For a `tool` route: the operation to call, as the definition's
+ /// `operations[].id` names it (the same value
+ /// `POST /v1/agents/tool-definitions/test-openapi-call` takes as
+ /// `operation`). The route is a POST whose JSON body is the
+ /// operation's arguments, validated against the argument schema the
+ /// definition publishes. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("operation")] + public string? Operation { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -219,6 +263,23 @@ public sealed partial class HostedAPIResolver /// /// How long a `run` route waits for the run before answering 202 (default 20; 0 answers 202 at once). /// + /// + /// For a `tool` route: the `openapi` tool definition whose operation
+ /// the route calls, as `POST /v1/agents/tool-definitions` returned
+ /// it. It must live in the API's project (409
+ /// `cross_project_reference` otherwise). The route refuses a definition
+ /// of another kind, an operation whose effective class is not `read`,
+ /// and a tool whose `approval` is set to anything but `auto`, since a
+ /// route has nobody to approve a call: set it to null or `auto` first. + /// + /// + /// For a `tool` route: the operation to call, as the definition's
+ /// `operations[].id` names it (the same value
+ /// `POST /v1/agents/tool-definitions/test-openapi-call` takes as
+ /// `operation`). The route is a POST whose JSON body is the
+ /// operation's arguments, validated against the argument schema the
+ /// definition publishes. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -237,7 +298,9 @@ public HostedAPIResolver( string? fileRoot, string? fileIndex, string? triggerId, - int? waitSeconds) + int? waitSeconds, + string? toolId, + string? operation) { this.Type = type; this.StoreId = storeId; @@ -254,6 +317,8 @@ public HostedAPIResolver( this.FileIndex = fileIndex; this.TriggerId = triggerId; this.WaitSeconds = waitSeconds; + this.ToolId = toolId; + this.Operation = operation; } /// diff --git a/src/libs/Speechify/Generated/Speechify.Models.HostedAPIRoute.g.cs b/src/libs/Speechify/Generated/Speechify.Models.HostedAPIRoute.g.cs index 988288b1..cd7db83c 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.HostedAPIRoute.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.HostedAPIRoute.g.cs @@ -38,14 +38,24 @@ public sealed partial class HostedAPIRoute public required string Path { get; set; } /// - /// + /// The route's name, 1-128 letters, digits, spaces, `.`, `_` or `-`.
+ /// On an API with `mcp_enabled` the MCP tool's name comes from it:
+ /// each run of other characters (a space included) becomes `_`,
+ /// leading and trailing `_` are dropped, and the result is cut to 64
+ /// characters. A route with no name is listed under a name built from
+ /// its method and path, and a name two routes would share takes `_2`,
+ /// `_3` in route order; the face's `tools/list` is the authority. Pick
+ /// a verb-first name a model can choose by. ///
[global::System.Text.Json.Serialization.JsonPropertyName("name")] [global::System.Text.Json.Serialization.JsonRequired] public required string Name { get; set; } /// - /// + /// What the route does. On an API with `mcp_enabled` it is the MCP
+ /// tool description a client's model reads to choose the tool, so say
+ /// what it returns and when to call it; a `tool` route with none falls
+ /// back to the operation's summary. ///
[global::System.Text.Json.Serialization.JsonPropertyName("description")] [global::System.Text.Json.Serialization.JsonRequired] @@ -66,7 +76,28 @@ public sealed partial class HostedAPIRoute /// `run_latest` (trigger_id of a schedule trigger),
/// `run` (trigger_id of a webhook trigger, wait_seconds),
/// `file` (file_path of one published file; or, on a route whose path
- /// ends in `*`, file_root and file_index for a whole published tree). + /// ends in `*`, file_root and file_index for a whole published tree),
+ /// `tool` (tool_id of an `openapi` tool definition and the `operation`
+ /// on it: the POST body is the operation's arguments, held to its
+ /// argument schema, and the vendor's answer after the operation's
+ /// `response` mapping is the response, or `{"text": ...}` when the vendor
+ /// answered text. Only an operation whose effective class is `read`, on a
+ /// tool whose `approval` is null or `auto`, may be served, and never on a
+ /// public API; a route write that names anything else is refused with 400
+ /// `validation_failed` on `resolver.tool_id`. Because a definition can
+ /// change after its route is written, every call re-checks it: an
+ /// operation no longer classified `read`, or a tool whose `approval` is no
+ /// longer null or `auto`, answers 403 `route_tool_not_readable`; a tool
+ /// deleted, moved to another project, no longer of kind `openapi` or
+ /// without the operation answers 409 `route_tool_unavailable`, which no
+ /// retry clears until the route or the tool is fixed. Arguments that do
+ /// not fit the schema answer 400 `validation_failed`; the definition's
+ /// `max_requests_per_minute` and the vendor's own throttle both answer 429
+ /// `route_upstream_rate_limited` with `Retry-After`; a vendor error
+ /// answers 502 `route_upstream_error` with the vendor's status in
+ /// `error.details.upstream_status`, and an unreachable vendor or a
+ /// credential that no longer resolves answers 502 `route_upstream_error`
+ /// without it). ///
[global::System.Text.Json.Serialization.JsonPropertyName("resolver")] [global::System.Text.Json.Serialization.JsonRequired] @@ -126,8 +157,22 @@ public sealed partial class HostedAPIRoute /// /// Lowercase segments, one-segment `{params}`, and optionally a trailing `*` that serves a published tree (file routes only). /// - /// - /// + /// + /// The route's name, 1-128 letters, digits, spaces, `.`, `_` or `-`.
+ /// On an API with `mcp_enabled` the MCP tool's name comes from it:
+ /// each run of other characters (a space included) becomes `_`,
+ /// leading and trailing `_` are dropped, and the result is cut to 64
+ /// characters. A route with no name is listed under a name built from
+ /// its method and path, and a name two routes would share takes `_2`,
+ /// `_3` in route order; the face's `tools/list` is the authority. Pick
+ /// a verb-first name a model can choose by. + /// + /// + /// What the route does. On an API with `mcp_enabled` it is the MCP
+ /// tool description a client's model reads to choose the tool, so say
+ /// what it returns and when to call it; a `tool` route with none falls
+ /// back to the operation's summary. + /// /// /// What answers a route. `type` selects the fields that apply:
/// `store_query` (store_id, collection, where, order_by, limit),
@@ -143,7 +188,28 @@ public sealed partial class HostedAPIRoute /// `run_latest` (trigger_id of a schedule trigger),
/// `run` (trigger_id of a webhook trigger, wait_seconds),
/// `file` (file_path of one published file; or, on a route whose path
- /// ends in `*`, file_root and file_index for a whole published tree). + /// ends in `*`, file_root and file_index for a whole published tree),
+ /// `tool` (tool_id of an `openapi` tool definition and the `operation`
+ /// on it: the POST body is the operation's arguments, held to its
+ /// argument schema, and the vendor's answer after the operation's
+ /// `response` mapping is the response, or `{"text": ...}` when the vendor
+ /// answered text. Only an operation whose effective class is `read`, on a
+ /// tool whose `approval` is null or `auto`, may be served, and never on a
+ /// public API; a route write that names anything else is refused with 400
+ /// `validation_failed` on `resolver.tool_id`. Because a definition can
+ /// change after its route is written, every call re-checks it: an
+ /// operation no longer classified `read`, or a tool whose `approval` is no
+ /// longer null or `auto`, answers 403 `route_tool_not_readable`; a tool
+ /// deleted, moved to another project, no longer of kind `openapi` or
+ /// without the operation answers 409 `route_tool_unavailable`, which no
+ /// retry clears until the route or the tool is fixed. Arguments that do
+ /// not fit the schema answer 400 `validation_failed`; the definition's
+ /// `max_requests_per_minute` and the vendor's own throttle both answer 429
+ /// `route_upstream_rate_limited` with `Retry-After`; a vendor error
+ /// answers 502 `route_upstream_error` with the vendor's status in
+ /// `error.details.upstream_status`, and an unreachable vendor or a
+ /// credential that no longer resolves answers 502 `route_upstream_error`
+ /// without it). /// /// /// Cache-Control max-age on GET responses, and the shared response
diff --git a/src/libs/Speechify/Generated/Speechify.Models.HostedAPIUsage.g.cs b/src/libs/Speechify/Generated/Speechify.Models.HostedAPIUsage.g.cs index d05f2a19..cb535cc9 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.HostedAPIUsage.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.HostedAPIUsage.g.cs @@ -16,7 +16,7 @@ public sealed partial class HostedAPIUsage public required string Day { get; set; } /// - /// Reads served from storage today across the API's routes. + /// Reads served today across the API's store, file, run_latest and tool routes. /// [global::System.Text.Json.Serialization.JsonPropertyName("reads")] [global::System.Text.Json.Serialization.JsonRequired] @@ -84,7 +84,7 @@ public sealed partial class HostedAPIUsage /// The UTC day the counters cover, `YYYY-MM-DD`. /// /// - /// Reads served from storage today across the API's routes. + /// Reads served today across the API's store, file, run_latest and tool routes. /// /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Models.HostedApiResolverType.g.cs b/src/libs/Speechify/Generated/Speechify.Models.HostedApiResolverType.g.cs index 628b5616..81dde134 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.HostedApiResolverType.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.HostedApiResolverType.g.cs @@ -36,6 +36,10 @@ public enum HostedApiResolverType /// ///
StoreWrite, + /// + /// + /// + Tool, } /// @@ -57,6 +61,7 @@ public static string ToValueString(this HostedApiResolverType value) HostedApiResolverType.StoreDocument => "store_document", HostedApiResolverType.StoreQuery => "store_query", HostedApiResolverType.StoreWrite => "store_write", + HostedApiResolverType.Tool => "tool", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -74,6 +79,7 @@ public static string ToValueString(this HostedApiResolverType value) "store_document" => HostedApiResolverType.StoreDocument, "store_query" => HostedApiResolverType.StoreQuery, "store_write" => HostedApiResolverType.StoreWrite, + "tool" => HostedApiResolverType.Tool, _ => null, }; } diff --git a/src/libs/Speechify/Generated/Speechify.Models.ImportOpenAPIRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ImportOpenAPIRequest.Json.g.cs new file mode 100644 index 00000000..7277c285 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ImportOpenAPIRequest.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class ImportOpenAPIRequest + { + /// + /// 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.ImportOpenAPIRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.ImportOpenAPIRequest), + jsonSerializerContext) as global::Speechify.ImportOpenAPIRequest; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.ImportOpenAPIRequest? 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.ImportOpenAPIRequest? 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.ImportOpenAPIRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.ImportOpenAPIRequest; + } + + /// + /// 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.ImportOpenAPIRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ImportOpenAPIRequest.g.cs new file mode 100644 index 00000000..8d95561a --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ImportOpenAPIRequest.g.cs @@ -0,0 +1,105 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Body for `POST /v1/agents/tool-definitions/import-openapi`. Exactly one
+ /// of `spec_url` and `spec` names the document. `auth` is the credential
+ /// to fetch `spec_url` with when the vendor serves its document behind the
+ /// same auth as its API, usually the same `auth` the tool will carry; omit
+ /// it for a public document. + ///
+ public sealed partial class ImportOpenAPIRequest + { + /// + /// An https URL the server fetches the document from, with the headers
+ /// of the credential `auth` names when it names one. A private or
+ /// loopback address is refused. At most 2 MiB. Keep it as the tool's
+ /// `spec_url` so a later import can refresh the operations. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("spec_url")] + public string? SpecUrl { get; set; } + + /// + /// The document inline: a JSON object, or a string holding the JSON
+ /// or YAML text. At most 2 MiB. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("spec")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.ImportOpenApiRequestSpecJsonConverter))] + public global::Speechify.ImportOpenApiRequestSpec? Spec { get; set; } + + /// + /// How the platform authenticates to an MCP server or an OpenAPI tool's
+ /// REST API: `none`, `bearer` or `oauth2_client_credentials`, a
+ /// discriminated union over `type`. Other credential kinds (an API key
+ /// in a custom header or query parameter, HTTP Basic) are not supported
+ /// here. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("auth")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.MCPAuthJsonConverter))] + public global::Speechify.MCPAuth? Auth { get; set; } + + /// + /// Overrides the document's `servers` in the result's `base_url`: the
+ /// regional or tenant host this workspace signed up to. The create
+ /// endpoint requires https. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("base_url")] + public string? BaseUrl { 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. + /// + /// + /// An https URL the server fetches the document from, with the headers
+ /// of the credential `auth` names when it names one. A private or
+ /// loopback address is refused. At most 2 MiB. Keep it as the tool's
+ /// `spec_url` so a later import can refresh the operations. + /// + /// + /// The document inline: a JSON object, or a string holding the JSON
+ /// or YAML text. At most 2 MiB. + /// + /// + /// How the platform authenticates to an MCP server or an OpenAPI tool's
+ /// REST API: `none`, `bearer` or `oauth2_client_credentials`, a
+ /// discriminated union over `type`. Other credential kinds (an API key
+ /// in a custom header or query parameter, HTTP Basic) are not supported
+ /// here. + /// + /// + /// Overrides the document's `servers` in the result's `base_url`: the
+ /// regional or tenant host this workspace signed up to. The create
+ /// endpoint requires https. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ImportOpenAPIRequest( + string? specUrl, + global::Speechify.ImportOpenApiRequestSpec? spec, + global::Speechify.MCPAuth? auth, + string? baseUrl) + { + this.SpecUrl = specUrl; + this.Spec = spec; + this.Auth = auth; + this.BaseUrl = baseUrl; + } + + /// + /// Initializes a new instance of the class. + /// + public ImportOpenAPIRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.ImportOpenAPIResult.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ImportOpenAPIResult.Json.g.cs new file mode 100644 index 00000000..c57e000e --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ImportOpenAPIResult.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class ImportOpenAPIResult + { + /// + /// 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.ImportOpenAPIResult? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.ImportOpenAPIResult), + jsonSerializerContext) as global::Speechify.ImportOpenAPIResult; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.ImportOpenAPIResult? 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.ImportOpenAPIResult? 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.ImportOpenAPIResult), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.ImportOpenAPIResult; + } + + /// + /// 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.ImportOpenAPIResult.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ImportOpenAPIResult.g.cs new file mode 100644 index 00000000..81d88e73 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ImportOpenAPIResult.g.cs @@ -0,0 +1,110 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// The compiled operations, or a structured failure. On success `error`
+ /// is absent; on failure `operations` and `skipped` are empty, `document`
+ /// is absent and `error` carries the reason. + ///
+ public sealed partial class ImportOpenAPIResult + { + /// + /// What the document said about itself. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("document")] + public global::Speechify.ImportedOpenAPIDocument? Document { get; set; } + + /// + /// The document's first https server, or the `base_url` the request
+ /// supplied. Use it as the tool's `base_url` unless the vendor gave
+ /// this workspace its own host. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("base_url")] + public string? BaseUrl { get; set; } + + /// + /// Every operation the compiler could represent, in document order and
+ /// in the shape `OpenAPIToolConfig.operations` takes. Copy the ones
+ /// the agent should call (at most 40), then add `action_class` and
+ /// `response` to them. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("operations")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Operations { get; set; } + + /// + /// Every operation the compiler could not represent, with the reason. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("skipped")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Skipped { get; set; } + + /// + /// Why nothing compiled: a refused `spec_url`, a credential that does
+ /// not resolve or cannot mint a token, a fetch that failed (with the
+ /// HTTP status the document URL answered), a document too large, or a
+ /// document that does not parse as OpenAPI 3.x. Absent on success. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("error")] + public string? Error { 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. + /// + /// + /// Every operation the compiler could represent, in document order and
+ /// in the shape `OpenAPIToolConfig.operations` takes. Copy the ones
+ /// the agent should call (at most 40), then add `action_class` and
+ /// `response` to them. + /// + /// + /// Every operation the compiler could not represent, with the reason. + /// + /// + /// What the document said about itself. + /// + /// + /// The document's first https server, or the `base_url` the request
+ /// supplied. Use it as the tool's `base_url` unless the vendor gave
+ /// this workspace its own host. + /// + /// + /// Why nothing compiled: a refused `spec_url`, a credential that does
+ /// not resolve or cannot mint a token, a fetch that failed (with the
+ /// HTTP status the document URL answered), a document too large, or a
+ /// document that does not parse as OpenAPI 3.x. Absent on success. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ImportOpenAPIResult( + global::System.Collections.Generic.IList operations, + global::System.Collections.Generic.IList skipped, + global::Speechify.ImportedOpenAPIDocument? document, + string? baseUrl, + string? error) + { + this.Document = document; + this.BaseUrl = baseUrl; + this.Operations = operations ?? throw new global::System.ArgumentNullException(nameof(operations)); + this.Skipped = skipped ?? throw new global::System.ArgumentNullException(nameof(skipped)); + this.Error = error; + } + + /// + /// Initializes a new instance of the class. + /// + public ImportOpenAPIResult() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.ImportOpenApiRequestSpec.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ImportOpenApiRequestSpec.Json.g.cs new file mode 100644 index 00000000..fbe331f6 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ImportOpenApiRequestSpec.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public readonly partial struct ImportOpenApiRequestSpec + { + /// + /// 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.ImportOpenApiRequestSpec? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.ImportOpenApiRequestSpec), + jsonSerializerContext) as global::Speechify.ImportOpenApiRequestSpec?; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.ImportOpenApiRequestSpec? 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.ImportOpenApiRequestSpec? 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.ImportOpenApiRequestSpec), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.ImportOpenApiRequestSpec?; + } + + /// + /// 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.ImportOpenApiRequestSpec.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ImportOpenApiRequestSpec.g.cs new file mode 100644 index 00000000..d981387c --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ImportOpenApiRequestSpec.g.cs @@ -0,0 +1,273 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace Speechify +{ + /// + /// The document inline: a JSON object, or a string holding the JSON
+ /// or YAML text. At most 2 MiB. + ///
+ public readonly partial struct ImportOpenApiRequestSpec : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public object? ImportOpenApiRequestSpecVariant1 { get; init; } +#else + public object? ImportOpenApiRequestSpecVariant1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImportOpenApiRequestSpecVariant1))] +#endif + public bool IsImportOpenApiRequestSpecVariant1 => ImportOpenApiRequestSpecVariant1 != null; + + /// + /// + /// + public bool TryPickImportOpenApiRequestSpecVariant1( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out object? value) + { + value = ImportOpenApiRequestSpecVariant1; + return IsImportOpenApiRequestSpecVariant1; + } + + /// + /// + /// + public object PickImportOpenApiRequestSpecVariant1() => IsImportOpenApiRequestSpecVariant1 + ? ImportOpenApiRequestSpecVariant1! + : throw new global::System.InvalidOperationException($"Expected union variant 'ImportOpenApiRequestSpecVariant1' but the value was {ToString()}."); + + /// + /// + /// +#if NET6_0_OR_GREATER + public string? ImportOpenApiRequestSpecVariant2 { get; init; } +#else + public string? ImportOpenApiRequestSpecVariant2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImportOpenApiRequestSpecVariant2))] +#endif + public bool IsImportOpenApiRequestSpecVariant2 => ImportOpenApiRequestSpecVariant2 != null; + + /// + /// + /// + public bool TryPickImportOpenApiRequestSpecVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out string? value) + { + value = ImportOpenApiRequestSpecVariant2; + return IsImportOpenApiRequestSpecVariant2; + } + + /// + /// + /// + public string PickImportOpenApiRequestSpecVariant2() => IsImportOpenApiRequestSpecVariant2 + ? ImportOpenApiRequestSpecVariant2! + : throw new global::System.InvalidOperationException($"Expected union variant 'ImportOpenApiRequestSpecVariant2' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator ImportOpenApiRequestSpec(string value) => new ImportOpenApiRequestSpec((string?)value); + + /// + /// + /// + public static implicit operator string?(ImportOpenApiRequestSpec @this) => @this.ImportOpenApiRequestSpecVariant2; + + /// + /// + /// + public ImportOpenApiRequestSpec(string? value) + { + ImportOpenApiRequestSpecVariant2 = value; + } + + /// + /// + /// + public static ImportOpenApiRequestSpec FromImportOpenApiRequestSpecVariant2(string? value) => new ImportOpenApiRequestSpec(value); + + /// + /// + /// + public ImportOpenApiRequestSpec( + object? importOpenApiRequestSpecVariant1, + string? importOpenApiRequestSpecVariant2 + ) + { + ImportOpenApiRequestSpecVariant1 = importOpenApiRequestSpecVariant1; + ImportOpenApiRequestSpecVariant2 = importOpenApiRequestSpecVariant2; + } + + /// + /// + /// + public object? Object => + ImportOpenApiRequestSpecVariant2 as object ?? + ImportOpenApiRequestSpecVariant1 as object + ; + + /// + /// + /// + public override string? ToString() => + ImportOpenApiRequestSpecVariant1?.ToString() ?? + ImportOpenApiRequestSpecVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsImportOpenApiRequestSpecVariant1 && !IsImportOpenApiRequestSpecVariant2 || !IsImportOpenApiRequestSpecVariant1 && IsImportOpenApiRequestSpecVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? importOpenApiRequestSpecVariant1 = null, + global::System.Func? importOpenApiRequestSpecVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsImportOpenApiRequestSpecVariant1 && importOpenApiRequestSpecVariant1 != null) + { + return importOpenApiRequestSpecVariant1(ImportOpenApiRequestSpecVariant1!); + } + else if (IsImportOpenApiRequestSpecVariant2 && importOpenApiRequestSpecVariant2 != null) + { + return importOpenApiRequestSpecVariant2(ImportOpenApiRequestSpecVariant2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? importOpenApiRequestSpecVariant1 = null, + + global::System.Action? importOpenApiRequestSpecVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsImportOpenApiRequestSpecVariant1) + { + importOpenApiRequestSpecVariant1?.Invoke(ImportOpenApiRequestSpecVariant1!); + } + else if (IsImportOpenApiRequestSpecVariant2) + { + importOpenApiRequestSpecVariant2?.Invoke(ImportOpenApiRequestSpecVariant2!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? importOpenApiRequestSpecVariant1 = null, + global::System.Action? importOpenApiRequestSpecVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsImportOpenApiRequestSpecVariant1) + { + importOpenApiRequestSpecVariant1?.Invoke(ImportOpenApiRequestSpecVariant1!); + } + else if (IsImportOpenApiRequestSpecVariant2) + { + importOpenApiRequestSpecVariant2?.Invoke(ImportOpenApiRequestSpecVariant2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + ImportOpenApiRequestSpecVariant1, + typeof(object), + ImportOpenApiRequestSpecVariant2, + typeof(string), + }; + 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(ImportOpenApiRequestSpec other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImportOpenApiRequestSpecVariant1, other.ImportOpenApiRequestSpecVariant1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImportOpenApiRequestSpecVariant2, other.ImportOpenApiRequestSpecVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(ImportOpenApiRequestSpec obj1, ImportOpenApiRequestSpec obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ImportOpenApiRequestSpec obj1, ImportOpenApiRequestSpec obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ImportOpenApiRequestSpec o && Equals(o); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.Models.ImportOpenApiRequestSpecVariant1.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ImportOpenApiRequestSpecVariant1.Json.g.cs new file mode 100644 index 00000000..f54576f8 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ImportOpenApiRequestSpecVariant1.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class ImportOpenApiRequestSpecVariant1 + { + /// + /// 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.ImportOpenApiRequestSpecVariant1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.ImportOpenApiRequestSpecVariant1), + jsonSerializerContext) as global::Speechify.ImportOpenApiRequestSpecVariant1; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.ImportOpenApiRequestSpecVariant1? 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.ImportOpenApiRequestSpecVariant1? 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.ImportOpenApiRequestSpecVariant1), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.ImportOpenApiRequestSpecVariant1; + } + + /// + /// 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.ImportOpenApiRequestSpecVariant1.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ImportOpenApiRequestSpecVariant1.g.cs new file mode 100644 index 00000000..1af1e8c2 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ImportOpenApiRequestSpecVariant1.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// + /// + public sealed partial class ImportOpenApiRequestSpecVariant1 + { + + /// + /// 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.ImportOpenApiRequestSpecVariant12.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ImportOpenApiRequestSpecVariant12.Json.g.cs new file mode 100644 index 00000000..ad2026a6 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ImportOpenApiRequestSpecVariant12.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class ImportOpenApiRequestSpecVariant12 + { + /// + /// 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.ImportOpenApiRequestSpecVariant12? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.ImportOpenApiRequestSpecVariant12), + jsonSerializerContext) as global::Speechify.ImportOpenApiRequestSpecVariant12; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.ImportOpenApiRequestSpecVariant12? 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.ImportOpenApiRequestSpecVariant12? 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.ImportOpenApiRequestSpecVariant12), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.ImportOpenApiRequestSpecVariant12; + } + + /// + /// 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.ImportOpenApiRequestSpecVariant12.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ImportOpenApiRequestSpecVariant12.g.cs new file mode 100644 index 00000000..8888da9e --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ImportOpenApiRequestSpecVariant12.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Any type + /// + public sealed partial class ImportOpenApiRequestSpecVariant12 + { + + /// + /// 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.ImportedOpenAPIDocument.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ImportedOpenAPIDocument.Json.g.cs new file mode 100644 index 00000000..7e1ab9b3 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ImportedOpenAPIDocument.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class ImportedOpenAPIDocument + { + /// + /// 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.ImportedOpenAPIDocument? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.ImportedOpenAPIDocument), + jsonSerializerContext) as global::Speechify.ImportedOpenAPIDocument; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.ImportedOpenAPIDocument? 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.ImportedOpenAPIDocument? 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.ImportedOpenAPIDocument), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.ImportedOpenAPIDocument; + } + + /// + /// 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.ImportedOpenAPIDocument.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ImportedOpenAPIDocument.g.cs new file mode 100644 index 00000000..52f1d193 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ImportedOpenAPIDocument.g.cs @@ -0,0 +1,67 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// What the document said about itself. + /// + public sealed partial class ImportedOpenAPIDocument + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("title")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Title { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("version")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Version { get; set; } + + /// + /// How many operations compiled (the length of `operations`). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("operation_count")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int OperationCount { 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. + /// + /// + /// + /// + /// How many operations compiled (the length of `operations`). + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ImportedOpenAPIDocument( + string title, + string version, + int operationCount) + { + this.Title = title ?? throw new global::System.ArgumentNullException(nameof(title)); + this.Version = version ?? throw new global::System.ArgumentNullException(nameof(version)); + this.OperationCount = operationCount; + } + + /// + /// Initializes a new instance of the class. + /// + public ImportedOpenAPIDocument() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.ListCredentialsResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ListCredentialsResponse.Json.g.cs new file mode 100644 index 00000000..c367210b --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ListCredentialsResponse.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class ListCredentialsResponse + { + /// + /// 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.ListCredentialsResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.ListCredentialsResponse), + jsonSerializerContext) as global::Speechify.ListCredentialsResponse; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.ListCredentialsResponse? 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.ListCredentialsResponse? 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.ListCredentialsResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.ListCredentialsResponse; + } + + /// + /// 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.ListCredentialsResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ListCredentialsResponse.g.cs new file mode 100644 index 00000000..7b09e658 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ListCredentialsResponse.g.cs @@ -0,0 +1,76 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Shared pagination metadata composed into every cursor-paginated
+ /// list response via `allOf`. Ships `has_more` alongside `next_cursor`
+ /// as two equivalent end-of-pages signals (defense-in-depth). + ///
+ public sealed partial class ListCredentialsResponse + { + /// + /// 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("credentials")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Credentials { 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 ListCredentialsResponse( + bool hasMore, + global::System.Collections.Generic.IList credentials, + string? nextCursor) + { + this.NextCursor = nextCursor; + this.HasMore = hasMore; + this.Credentials = credentials ?? throw new global::System.ArgumentNullException(nameof(credentials)); + } + + /// + /// Initializes a new instance of the class. + /// + public ListCredentialsResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.MCPAuth.g.cs b/src/libs/Speechify/Generated/Speechify.Models.MCPAuth.g.cs index 4fa8807e..fdec93ac 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.MCPAuth.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.MCPAuth.g.cs @@ -5,7 +5,11 @@ namespace Speechify { /// - /// Discriminated union over `type`. + /// How the platform authenticates to an MCP server or an OpenAPI tool's
+ /// REST API: `none`, `bearer` or `oauth2_client_credentials`, a
+ /// discriminated union over `type`. Other credential kinds (an API key
+ /// in a custom header or query parameter, HTTP Basic) are not supported
+ /// here. ///
public readonly partial struct MCPAuth : global::System.IEquatable { @@ -52,9 +56,12 @@ public bool TryPickNone( : throw new global::System.InvalidOperationException($"Expected union variant 'None' but the value was {ToString()}."); /// - /// Bearer auth for an MCP server. References a workspace credential of
- /// kind `bearer` by id; the secret lives in the credentials vault and is
- /// resolved server-side at dispatch, never inlined on the tool. + /// Bearer auth for an MCP server or an OpenAPI tool's REST API, and for
+ /// fetching an OpenAPI document behind that auth. References a workspace
+ /// credential of kind `bearer` by id; its token is sent as
+ /// `Authorization: Bearer <token>`. The secret lives in the credentials
+ /// vault and is resolved server-side when a call is made, never inlined
+ /// on the tool. ///
#if NET6_0_OR_GREATER public global::Speechify.MCPAuthVariant2? Bearer { get; init; } @@ -91,10 +98,14 @@ public bool TryPickBearer( : throw new global::System.InvalidOperationException($"Expected union variant 'Bearer' but the value was {ToString()}."); /// - /// OAuth2 client-credentials auth for an MCP server. References a
- /// workspace credential of kind `oauth2_client_credentials` by id; the
- /// token_url / client_id / client_secret / scopes all live in the vault
- /// credential and are resolved server-side at dispatch. + /// OAuth2 client-credentials auth for an MCP server or an OpenAPI tool's
+ /// REST API, and for fetching an OpenAPI document behind that auth.
+ /// References a workspace credential of kind `oauth2_client_credentials`
+ /// by id. The platform mints an access token from the credential's
+ /// `token_url`, sends it as `Authorization: Bearer <token>`, and reuses it
+ /// until it nears expiry; the `token_url`, `client_id`, `client_secret`
+ /// and `scopes` live in the vault and are resolved server-side, never
+ /// inlined on the tool. ///
#if NET6_0_OR_GREATER public global::Speechify.MCPAuthVariant3? Oauth2ClientCredentials { get; init; } diff --git a/src/libs/Speechify/Generated/Speechify.Models.MCPAuthVariant2.g.cs b/src/libs/Speechify/Generated/Speechify.Models.MCPAuthVariant2.g.cs index 3e73bd09..5bbc219a 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.MCPAuthVariant2.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.MCPAuthVariant2.g.cs @@ -4,9 +4,12 @@ namespace Speechify { /// - /// Bearer auth for an MCP server. References a workspace credential of
- /// kind `bearer` by id; the secret lives in the credentials vault and is
- /// resolved server-side at dispatch, never inlined on the tool. + /// Bearer auth for an MCP server or an OpenAPI tool's REST API, and for
+ /// fetching an OpenAPI document behind that auth. References a workspace
+ /// credential of kind `bearer` by id; its token is sent as
+ /// `Authorization: Bearer <token>`. The secret lives in the credentials
+ /// vault and is resolved server-side when a call is made, never inlined
+ /// on the tool. ///
public sealed partial class MCPAuthVariant2 { @@ -20,7 +23,8 @@ public sealed partial class MCPAuthVariant2 /// /// `cred_<crockford>` id of a `bearer` credential in the workspace
/// vault. Create the credential first via `POST /v1/credentials`,
- /// then reference it here. + /// then reference it here. It must be workspace-shared or in the
+ /// tool's own project. ///
[global::System.Text.Json.Serialization.JsonPropertyName("credential_id")] [global::System.Text.Json.Serialization.JsonRequired] @@ -38,7 +42,8 @@ public sealed partial class MCPAuthVariant2 /// /// `cred_<crockford>` id of a `bearer` credential in the workspace
/// vault. Create the credential first via `POST /v1/credentials`,
- /// then reference it here. + /// then reference it here. It must be workspace-shared or in the
+ /// tool's own project. /// /// /// Discriminator value: bearer diff --git a/src/libs/Speechify/Generated/Speechify.Models.MCPAuthVariant3.g.cs b/src/libs/Speechify/Generated/Speechify.Models.MCPAuthVariant3.g.cs index 4b5e2492..00970c5d 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.MCPAuthVariant3.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.MCPAuthVariant3.g.cs @@ -4,10 +4,14 @@ namespace Speechify { /// - /// OAuth2 client-credentials auth for an MCP server. References a
- /// workspace credential of kind `oauth2_client_credentials` by id; the
- /// token_url / client_id / client_secret / scopes all live in the vault
- /// credential and are resolved server-side at dispatch. + /// OAuth2 client-credentials auth for an MCP server or an OpenAPI tool's
+ /// REST API, and for fetching an OpenAPI document behind that auth.
+ /// References a workspace credential of kind `oauth2_client_credentials`
+ /// by id. The platform mints an access token from the credential's
+ /// `token_url`, sends it as `Authorization: Bearer <token>`, and reuses it
+ /// until it nears expiry; the `token_url`, `client_id`, `client_secret`
+ /// and `scopes` live in the vault and are resolved server-side, never
+ /// inlined on the tool. ///
public sealed partial class MCPAuthVariant3 { @@ -20,7 +24,8 @@ public sealed partial class MCPAuthVariant3 /// /// `cred_<crockford>` id of an `oauth2_client_credentials` credential
- /// in the workspace vault. + /// in the workspace vault. Create it first via `POST /v1/credentials`.
+ /// It must be workspace-shared or in the tool's own project. ///
[global::System.Text.Json.Serialization.JsonPropertyName("credential_id")] [global::System.Text.Json.Serialization.JsonRequired] @@ -37,7 +42,8 @@ public sealed partial class MCPAuthVariant3 /// /// /// `cred_<crockford>` id of an `oauth2_client_credentials` credential
- /// in the workspace vault. + /// in the workspace vault. Create it first via `POST /v1/credentials`.
+ /// It must be workspace-shared or in the tool's own project. /// /// /// Discriminator value: oauth2_client_credentials diff --git a/src/libs/Speechify/Generated/Speechify.Models.MCPToolConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.MCPToolConfig.g.cs index ef9cfcc6..b8dc9ad8 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.MCPToolConfig.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.MCPToolConfig.g.cs @@ -60,7 +60,11 @@ public sealed partial class MCPToolConfig public global::Speechify.MCPTransport? Transport { get; set; } /// - /// Discriminated union over `type`. + /// How the platform authenticates to an MCP server or an OpenAPI tool's
+ /// REST API: `none`, `bearer` or `oauth2_client_credentials`, a
+ /// discriminated union over `type`. Other credential kinds (an API key
+ /// in a custom header or query parameter, HTTP Basic) are not supported
+ /// here. ///
[global::System.Text.Json.Serialization.JsonPropertyName("auth")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.MCPAuthJsonConverter))] @@ -121,6 +125,17 @@ public sealed partial class MCPToolConfig [global::System.Text.Json.Serialization.JsonPropertyName("action_classes")] public global::System.Collections.Generic.Dictionary? ActionClasses { get; set; } + /// + /// What each of the server's tools' JSON results passes through before
+ /// the agent reads it, keyed by the remote tool name: an item bound, a
+ /// projection and derived string fields. Applies on durable runs only;
+ /// a live session's MCP call is made by the worker's own client and
+ /// never crosses the control plane, so a live agent sees the server's
+ /// answer as it came. A tool you do not name here is passed through. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("response_mappings")] + public global::System.Collections.Generic.Dictionary? ResponseMappings { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -132,7 +147,11 @@ public sealed partial class MCPToolConfig /// /// /// - /// Discriminated union over `type`. + /// How the platform authenticates to an MCP server or an OpenAPI tool's
+ /// REST API: `none`, `bearer` or `oauth2_client_credentials`, a
+ /// discriminated union over `type`. Other credential kinds (an API key
+ /// in a custom header or query parameter, HTTP Basic) are not supported
+ /// here. /// /// /// MCP transport. `http_streamable` is the default; `sse` is the
@@ -183,6 +202,14 @@ public sealed partial class MCPToolConfig /// server and no entry here. What you declare here beats what the
/// server declares. /// + /// + /// What each of the server's tools' JSON results passes through before
+ /// the agent reads it, keyed by the remote tool name: an item bound, a
+ /// projection and derived string fields. Applies on durable runs only;
+ /// a live session's MCP call is made by the worker's own client and
+ /// never crosses the control plane, so a live agent sees the server's
+ /// answer as it came. A tool you do not name here is passed through. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -192,7 +219,8 @@ public MCPToolConfig( global::Speechify.MCPTransport? transport, int? timeoutMs, global::Speechify.LongRunningToolConfig? longRunning, - global::System.Collections.Generic.Dictionary? actionClasses) + global::System.Collections.Generic.Dictionary? actionClasses, + global::System.Collections.Generic.Dictionary? responseMappings) { this.Endpoint = endpoint ?? throw new global::System.ArgumentNullException(nameof(endpoint)); this.Transport = transport; @@ -200,6 +228,7 @@ public MCPToolConfig( this.TimeoutMs = timeoutMs; this.LongRunning = longRunning; this.ActionClasses = actionClasses; + this.ResponseMappings = responseMappings; } /// diff --git a/src/libs/Speechify/Generated/Speechify.Models.MCPToolConfigResponseMappings.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.MCPToolConfigResponseMappings.Json.g.cs new file mode 100644 index 00000000..43656ade --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.MCPToolConfigResponseMappings.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class MCPToolConfigResponseMappings + { + /// + /// 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.MCPToolConfigResponseMappings? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.MCPToolConfigResponseMappings), + jsonSerializerContext) as global::Speechify.MCPToolConfigResponseMappings; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.MCPToolConfigResponseMappings? 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.MCPToolConfigResponseMappings? 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.MCPToolConfigResponseMappings), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.MCPToolConfigResponseMappings; + } + + /// + /// 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.MCPToolConfigResponseMappings.g.cs b/src/libs/Speechify/Generated/Speechify.Models.MCPToolConfigResponseMappings.g.cs new file mode 100644 index 00000000..5b3f1c55 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.MCPToolConfigResponseMappings.g.cs @@ -0,0 +1,24 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// What each of the server's tools' JSON results passes through before
+ /// the agent reads it, keyed by the remote tool name: an item bound, a
+ /// projection and derived string fields. Applies on durable runs only;
+ /// a live session's MCP call is made by the worker's own client and
+ /// never crosses the control plane, so a live agent sees the server's
+ /// answer as it came. A tool you do not name here is passed through. + ///
+ public sealed partial class MCPToolConfigResponseMappings + { + + /// + /// 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.OAuth2ClientCredentialsConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.OAuth2ClientCredentialsConfig.Json.g.cs new file mode 100644 index 00000000..0b429637 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.OAuth2ClientCredentialsConfig.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class OAuth2ClientCredentialsConfig + { + /// + /// 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.OAuth2ClientCredentialsConfig? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.OAuth2ClientCredentialsConfig), + jsonSerializerContext) as global::Speechify.OAuth2ClientCredentialsConfig; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.OAuth2ClientCredentialsConfig? 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.OAuth2ClientCredentialsConfig? 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.OAuth2ClientCredentialsConfig), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.OAuth2ClientCredentialsConfig; + } + + /// + /// 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.OAuth2ClientCredentialsConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.OAuth2ClientCredentialsConfig.g.cs new file mode 100644 index 00000000..383f838f --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.OAuth2ClientCredentialsConfig.g.cs @@ -0,0 +1,131 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// A `client_id` and `client_secret` for the OAuth2 client-credentials
+ /// flow. When a call needs a token, the platform POSTs
+ /// `grant_type=client_credentials` to `token_url`, with `scope` and
+ /// `audience` when they are set, authenticating the way
+ /// `token_endpoint_auth_method` says. It sends the access token that
+ /// comes back as `Authorization: Bearer <token>` and reuses it until it
+ /// nears expiry; rotating the secret mints a fresh one. + ///
+ public sealed partial class OAuth2ClientCredentialsConfig + { + /// + /// The vendor's OAuth2 token endpoint. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("token_url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string TokenUrl { get; set; } + + /// + /// The client id the vendor issued. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("client_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ClientId { get; set; } + + /// + /// The client secret the vendor issued. Accepted on create and rotate,
+ /// never returned: a read shows `client_secret_set` instead. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("client_secret")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ClientSecret { get; set; } + + /// + /// The scopes to request, sent space-separated as the token request's
+ /// `scope`. Omit when the vendor grants a fixed set. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("scopes")] + public global::System.Collections.Generic.IList? Scopes { get; set; } + + /// + /// The API the token is for, sent as the token request's `audience`,
+ /// for vendors that require one. Omit otherwise. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("audience")] + public string? Audience { get; set; } + + /// + /// How a client-credentials credential authenticates to its `token_url`
+ /// when an access token is minted. `client_secret_post` sends `client_id`
+ /// and `client_secret` as form parameters in the request body, and is what
+ /// a credential that omits this field uses. `client_secret_basic` sends
+ /// them in an HTTP Basic `Authorization` header instead (each value
+ /// form-urlencoded first, as RFC 6749 section 2.3.1 specifies) and neither
+ /// in the body. Most providers accept either; choose `client_secret_basic`
+ /// when the provider's documentation says so. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("token_endpoint_auth_method")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.OAuth2TokenEndpointAuthMethodJsonConverter))] + public global::Speechify.OAuth2TokenEndpointAuthMethod? TokenEndpointAuthMethod { 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 vendor's OAuth2 token endpoint. + /// + /// + /// The client id the vendor issued. + /// + /// + /// The client secret the vendor issued. Accepted on create and rotate,
+ /// never returned: a read shows `client_secret_set` instead. + /// + /// + /// The scopes to request, sent space-separated as the token request's
+ /// `scope`. Omit when the vendor grants a fixed set. + /// + /// + /// The API the token is for, sent as the token request's `audience`,
+ /// for vendors that require one. Omit otherwise. + /// + /// + /// How a client-credentials credential authenticates to its `token_url`
+ /// when an access token is minted. `client_secret_post` sends `client_id`
+ /// and `client_secret` as form parameters in the request body, and is what
+ /// a credential that omits this field uses. `client_secret_basic` sends
+ /// them in an HTTP Basic `Authorization` header instead (each value
+ /// form-urlencoded first, as RFC 6749 section 2.3.1 specifies) and neither
+ /// in the body. Most providers accept either; choose `client_secret_basic`
+ /// when the provider's documentation says so. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public OAuth2ClientCredentialsConfig( + string tokenUrl, + string clientId, + string clientSecret, + global::System.Collections.Generic.IList? scopes, + string? audience, + global::Speechify.OAuth2TokenEndpointAuthMethod? tokenEndpointAuthMethod) + { + this.TokenUrl = tokenUrl ?? throw new global::System.ArgumentNullException(nameof(tokenUrl)); + this.ClientId = clientId ?? throw new global::System.ArgumentNullException(nameof(clientId)); + this.ClientSecret = clientSecret ?? throw new global::System.ArgumentNullException(nameof(clientSecret)); + this.Scopes = scopes; + this.Audience = audience; + this.TokenEndpointAuthMethod = tokenEndpointAuthMethod; + } + + /// + /// Initializes a new instance of the class. + /// + public OAuth2ClientCredentialsConfig() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.OAuth2JWTConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.OAuth2JWTConfig.Json.g.cs new file mode 100644 index 00000000..fb1ee978 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.OAuth2JWTConfig.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class OAuth2JWTConfig + { + /// + /// 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.OAuth2JWTConfig? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.OAuth2JWTConfig), + jsonSerializerContext) as global::Speechify.OAuth2JWTConfig; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.OAuth2JWTConfig? 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.OAuth2JWTConfig? 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.OAuth2JWTConfig), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.OAuth2JWTConfig; + } + + /// + /// 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.OAuth2JWTConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.OAuth2JWTConfig.g.cs new file mode 100644 index 00000000..e1f8a89e --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.OAuth2JWTConfig.g.cs @@ -0,0 +1,104 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Issuer, audience, and signing key for the JWT-bearer flow
+ /// (RFC 7523) — e.g. Google service accounts that exchange a
+ /// signed JWT for an access token. + ///
+ public sealed partial class OAuth2JWTConfig + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("token_url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string TokenUrl { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("issuer")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Issuer { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("subject")] + public string? Subject { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("audience")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Audience { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("scopes")] + public global::System.Collections.Generic.IList? Scopes { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("private_key")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string PrivateKey { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("key_id")] + public string? KeyId { 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 OAuth2JWTConfig( + string tokenUrl, + string issuer, + string audience, + string privateKey, + string? subject, + global::System.Collections.Generic.IList? scopes, + string? keyId) + { + this.TokenUrl = tokenUrl ?? throw new global::System.ArgumentNullException(nameof(tokenUrl)); + this.Issuer = issuer ?? throw new global::System.ArgumentNullException(nameof(issuer)); + this.Subject = subject; + this.Audience = audience ?? throw new global::System.ArgumentNullException(nameof(audience)); + this.Scopes = scopes; + this.PrivateKey = privateKey ?? throw new global::System.ArgumentNullException(nameof(privateKey)); + this.KeyId = keyId; + } + + /// + /// Initializes a new instance of the class. + /// + public OAuth2JWTConfig() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.OAuth2TokenEndpointAuthMethod.g.cs b/src/libs/Speechify/Generated/Speechify.Models.OAuth2TokenEndpointAuthMethod.g.cs new file mode 100644 index 00000000..ab48c40d --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.OAuth2TokenEndpointAuthMethod.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// How a client-credentials credential authenticates to its `token_url`
+ /// when an access token is minted. `client_secret_post` sends `client_id`
+ /// and `client_secret` as form parameters in the request body, and is what
+ /// a credential that omits this field uses. `client_secret_basic` sends
+ /// them in an HTTP Basic `Authorization` header instead (each value
+ /// form-urlencoded first, as RFC 6749 section 2.3.1 specifies) and neither
+ /// in the body. Most providers accept either; choose `client_secret_basic`
+ /// when the provider's documentation says so. + ///
+ public enum OAuth2TokenEndpointAuthMethod + { + /// + /// + /// + ClientSecretBasic, + /// + /// + /// + ClientSecretPost, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class OAuth2TokenEndpointAuthMethodExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this OAuth2TokenEndpointAuthMethod value) + { + return value switch + { + OAuth2TokenEndpointAuthMethod.ClientSecretBasic => "client_secret_basic", + OAuth2TokenEndpointAuthMethod.ClientSecretPost => "client_secret_post", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static OAuth2TokenEndpointAuthMethod? ToEnum(string value) + { + return value switch + { + "client_secret_basic" => OAuth2TokenEndpointAuthMethod.ClientSecretBasic, + "client_secret_post" => OAuth2TokenEndpointAuthMethod.ClientSecretPost, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.OpenAPIBody.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIBody.Json.g.cs new file mode 100644 index 00000000..ee67928a --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIBody.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class OpenAPIBody + { + /// + /// 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.OpenAPIBody? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.OpenAPIBody), + jsonSerializerContext) as global::Speechify.OpenAPIBody; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.OpenAPIBody? 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.OpenAPIBody? 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.OpenAPIBody), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.OpenAPIBody; + } + + /// + /// 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.OpenAPIBody.g.cs b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIBody.g.cs new file mode 100644 index 00000000..a780358f --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIBody.g.cs @@ -0,0 +1,66 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// The JSON request body an operation takes, offered to the agent as the `body` argument. + /// + public sealed partial class OpenAPIBody + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.OpenApiBodyContentTypeJsonConverter))] + public global::Speechify.OpenApiBodyContentType? ContentType { get; set; } + + /// + /// A JSON Schema object for the body. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("schema")] + [global::System.Text.Json.Serialization.JsonRequired] + public required object Schema { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("required")] + public bool? Required { 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 JSON Schema object for the body. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public OpenAPIBody( + object schema, + global::Speechify.OpenApiBodyContentType? contentType, + bool? required) + { + this.ContentType = contentType; + this.Schema = schema ?? throw new global::System.ArgumentNullException(nameof(schema)); + this.Required = required; + } + + /// + /// Initializes a new instance of the class. + /// + public OpenAPIBody() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.OpenAPIBodySchema.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIBodySchema.Json.g.cs new file mode 100644 index 00000000..e9981b85 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIBodySchema.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class OpenAPIBodySchema + { + /// + /// 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.OpenAPIBodySchema? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.OpenAPIBodySchema), + jsonSerializerContext) as global::Speechify.OpenAPIBodySchema; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.OpenAPIBodySchema? 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.OpenAPIBodySchema? 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.OpenAPIBodySchema), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.OpenAPIBodySchema; + } + + /// + /// 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.OpenAPIBodySchema.g.cs b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIBodySchema.g.cs new file mode 100644 index 00000000..a36a12cc --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIBodySchema.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// A JSON Schema object for the body. + /// + public sealed partial class OpenAPIBodySchema + { + + /// + /// 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.OpenAPIBodySchema2.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIBodySchema2.Json.g.cs new file mode 100644 index 00000000..c9edee13 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIBodySchema2.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class OpenAPIBodySchema2 + { + /// + /// 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.OpenAPIBodySchema2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.OpenAPIBodySchema2), + jsonSerializerContext) as global::Speechify.OpenAPIBodySchema2; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.OpenAPIBodySchema2? 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.OpenAPIBodySchema2? 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.OpenAPIBodySchema2), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.OpenAPIBodySchema2; + } + + /// + /// 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.OpenAPIBodySchema2.g.cs b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIBodySchema2.g.cs new file mode 100644 index 00000000..304d0326 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIBodySchema2.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Any type + /// + public sealed partial class OpenAPIBodySchema2 + { + + /// + /// 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.OpenAPIOperation.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIOperation.Json.g.cs new file mode 100644 index 00000000..b3512f1f --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIOperation.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class OpenAPIOperation + { + /// + /// 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.OpenAPIOperation? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.OpenAPIOperation), + jsonSerializerContext) as global::Speechify.OpenAPIOperation; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.OpenAPIOperation? 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.OpenAPIOperation? 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.OpenAPIOperation), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.OpenAPIOperation; + } + + /// + /// 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.OpenAPIOperation.g.cs b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIOperation.g.cs new file mode 100644 index 00000000..cec82000 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIOperation.g.cs @@ -0,0 +1,178 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// One REST operation, compiled from the document or authored by hand in
+ /// the same shape. + ///
+ public sealed partial class OpenAPIOperation + { + /// + /// The operation's name, unique within the tool regardless of case:
+ /// the id `POST /v1/agents/tool-definitions/import-openapi` answered
+ /// (the document's operationId made safe for a function name, or a
+ /// name built from the method and path), or any name you choose in
+ /// this grammar. The qualified `<tool name>__<id>` must fit 64
+ /// characters. This is the value the
+ /// `operation` field names in
+ /// `POST /v1/agents/tool-definitions/test-openapi-call` and in a hosted
+ /// API `tool` route's resolver. + ///
+ [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("method")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.OpenApiOperationMethodJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Speechify.OpenApiOperationMethod Method { get; set; } + + /// + /// The path appended to `base_url`, with `{name}` placeholders bound
+ /// from path params. Parameter names are one namespace across path,
+ /// query and header: the agent fills one argument object keyed by name. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("path")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Path { get; set; } + + /// + /// A one-line account of the operation. A hosted API `tool` route
+ /// with no description of its own shows it to MCP clients. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("summary")] + public string? Summary { get; set; } + + /// + /// What the agent is told the operation does. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("params")] + public global::System.Collections.Generic.IList? Params { get; set; } + + /// + /// The JSON request body an operation takes, offered to the agent as the `body` argument. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("body")] + public global::Speechify.OpenAPIBody? Body { get; set; } + + /// + /// Your own statement of this operation's impact. Omitted, a GET or
+ /// HEAD reads and every other method carries the tool's class, which
+ /// is `irreversible_other` when the tool declares none. It decides
+ /// what runs unattended: a `read` operation runs on a durable run
+ /// without asking anyone, is the only kind `test-openapi-call` will
+ /// call, and is the only kind a hosted API `tool` route may serve (on
+ /// a tool whose `approval` is null or `auto`),
+ /// while an undeclared write parks the run for a person. An explicit
+ /// tool-level `approval` still wins over every operation. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("action_class")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.ToolActionClassJsonConverter))] + public global::Speechify.ToolActionClass? ActionClass { get; set; } + + /// + /// What this operation's JSON result passes through before the agent
+ /// reads it, on every surface. Omitted, the vendor's answer is passed
+ /// as it came, trimmed to the observation window. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("response")] + public global::Speechify.ToolResponseMapping? Response { 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 operation's name, unique within the tool regardless of case:
+ /// the id `POST /v1/agents/tool-definitions/import-openapi` answered
+ /// (the document's operationId made safe for a function name, or a
+ /// name built from the method and path), or any name you choose in
+ /// this grammar. The qualified `<tool name>__<id>` must fit 64
+ /// characters. This is the value the
+ /// `operation` field names in
+ /// `POST /v1/agents/tool-definitions/test-openapi-call` and in a hosted
+ /// API `tool` route's resolver. + /// + /// + /// + /// The path appended to `base_url`, with `{name}` placeholders bound
+ /// from path params. Parameter names are one namespace across path,
+ /// query and header: the agent fills one argument object keyed by name. + /// + /// + /// A one-line account of the operation. A hosted API `tool` route
+ /// with no description of its own shows it to MCP clients. + /// + /// + /// What the agent is told the operation does. + /// + /// + /// + /// The JSON request body an operation takes, offered to the agent as the `body` argument. + /// + /// + /// Your own statement of this operation's impact. Omitted, a GET or
+ /// HEAD reads and every other method carries the tool's class, which
+ /// is `irreversible_other` when the tool declares none. It decides
+ /// what runs unattended: a `read` operation runs on a durable run
+ /// without asking anyone, is the only kind `test-openapi-call` will
+ /// call, and is the only kind a hosted API `tool` route may serve (on
+ /// a tool whose `approval` is null or `auto`),
+ /// while an undeclared write parks the run for a person. An explicit
+ /// tool-level `approval` still wins over every operation. + /// + /// + /// What this operation's JSON result passes through before the agent
+ /// reads it, on every surface. Omitted, the vendor's answer is passed
+ /// as it came, trimmed to the observation window. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public OpenAPIOperation( + string id, + global::Speechify.OpenApiOperationMethod method, + string path, + string? summary, + string? description, + global::System.Collections.Generic.IList? @params, + global::Speechify.OpenAPIBody? body, + global::Speechify.ToolActionClass? actionClass, + global::Speechify.ToolResponseMapping? response) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Method = method; + this.Path = path ?? throw new global::System.ArgumentNullException(nameof(path)); + this.Summary = summary; + this.Description = description; + this.Params = @params; + this.Body = body; + this.ActionClass = actionClass; + this.Response = response; + } + + /// + /// Initializes a new instance of the class. + /// + public OpenAPIOperation() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.OpenAPIParam.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIParam.Json.g.cs new file mode 100644 index 00000000..7048e0cd --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIParam.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class OpenAPIParam + { + /// + /// 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.OpenAPIParam? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.OpenAPIParam), + jsonSerializerContext) as global::Speechify.OpenAPIParam; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.OpenAPIParam? 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.OpenAPIParam? 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.OpenAPIParam), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.OpenAPIParam; + } + + /// + /// 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.OpenAPIParam.g.cs b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIParam.g.cs new file mode 100644 index 00000000..4814ad8e --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIParam.g.cs @@ -0,0 +1,107 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// One parameter of an operation and where it rides on the request. The
+ /// agent supplies every parameter's value, so never declare a credential
+ /// (an API key header or query parameter) as one: the tool's `auth`
+ /// carries credentials. + ///
+ public sealed partial class OpenAPIParam + { + /// + /// The argument name the agent fills, unique across the operation's
+ /// path, query and header params. `body` is reserved for the request
+ /// body. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// Where the value rides. A `header` param may not be `Authorization`,
+ /// `Host`, `Content-Type`, `Content-Length`, `Transfer-Encoding`,
+ /// `Connection` or any `Speechify-` header. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("in")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.OpenApiParamInJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Speechify.OpenApiParamIn In { get; set; } + + /// + /// A JSON Schema fragment for the value: `type` is string, number,
+ /// integer, boolean or array (of a scalar `items`), plus `enum`,
+ /// `description` and the ordinary scalar keywords. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("schema")] + [global::System.Text.Json.Serialization.JsonRequired] + public required object Schema { get; set; } + + /// + /// Whether the agent must supply it. A path param always is. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("required")] + public bool? Required { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { 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 argument name the agent fills, unique across the operation's
+ /// path, query and header params. `body` is reserved for the request
+ /// body. + /// + /// + /// Where the value rides. A `header` param may not be `Authorization`,
+ /// `Host`, `Content-Type`, `Content-Length`, `Transfer-Encoding`,
+ /// `Connection` or any `Speechify-` header. + /// + /// + /// A JSON Schema fragment for the value: `type` is string, number,
+ /// integer, boolean or array (of a scalar `items`), plus `enum`,
+ /// `description` and the ordinary scalar keywords. + /// + /// + /// Whether the agent must supply it. A path param always is. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public OpenAPIParam( + string name, + global::Speechify.OpenApiParamIn @in, + object schema, + bool? required, + string? description) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.In = @in; + this.Schema = schema ?? throw new global::System.ArgumentNullException(nameof(schema)); + this.Required = required; + this.Description = description; + } + + /// + /// Initializes a new instance of the class. + /// + public OpenAPIParam() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.OpenAPIParamSchema.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIParamSchema.Json.g.cs new file mode 100644 index 00000000..86d82345 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIParamSchema.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class OpenAPIParamSchema + { + /// + /// 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.OpenAPIParamSchema? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.OpenAPIParamSchema), + jsonSerializerContext) as global::Speechify.OpenAPIParamSchema; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.OpenAPIParamSchema? 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.OpenAPIParamSchema? 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.OpenAPIParamSchema), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.OpenAPIParamSchema; + } + + /// + /// 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.OpenAPIParamSchema.g.cs b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIParamSchema.g.cs new file mode 100644 index 00000000..965c8d9b --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIParamSchema.g.cs @@ -0,0 +1,21 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// A JSON Schema fragment for the value: `type` is string, number,
+ /// integer, boolean or array (of a scalar `items`), plus `enum`,
+ /// `description` and the ordinary scalar keywords. + ///
+ public sealed partial class OpenAPIParamSchema + { + + /// + /// 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.OpenAPIParamSchema2.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIParamSchema2.Json.g.cs new file mode 100644 index 00000000..1b028414 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIParamSchema2.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class OpenAPIParamSchema2 + { + /// + /// 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.OpenAPIParamSchema2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.OpenAPIParamSchema2), + jsonSerializerContext) as global::Speechify.OpenAPIParamSchema2; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.OpenAPIParamSchema2? 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.OpenAPIParamSchema2? 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.OpenAPIParamSchema2), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.OpenAPIParamSchema2; + } + + /// + /// 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.OpenAPIParamSchema2.g.cs b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIParamSchema2.g.cs new file mode 100644 index 00000000..0a7f81aa --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIParamSchema2.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Any type + /// + public sealed partial class OpenAPIParamSchema2 + { + + /// + /// 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.OpenAPIToolConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIToolConfig.Json.g.cs new file mode 100644 index 00000000..b23a9b97 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIToolConfig.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class OpenAPIToolConfig + { + /// + /// 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.OpenAPIToolConfig? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.OpenAPIToolConfig), + jsonSerializerContext) as global::Speechify.OpenAPIToolConfig; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.OpenAPIToolConfig? 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.OpenAPIToolConfig? 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.OpenAPIToolConfig), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.OpenAPIToolConfig; + } + + /// + /// 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.OpenAPIToolConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIToolConfig.g.cs new file mode 100644 index 00000000..a06a5ef3 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.OpenAPIToolConfig.g.cs @@ -0,0 +1,141 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Config shape for `kind=openapi`: a REST API described by its OpenAPI
+ /// document, pinned to the operations you selected. Get the operations
+ /// from `POST /v1/agents/tool-definitions/import-openapi`, which answers
+ /// them in exactly this shape, or write them by hand. The document itself
+ /// is never stored; the compiled operations are, so a vendor rename cannot
+ /// change a published agent's schemas until you re-import. Each operation
+ /// is offered to the agent as the function `<tool name>__<operation id>`
+ /// whose arguments are the operation's params by name plus `body` when it
+ /// takes one.
+ /// Speechify's servers make every call, on a durable run, a live voice
+ /// session, a text conversation and a hosted API `tool` route alike, so
+ /// the vendor credential never leaves them. `auth` is the same vault
+ /// reference the `mcp` kind takes; a `bearer` or
+ /// `oauth2_client_credentials` auth requires `credential_id`, whose
+ /// credential must be of the matching kind. + ///
+ public sealed partial class OpenAPIToolConfig + { + /// + /// The API's base URL every operation path is appended to. https
+ /// only, and never with credentials in it: the vault holds those. It
+ /// wins over the document's `servers`: a vendor with regional bases
+ /// needs the one this workspace signed up to. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("base_url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string BaseUrl { get; set; } + + /// + /// Where the operations were imported from, kept for a later refresh.
+ /// Nothing reads it at call time. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("spec_url")] + public string? SpecUrl { get; set; } + + /// + /// How the platform authenticates to an MCP server or an OpenAPI tool's
+ /// REST API: `none`, `bearer` or `oauth2_client_credentials`, a
+ /// discriminated union over `type`. Other credential kinds (an API key
+ /// in a custom header or query parameter, HTTP Basic) are not supported
+ /// here. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("auth")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.MCPAuthJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Speechify.MCPAuth Auth { get; set; } + + /// + /// How long one operation call may take. Defaults to 30000. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("timeout_ms")] + public int? TimeoutMs { get; set; } + + /// + /// A ceiling on calls to this API per minute across every agent, run
+ /// and hosted API route in the workspace, so an agent cannot starve
+ /// the people who share the vendor's budget. Omitted means unbounded on our side; the
+ /// vendor's own 429 still reaches the model as an observation. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("max_requests_per_minute")] + public int? MaxRequestsPerMinute { get; set; } + + /// + /// The operations the agent may call. At most forty. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("operations")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Operations { 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 base URL every operation path is appended to. https
+ /// only, and never with credentials in it: the vault holds those. It
+ /// wins over the document's `servers`: a vendor with regional bases
+ /// needs the one this workspace signed up to. + /// + /// + /// How the platform authenticates to an MCP server or an OpenAPI tool's
+ /// REST API: `none`, `bearer` or `oauth2_client_credentials`, a
+ /// discriminated union over `type`. Other credential kinds (an API key
+ /// in a custom header or query parameter, HTTP Basic) are not supported
+ /// here. + /// + /// + /// The operations the agent may call. At most forty. + /// + /// + /// Where the operations were imported from, kept for a later refresh.
+ /// Nothing reads it at call time. + /// + /// + /// How long one operation call may take. Defaults to 30000. + /// + /// + /// A ceiling on calls to this API per minute across every agent, run
+ /// and hosted API route in the workspace, so an agent cannot starve
+ /// the people who share the vendor's budget. Omitted means unbounded on our side; the
+ /// vendor's own 429 still reaches the model as an observation. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public OpenAPIToolConfig( + string baseUrl, + global::Speechify.MCPAuth auth, + global::System.Collections.Generic.IList operations, + string? specUrl, + int? timeoutMs, + int? maxRequestsPerMinute) + { + this.BaseUrl = baseUrl ?? throw new global::System.ArgumentNullException(nameof(baseUrl)); + this.SpecUrl = specUrl; + this.Auth = auth; + this.TimeoutMs = timeoutMs; + this.MaxRequestsPerMinute = maxRequestsPerMinute; + this.Operations = operations ?? throw new global::System.ArgumentNullException(nameof(operations)); + } + + /// + /// Initializes a new instance of the class. + /// + public OpenAPIToolConfig() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.OpenApiBodyContentType.g.cs b/src/libs/Speechify/Generated/Speechify.Models.OpenApiBodyContentType.g.cs new file mode 100644 index 00000000..2ecc602b --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.OpenApiBodyContentType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// + /// + public enum OpenApiBodyContentType + { + /// + /// + /// + ApplicationJson, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class OpenApiBodyContentTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this OpenApiBodyContentType value) + { + return value switch + { + OpenApiBodyContentType.ApplicationJson => "application/json", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static OpenApiBodyContentType? ToEnum(string value) + { + return value switch + { + "application/json" => OpenApiBodyContentType.ApplicationJson, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.OpenApiOperationMethod.g.cs b/src/libs/Speechify/Generated/Speechify.Models.OpenApiOperationMethod.g.cs new file mode 100644 index 00000000..b9d43e36 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.OpenApiOperationMethod.g.cs @@ -0,0 +1,75 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// + /// + public enum OpenApiOperationMethod + { + /// + /// + /// + Delete, + /// + /// + /// + Get, + /// + /// + /// + Head, + /// + /// + /// + Patch, + /// + /// + /// + Post, + /// + /// + /// + Put, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class OpenApiOperationMethodExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this OpenApiOperationMethod value) + { + return value switch + { + OpenApiOperationMethod.Delete => "DELETE", + OpenApiOperationMethod.Get => "GET", + OpenApiOperationMethod.Head => "HEAD", + OpenApiOperationMethod.Patch => "PATCH", + OpenApiOperationMethod.Post => "POST", + OpenApiOperationMethod.Put => "PUT", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static OpenApiOperationMethod? ToEnum(string value) + { + return value switch + { + "DELETE" => OpenApiOperationMethod.Delete, + "GET" => OpenApiOperationMethod.Get, + "HEAD" => OpenApiOperationMethod.Head, + "PATCH" => OpenApiOperationMethod.Patch, + "POST" => OpenApiOperationMethod.Post, + "PUT" => OpenApiOperationMethod.Put, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.OpenApiParamIn.g.cs b/src/libs/Speechify/Generated/Speechify.Models.OpenApiParamIn.g.cs new file mode 100644 index 00000000..d6dd483b --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.OpenApiParamIn.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Where the value rides. A `header` param may not be `Authorization`,
+ /// `Host`, `Content-Type`, `Content-Length`, `Transfer-Encoding`,
+ /// `Connection` or any `Speechify-` header. + ///
+ public enum OpenApiParamIn + { + /// + /// + /// + Header, + /// + /// + /// + Path, + /// + /// + /// + Query, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class OpenApiParamInExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this OpenApiParamIn value) + { + return value switch + { + OpenApiParamIn.Header => "header", + OpenApiParamIn.Path => "path", + OpenApiParamIn.Query => "query", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static OpenApiParamIn? ToEnum(string value) + { + return value switch + { + "header" => OpenApiParamIn.Header, + "path" => OpenApiParamIn.Path, + "query" => OpenApiParamIn.Query, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.ShareLink.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ShareLink.g.cs index bdb470a3..73bbe4ac 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.ShareLink.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.ShareLink.g.cs @@ -117,8 +117,8 @@ public sealed partial class ShareLink /// Tools the owner opted this link into, by id — the same
/// `tool_…` ids `listAgentTools` returns. Empty means the
/// default posture: the agent's built-in call controls and
- /// knowledge search only, with no webhook, MCP or transfer tool —
- /// a link recipient is a stranger, not the owner's customer. + /// knowledge search only, with no webhook, MCP, OpenAPI or transfer
+ /// tool: a link recipient is a stranger, not the owner's customer. ///
[global::System.Text.Json.Serialization.JsonPropertyName("allowed_tool_ids")] [global::System.Text.Json.Serialization.JsonRequired] @@ -188,8 +188,8 @@ public sealed partial class ShareLink /// Tools the owner opted this link into, by id — the same
/// `tool_…` ids `listAgentTools` returns. Empty means the
/// default posture: the agent's built-in call controls and
- /// knowledge search only, with no webhook, MCP or transfer tool —
- /// a link recipient is a stranger, not the owner's customer. + /// knowledge search only, with no webhook, MCP, OpenAPI or transfer
+ /// tool: a link recipient is a stranger, not the owner's customer. /// /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Models.SharedSecretConfig.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.SharedSecretConfig.Json.g.cs new file mode 100644 index 00000000..bf327205 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.SharedSecretConfig.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class SharedSecretConfig + { + /// + /// 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.SharedSecretConfig? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.SharedSecretConfig), + jsonSerializerContext) as global::Speechify.SharedSecretConfig; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.SharedSecretConfig? 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.SharedSecretConfig? 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.SharedSecretConfig), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.SharedSecretConfig; + } + + /// + /// 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.SharedSecretConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.SharedSecretConfig.g.cs new file mode 100644 index 00000000..a561b1c7 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.SharedSecretConfig.g.cs @@ -0,0 +1,50 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// One pre-shared secret. Unlike every other credential kind it is never
+ /// placed on an outbound request: it is the key an INBOUND callback's
+ /// signature is verified against, which is how a messaging provider
+ /// authenticates itself to a channel front door. + ///
+ public sealed partial class SharedSecretConfig + { + /// + /// The shared secret, for example a Slack app's signing secret. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("secret")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Secret { 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 shared secret, for example a Slack app's signing secret. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SharedSecretConfig( + string secret) + { + this.Secret = secret ?? throw new global::System.ArgumentNullException(nameof(secret)); + } + + /// + /// Initializes a new instance of the class. + /// + public SharedSecretConfig() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.SkippedOpenAPIOperation.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.SkippedOpenAPIOperation.Json.g.cs new file mode 100644 index 00000000..0b40a90d --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.SkippedOpenAPIOperation.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class SkippedOpenAPIOperation + { + /// + /// 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.SkippedOpenAPIOperation? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.SkippedOpenAPIOperation), + jsonSerializerContext) as global::Speechify.SkippedOpenAPIOperation; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.SkippedOpenAPIOperation? 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.SkippedOpenAPIOperation? 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.SkippedOpenAPIOperation), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.SkippedOpenAPIOperation; + } + + /// + /// 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.SkippedOpenAPIOperation.g.cs b/src/libs/Speechify/Generated/Speechify.Models.SkippedOpenAPIOperation.g.cs new file mode 100644 index 00000000..1d2612f7 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.SkippedOpenAPIOperation.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// An operation the compiler could not represent, and why. + /// + public sealed partial class SkippedOpenAPIOperation + { + /// + /// The operationId exactly as the document wrote it, absent when it
+ /// has none. It is not an `OpenAPIOperation.id`: a skipped operation
+ /// is never given one. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("operation_id")] + public string? OperationId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("method")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Method { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("path")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Path { get; set; } + + /// + /// Why it was skipped, for example a request body that is not JSON. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("reason")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Reason { 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. + /// + /// + /// + /// + /// Why it was skipped, for example a request body that is not JSON. + /// + /// + /// The operationId exactly as the document wrote it, absent when it
+ /// has none. It is not an `OpenAPIOperation.id`: a skipped operation
+ /// is never given one. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SkippedOpenAPIOperation( + string method, + string path, + string reason, + string? operationId) + { + this.OperationId = operationId; + this.Method = method ?? throw new global::System.ArgumentNullException(nameof(method)); + this.Path = path ?? throw new global::System.ArgumentNullException(nameof(path)); + this.Reason = reason ?? throw new global::System.ArgumentNullException(nameof(reason)); + } + + /// + /// Initializes a new instance of the class. + /// + public SkippedOpenAPIOperation() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallRequest.Json.g.cs new file mode 100644 index 00000000..4d19a612 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallRequest.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class TestOpenAPICallRequest + { + /// + /// 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.TestOpenAPICallRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.TestOpenAPICallRequest), + jsonSerializerContext) as global::Speechify.TestOpenAPICallRequest; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.TestOpenAPICallRequest? 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.TestOpenAPICallRequest? 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.TestOpenAPICallRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TestOpenAPICallRequest; + } + + /// + /// 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.TestOpenAPICallRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallRequest.g.cs new file mode 100644 index 00000000..607bad54 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallRequest.g.cs @@ -0,0 +1,80 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Body for `POST /v1/agents/tool-definitions/test-openapi-call`: an
+ /// unsaved `openapi` config, the operation to call on it, and the
+ /// arguments the agent would pass. + ///
+ public sealed partial class TestOpenAPICallRequest + { + /// + /// The `openapi` config exactly as `POST /v1/agents/tool-definitions`
+ /// takes it, with the credential by reference. The whole config is
+ /// validated, not only the operation called. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("config")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Speechify.OpenAPIToolConfig Config { get; set; } + + /// + /// The `id` of the operation to call, one of `config.operations[].id`;
+ /// the same value a hosted API `tool` route's `operation` names. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("operation")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Operation { get; set; } + + /// + /// The arguments the agent would pass: each param by its `name`, plus
+ /// `body` when the operation takes one. Omitted, the call carries none. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + public object? Arguments { 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 `openapi` config exactly as `POST /v1/agents/tool-definitions`
+ /// takes it, with the credential by reference. The whole config is
+ /// validated, not only the operation called. + /// + /// + /// The `id` of the operation to call, one of `config.operations[].id`;
+ /// the same value a hosted API `tool` route's `operation` names. + /// + /// + /// The arguments the agent would pass: each param by its `name`, plus
+ /// `body` when the operation takes one. Omitted, the call carries none. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public TestOpenAPICallRequest( + global::Speechify.OpenAPIToolConfig config, + string operation, + object? arguments) + { + this.Config = config ?? throw new global::System.ArgumentNullException(nameof(config)); + this.Operation = operation ?? throw new global::System.ArgumentNullException(nameof(operation)); + this.Arguments = arguments; + } + + /// + /// Initializes a new instance of the class. + /// + public TestOpenAPICallRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallRequestArguments.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallRequestArguments.Json.g.cs new file mode 100644 index 00000000..33799d77 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallRequestArguments.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class TestOpenAPICallRequestArguments + { + /// + /// 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.TestOpenAPICallRequestArguments? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.TestOpenAPICallRequestArguments), + jsonSerializerContext) as global::Speechify.TestOpenAPICallRequestArguments; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.TestOpenAPICallRequestArguments? 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.TestOpenAPICallRequestArguments? 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.TestOpenAPICallRequestArguments), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TestOpenAPICallRequestArguments; + } + + /// + /// 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.TestOpenAPICallRequestArguments.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallRequestArguments.g.cs new file mode 100644 index 00000000..9cebeda7 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallRequestArguments.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// The arguments the agent would pass: each param by its `name`, plus
+ /// `body` when the operation takes one. Omitted, the call carries none. + ///
+ public sealed partial class TestOpenAPICallRequestArguments + { + + /// + /// 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.TestOpenAPICallRequestArguments2.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallRequestArguments2.Json.g.cs new file mode 100644 index 00000000..5ca88227 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallRequestArguments2.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class TestOpenAPICallRequestArguments2 + { + /// + /// 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.TestOpenAPICallRequestArguments2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.TestOpenAPICallRequestArguments2), + jsonSerializerContext) as global::Speechify.TestOpenAPICallRequestArguments2; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.TestOpenAPICallRequestArguments2? 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.TestOpenAPICallRequestArguments2? 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.TestOpenAPICallRequestArguments2), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TestOpenAPICallRequestArguments2; + } + + /// + /// 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.TestOpenAPICallRequestArguments2.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallRequestArguments2.g.cs new file mode 100644 index 00000000..f546869c --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallRequestArguments2.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Any type + /// + public sealed partial class TestOpenAPICallRequestArguments2 + { + + /// + /// 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.TestOpenAPICallResult.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallResult.Json.g.cs new file mode 100644 index 00000000..621b9751 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallResult.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class TestOpenAPICallResult + { + /// + /// 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.TestOpenAPICallResult? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.TestOpenAPICallResult), + jsonSerializerContext) as global::Speechify.TestOpenAPICallResult; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.TestOpenAPICallResult? 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.TestOpenAPICallResult? 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.TestOpenAPICallResult), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TestOpenAPICallResult; + } + + /// + /// 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.TestOpenAPICallResult.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallResult.g.cs new file mode 100644 index 00000000..b0e59776 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallResult.g.cs @@ -0,0 +1,187 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// One test call's result. `error` is set only when no call was made, and
+ /// then every other field but `applied` is absent. Otherwise `outcome`
+ /// says how the call ended, and only `ok` is a preview that worked; `raw`
+ /// and `mapped` are present only on `ok` when the vendor answered JSON. + ///
+ public sealed partial class TestOpenAPICallResult + { + /// + /// Exactly what the agent would read. On `ok` it is the mapped answer
+ /// trimmed to the observation window; on any other outcome it is the
+ /// account the agent gets instead (the vendor's status and an excerpt
+ /// of its error body, the wait to observe, the argument that was
+ /// missing). Absent when `error` is set. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("observation")] + public string? Observation { get; set; } + + /// + /// The vendor's JSON answer as it came, before the operation's
+ /// `response` mapping. Present only when `outcome` is `ok` and the
+ /// vendor answered JSON. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("raw")] + public object? Raw { get; set; } + + /// + /// The same answer after the operation's `response` mapping and
+ /// before trimming: what a hosted API `tool` route would respond with.
+ /// Identical to `raw` when the operation has no mapping or the mapping
+ /// changed nothing. Present only when `outcome` is `ok` and the vendor
+ /// answered JSON. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("mapped")] + public object? Mapped { get; set; } + + /// + /// Whether the `response` mapping changed the answer. It is also true
+ /// when every `pick` path missed and the answer became empty, so read
+ /// `mapped` to see what survives. Always false when `error` is set. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("applied")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Applied { get; set; } + + /// + /// The vendor's HTTP status, the value a hosted API `tool` route
+ /// reports as `error.details.upstream_status`. Absent when the call
+ /// never reached the vendor (`invalid_arguments`, `unreachable`) and
+ /// when `error` is set. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("status")] + public int? Status { get; set; } + + /// + /// How a call that was made ended. Absent when `error` is set.
+ /// - `ok`: the vendor answered with a success status. The only
+ /// outcome that previews a working call.
+ /// - `invalid_arguments`: the arguments did not fit the operation (a
+ /// required param or body missing, a value that cannot be placed on
+ /// the request), so nothing was sent. Fix `arguments`, or the
+ /// operation's `params`.
+ /// - `rate_limited`: the vendor answered 429. `observation` carries
+ /// the wait it asked for.
+ /// - `upstream_error`: the vendor answered 4xx or 5xx. `status` is the
+ /// code and `observation` carries an excerpt of the body; a 401 or
+ /// 403 usually means the credential or its scopes, a 404 the path or
+ /// `base_url`.
+ /// - `unreachable`: the vendor could not be reached, or its answer
+ /// could not be read (DNS, TLS, timeout, an address the platform
+ /// refuses to call).
+ /// - `unsupported_response`: the vendor answered a media type the
+ /// agent cannot read (not JSON or text). `status` is set. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("outcome")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.TestOpenApiCallResultOutcomeJsonConverter))] + public global::Speechify.TestOpenApiCallResultOutcome? Outcome { get; set; } + + /// + /// Why no call was made: a config the create endpoint would refuse, an
+ /// operation the config does not have, a write operation, or a
+ /// credential that does not resolve or cannot mint a token. The
+ /// message names what to fix. Absent when a call was made. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("error")] + public string? Error { 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. + /// + /// + /// Whether the `response` mapping changed the answer. It is also true
+ /// when every `pick` path missed and the answer became empty, so read
+ /// `mapped` to see what survives. Always false when `error` is set. + /// + /// + /// Exactly what the agent would read. On `ok` it is the mapped answer
+ /// trimmed to the observation window; on any other outcome it is the
+ /// account the agent gets instead (the vendor's status and an excerpt
+ /// of its error body, the wait to observe, the argument that was
+ /// missing). Absent when `error` is set. + /// + /// + /// The vendor's JSON answer as it came, before the operation's
+ /// `response` mapping. Present only when `outcome` is `ok` and the
+ /// vendor answered JSON. + /// + /// + /// The same answer after the operation's `response` mapping and
+ /// before trimming: what a hosted API `tool` route would respond with.
+ /// Identical to `raw` when the operation has no mapping or the mapping
+ /// changed nothing. Present only when `outcome` is `ok` and the vendor
+ /// answered JSON. + /// + /// + /// The vendor's HTTP status, the value a hosted API `tool` route
+ /// reports as `error.details.upstream_status`. Absent when the call
+ /// never reached the vendor (`invalid_arguments`, `unreachable`) and
+ /// when `error` is set. + /// + /// + /// How a call that was made ended. Absent when `error` is set.
+ /// - `ok`: the vendor answered with a success status. The only
+ /// outcome that previews a working call.
+ /// - `invalid_arguments`: the arguments did not fit the operation (a
+ /// required param or body missing, a value that cannot be placed on
+ /// the request), so nothing was sent. Fix `arguments`, or the
+ /// operation's `params`.
+ /// - `rate_limited`: the vendor answered 429. `observation` carries
+ /// the wait it asked for.
+ /// - `upstream_error`: the vendor answered 4xx or 5xx. `status` is the
+ /// code and `observation` carries an excerpt of the body; a 401 or
+ /// 403 usually means the credential or its scopes, a 404 the path or
+ /// `base_url`.
+ /// - `unreachable`: the vendor could not be reached, or its answer
+ /// could not be read (DNS, TLS, timeout, an address the platform
+ /// refuses to call).
+ /// - `unsupported_response`: the vendor answered a media type the
+ /// agent cannot read (not JSON or text). `status` is set. + /// + /// + /// Why no call was made: a config the create endpoint would refuse, an
+ /// operation the config does not have, a write operation, or a
+ /// credential that does not resolve or cannot mint a token. The
+ /// message names what to fix. Absent when a call was made. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public TestOpenAPICallResult( + bool applied, + string? observation, + object? raw, + object? mapped, + int? status, + global::Speechify.TestOpenApiCallResultOutcome? outcome, + string? error) + { + this.Observation = observation; + this.Raw = raw; + this.Mapped = mapped; + this.Applied = applied; + this.Status = status; + this.Outcome = outcome; + this.Error = error; + } + + /// + /// Initializes a new instance of the class. + /// + public TestOpenAPICallResult() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallResultMapped.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallResultMapped.Json.g.cs new file mode 100644 index 00000000..a3dedb37 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallResultMapped.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class TestOpenAPICallResultMapped + { + /// + /// 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.TestOpenAPICallResultMapped? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.TestOpenAPICallResultMapped), + jsonSerializerContext) as global::Speechify.TestOpenAPICallResultMapped; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.TestOpenAPICallResultMapped? 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.TestOpenAPICallResultMapped? 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.TestOpenAPICallResultMapped), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TestOpenAPICallResultMapped; + } + + /// + /// 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.TestOpenAPICallResultMapped.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallResultMapped.g.cs new file mode 100644 index 00000000..e7b8f43a --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallResultMapped.g.cs @@ -0,0 +1,23 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// The same answer after the operation's `response` mapping and
+ /// before trimming: what a hosted API `tool` route would respond with.
+ /// Identical to `raw` when the operation has no mapping or the mapping
+ /// changed nothing. Present only when `outcome` is `ok` and the vendor
+ /// answered JSON. + ///
+ public sealed partial class TestOpenAPICallResultMapped + { + + /// + /// 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.TestOpenAPICallResultRaw.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallResultRaw.Json.g.cs new file mode 100644 index 00000000..7c003c93 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallResultRaw.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class TestOpenAPICallResultRaw + { + /// + /// 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.TestOpenAPICallResultRaw? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.TestOpenAPICallResultRaw), + jsonSerializerContext) as global::Speechify.TestOpenAPICallResultRaw; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.TestOpenAPICallResultRaw? 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.TestOpenAPICallResultRaw? 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.TestOpenAPICallResultRaw), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.TestOpenAPICallResultRaw; + } + + /// + /// 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.TestOpenAPICallResultRaw.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallResultRaw.g.cs new file mode 100644 index 00000000..f0ebd0dd --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.TestOpenAPICallResultRaw.g.cs @@ -0,0 +1,21 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// The vendor's JSON answer as it came, before the operation's
+ /// `response` mapping. Present only when `outcome` is `ok` and the
+ /// vendor answered JSON. + ///
+ public sealed partial class TestOpenAPICallResultRaw + { + + /// + /// 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.TestOpenApiCallResultOutcome.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TestOpenApiCallResultOutcome.g.cs new file mode 100644 index 00000000..21fbbf63 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.TestOpenApiCallResultOutcome.g.cs @@ -0,0 +1,92 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// How a call that was made ended. Absent when `error` is set.
+ /// - `ok`: the vendor answered with a success status. The only
+ /// outcome that previews a working call.
+ /// - `invalid_arguments`: the arguments did not fit the operation (a
+ /// required param or body missing, a value that cannot be placed on
+ /// the request), so nothing was sent. Fix `arguments`, or the
+ /// operation's `params`.
+ /// - `rate_limited`: the vendor answered 429. `observation` carries
+ /// the wait it asked for.
+ /// - `upstream_error`: the vendor answered 4xx or 5xx. `status` is the
+ /// code and `observation` carries an excerpt of the body; a 401 or
+ /// 403 usually means the credential or its scopes, a 404 the path or
+ /// `base_url`.
+ /// - `unreachable`: the vendor could not be reached, or its answer
+ /// could not be read (DNS, TLS, timeout, an address the platform
+ /// refuses to call).
+ /// - `unsupported_response`: the vendor answered a media type the
+ /// agent cannot read (not JSON or text). `status` is set. + ///
+ public enum TestOpenApiCallResultOutcome + { + /// + /// the arguments did not fit the operation (a + /// + InvalidArguments, + /// + /// the vendor answered with a success status. The only + /// + Ok, + /// + /// the vendor answered 429. `observation` carries + /// + RateLimited, + /// + /// the vendor could not be reached, or its answer + /// + Unreachable, + /// + /// the vendor answered a media type the + /// + UnsupportedResponse, + /// + /// the vendor answered 4xx or 5xx. `status` is the + /// + UpstreamError, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class TestOpenApiCallResultOutcomeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this TestOpenApiCallResultOutcome value) + { + return value switch + { + TestOpenApiCallResultOutcome.InvalidArguments => "invalid_arguments", + TestOpenApiCallResultOutcome.Ok => "ok", + TestOpenApiCallResultOutcome.RateLimited => "rate_limited", + TestOpenApiCallResultOutcome.Unreachable => "unreachable", + TestOpenApiCallResultOutcome.UnsupportedResponse => "unsupported_response", + TestOpenApiCallResultOutcome.UpstreamError => "upstream_error", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static TestOpenApiCallResultOutcome? ToEnum(string value) + { + return value switch + { + "invalid_arguments" => TestOpenApiCallResultOutcome.InvalidArguments, + "ok" => TestOpenApiCallResultOutcome.Ok, + "rate_limited" => TestOpenApiCallResultOutcome.RateLimited, + "unreachable" => TestOpenApiCallResultOutcome.Unreachable, + "unsupported_response" => TestOpenApiCallResultOutcome.UnsupportedResponse, + "upstream_error" => TestOpenApiCallResultOutcome.UpstreamError, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.Tool.g.cs b/src/libs/Speechify/Generated/Speechify.Models.Tool.g.cs index 105e6343..0ec50a47 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.Tool.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.Tool.g.cs @@ -4,8 +4,8 @@ namespace Speechify { /// - /// A workspace tool definition: a reusable webhook / client / MCP
- /// integration created once and attached to many agents. Built-ins
+ /// A workspace tool definition: a reusable webhook, client, MCP or
+ /// OpenAPI integration created once and attached to many agents. Built-ins
/// are NOT definitions - they are per-agent (see `AgentTool`).
/// **A tool row belongs to exactly one project and is reused only inside
/// it.** An attach whose agent and tool sit in different projects is
@@ -55,7 +55,8 @@ public sealed partial class Tool /// - `builtin`: a worker-resident platform capability (e.g. end_call, play_audio), configured per-agent
/// - `webhook`: worker signs a payload and POSTs it to your URL
/// - `client`: worker dispatches to the caller's browser/SDK via data channel
- /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls + /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls
+ /// - `openapi`: a REST API described by its OpenAPI document, pinned to the operations you selected; the control plane executes every call ///
[global::System.Text.Json.Serialization.JsonPropertyName("kind")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.ToolKindJsonConverter))] @@ -63,7 +64,7 @@ public sealed partial class Tool public required global::Speechify.ToolKind Kind { get; set; } /// - /// One of `WebhookToolConfig`, `ClientToolConfig`, or `MCPToolConfig` depending on `kind`. + /// One of `WebhookToolConfig`, `ClientToolConfig`, `MCPToolConfig` or `OpenAPIToolConfig` depending on `kind`. /// [global::System.Text.Json.Serialization.JsonPropertyName("config")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.ToolConfigJsonConverter))] @@ -96,9 +97,12 @@ public sealed partial class Tool /// /// The impact the tool actually carries: `action_class` when you set
/// one, otherwise the class its shape implies (a `GET` webhook reads, a
- /// `POST` webhook reaches outside your team, an MCP or client tool can
- /// do anything its author wired). Derived on every read, so changing a
- /// webhook's method changes this with it. Read-only. + /// `POST` webhook reaches outside your team, an MCP, client or OpenAPI
+ /// tool can do anything its author wired). Derived on every read, so
+ /// changing a webhook's method changes this with it. Read-only. An
+ /// OpenAPI tool's operations each carry their own class as well (see
+ /// `OpenAPIOperation.action_class`); this is the class an operation
+ /// that declares none, and is not a GET or HEAD, falls back to. ///
[global::System.Text.Json.Serialization.JsonPropertyName("effective_action_class")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.ToolActionClassJsonConverter))] @@ -126,7 +130,7 @@ public sealed partial class Tool /// /// Where a call to this tool can execute, derived from its `kind`.
/// Read-only.
- /// A `webhook` or `mcp` tool reaches every surface. A `client` tool
+ /// A `webhook`, `mcp` or `openapi` tool reaches every surface. A `client` tool
/// reaches `voice` only: its call is answered by your own application
/// over the live session's data channel, so it needs a realtime
/// session your client is connected to. Neither the roomless text
@@ -171,17 +175,21 @@ public sealed partial class Tool /// - `builtin`: a worker-resident platform capability (e.g. end_call, play_audio), configured per-agent
/// - `webhook`: worker signs a payload and POSTs it to your URL
/// - `client`: worker dispatches to the caller's browser/SDK via data channel
- /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls + /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls
+ /// - `openapi`: a REST API described by its OpenAPI document, pinned to the operations you selected; the control plane executes every call /// /// - /// One of `WebhookToolConfig`, `ClientToolConfig`, or `MCPToolConfig` depending on `kind`. + /// One of `WebhookToolConfig`, `ClientToolConfig`, `MCPToolConfig` or `OpenAPIToolConfig` depending on `kind`. /// /// /// The impact the tool actually carries: `action_class` when you set
/// one, otherwise the class its shape implies (a `GET` webhook reads, a
- /// `POST` webhook reaches outside your team, an MCP or client tool can
- /// do anything its author wired). Derived on every read, so changing a
- /// webhook's method changes this with it. Read-only. + /// `POST` webhook reaches outside your team, an MCP, client or OpenAPI
+ /// tool can do anything its author wired). Derived on every read, so
+ /// changing a webhook's method changes this with it. Read-only. An
+ /// OpenAPI tool's operations each carry their own class as well (see
+ /// `OpenAPIOperation.action_class`); this is the class an operation
+ /// that declares none, and is not a GET or HEAD, falls back to. /// /// /// What governs the tool on the autonomous path: `approval` when set,
@@ -212,7 +220,7 @@ public sealed partial class Tool /// /// Where a call to this tool can execute, derived from its `kind`.
/// Read-only.
- /// A `webhook` or `mcp` tool reaches every surface. A `client` tool
+ /// A `webhook`, `mcp` or `openapi` tool reaches every surface. A `client` tool
/// reaches `voice` only: its call is answered by your own application
/// over the live session's data channel, so it needs a realtime
/// session your client is connected to. Neither the roomless text
diff --git a/src/libs/Speechify/Generated/Speechify.Models.ToolConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ToolConfig.g.cs index 2d75e99e..c63aadbf 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.ToolConfig.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.ToolConfig.g.cs @@ -5,7 +5,7 @@ namespace Speechify { /// - /// One of `WebhookToolConfig`, `ClientToolConfig`, or `MCPToolConfig` depending on `kind`. + /// One of `WebhookToolConfig`, `ClientToolConfig`, `MCPToolConfig` or `OpenAPIToolConfig` depending on `kind`. /// public readonly partial struct ToolConfig : global::System.IEquatable { @@ -169,6 +169,57 @@ public bool TryPickMCPToolConfig( public global::Speechify.MCPToolConfig PickMCPToolConfig() => IsMCPToolConfig ? MCPToolConfig! : throw new global::System.InvalidOperationException($"Expected union variant 'MCPToolConfig' but the value was {ToString()}."); + + /// + /// Config shape for `kind=openapi`: a REST API described by its OpenAPI
+ /// document, pinned to the operations you selected. Get the operations
+ /// from `POST /v1/agents/tool-definitions/import-openapi`, which answers
+ /// them in exactly this shape, or write them by hand. The document itself
+ /// is never stored; the compiled operations are, so a vendor rename cannot
+ /// change a published agent's schemas until you re-import. Each operation
+ /// is offered to the agent as the function `<tool name>__<operation id>`
+ /// whose arguments are the operation's params by name plus `body` when it
+ /// takes one.
+ /// Speechify's servers make every call, on a durable run, a live voice
+ /// session, a text conversation and a hosted API `tool` route alike, so
+ /// the vendor credential never leaves them. `auth` is the same vault
+ /// reference the `mcp` kind takes; a `bearer` or
+ /// `oauth2_client_credentials` auth requires `credential_id`, whose
+ /// credential must be of the matching kind. + ///
+#if NET6_0_OR_GREATER + public global::Speechify.OpenAPIToolConfig? OpenAPIToolConfig { get; init; } +#else + public global::Speechify.OpenAPIToolConfig? OpenAPIToolConfig { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OpenAPIToolConfig))] +#endif + public bool IsOpenAPIToolConfig => OpenAPIToolConfig != null; + + /// + /// + /// + public bool TryPickOpenAPIToolConfig( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Speechify.OpenAPIToolConfig? value) + { + value = OpenAPIToolConfig; + return IsOpenAPIToolConfig; + } + + /// + /// + /// + public global::Speechify.OpenAPIToolConfig PickOpenAPIToolConfig() => IsOpenAPIToolConfig + ? OpenAPIToolConfig! + : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAPIToolConfig' but the value was {ToString()}."); /// /// /// @@ -238,24 +289,50 @@ public ToolConfig(global::Speechify.MCPToolConfig? value) ///
public static ToolConfig FromMCPToolConfig(global::Speechify.MCPToolConfig? value) => new ToolConfig(value); + /// + /// + /// + public static implicit operator ToolConfig(global::Speechify.OpenAPIToolConfig value) => new ToolConfig((global::Speechify.OpenAPIToolConfig?)value); + + /// + /// + /// + public static implicit operator global::Speechify.OpenAPIToolConfig?(ToolConfig @this) => @this.OpenAPIToolConfig; + + /// + /// + /// + public ToolConfig(global::Speechify.OpenAPIToolConfig? value) + { + OpenAPIToolConfig = value; + } + + /// + /// + /// + public static ToolConfig FromOpenAPIToolConfig(global::Speechify.OpenAPIToolConfig? value) => new ToolConfig(value); + /// /// /// public ToolConfig( global::Speechify.WebhookToolConfig? webhookToolConfig, global::Speechify.ClientToolConfig? clientToolConfig, - global::Speechify.MCPToolConfig? mCPToolConfig + global::Speechify.MCPToolConfig? mCPToolConfig, + global::Speechify.OpenAPIToolConfig? openAPIToolConfig ) { WebhookToolConfig = webhookToolConfig; ClientToolConfig = clientToolConfig; MCPToolConfig = mCPToolConfig; + OpenAPIToolConfig = openAPIToolConfig; } /// /// /// public object? Object => + OpenAPIToolConfig as object ?? MCPToolConfig as object ?? ClientToolConfig as object ?? WebhookToolConfig as object @@ -267,7 +344,8 @@ WebhookToolConfig as object public override string? ToString() => WebhookToolConfig?.ToString() ?? ClientToolConfig?.ToString() ?? - MCPToolConfig?.ToString() + MCPToolConfig?.ToString() ?? + OpenAPIToolConfig?.ToString() ; /// @@ -275,7 +353,7 @@ WebhookToolConfig as object /// public bool Validate() { - return IsWebhookToolConfig && !IsClientToolConfig && !IsMCPToolConfig || !IsWebhookToolConfig && IsClientToolConfig && !IsMCPToolConfig || !IsWebhookToolConfig && !IsClientToolConfig && IsMCPToolConfig; + return IsWebhookToolConfig && !IsClientToolConfig && !IsMCPToolConfig && !IsOpenAPIToolConfig || !IsWebhookToolConfig && IsClientToolConfig && !IsMCPToolConfig && !IsOpenAPIToolConfig || !IsWebhookToolConfig && !IsClientToolConfig && IsMCPToolConfig && !IsOpenAPIToolConfig || !IsWebhookToolConfig && !IsClientToolConfig && !IsMCPToolConfig && IsOpenAPIToolConfig; } /// @@ -285,6 +363,7 @@ public bool Validate() global::System.Func? webhookToolConfig = null, global::System.Func? clientToolConfig = null, global::System.Func? mCPToolConfig = null, + global::System.Func? openAPIToolConfig = null, bool validate = true) { if (validate) @@ -304,6 +383,10 @@ public bool Validate() { return mCPToolConfig(MCPToolConfig!); } + else if (IsOpenAPIToolConfig && openAPIToolConfig != null) + { + return openAPIToolConfig(OpenAPIToolConfig!); + } return default(TResult); } @@ -317,6 +400,8 @@ public void Match( global::System.Action? clientToolConfig = null, global::System.Action? mCPToolConfig = null, + + global::System.Action? openAPIToolConfig = null, bool validate = true) { if (validate) @@ -336,6 +421,10 @@ public void Match( { mCPToolConfig?.Invoke(MCPToolConfig!); } + else if (IsOpenAPIToolConfig) + { + openAPIToolConfig?.Invoke(OpenAPIToolConfig!); + } } /// @@ -345,6 +434,7 @@ public void Switch( global::System.Action? webhookToolConfig = null, global::System.Action? clientToolConfig = null, global::System.Action? mCPToolConfig = null, + global::System.Action? openAPIToolConfig = null, bool validate = true) { if (validate) @@ -364,6 +454,10 @@ public void Switch( { mCPToolConfig?.Invoke(MCPToolConfig!); } + else if (IsOpenAPIToolConfig) + { + openAPIToolConfig?.Invoke(OpenAPIToolConfig!); + } } /// @@ -379,6 +473,8 @@ public override int GetHashCode() typeof(global::Speechify.ClientToolConfig), MCPToolConfig, typeof(global::Speechify.MCPToolConfig), + OpenAPIToolConfig, + typeof(global::Speechify.OpenAPIToolConfig), }; const int offset = unchecked((int)2166136261); const int prime = 16777619; @@ -397,7 +493,8 @@ public bool Equals(ToolConfig other) return global::System.Collections.Generic.EqualityComparer.Default.Equals(WebhookToolConfig, other.WebhookToolConfig) && global::System.Collections.Generic.EqualityComparer.Default.Equals(ClientToolConfig, other.ClientToolConfig) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPToolConfig, other.MCPToolConfig) + global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPToolConfig, other.MCPToolConfig) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(OpenAPIToolConfig, other.OpenAPIToolConfig) ; } diff --git a/src/libs/Speechify/Generated/Speechify.Models.ToolKind.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ToolKind.g.cs index 0358c780..1c480662 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.ToolKind.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.ToolKind.g.cs @@ -8,7 +8,8 @@ namespace Speechify /// - `builtin`: a worker-resident platform capability (e.g. end_call, play_audio), configured per-agent
/// - `webhook`: worker signs a payload and POSTs it to your URL
/// - `client`: worker dispatches to the caller's browser/SDK via data channel
- /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls + /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls
+ /// - `openapi`: a REST API described by its OpenAPI document, pinned to the operations you selected; the control plane executes every call ///
public enum ToolKind { @@ -25,6 +26,10 @@ public enum ToolKind ///
Mcp, /// + /// a REST API described by its OpenAPI document, pinned to the operations you selected; the control plane executes every call + /// + Openapi, + /// /// worker signs a payload and POSTs it to your URL /// Webhook, @@ -45,6 +50,7 @@ public static string ToValueString(this ToolKind value) ToolKind.Builtin => "builtin", ToolKind.Client => "client", ToolKind.Mcp => "mcp", + ToolKind.Openapi => "openapi", ToolKind.Webhook => "webhook", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; @@ -59,6 +65,7 @@ public static string ToValueString(this ToolKind value) "builtin" => ToolKind.Builtin, "client" => ToolKind.Client, "mcp" => ToolKind.Mcp, + "openapi" => ToolKind.Openapi, "webhook" => ToolKind.Webhook, _ => null, }; diff --git a/src/libs/Speechify/Generated/Speechify.Models.ToolNameHolderKind.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ToolNameHolderKind.g.cs index 288db57f..692e8899 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.ToolNameHolderKind.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.ToolNameHolderKind.g.cs @@ -23,6 +23,10 @@ public enum ToolNameHolderKind /// /// /// + Openapi, + /// + /// + /// Webhook, } @@ -41,6 +45,7 @@ public static string ToValueString(this ToolNameHolderKind value) ToolNameHolderKind.Builtin => "builtin", ToolNameHolderKind.Client => "client", ToolNameHolderKind.Mcp => "mcp", + ToolNameHolderKind.Openapi => "openapi", ToolNameHolderKind.Webhook => "webhook", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; @@ -55,6 +60,7 @@ public static string ToValueString(this ToolNameHolderKind value) "builtin" => ToolNameHolderKind.Builtin, "client" => ToolNameHolderKind.Client, "mcp" => ToolNameHolderKind.Mcp, + "openapi" => ToolNameHolderKind.Openapi, "webhook" => ToolNameHolderKind.Webhook, _ => null, }; diff --git a/src/libs/Speechify/Generated/Speechify.Models.ToolResponseMapping.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ToolResponseMapping.Json.g.cs new file mode 100644 index 00000000..fa7665af --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ToolResponseMapping.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class ToolResponseMapping + { + /// + /// 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.ToolResponseMapping? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.ToolResponseMapping), + jsonSerializerContext) as global::Speechify.ToolResponseMapping; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.ToolResponseMapping? 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.ToolResponseMapping? 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.ToolResponseMapping), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.ToolResponseMapping; + } + + /// + /// 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.ToolResponseMapping.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ToolResponseMapping.g.cs new file mode 100644 index 00000000..16819686 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ToolResponseMapping.g.cs @@ -0,0 +1,102 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// What a tool's JSON result passes through before the agent reads it,
+ /// applied in the order `max_items`, `pick`, `derive`, on the platform
+ /// and before the result is trimmed to the observation window. One path
+ /// grammar serves `pick` and the keys of `derive`: dot-separated names of
+ /// letters, digits, `_` and `-`, each optionally followed by `[]` for
+ /// every element (`issues[].id`; `[].id` for a root array). A `derive`
+ /// value is free text with `{{path}}` placeholders resolved relative to
+ /// the object its key's scope selects, and nothing else: there is no
+ /// expression language (no filters, conditionals, arithmetic, JSONata or
+ /// jq); anything richer belongs in your own connector. A result that is
+ /// not JSON passes through untouched. + ///
+ public sealed partial class ToolResponseMapping + { + /// + /// The paths to keep, structure-preserving: `issues[].id` keeps
+ /// `issues` as an array whose objects hold only `id`. A path the
+ /// result does not have leaves nothing, silently; an empty list keeps
+ /// everything. Preview with
+ /// `POST /v1/agents/tool-definitions/test-openapi-call` and read
+ /// `mapped`, since a `pick` whose every path missed still changes the
+ /// answer. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("pick")] + public global::System.Collections.Generic.IList? Pick { get; set; } + + /// + /// Fields to add, keyed by where they land: the last segment is the
+ /// field name, the segments before it the scope, so `issues[].url`
+ /// adds `url` to every issue and `summary_url` adds it at the root.
+ /// The value is a template whose `{{path}}` placeholders resolve
+ /// relative to that scope; a missing value renders empty. A field the
+ /// result already has is never overwritten. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("derive")] + public global::System.Collections.Generic.Dictionary? Derive { get; set; } + + /// + /// Keep only the first N elements of a root array, or of every
+ /// top-level array of a root object. Applied before `pick`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("max_items")] + public int? MaxItems { 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 paths to keep, structure-preserving: `issues[].id` keeps
+ /// `issues` as an array whose objects hold only `id`. A path the
+ /// result does not have leaves nothing, silently; an empty list keeps
+ /// everything. Preview with
+ /// `POST /v1/agents/tool-definitions/test-openapi-call` and read
+ /// `mapped`, since a `pick` whose every path missed still changes the
+ /// answer. + /// + /// + /// Fields to add, keyed by where they land: the last segment is the
+ /// field name, the segments before it the scope, so `issues[].url`
+ /// adds `url` to every issue and `summary_url` adds it at the root.
+ /// The value is a template whose `{{path}}` placeholders resolve
+ /// relative to that scope; a missing value renders empty. A field the
+ /// result already has is never overwritten. + /// + /// + /// Keep only the first N elements of a root array, or of every
+ /// top-level array of a root object. Applied before `pick`. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ToolResponseMapping( + global::System.Collections.Generic.IList? pick, + global::System.Collections.Generic.Dictionary? derive, + int? maxItems) + { + this.Pick = pick; + this.Derive = derive; + this.MaxItems = maxItems; + } + + /// + /// Initializes a new instance of the class. + /// + public ToolResponseMapping() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.ToolResponseMappingDerive.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ToolResponseMappingDerive.Json.g.cs new file mode 100644 index 00000000..06b87421 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ToolResponseMappingDerive.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class ToolResponseMappingDerive + { + /// + /// 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.ToolResponseMappingDerive? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.ToolResponseMappingDerive), + jsonSerializerContext) as global::Speechify.ToolResponseMappingDerive; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.ToolResponseMappingDerive? 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.ToolResponseMappingDerive? 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.ToolResponseMappingDerive), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.ToolResponseMappingDerive; + } + + /// + /// 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.ToolResponseMappingDerive.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ToolResponseMappingDerive.g.cs new file mode 100644 index 00000000..c0e2b01f --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.ToolResponseMappingDerive.g.cs @@ -0,0 +1,24 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Fields to add, keyed by where they land: the last segment is the
+ /// field name, the segments before it the scope, so `issues[].url`
+ /// adds `url` to every issue and `summary_url` adds it at the root.
+ /// The value is a template whose `{{path}}` placeholders resolve
+ /// relative to that scope; a missing value renders empty. A field the
+ /// result already has is never overwritten. + ///
+ public sealed partial class ToolResponseMappingDerive + { + + /// + /// 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.UpdateCredentialRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.UpdateCredentialRequest.Json.g.cs new file mode 100644 index 00000000..d3e06c93 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.UpdateCredentialRequest.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class UpdateCredentialRequest + { + /// + /// 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.UpdateCredentialRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.UpdateCredentialRequest), + jsonSerializerContext) as global::Speechify.UpdateCredentialRequest; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.UpdateCredentialRequest? 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.UpdateCredentialRequest? 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.UpdateCredentialRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.UpdateCredentialRequest; + } + + /// + /// 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.UpdateCredentialRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.UpdateCredentialRequest.g.cs new file mode 100644 index 00000000..91111e50 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.UpdateCredentialRequest.g.cs @@ -0,0 +1,101 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// Body for `PATCH /v1/credentials/{credential_id}`. Rotates a credential's secret,
+ /// renames it, and/or moves it between the workspace-shared tier and a
+ /// project, in place, keeping the same id so every referencing
+ /// config picks up the change. All fields are optional; provide at least
+ /// one. The kind is immutable — a rotated `config` must populate the same
+ /// block as the credential's existing kind.
+ /// A rotated block must carry every required field again, and its
+ /// optional fields keep their stored values when omitted: `scopes`,
+ /// `audience` and `token_endpoint_auth_method` on
+ /// `oauth2_client_credentials`, and `subject`, `scopes` and `key_id` on
+ /// `oauth2_jwt`. So rotating a client secret alone never resets how the
+ /// credential mints. Send an optional field empty (`""`, `[]`) or null to
+ /// clear it; send `token_endpoint_auth_method: client_secret_post` to
+ /// return to the default. + ///
+ public sealed partial class UpdateCredentialRequest + { + /// + /// New human-readable label, unique per workspace. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// Move the credential between scopes: a `proj_...` id scopes it to
+ /// that project, an explicit null makes it workspace-shared,
+ /// omitted leaves it unchanged. Scoping to a project is refused
+ /// with `409 cross_project_reference` while tools or agents outside
+ /// that project still reference the credential (the response lists
+ /// them); making it shared always succeeds. A project-pinned API
+ /// key may only scope a credential to its own project. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] + public string? ProjectId { get; set; } + + /// + /// Kind-specific credential payload, used on WRITES only (create and
+ /// rotate). Exactly one block is populated — the one named by the
+ /// credential's `kind`. The secret fields are write-only: they are
+ /// accepted here but are NEVER returned on reads — a read returns the
+ /// masked `CredentialConfigView` instead. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("config")] + public global::Speechify.CredentialConfig? Config { 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. + /// + /// + /// New human-readable label, unique per workspace. + /// + /// + /// Move the credential between scopes: a `proj_...` id scopes it to
+ /// that project, an explicit null makes it workspace-shared,
+ /// omitted leaves it unchanged. Scoping to a project is refused
+ /// with `409 cross_project_reference` while tools or agents outside
+ /// that project still reference the credential (the response lists
+ /// them); making it shared always succeeds. A project-pinned API
+ /// key may only scope a credential to its own project. + /// + /// + /// Kind-specific credential payload, used on WRITES only (create and
+ /// rotate). Exactly one block is populated — the one named by the
+ /// credential's `kind`. The secret fields are write-only: they are
+ /// accepted here but are NEVER returned on reads — a read returns the
+ /// masked `CredentialConfigView` instead. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UpdateCredentialRequest( + string? name, + string? projectId, + global::Speechify.CredentialConfig? config) + { + this.Name = name; + this.ProjectId = projectId; + this.Config = config; + } + + /// + /// Initializes a new instance of the class. + /// + public UpdateCredentialRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.UpdateHostedAPIRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.UpdateHostedAPIRequest.g.cs index db4f75ff..1df12fcc 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.UpdateHostedAPIRequest.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.UpdateHostedAPIRequest.g.cs @@ -15,7 +15,7 @@ public sealed partial class UpdateHostedAPIRequest public string? Name { get; set; } /// - /// + /// What the API is for; also the instructions an MCP client hands its model when `mcp_enabled` is on. /// [global::System.Text.Json.Serialization.JsonPropertyName("description")] public string? Description { get; set; } @@ -57,6 +57,15 @@ public sealed partial class UpdateHostedAPIRequest [global::System.Text.Json.Serialization.JsonPropertyName("daily_write_cap")] public int? DailyWriteCap { get; set; } + /// + /// Switch the MCP face at `POST <base_url>/mcp` on or off. Refused with
+ /// 400 `validation_failed` naming `mcp_enabled` when the API is, or is
+ /// being made, `public`. Allow up to 15 seconds for the switch, like
+ /// any route change, to reach every server. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("mcp_enabled")] + public bool? McpEnabled { get; set; } + /// /// Replace the registered key set; an empty string removes it, after which the signing secret verifies tokens again. /// @@ -73,7 +82,9 @@ public sealed partial class UpdateHostedAPIRequest /// Initializes a new instance of the class. ///
/// - /// + /// + /// What the API is for; also the instructions an MCP client hands its model when `mcp_enabled` is on. + /// /// /// /// @@ -82,6 +93,12 @@ public sealed partial class UpdateHostedAPIRequest /// /// /// + /// + /// Switch the MCP face at `POST <base_url>/mcp` on or off. Refused with
+ /// 400 `validation_failed` naming `mcp_enabled` when the API is, or is
+ /// being made, `public`. Allow up to 15 seconds for the switch, like
+ /// any route change, to reach every server. + /// /// /// Replace the registered key set; an empty string removes it, after which the signing secret verifies tokens again. /// @@ -97,6 +114,7 @@ public UpdateHostedAPIRequest( int? dailyRunCap, int? dailyReadCap, int? dailyWriteCap, + bool? mcpEnabled, string? userTokenJwksUrl) { this.Name = name; @@ -107,6 +125,7 @@ public UpdateHostedAPIRequest( this.DailyRunCap = dailyRunCap; this.DailyReadCap = dailyReadCap; this.DailyWriteCap = dailyWriteCap; + this.McpEnabled = mcpEnabled; this.UserTokenJwksUrl = userTokenJwksUrl; } diff --git a/src/libs/Speechify/Generated/Speechify.Models.UpdateHostedAPIRouteRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.UpdateHostedAPIRouteRequest.g.cs index 61c3d901..dda1c44c 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.UpdateHostedAPIRouteRequest.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.UpdateHostedAPIRouteRequest.g.cs @@ -22,13 +22,23 @@ public sealed partial class UpdateHostedAPIRouteRequest public string? Path { get; set; } /// - /// + /// The route's name, 1-128 letters, digits, spaces, `.`, `_` or `-`.
+ /// On an API with `mcp_enabled` the MCP tool's name comes from it:
+ /// each run of other characters (a space included) becomes `_`,
+ /// leading and trailing `_` are dropped, and the result is cut to 64
+ /// characters. A route with no name is listed under a name built from
+ /// its method and path, and a name two routes would share takes `_2`,
+ /// `_3` in route order; the face's `tools/list` is the authority. Pick
+ /// a verb-first name a model can choose by. ///
[global::System.Text.Json.Serialization.JsonPropertyName("name")] public string? Name { get; set; } /// - /// + /// What the route does. On an API with `mcp_enabled` it is the MCP
+ /// tool description a client's model reads to choose the tool, so say
+ /// what it returns and when to call it; a `tool` route with none falls
+ /// back to the operation's summary. ///
[global::System.Text.Json.Serialization.JsonPropertyName("description")] public string? Description { get; set; } @@ -48,7 +58,28 @@ public sealed partial class UpdateHostedAPIRouteRequest /// `run_latest` (trigger_id of a schedule trigger),
/// `run` (trigger_id of a webhook trigger, wait_seconds),
/// `file` (file_path of one published file; or, on a route whose path
- /// ends in `*`, file_root and file_index for a whole published tree). + /// ends in `*`, file_root and file_index for a whole published tree),
+ /// `tool` (tool_id of an `openapi` tool definition and the `operation`
+ /// on it: the POST body is the operation's arguments, held to its
+ /// argument schema, and the vendor's answer after the operation's
+ /// `response` mapping is the response, or `{"text": ...}` when the vendor
+ /// answered text. Only an operation whose effective class is `read`, on a
+ /// tool whose `approval` is null or `auto`, may be served, and never on a
+ /// public API; a route write that names anything else is refused with 400
+ /// `validation_failed` on `resolver.tool_id`. Because a definition can
+ /// change after its route is written, every call re-checks it: an
+ /// operation no longer classified `read`, or a tool whose `approval` is no
+ /// longer null or `auto`, answers 403 `route_tool_not_readable`; a tool
+ /// deleted, moved to another project, no longer of kind `openapi` or
+ /// without the operation answers 409 `route_tool_unavailable`, which no
+ /// retry clears until the route or the tool is fixed. Arguments that do
+ /// not fit the schema answer 400 `validation_failed`; the definition's
+ /// `max_requests_per_minute` and the vendor's own throttle both answer 429
+ /// `route_upstream_rate_limited` with `Retry-After`; a vendor error
+ /// answers 502 `route_upstream_error` with the vendor's status in
+ /// `error.details.upstream_status`, and an unreachable vendor or a
+ /// credential that no longer resolves answers 502 `route_upstream_error`
+ /// without it). /// [global::System.Text.Json.Serialization.JsonPropertyName("resolver")] public global::Speechify.HostedAPIResolver? Resolver { get; set; } @@ -82,8 +113,22 @@ public sealed partial class UpdateHostedAPIRouteRequest /// /// /// - /// - /// + /// + /// The route's name, 1-128 letters, digits, spaces, `.`, `_` or `-`.
+ /// On an API with `mcp_enabled` the MCP tool's name comes from it:
+ /// each run of other characters (a space included) becomes `_`,
+ /// leading and trailing `_` are dropped, and the result is cut to 64
+ /// characters. A route with no name is listed under a name built from
+ /// its method and path, and a name two routes would share takes `_2`,
+ /// `_3` in route order; the face's `tools/list` is the authority. Pick
+ /// a verb-first name a model can choose by. + /// + /// + /// What the route does. On an API with `mcp_enabled` it is the MCP
+ /// tool description a client's model reads to choose the tool, so say
+ /// what it returns and when to call it; a `tool` route with none falls
+ /// back to the operation's summary. + /// /// /// What answers a route. `type` selects the fields that apply:
/// `store_query` (store_id, collection, where, order_by, limit),
@@ -99,7 +144,28 @@ public sealed partial class UpdateHostedAPIRouteRequest /// `run_latest` (trigger_id of a schedule trigger),
/// `run` (trigger_id of a webhook trigger, wait_seconds),
/// `file` (file_path of one published file; or, on a route whose path
- /// ends in `*`, file_root and file_index for a whole published tree). + /// ends in `*`, file_root and file_index for a whole published tree),
+ /// `tool` (tool_id of an `openapi` tool definition and the `operation`
+ /// on it: the POST body is the operation's arguments, held to its
+ /// argument schema, and the vendor's answer after the operation's
+ /// `response` mapping is the response, or `{"text": ...}` when the vendor
+ /// answered text. Only an operation whose effective class is `read`, on a
+ /// tool whose `approval` is null or `auto`, may be served, and never on a
+ /// public API; a route write that names anything else is refused with 400
+ /// `validation_failed` on `resolver.tool_id`. Because a definition can
+ /// change after its route is written, every call re-checks it: an
+ /// operation no longer classified `read`, or a tool whose `approval` is no
+ /// longer null or `auto`, answers 403 `route_tool_not_readable`; a tool
+ /// deleted, moved to another project, no longer of kind `openapi` or
+ /// without the operation answers 409 `route_tool_unavailable`, which no
+ /// retry clears until the route or the tool is fixed. Arguments that do
+ /// not fit the schema answer 400 `validation_failed`; the definition's
+ /// `max_requests_per_minute` and the vendor's own throttle both answer 429
+ /// `route_upstream_rate_limited` with `Retry-After`; a vendor error
+ /// answers 502 `route_upstream_error` with the vendor's status in
+ /// `error.details.upstream_status`, and an unreachable vendor or a
+ /// credential that no longer resolves answers 502 `route_upstream_error`
+ /// without it). /// /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Models.UpdateSkillRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.UpdateSkillRequest.g.cs index 616656a5..8bf3bc73 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.UpdateSkillRequest.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.UpdateSkillRequest.g.cs @@ -29,7 +29,14 @@ public sealed partial class UpdateSkillRequest public string? Instructions { get; set; } /// - /// + /// Replaces the skill's tool definitions and mints a new version.
+ /// Tool definitions (`tool_...`) the skill contributes to every agent
+ /// that attaches it, unioned with the agent's own tools: any kind a
+ /// `POST /v1/agents/tool-definitions` create makes (`webhook`,
+ /// `client`, `mcp` or `openapi`, where an `openapi` tool contributes
+ /// each of its operations). The tools do not have to be attached to
+ /// the agent; an attach is refused with 409 `skill_tool_name_conflict`
+ /// when one of their names collides with a tool the agent already has. ///
[global::System.Text.Json.Serialization.JsonPropertyName("tool_ids")] public global::System.Collections.Generic.IList? ToolIds { get; set; } @@ -58,7 +65,16 @@ public sealed partial class UpdateSkillRequest /// /// /// - /// + /// + /// Replaces the skill's tool definitions and mints a new version.
+ /// Tool definitions (`tool_...`) the skill contributes to every agent
+ /// that attaches it, unioned with the agent's own tools: any kind a
+ /// `POST /v1/agents/tool-definitions` create makes (`webhook`,
+ /// `client`, `mcp` or `openapi`, where an `openapi` tool contributes
+ /// each of its operations). The tools do not have to be attached to
+ /// the agent; an attach is refused with 409 `skill_tool_name_conflict`
+ /// when one of their names collides with a tool the agent already has. + /// /// /// #if NET7_0_OR_GREATER diff --git a/src/libs/Speechify/Generated/Speechify.Models.UpdateToolRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.UpdateToolRequest.g.cs index 33fce6b4..bc7c8e0d 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.UpdateToolRequest.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.UpdateToolRequest.g.cs @@ -4,7 +4,10 @@ namespace Speechify { /// - /// All fields optional. `kind` is immutable — create a new definition to change it. + /// All fields optional. `kind` is immutable - create a new definition to
+ /// change it. `config` replaces the stored config whole, never merged:
+ /// send the complete config for the tool's kind, starting from what
+ /// `GET /v1/agents/tool-definitions/{tool_definition_id}` returns. ///
public sealed partial class UpdateToolRequest { diff --git a/src/libs/Speechify/Generated/Speechify.Models.UpdateToolRequestConfig.g.cs b/src/libs/Speechify/Generated/Speechify.Models.UpdateToolRequestConfig.g.cs index bf29152d..a1f1d30d 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.UpdateToolRequestConfig.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.UpdateToolRequestConfig.g.cs @@ -169,6 +169,57 @@ public bool TryPickMCPToolConfig( public global::Speechify.MCPToolConfig PickMCPToolConfig() => IsMCPToolConfig ? MCPToolConfig! : throw new global::System.InvalidOperationException($"Expected union variant 'MCPToolConfig' but the value was {ToString()}."); + + /// + /// Config shape for `kind=openapi`: a REST API described by its OpenAPI
+ /// document, pinned to the operations you selected. Get the operations
+ /// from `POST /v1/agents/tool-definitions/import-openapi`, which answers
+ /// them in exactly this shape, or write them by hand. The document itself
+ /// is never stored; the compiled operations are, so a vendor rename cannot
+ /// change a published agent's schemas until you re-import. Each operation
+ /// is offered to the agent as the function `<tool name>__<operation id>`
+ /// whose arguments are the operation's params by name plus `body` when it
+ /// takes one.
+ /// Speechify's servers make every call, on a durable run, a live voice
+ /// session, a text conversation and a hosted API `tool` route alike, so
+ /// the vendor credential never leaves them. `auth` is the same vault
+ /// reference the `mcp` kind takes; a `bearer` or
+ /// `oauth2_client_credentials` auth requires `credential_id`, whose
+ /// credential must be of the matching kind. + ///
+#if NET6_0_OR_GREATER + public global::Speechify.OpenAPIToolConfig? OpenAPIToolConfig { get; init; } +#else + public global::Speechify.OpenAPIToolConfig? OpenAPIToolConfig { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OpenAPIToolConfig))] +#endif + public bool IsOpenAPIToolConfig => OpenAPIToolConfig != null; + + /// + /// + /// + public bool TryPickOpenAPIToolConfig( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Speechify.OpenAPIToolConfig? value) + { + value = OpenAPIToolConfig; + return IsOpenAPIToolConfig; + } + + /// + /// + /// + public global::Speechify.OpenAPIToolConfig PickOpenAPIToolConfig() => IsOpenAPIToolConfig + ? OpenAPIToolConfig! + : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAPIToolConfig' but the value was {ToString()}."); /// /// /// @@ -238,24 +289,50 @@ public UpdateToolRequestConfig(global::Speechify.MCPToolConfig? value) /// public static UpdateToolRequestConfig FromMCPToolConfig(global::Speechify.MCPToolConfig? value) => new UpdateToolRequestConfig(value); + /// + /// + /// + public static implicit operator UpdateToolRequestConfig(global::Speechify.OpenAPIToolConfig value) => new UpdateToolRequestConfig((global::Speechify.OpenAPIToolConfig?)value); + + /// + /// + /// + public static implicit operator global::Speechify.OpenAPIToolConfig?(UpdateToolRequestConfig @this) => @this.OpenAPIToolConfig; + + /// + /// + /// + public UpdateToolRequestConfig(global::Speechify.OpenAPIToolConfig? value) + { + OpenAPIToolConfig = value; + } + + /// + /// + /// + public static UpdateToolRequestConfig FromOpenAPIToolConfig(global::Speechify.OpenAPIToolConfig? value) => new UpdateToolRequestConfig(value); + /// /// /// public UpdateToolRequestConfig( global::Speechify.WebhookToolConfig? webhookToolConfig, global::Speechify.ClientToolConfig? clientToolConfig, - global::Speechify.MCPToolConfig? mCPToolConfig + global::Speechify.MCPToolConfig? mCPToolConfig, + global::Speechify.OpenAPIToolConfig? openAPIToolConfig ) { WebhookToolConfig = webhookToolConfig; ClientToolConfig = clientToolConfig; MCPToolConfig = mCPToolConfig; + OpenAPIToolConfig = openAPIToolConfig; } /// /// /// public object? Object => + OpenAPIToolConfig as object ?? MCPToolConfig as object ?? ClientToolConfig as object ?? WebhookToolConfig as object @@ -267,7 +344,8 @@ WebhookToolConfig as object public override string? ToString() => WebhookToolConfig?.ToString() ?? ClientToolConfig?.ToString() ?? - MCPToolConfig?.ToString() + MCPToolConfig?.ToString() ?? + OpenAPIToolConfig?.ToString() ; /// @@ -275,7 +353,7 @@ WebhookToolConfig as object /// public bool Validate() { - return IsWebhookToolConfig && !IsClientToolConfig && !IsMCPToolConfig || !IsWebhookToolConfig && IsClientToolConfig && !IsMCPToolConfig || !IsWebhookToolConfig && !IsClientToolConfig && IsMCPToolConfig; + return IsWebhookToolConfig && !IsClientToolConfig && !IsMCPToolConfig && !IsOpenAPIToolConfig || !IsWebhookToolConfig && IsClientToolConfig && !IsMCPToolConfig && !IsOpenAPIToolConfig || !IsWebhookToolConfig && !IsClientToolConfig && IsMCPToolConfig && !IsOpenAPIToolConfig || !IsWebhookToolConfig && !IsClientToolConfig && !IsMCPToolConfig && IsOpenAPIToolConfig; } /// @@ -285,6 +363,7 @@ public bool Validate() global::System.Func? webhookToolConfig = null, global::System.Func? clientToolConfig = null, global::System.Func? mCPToolConfig = null, + global::System.Func? openAPIToolConfig = null, bool validate = true) { if (validate) @@ -304,6 +383,10 @@ public bool Validate() { return mCPToolConfig(MCPToolConfig!); } + else if (IsOpenAPIToolConfig && openAPIToolConfig != null) + { + return openAPIToolConfig(OpenAPIToolConfig!); + } return default(TResult); } @@ -317,6 +400,8 @@ public void Match( global::System.Action? clientToolConfig = null, global::System.Action? mCPToolConfig = null, + + global::System.Action? openAPIToolConfig = null, bool validate = true) { if (validate) @@ -336,6 +421,10 @@ public void Match( { mCPToolConfig?.Invoke(MCPToolConfig!); } + else if (IsOpenAPIToolConfig) + { + openAPIToolConfig?.Invoke(OpenAPIToolConfig!); + } } /// @@ -345,6 +434,7 @@ public void Switch( global::System.Action? webhookToolConfig = null, global::System.Action? clientToolConfig = null, global::System.Action? mCPToolConfig = null, + global::System.Action? openAPIToolConfig = null, bool validate = true) { if (validate) @@ -364,6 +454,10 @@ public void Switch( { mCPToolConfig?.Invoke(MCPToolConfig!); } + else if (IsOpenAPIToolConfig) + { + openAPIToolConfig?.Invoke(OpenAPIToolConfig!); + } } /// @@ -379,6 +473,8 @@ public override int GetHashCode() typeof(global::Speechify.ClientToolConfig), MCPToolConfig, typeof(global::Speechify.MCPToolConfig), + OpenAPIToolConfig, + typeof(global::Speechify.OpenAPIToolConfig), }; const int offset = unchecked((int)2166136261); const int prime = 16777619; @@ -397,7 +493,8 @@ public bool Equals(UpdateToolRequestConfig other) return global::System.Collections.Generic.EqualityComparer.Default.Equals(WebhookToolConfig, other.WebhookToolConfig) && global::System.Collections.Generic.EqualityComparer.Default.Equals(ClientToolConfig, other.ClientToolConfig) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPToolConfig, other.MCPToolConfig) + global::System.Collections.Generic.EqualityComparer.Default.Equals(MCPToolConfig, other.MCPToolConfig) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(OpenAPIToolConfig, other.OpenAPIToolConfig) ; } diff --git a/src/libs/Speechify/Generated/Speechify.RoutesClient.CreateRoute.g.cs b/src/libs/Speechify/Generated/Speechify.RoutesClient.CreateRoute.g.cs index 392882ec..260a0a08 100644 --- a/src/libs/Speechify/Generated/Speechify.RoutesClient.CreateRoute.g.cs +++ b/src/libs/Speechify/Generated/Speechify.RoutesClient.CreateRoute.g.cs @@ -59,7 +59,13 @@ partial void ProcessCreateRouteResponseContent( /// never on a public API) and waits up to `wait_seconds` before answering
/// 202 with a handle to poll at `/_runs/{run_id}`; `file` serves one
/// published file, or a whole published tree when the path ends in `*`
- /// (`/app/*` with `file_root` and `file_index`). Where-clause values and
+ /// (`/app/*` with `file_root` and `file_index`); `tool` calls one read
+ /// operation of an `openapi` tool definition in the API's project whose
+ /// `approval` is null or `auto` (POST only, never on a public API, counted
+ /// against `daily_read_cap`): the
+ /// consumer's JSON body is the operation's arguments and the vendor's
+ /// answer, after the operation's `response` mapping, is the response.
+ /// Where-clause values and
/// the document id may be `{{query.x}}`, `{{path.x}}` or `{{body.x}}`
/// templates bound from the consumer's request, or `{{user.x}}` claims of
/// the verified caller on a `user_token`, `workspace` or `owner` API; a
@@ -69,6 +75,17 @@ partial void ProcessCreateRouteResponseContent( /// `{{user.*}}` on an API that names no caller, and a clause on
/// `user_identity` bound from a request template, which would let any
/// caller read any user's rows.
+ /// On an API with `mcp_enabled`, every enabled route except a `file`
+ /// route is also an MCP tool. The tool's name comes from the route's
+ /// `name`: every run of characters outside letters, digits, `_` and `-`
+ /// becomes `_`, leading and trailing `_` are dropped, and the result is
+ /// cut to 64 characters. A route with no name is listed under a name
+ /// built from its method and path (`post_issues_open`), and a name two
+ /// routes would share takes `_2`, `_3` in route order, so read the names
+ /// from the face's `tools/list` rather than deriving them. The route's
+ /// `description` is what the client's model reads to choose the tool,
+ /// falling back to the operation's summary on a `tool` route. Name and
+ /// describe a route for that reader.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). ///
/// @@ -113,7 +130,13 @@ partial void ProcessCreateRouteResponseContent( /// never on a public API) and waits up to `wait_seconds` before answering
/// 202 with a handle to poll at `/_runs/{run_id}`; `file` serves one
/// published file, or a whole published tree when the path ends in `*`
- /// (`/app/*` with `file_root` and `file_index`). Where-clause values and
+ /// (`/app/*` with `file_root` and `file_index`); `tool` calls one read
+ /// operation of an `openapi` tool definition in the API's project whose
+ /// `approval` is null or `auto` (POST only, never on a public API, counted
+ /// against `daily_read_cap`): the
+ /// consumer's JSON body is the operation's arguments and the vendor's
+ /// answer, after the operation's `response` mapping, is the response.
+ /// Where-clause values and
/// the document id may be `{{query.x}}`, `{{path.x}}` or `{{body.x}}`
/// templates bound from the consumer's request, or `{{user.x}}` claims of
/// the verified caller on a `user_token`, `workspace` or `owner` API; a
@@ -123,6 +146,17 @@ partial void ProcessCreateRouteResponseContent( /// `{{user.*}}` on an API that names no caller, and a clause on
/// `user_identity` bound from a request template, which would let any
/// caller read any user's rows.
+ /// On an API with `mcp_enabled`, every enabled route except a `file`
+ /// route is also an MCP tool. The tool's name comes from the route's
+ /// `name`: every run of characters outside letters, digits, `_` and `-`
+ /// becomes `_`, leading and trailing `_` are dropped, and the result is
+ /// cut to 64 characters. A route with no name is listed under a name
+ /// built from its method and path (`post_issues_open`), and a name two
+ /// routes would share takes `_2`, `_3` in route order, so read the names
+ /// from the face's `tools/list` rather than deriving them. The route's
+ /// `description` is what the client's model reads to choose the tool,
+ /// falling back to the operation's summary on a `tool` route. Name and
+ /// describe a route for that reader.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). ///
/// @@ -711,7 +745,13 @@ partial void ProcessCreateRouteResponseContent( /// never on a public API) and waits up to `wait_seconds` before answering
/// 202 with a handle to poll at `/_runs/{run_id}`; `file` serves one
/// published file, or a whole published tree when the path ends in `*`
- /// (`/app/*` with `file_root` and `file_index`). Where-clause values and
+ /// (`/app/*` with `file_root` and `file_index`); `tool` calls one read
+ /// operation of an `openapi` tool definition in the API's project whose
+ /// `approval` is null or `auto` (POST only, never on a public API, counted
+ /// against `daily_read_cap`): the
+ /// consumer's JSON body is the operation's arguments and the vendor's
+ /// answer, after the operation's `response` mapping, is the response.
+ /// Where-clause values and
/// the document id may be `{{query.x}}`, `{{path.x}}` or `{{body.x}}`
/// templates bound from the consumer's request, or `{{user.x}}` claims of
/// the verified caller on a `user_token`, `workspace` or `owner` API; a
@@ -721,6 +761,17 @@ partial void ProcessCreateRouteResponseContent( /// `{{user.*}}` on an API that names no caller, and a clause on
/// `user_identity` bound from a request template, which would let any
/// caller read any user's rows.
+ /// On an API with `mcp_enabled`, every enabled route except a `file`
+ /// route is also an MCP tool. The tool's name comes from the route's
+ /// `name`: every run of characters outside letters, digits, `_` and `-`
+ /// becomes `_`, leading and trailing `_` are dropped, and the result is
+ /// cut to 64 characters. A route with no name is listed under a name
+ /// built from its method and path (`post_issues_open`), and a name two
+ /// routes would share takes `_2`, `_3` in route order, so read the names
+ /// from the face's `tools/list` rather than deriving them. The route's
+ /// `description` is what the client's model reads to choose the tool,
+ /// falling back to the operation's summary on a `tool` route. Name and
+ /// describe a route for that reader.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). ///
/// @@ -730,10 +781,24 @@ partial void ProcessCreateRouteResponseContent( /// /// /// - /// Lowercase segments of letters, digits, `. _ -` or a `{param}`; `/openapi.json` and `/_runs` are reserved. + /// Lowercase segments of letters, digits, `. _ -` or a `{param}`; `/openapi.json`, `/_runs` and `/mcp` are reserved. + /// + /// + /// The route's name, 1-128 letters, digits, spaces, `.`, `_` or `-`.
+ /// On an API with `mcp_enabled` the MCP tool's name comes from it:
+ /// each run of other characters (a space included) becomes `_`,
+ /// leading and trailing `_` are dropped, and the result is cut to 64
+ /// characters. A route with no name is listed under a name built from
+ /// its method and path, and a name two routes would share takes `_2`,
+ /// `_3` in route order; the face's `tools/list` is the authority. Pick
+ /// a verb-first name a model can choose by. + /// + /// + /// What the route does. On an API with `mcp_enabled` it is the MCP
+ /// tool description a client's model reads to choose the tool, so say
+ /// what it returns and when to call it; a `tool` route with none falls
+ /// back to the operation's summary. /// - /// - /// /// /// What answers a route. `type` selects the fields that apply:
/// `store_query` (store_id, collection, where, order_by, limit),
@@ -749,7 +814,28 @@ partial void ProcessCreateRouteResponseContent( /// `run_latest` (trigger_id of a schedule trigger),
/// `run` (trigger_id of a webhook trigger, wait_seconds),
/// `file` (file_path of one published file; or, on a route whose path
- /// ends in `*`, file_root and file_index for a whole published tree). + /// ends in `*`, file_root and file_index for a whole published tree),
+ /// `tool` (tool_id of an `openapi` tool definition and the `operation`
+ /// on it: the POST body is the operation's arguments, held to its
+ /// argument schema, and the vendor's answer after the operation's
+ /// `response` mapping is the response, or `{"text": ...}` when the vendor
+ /// answered text. Only an operation whose effective class is `read`, on a
+ /// tool whose `approval` is null or `auto`, may be served, and never on a
+ /// public API; a route write that names anything else is refused with 400
+ /// `validation_failed` on `resolver.tool_id`. Because a definition can
+ /// change after its route is written, every call re-checks it: an
+ /// operation no longer classified `read`, or a tool whose `approval` is no
+ /// longer null or `auto`, answers 403 `route_tool_not_readable`; a tool
+ /// deleted, moved to another project, no longer of kind `openapi` or
+ /// without the operation answers 409 `route_tool_unavailable`, which no
+ /// retry clears until the route or the tool is fixed. Arguments that do
+ /// not fit the schema answer 400 `validation_failed`; the definition's
+ /// `max_requests_per_minute` and the vendor's own throttle both answer 429
+ /// `route_upstream_rate_limited` with `Retry-After`; a vendor error
+ /// answers 502 `route_upstream_error` with the vendor's status in
+ /// `error.details.upstream_status`, and an unreachable vendor or a
+ /// credential that no longer resolves answers 502 `route_upstream_error`
+ /// without it). /// /// /// diff --git a/src/libs/Speechify/Generated/Speechify.RoutesClient.UpdateRoute.g.cs b/src/libs/Speechify/Generated/Speechify.RoutesClient.UpdateRoute.g.cs index 84b9826b..4c9702c4 100644 --- a/src/libs/Speechify/Generated/Speechify.RoutesClient.UpdateRoute.g.cs +++ b/src/libs/Speechify/Generated/Speechify.RoutesClient.UpdateRoute.g.cs @@ -663,8 +663,22 @@ partial void ProcessUpdateRouteResponseContent( /// /// /// - /// - /// + /// + /// The route's name, 1-128 letters, digits, spaces, `.`, `_` or `-`.
+ /// On an API with `mcp_enabled` the MCP tool's name comes from it:
+ /// each run of other characters (a space included) becomes `_`,
+ /// leading and trailing `_` are dropped, and the result is cut to 64
+ /// characters. A route with no name is listed under a name built from
+ /// its method and path, and a name two routes would share takes `_2`,
+ /// `_3` in route order; the face's `tools/list` is the authority. Pick
+ /// a verb-first name a model can choose by. + /// + /// + /// What the route does. On an API with `mcp_enabled` it is the MCP
+ /// tool description a client's model reads to choose the tool, so say
+ /// what it returns and when to call it; a `tool` route with none falls
+ /// back to the operation's summary. + /// /// /// What answers a route. `type` selects the fields that apply:
/// `store_query` (store_id, collection, where, order_by, limit),
@@ -680,7 +694,28 @@ partial void ProcessUpdateRouteResponseContent( /// `run_latest` (trigger_id of a schedule trigger),
/// `run` (trigger_id of a webhook trigger, wait_seconds),
/// `file` (file_path of one published file; or, on a route whose path
- /// ends in `*`, file_root and file_index for a whole published tree). + /// ends in `*`, file_root and file_index for a whole published tree),
+ /// `tool` (tool_id of an `openapi` tool definition and the `operation`
+ /// on it: the POST body is the operation's arguments, held to its
+ /// argument schema, and the vendor's answer after the operation's
+ /// `response` mapping is the response, or `{"text": ...}` when the vendor
+ /// answered text. Only an operation whose effective class is `read`, on a
+ /// tool whose `approval` is null or `auto`, may be served, and never on a
+ /// public API; a route write that names anything else is refused with 400
+ /// `validation_failed` on `resolver.tool_id`. Because a definition can
+ /// change after its route is written, every call re-checks it: an
+ /// operation no longer classified `read`, or a tool whose `approval` is no
+ /// longer null or `auto`, answers 403 `route_tool_not_readable`; a tool
+ /// deleted, moved to another project, no longer of kind `openapi` or
+ /// without the operation answers 409 `route_tool_unavailable`, which no
+ /// retry clears until the route or the tool is fixed. Arguments that do
+ /// not fit the schema answer 400 `validation_failed`; the definition's
+ /// `max_requests_per_minute` and the vendor's own throttle both answer 429
+ /// `route_upstream_rate_limited` with `Retry-After`; a vendor error
+ /// answers 502 `route_upstream_error` with the vendor's status in
+ /// `error.details.upstream_status`, and an unreachable vendor or a
+ /// credential that no longer resolves answers 502 `route_upstream_error`
+ /// without it). /// /// /// diff --git a/src/libs/Speechify/Generated/Speechify.ShareLinksClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.ShareLinksClient.Create.g.cs index 47fa17f5..4bc8f4b5 100644 --- a/src/libs/Speechify/Generated/Speechify.ShareLinksClient.Create.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ShareLinksClient.Create.g.cs @@ -721,8 +721,8 @@ partial void ProcessCreateResponseContent( /// /// Tools to opt this link into, by id — the same `tool_…` ids
/// `listAgentTools` returns. Omit for the default posture (call
- /// controls and knowledge search only). Opting a webhook or MCP
- /// tool in lets a stranger drive it, so it is an explicit act
+ /// controls and knowledge search only). Opting a webhook, MCP or
+ /// OpenAPI tool in lets a stranger drive it, so it is an explicit act
/// rather than something inherited from the agent. Every id must
/// name a tool attached to this agent; anything else is a 400. /// diff --git a/src/libs/Speechify/Generated/Speechify.SkillsClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.SkillsClient.Create.g.cs index 550503e8..73913128 100644 --- a/src/libs/Speechify/Generated/Speechify.SkillsClient.Create.g.cs +++ b/src/libs/Speechify/Generated/Speechify.SkillsClient.Create.g.cs @@ -679,7 +679,15 @@ partial void ProcessCreateResponseContent( /// every agent that attaches it, so the limit is a per-turn token bill
/// rather than a storage bound. /// - /// + /// + /// Tool definitions (`tool_...`) the skill contributes to every agent
+ /// that attaches it, unioned with the agent's own tools: any kind a
+ /// `POST /v1/agents/tool-definitions` create makes (`webhook`,
+ /// `client`, `mcp` or `openapi`, where an `openapi` tool contributes
+ /// each of its operations). The tools do not have to be attached to
+ /// the agent; an attach is refused with 409 `skill_tool_name_conflict`
+ /// when one of their names collides with a tool the agent already has. + /// /// /// /// Default token values. Keys in the reserved `system__` namespace are refused. diff --git a/src/libs/Speechify/Generated/Speechify.SkillsClient.Update.g.cs b/src/libs/Speechify/Generated/Speechify.SkillsClient.Update.g.cs index d9a4344a..c2407927 100644 --- a/src/libs/Speechify/Generated/Speechify.SkillsClient.Update.g.cs +++ b/src/libs/Speechify/Generated/Speechify.SkillsClient.Update.g.cs @@ -672,7 +672,16 @@ partial void ProcessUpdateResponseContent( /// /// /// - /// + /// + /// Replaces the skill's tool definitions and mints a new version.
+ /// Tool definitions (`tool_...`) the skill contributes to every agent
+ /// that attaches it, unioned with the agent's own tools: any kind a
+ /// `POST /v1/agents/tool-definitions` create makes (`webhook`,
+ /// `client`, `mcp` or `openapi`, where an `openapi` tool contributes
+ /// each of its operations). The tools do not have to be attached to
+ /// the agent; an attach is refused with 409 `skill_tool_name_conflict`
+ /// when one of their names collides with a tool the agent already has. + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Speechify/Generated/Speechify.SpeechifyClient.g.cs b/src/libs/Speechify/Generated/Speechify.SpeechifyClient.g.cs index 0084505b..ae0d3e43 100644 --- a/src/libs/Speechify/Generated/Speechify.SpeechifyClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.SpeechifyClient.g.cs @@ -150,6 +150,16 @@ public sealed partial class SpeechifyClient : global::Speechify.ISpeechifyClient JsonSerializerContextProvider = JsonSerializerContextProvider, }; + /// + /// + /// + public CredentialsClient Credentials => new CredentialsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) + { + ReadResponseAsString = ReadResponseAsString, + CreateIdempotencyKey = CreateIdempotencyKey, + JsonSerializerContextProvider = JsonSerializerContextProvider, + }; + /// /// /// diff --git a/src/libs/Speechify/Generated/Speechify.ToolDefinitions.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.ToolDefinitions.JsonSerializerContext.g.cs index a80a1feb..8cd069c5 100644 --- a/src/libs/Speechify/Generated/Speechify.ToolDefinitions.JsonSerializerContext.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ToolDefinitions.JsonSerializerContext.g.cs @@ -50,8 +50,19 @@ namespace Speechify [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthDiscriminator))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthDiscriminatorType), TypeInfoPropertyName = "MCPAuthDiscriminatorType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolActionClass), TypeInfoPropertyName = "ToolActionClass2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolResponseMapping))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPToolConfig))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenApiOperationMethod), TypeInfoPropertyName = "OpenApiOperationMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenApiParamIn), TypeInfoPropertyName = "OpenApiParamIn2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenAPIParam))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenApiBodyContentType), TypeInfoPropertyName = "OpenApiBodyContentType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenAPIBody))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenAPIOperation))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenAPIToolConfig))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolApprovalClass), TypeInfoPropertyName = "ToolApprovalClass2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolReach), TypeInfoPropertyName = "ToolReach2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] @@ -79,6 +90,15 @@ namespace Speechify [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestWebhookConnectionRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.WebhookProbeResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ImportOpenApiRequestSpec), TypeInfoPropertyName = "ImportOpenApiRequestSpec2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ImportOpenAPIRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ImportedOpenAPIDocument))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SkippedOpenAPIOperation))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ImportOpenAPIResult))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestOpenAPICallRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestOpenApiCallResultOutcome), TypeInfoPropertyName = "TestOpenApiCallResultOutcome2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TestOpenAPICallResult))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(long?))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ErrorCode?), TypeInfoPropertyName = "NullableErrorCode2")] @@ -96,6 +116,9 @@ namespace Speechify [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthVariant3Type?), TypeInfoPropertyName = "NullableMCPAuthVariant3Type2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.MCPAuthDiscriminatorType?), TypeInfoPropertyName = "NullableMCPAuthDiscriminatorType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolActionClass?), TypeInfoPropertyName = "NullableToolActionClass2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenApiOperationMethod?), TypeInfoPropertyName = "NullableOpenApiOperationMethod2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenApiParamIn?), TypeInfoPropertyName = "NullableOpenApiParamIn2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.OpenApiBodyContentType?), TypeInfoPropertyName = "NullableOpenApiBodyContentType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolApprovalClass?), TypeInfoPropertyName = "NullableToolApprovalClass2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolReach?), TypeInfoPropertyName = "NullableToolReach2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ToolNameHolderKind?), TypeInfoPropertyName = "NullableToolNameHolderKind2")] @@ -103,12 +126,17 @@ namespace Speechify [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.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")] [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))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] internal sealed partial class ToolDefinitionsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext { } @@ -157,6 +185,7 @@ public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options.Converters.Add(new global::Speechify.JsonConverters.ToolConfigJsonConverter()); options.Converters.Add(new global::Speechify.JsonConverters.CreateToolRequestConfigJsonConverter()); options.Converters.Add(new global::Speechify.JsonConverters.UpdateToolRequestConfigJsonConverter()); + options.Converters.Add(new global::Speechify.JsonConverters.ImportOpenApiRequestSpecJsonConverter()); options.Converters.Add(new global::Speechify.JsonConverters.UnixTimestampJsonConverter()); options.Converters.Add(new LazyEnumJsonConverterFactory()); } @@ -227,6 +256,18 @@ public override bool CanConvert(global::System.Type typeToConvert) || typeToConvert == typeof(global::Speechify.ToolActionClass?) + || typeToConvert == typeof(global::Speechify.OpenApiOperationMethod) + + || typeToConvert == typeof(global::Speechify.OpenApiOperationMethod?) + + || typeToConvert == typeof(global::Speechify.OpenApiParamIn) + + || typeToConvert == typeof(global::Speechify.OpenApiParamIn?) + + || typeToConvert == typeof(global::Speechify.OpenApiBodyContentType) + + || typeToConvert == typeof(global::Speechify.OpenApiBodyContentType?) + || typeToConvert == typeof(global::Speechify.ToolApprovalClass) || typeToConvert == typeof(global::Speechify.ToolApprovalClass?) @@ -241,7 +282,11 @@ public override bool CanConvert(global::System.Type typeToConvert) || typeToConvert == typeof(global::Speechify.McpProbeErrorDetailsStage) - || typeToConvert == typeof(global::Speechify.McpProbeErrorDetailsStage?); + || typeToConvert == typeof(global::Speechify.McpProbeErrorDetailsStage?) + + || typeToConvert == typeof(global::Speechify.TestOpenApiCallResultOutcome) + + || typeToConvert == typeof(global::Speechify.TestOpenApiCallResultOutcome?); } public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( @@ -368,6 +413,36 @@ public override bool CanConvert(global::System.Type typeToConvert) return new global::Speechify.JsonConverters.ToolActionClassNullableJsonConverter(); } + if (typeToConvert == typeof(global::Speechify.OpenApiOperationMethod)) + { + return new global::Speechify.JsonConverters.OpenApiOperationMethodJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.OpenApiOperationMethod?)) + { + return new global::Speechify.JsonConverters.OpenApiOperationMethodNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.OpenApiParamIn)) + { + return new global::Speechify.JsonConverters.OpenApiParamInJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.OpenApiParamIn?)) + { + return new global::Speechify.JsonConverters.OpenApiParamInNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.OpenApiBodyContentType)) + { + return new global::Speechify.JsonConverters.OpenApiBodyContentTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.OpenApiBodyContentType?)) + { + return new global::Speechify.JsonConverters.OpenApiBodyContentTypeNullableJsonConverter(); + } + if (typeToConvert == typeof(global::Speechify.ToolApprovalClass)) { return new global::Speechify.JsonConverters.ToolApprovalClassJsonConverter(); @@ -407,6 +482,16 @@ public override bool CanConvert(global::System.Type typeToConvert) { return new global::Speechify.JsonConverters.McpProbeErrorDetailsStageNullableJsonConverter(); } + + if (typeToConvert == typeof(global::Speechify.TestOpenApiCallResultOutcome)) + { + return new global::Speechify.JsonConverters.TestOpenApiCallResultOutcomeJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.TestOpenApiCallResultOutcome?)) + { + return new global::Speechify.JsonConverters.TestOpenApiCallResultOutcomeNullableJsonConverter(); + } throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); } } diff --git a/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.Create.g.cs index 6dbb2659..61579802 100644 --- a/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.Create.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.Create.g.cs @@ -46,8 +46,20 @@ partial void ProcessCreateResponseContent( /// /// Create Tool
/// Create a tool. For webhook tools, the response includes the HMAC
- /// `webhook_secret` exactly once — store it immediately; subsequent
+ /// `webhook_secret` exactly once - store it immediately; subsequent
/// reads return a masked placeholder.
+ /// An `mcp` or `openapi` tool that authenticates references a vault
+ /// credential by `auth.credential_id`: create it first with
+ /// `POST /v1/credentials`. For an `mcp` tool,
+ /// `POST /v1/agents/tool-definitions/test-mcp-connection` lists the
+ /// server's tools before you save. For an `openapi` tool, compile the
+ /// vendor's document with
+ /// `POST /v1/agents/tool-definitions/import-openapi`, choose and classify
+ /// the operations the agent needs, preview one with
+ /// `POST /v1/agents/tool-definitions/test-openapi-call`, then send the
+ /// chosen operations here. The tool is usable once it is attached to an
+ /// agent (`PUT /v1/agents/{agent_id}/tools/{tool_id}`) or named in a
+ /// skill's `tool_ids`.
/// A field this endpoint does not define is refused with `400
/// validation_failed` naming every unknown field, rather than accepted
/// and silently dropped.
@@ -80,8 +92,20 @@ partial void ProcessCreateResponseContent( /// /// Create Tool
/// Create a tool. For webhook tools, the response includes the HMAC
- /// `webhook_secret` exactly once — store it immediately; subsequent
+ /// `webhook_secret` exactly once - store it immediately; subsequent
/// reads return a masked placeholder.
+ /// An `mcp` or `openapi` tool that authenticates references a vault
+ /// credential by `auth.credential_id`: create it first with
+ /// `POST /v1/credentials`. For an `mcp` tool,
+ /// `POST /v1/agents/tool-definitions/test-mcp-connection` lists the
+ /// server's tools before you save. For an `openapi` tool, compile the
+ /// vendor's document with
+ /// `POST /v1/agents/tool-definitions/import-openapi`, choose and classify
+ /// the operations the agent needs, preview one with
+ /// `POST /v1/agents/tool-definitions/test-openapi-call`, then send the
+ /// chosen operations here. The tool is usable once it is attached to an
+ /// agent (`PUT /v1/agents/{agent_id}/tools/{tool_id}`) or named in a
+ /// skill's `tool_ids`.
/// A field this endpoint does not define is refused with `400
/// validation_failed` naming every unknown field, rather than accepted
/// and silently dropped.
@@ -578,8 +602,20 @@ partial void ProcessCreateResponseContent( /// /// Create Tool
/// Create a tool. For webhook tools, the response includes the HMAC
- /// `webhook_secret` exactly once — store it immediately; subsequent
+ /// `webhook_secret` exactly once - store it immediately; subsequent
/// reads return a masked placeholder.
+ /// An `mcp` or `openapi` tool that authenticates references a vault
+ /// credential by `auth.credential_id`: create it first with
+ /// `POST /v1/credentials`. For an `mcp` tool,
+ /// `POST /v1/agents/tool-definitions/test-mcp-connection` lists the
+ /// server's tools before you save. For an `openapi` tool, compile the
+ /// vendor's document with
+ /// `POST /v1/agents/tool-definitions/import-openapi`, choose and classify
+ /// the operations the agent needs, preview one with
+ /// `POST /v1/agents/tool-definitions/test-openapi-call`, then send the
+ /// chosen operations here. The tool is usable once it is attached to an
+ /// agent (`PUT /v1/agents/{agent_id}/tools/{tool_id}`) or named in a
+ /// skill's `tool_ids`.
/// A field this endpoint does not define is refused with `400
/// validation_failed` naming every unknown field, rather than accepted
/// and silently dropped.
@@ -600,14 +636,18 @@ partial void ProcessCreateResponseContent( /// - `builtin`: a worker-resident platform capability (e.g. end_call, play_audio), configured per-agent
/// - `webhook`: worker signs a payload and POSTs it to your URL
/// - `client`: worker dispatches to the caller's browser/SDK via data channel
- /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls + /// - `mcp`: worker connects to a customer-hosted MCP server and proxies tool calls
+ /// - `openapi`: a REST API described by its OpenAPI document, pinned to the operations you selected; the control plane executes every call /// /// /// /// The impact class. Omit it and the tool's impact is read off its
/// shape instead, and keeps tracking it: a `GET` webhook reads, a
- /// `POST` webhook reaches outside your team, an MCP or client tool can
- /// do anything its author wired.
+ /// `POST` webhook reaches outside your team, an MCP, client or OpenAPI
+ /// tool can do anything its author wired.
+ /// On an OpenAPI tool it is the class of every operation that declares
+ /// none of its own and is not a GET or HEAD; classify operations one by
+ /// one with `OpenAPIOperation.action_class` instead of setting it here.
/// On an MCP tool it is also the ceiling for what the server may claim
/// about its own tools: a class a `tools/list` entry declares under
/// `_meta["speechify/action_class"]` is honoured when it is at least
diff --git a/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.ImportOpenAPI.g.cs b/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.ImportOpenAPI.g.cs new file mode 100644 index 00000000..faffc7c5 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.ImportOpenAPI.g.cs @@ -0,0 +1,721 @@ + +#nullable enable + +namespace Speechify +{ + public partial class ToolDefinitionsClient + { + + + private static readonly global::Speechify.EndPointSecurityRequirement s_ImportOpenAPISecurityRequirement0 = + 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_ImportOpenAPISecurityRequirements = + new global::Speechify.EndPointSecurityRequirement[] + { s_ImportOpenAPISecurityRequirement0, + }; + partial void PrepareImportOpenAPIArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? speechifyVersion, + global::Speechify.ImportOpenAPIRequest request); + partial void PrepareImportOpenAPIRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? speechifyVersion, + global::Speechify.ImportOpenAPIRequest request); + partial void ProcessImportOpenAPIResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessImportOpenAPIResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Import OpenAPI Operations
+ /// Compile a vendor's OpenAPI 3.x document into the operations an
+ /// `openapi` tool can carry, without persisting anything. It is the
+ /// second step of connecting a REST API: store the vendor credential
+ /// with `POST /v1/credentials`, import the document here, choose and
+ /// classify the operations the agent needs, preview one with
+ /// `POST /v1/agents/tool-definitions/test-openapi-call`, then create the
+ /// tool with `POST /v1/agents/tool-definitions`.
+ /// Pass the document by `spec_url` (an https URL fetched server-side,
+ /// with the headers of the credential `auth` names when the document
+ /// sits behind the vendor's own auth) or inline as `spec`, never both.
+ /// Each entry of `operations` is already in the shape
+ /// `OpenAPIToolConfig.operations` takes, in document order: copy the ones
+ /// the agent should have (at most 40 per tool), and add `action_class`
+ /// and `response` where you need them. Use each returned `id` verbatim
+ /// rather than deriving it: it is the document's operationId made safe
+ /// for a function name (a run of other characters becomes one `_`, a
+ /// leading digit gains `op_`, at most 64 characters), or a name built
+ /// from the method and path when the document has none, and an id two
+ /// operations would share takes a numeric suffix. You may rename an id
+ /// before saving. The agent calls each operation as
+ /// `<tool name>__<id>`, which must fit 64 characters, so shorten the tool
+ /// name or rename the id when it does not. `skipped` lists every
+ /// operation that could not be represented, with the reason.
+ /// The document's security schemes are not imported: the tool's own
+ /// `auth` is `none`, `bearer` or `oauth2_client_credentials`. Never
+ /// select an API key the document declares as a header or query
+ /// parameter as a parameter, since the agent would have to supply its
+ /// value.
+ /// A refused `spec_url`, a credential that does not resolve or cannot
+ /// mint a token, a fetch that fails and a document that does not parse
+ /// all answer 200 with `error` set and `operations` empty. Only a
+ /// malformed request is a 400: neither or both of `spec` and `spec_url`,
+ /// or a field this endpoint does not define, which is refused naming
+ /// every unknown field.
+ /// Needs the `content.manage` permission, as creating a tool does: the
+ /// fetch sends a referenced credential's headers to `spec_url`. + ///
+ /// + /// + /// 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 ImportOpenAPIAsync( + + global::Speechify.ImportOpenAPIRequest request, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ImportOpenAPIAsResponseAsync( + + request: request, + speechifyVersion: speechifyVersion, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Import OpenAPI Operations
+ /// Compile a vendor's OpenAPI 3.x document into the operations an
+ /// `openapi` tool can carry, without persisting anything. It is the
+ /// second step of connecting a REST API: store the vendor credential
+ /// with `POST /v1/credentials`, import the document here, choose and
+ /// classify the operations the agent needs, preview one with
+ /// `POST /v1/agents/tool-definitions/test-openapi-call`, then create the
+ /// tool with `POST /v1/agents/tool-definitions`.
+ /// Pass the document by `spec_url` (an https URL fetched server-side,
+ /// with the headers of the credential `auth` names when the document
+ /// sits behind the vendor's own auth) or inline as `spec`, never both.
+ /// Each entry of `operations` is already in the shape
+ /// `OpenAPIToolConfig.operations` takes, in document order: copy the ones
+ /// the agent should have (at most 40 per tool), and add `action_class`
+ /// and `response` where you need them. Use each returned `id` verbatim
+ /// rather than deriving it: it is the document's operationId made safe
+ /// for a function name (a run of other characters becomes one `_`, a
+ /// leading digit gains `op_`, at most 64 characters), or a name built
+ /// from the method and path when the document has none, and an id two
+ /// operations would share takes a numeric suffix. You may rename an id
+ /// before saving. The agent calls each operation as
+ /// `<tool name>__<id>`, which must fit 64 characters, so shorten the tool
+ /// name or rename the id when it does not. `skipped` lists every
+ /// operation that could not be represented, with the reason.
+ /// The document's security schemes are not imported: the tool's own
+ /// `auth` is `none`, `bearer` or `oauth2_client_credentials`. Never
+ /// select an API key the document declares as a header or query
+ /// parameter as a parameter, since the agent would have to supply its
+ /// value.
+ /// A refused `spec_url`, a credential that does not resolve or cannot
+ /// mint a token, a fetch that fails and a document that does not parse
+ /// all answer 200 with `error` set and `operations` empty. Only a
+ /// malformed request is a 400: neither or both of `spec` and `spec_url`,
+ /// or a field this endpoint does not define, which is refused naming
+ /// every unknown field.
+ /// Needs the `content.manage` permission, as creating a tool does: the
+ /// fetch sends a referenced credential's headers to `spec_url`. + ///
+ /// + /// + /// 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> ImportOpenAPIAsResponseAsync( + + global::Speechify.ImportOpenAPIRequest request, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareImportOpenAPIArguments( + httpClient: HttpClient, + speechifyVersion: ref speechifyVersion, + request: request); + + + var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ImportOpenAPISecurityRequirements, + operationName: "ImportOpenAPIAsync"); + + 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/import-openapi", + baseUri: HttpClient.BaseAddress); + 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.Post, + 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()); + } + + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareImportOpenAPIRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + speechifyVersion: speechifyVersion, + request: request); + + 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: "ImportOpenAPI", + methodName: "ImportOpenAPIAsync", + pathTemplate: "\"/v1/agents/tool-definitions/import-openapi\"", + httpMethod: "POST", + 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: "ImportOpenAPI", + methodName: "ImportOpenAPIAsync", + pathTemplate: "\"/v1/agents/tool-definitions/import-openapi\"", + httpMethod: "POST", + 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: "ImportOpenAPI", + methodName: "ImportOpenAPIAsync", + pathTemplate: "\"/v1/agents/tool-definitions/import-openapi\"", + httpMethod: "POST", + 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); + ProcessImportOpenAPIResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportOpenAPI", + methodName: "ImportOpenAPIAsync", + pathTemplate: "\"/v1/agents/tool-definitions/import-openapi\"", + httpMethod: "POST", + 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: "ImportOpenAPI", + methodName: "ImportOpenAPIAsync", + pathTemplate: "\"/v1/agents/tool-definitions/import-openapi\"", + httpMethod: "POST", + 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 credential authenticated, but is not authorised for this resource - typically a workspace-role gate (owner / admin required) or a cross-tenant access attempt. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Speechify.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Speechify.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Speechify.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + 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); + ProcessImportOpenAPIResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Speechify.ImportOpenAPIResult.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.ImportOpenAPIResult.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(); + } + } + /// + /// Import OpenAPI Operations
+ /// Compile a vendor's OpenAPI 3.x document into the operations an
+ /// `openapi` tool can carry, without persisting anything. It is the
+ /// second step of connecting a REST API: store the vendor credential
+ /// with `POST /v1/credentials`, import the document here, choose and
+ /// classify the operations the agent needs, preview one with
+ /// `POST /v1/agents/tool-definitions/test-openapi-call`, then create the
+ /// tool with `POST /v1/agents/tool-definitions`.
+ /// Pass the document by `spec_url` (an https URL fetched server-side,
+ /// with the headers of the credential `auth` names when the document
+ /// sits behind the vendor's own auth) or inline as `spec`, never both.
+ /// Each entry of `operations` is already in the shape
+ /// `OpenAPIToolConfig.operations` takes, in document order: copy the ones
+ /// the agent should have (at most 40 per tool), and add `action_class`
+ /// and `response` where you need them. Use each returned `id` verbatim
+ /// rather than deriving it: it is the document's operationId made safe
+ /// for a function name (a run of other characters becomes one `_`, a
+ /// leading digit gains `op_`, at most 64 characters), or a name built
+ /// from the method and path when the document has none, and an id two
+ /// operations would share takes a numeric suffix. You may rename an id
+ /// before saving. The agent calls each operation as
+ /// `<tool name>__<id>`, which must fit 64 characters, so shorten the tool
+ /// name or rename the id when it does not. `skipped` lists every
+ /// operation that could not be represented, with the reason.
+ /// The document's security schemes are not imported: the tool's own
+ /// `auth` is `none`, `bearer` or `oauth2_client_credentials`. Never
+ /// select an API key the document declares as a header or query
+ /// parameter as a parameter, since the agent would have to supply its
+ /// value.
+ /// A refused `spec_url`, a credential that does not resolve or cannot
+ /// mint a token, a fetch that fails and a document that does not parse
+ /// all answer 200 with `error` set and `operations` empty. Only a
+ /// malformed request is a 400: neither or both of `spec` and `spec_url`,
+ /// or a field this endpoint does not define, which is refused naming
+ /// every unknown field.
+ /// Needs the `content.manage` permission, as creating a tool does: the
+ /// fetch sends a referenced credential's headers to `spec_url`. + ///
+ /// + /// + /// An https URL the server fetches the document from, with the headers
+ /// of the credential `auth` names when it names one. A private or
+ /// loopback address is refused. At most 2 MiB. Keep it as the tool's
+ /// `spec_url` so a later import can refresh the operations. + /// + /// + /// The document inline: a JSON object, or a string holding the JSON
+ /// or YAML text. At most 2 MiB. + /// + /// + /// How the platform authenticates to an MCP server or an OpenAPI tool's
+ /// REST API: `none`, `bearer` or `oauth2_client_credentials`, a
+ /// discriminated union over `type`. Other credential kinds (an API key
+ /// in a custom header or query parameter, HTTP Basic) are not supported
+ /// here. + /// + /// + /// Overrides the document's `servers` in the result's `base_url`: the
+ /// regional or tenant host this workspace signed up to. The create
+ /// endpoint requires https. + /// + /// 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 ImportOpenAPIAsync( + string? speechifyVersion = default, + string? specUrl = default, + global::Speechify.ImportOpenApiRequestSpec? spec = default, + global::Speechify.MCPAuth? auth = default, + string? baseUrl = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Speechify.ImportOpenAPIRequest + { + SpecUrl = specUrl, + Spec = spec, + Auth = auth, + BaseUrl = baseUrl, + }; + + return await ImportOpenAPIAsync( + speechifyVersion: speechifyVersion, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.TestMCPConnection.g.cs b/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.TestMCPConnection.g.cs index 8d447fdc..73e06ff4 100644 --- a/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.TestMCPConnection.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.TestMCPConnection.g.cs @@ -52,6 +52,8 @@ partial void ProcessTestMCPConnectionResponseContent( /// `tool_id` from the edit-form flow when the auth payload carries
/// `_set` markers but no plaintext, so the server can hydrate the
/// stored secret from the encrypted column before probing.
+ /// Needs the `content.manage` permission, as creating a tool does: the
+ /// probe sends a referenced credential to the endpoint in the request.
/// A field this endpoint does not define is refused with `400
/// validation_failed` naming every unknown field, rather than accepted
/// and silently dropped. @@ -87,6 +89,8 @@ partial void ProcessTestMCPConnectionResponseContent( /// `tool_id` from the edit-form flow when the auth payload carries
/// `_set` markers but no plaintext, so the server can hydrate the
/// stored secret from the encrypted column before probing.
+ /// Needs the `content.manage` permission, as creating a tool does: the
+ /// probe sends a referenced credential to the endpoint in the request.
/// A field this endpoint does not define is refused with `400
/// validation_failed` naming every unknown field, rather than accepted
/// and silently dropped. @@ -444,6 +448,43 @@ partial void ProcessTestMCPConnectionResponseContent( h => h.Key, h => h.Value)); } + // The credential authenticated, but is not authorised for this resource - typically a workspace-role gate (owner / admin required) or a cross-tenant access attempt. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Speechify.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Speechify.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Speechify.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } if (__effectiveReadResponseAsString) { @@ -549,6 +590,8 @@ partial void ProcessTestMCPConnectionResponseContent( /// `tool_id` from the edit-form flow when the auth payload carries
/// `_set` markers but no plaintext, so the server can hydrate the
/// stored secret from the encrypted column before probing.
+ /// Needs the `content.manage` permission, as creating a tool does: the
+ /// probe sends a referenced credential to the endpoint in the request.
/// A field this endpoint does not define is refused with `400
/// validation_failed` naming every unknown field, rather than accepted
/// and silently dropped. diff --git a/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.TestOpenAPICall.g.cs b/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.TestOpenAPICall.g.cs new file mode 100644 index 00000000..cfe44b53 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.TestOpenAPICall.g.cs @@ -0,0 +1,714 @@ + +#nullable enable + +namespace Speechify +{ + public partial class ToolDefinitionsClient + { + + + private static readonly global::Speechify.EndPointSecurityRequirement s_TestOpenAPICallSecurityRequirement0 = + 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_TestOpenAPICallSecurityRequirements = + new global::Speechify.EndPointSecurityRequirement[] + { s_TestOpenAPICallSecurityRequirement0, + }; + partial void PrepareTestOpenAPICallArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? speechifyVersion, + global::Speechify.TestOpenAPICallRequest request); + partial void PrepareTestOpenAPICallRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? speechifyVersion, + global::Speechify.TestOpenAPICallRequest request); + partial void ProcessTestOpenAPICallResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessTestOpenAPICallResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Test OpenAPI Operation
+ /// Call one operation of an `openapi` tool config that is not saved yet,
+ /// through the same path a run and a live session execute it, and answer
+ /// what the agent would read. Use it after
+ /// `POST /v1/agents/tool-definitions/import-openapi` and before
+ /// `POST /v1/agents/tool-definitions`, to check that the arguments reach
+ /// the vendor and that a `pick` / `derive` / `max_items` mapping keeps
+ /// what the agent needs.
+ /// Read the result in this order. `error` is set only when no call was
+ /// made: a config the create endpoint would refuse, an operation the
+ /// config does not have, a write operation, or a credential that does not
+ /// resolve or cannot mint a token. Otherwise `outcome` says how the call
+ /// ended, and only `ok` is a preview that worked. On `ok` with a JSON answer, `raw` is the
+ /// vendor's answer and `mapped` is the same answer after the operation's
+ /// `response` mapping, so one call shows both sides; `observation` is
+ /// what the agent reads, trimmed to its observation window.
+ /// Only a read operation runs (declared `read`, or a GET or HEAD that
+ /// declares no class): nobody approves a test call, so a write is
+ /// answered with `error` set and never reaches the vendor. Nothing is
+ /// persisted and the tool's own `max_requests_per_minute` does not apply,
+ /// but the call does reach the vendor and counts against the vendor's
+ /// own limits. It acts with a workspace credential, so it needs the
+ /// `content.manage` permission a tool create does.
+ /// A malformed request is a 400: a missing `operation`, `arguments` that
+ /// are not an object, or a field this endpoint does not define, which is
+ /// refused naming every unknown field. + ///
+ /// + /// + /// 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 TestOpenAPICallAsync( + + global::Speechify.TestOpenAPICallRequest request, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await TestOpenAPICallAsResponseAsync( + + request: request, + speechifyVersion: speechifyVersion, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Test OpenAPI Operation
+ /// Call one operation of an `openapi` tool config that is not saved yet,
+ /// through the same path a run and a live session execute it, and answer
+ /// what the agent would read. Use it after
+ /// `POST /v1/agents/tool-definitions/import-openapi` and before
+ /// `POST /v1/agents/tool-definitions`, to check that the arguments reach
+ /// the vendor and that a `pick` / `derive` / `max_items` mapping keeps
+ /// what the agent needs.
+ /// Read the result in this order. `error` is set only when no call was
+ /// made: a config the create endpoint would refuse, an operation the
+ /// config does not have, a write operation, or a credential that does not
+ /// resolve or cannot mint a token. Otherwise `outcome` says how the call
+ /// ended, and only `ok` is a preview that worked. On `ok` with a JSON answer, `raw` is the
+ /// vendor's answer and `mapped` is the same answer after the operation's
+ /// `response` mapping, so one call shows both sides; `observation` is
+ /// what the agent reads, trimmed to its observation window.
+ /// Only a read operation runs (declared `read`, or a GET or HEAD that
+ /// declares no class): nobody approves a test call, so a write is
+ /// answered with `error` set and never reaches the vendor. Nothing is
+ /// persisted and the tool's own `max_requests_per_minute` does not apply,
+ /// but the call does reach the vendor and counts against the vendor's
+ /// own limits. It acts with a workspace credential, so it needs the
+ /// `content.manage` permission a tool create does.
+ /// A malformed request is a 400: a missing `operation`, `arguments` that
+ /// are not an object, or a field this endpoint does not define, which is
+ /// refused naming every unknown field. + ///
+ /// + /// + /// 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> TestOpenAPICallAsResponseAsync( + + global::Speechify.TestOpenAPICallRequest request, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareTestOpenAPICallArguments( + httpClient: HttpClient, + speechifyVersion: ref speechifyVersion, + request: request); + + + var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_TestOpenAPICallSecurityRequirements, + operationName: "TestOpenAPICallAsync"); + + 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/test-openapi-call", + baseUri: HttpClient.BaseAddress); + 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.Post, + 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()); + } + + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareTestOpenAPICallRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + speechifyVersion: speechifyVersion, + request: request); + + 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: "TestOpenAPICall", + methodName: "TestOpenAPICallAsync", + pathTemplate: "\"/v1/agents/tool-definitions/test-openapi-call\"", + httpMethod: "POST", + 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: "TestOpenAPICall", + methodName: "TestOpenAPICallAsync", + pathTemplate: "\"/v1/agents/tool-definitions/test-openapi-call\"", + httpMethod: "POST", + 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: "TestOpenAPICall", + methodName: "TestOpenAPICallAsync", + pathTemplate: "\"/v1/agents/tool-definitions/test-openapi-call\"", + httpMethod: "POST", + 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); + ProcessTestOpenAPICallResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "TestOpenAPICall", + methodName: "TestOpenAPICallAsync", + pathTemplate: "\"/v1/agents/tool-definitions/test-openapi-call\"", + httpMethod: "POST", + 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: "TestOpenAPICall", + methodName: "TestOpenAPICallAsync", + pathTemplate: "\"/v1/agents/tool-definitions/test-openapi-call\"", + httpMethod: "POST", + 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 credential authenticated, but is not authorised for this resource - typically a workspace-role gate (owner / admin required) or a cross-tenant access attempt. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Speechify.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Speechify.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Speechify.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + 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); + ProcessTestOpenAPICallResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Speechify.TestOpenAPICallResult.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.TestOpenAPICallResult.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(); + } + } + /// + /// Test OpenAPI Operation
+ /// Call one operation of an `openapi` tool config that is not saved yet,
+ /// through the same path a run and a live session execute it, and answer
+ /// what the agent would read. Use it after
+ /// `POST /v1/agents/tool-definitions/import-openapi` and before
+ /// `POST /v1/agents/tool-definitions`, to check that the arguments reach
+ /// the vendor and that a `pick` / `derive` / `max_items` mapping keeps
+ /// what the agent needs.
+ /// Read the result in this order. `error` is set only when no call was
+ /// made: a config the create endpoint would refuse, an operation the
+ /// config does not have, a write operation, or a credential that does not
+ /// resolve or cannot mint a token. Otherwise `outcome` says how the call
+ /// ended, and only `ok` is a preview that worked. On `ok` with a JSON answer, `raw` is the
+ /// vendor's answer and `mapped` is the same answer after the operation's
+ /// `response` mapping, so one call shows both sides; `observation` is
+ /// what the agent reads, trimmed to its observation window.
+ /// Only a read operation runs (declared `read`, or a GET or HEAD that
+ /// declares no class): nobody approves a test call, so a write is
+ /// answered with `error` set and never reaches the vendor. Nothing is
+ /// persisted and the tool's own `max_requests_per_minute` does not apply,
+ /// but the call does reach the vendor and counts against the vendor's
+ /// own limits. It acts with a workspace credential, so it needs the
+ /// `content.manage` permission a tool create does.
+ /// A malformed request is a 400: a missing `operation`, `arguments` that
+ /// are not an object, or a field this endpoint does not define, which is
+ /// refused naming every unknown field. + ///
+ /// + /// + /// The `openapi` config exactly as `POST /v1/agents/tool-definitions`
+ /// takes it, with the credential by reference. The whole config is
+ /// validated, not only the operation called. + /// + /// + /// The `id` of the operation to call, one of `config.operations[].id`;
+ /// the same value a hosted API `tool` route's `operation` names. + /// + /// + /// The arguments the agent would pass: each param by its `name`, plus
+ /// `body` when the operation takes one. Omitted, the call carries none. + /// + /// 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 TestOpenAPICallAsync( + global::Speechify.OpenAPIToolConfig config, + string operation, + string? speechifyVersion = default, + object? arguments = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Speechify.TestOpenAPICallRequest + { + Config = config, + Operation = operation, + Arguments = arguments, + }; + + return await TestOpenAPICallAsync( + speechifyVersion: speechifyVersion, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.TestWebhookConnection.g.cs b/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.TestWebhookConnection.g.cs index a49e55f1..8b8c6049 100644 --- a/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.TestWebhookConnection.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.TestWebhookConnection.g.cs @@ -55,6 +55,8 @@ partial void ProcessTestWebhookConnectionResponseContent( /// can recognise the test and skip its real side effect. Pass
/// `tool_id` from the edit-form flow so the server signs the probe
/// with the tool's stored HMAC secret.
+ /// Needs the `content.manage` permission, as creating a tool does: the
+ /// probe signs with a stored tool's secret for the URL in the request.
/// A field this endpoint does not define is refused with `400
/// validation_failed` naming every unknown field, rather than accepted
/// and silently dropped. @@ -93,6 +95,8 @@ partial void ProcessTestWebhookConnectionResponseContent( /// can recognise the test and skip its real side effect. Pass
/// `tool_id` from the edit-form flow so the server signs the probe
/// with the tool's stored HMAC secret.
+ /// Needs the `content.manage` permission, as creating a tool does: the
+ /// probe signs with a stored tool's secret for the URL in the request.
/// A field this endpoint does not define is refused with `400
/// validation_failed` naming every unknown field, rather than accepted
/// and silently dropped. @@ -450,6 +454,43 @@ partial void ProcessTestWebhookConnectionResponseContent( h => h.Key, h => h.Value)); } + // The credential authenticated, but is not authorised for this resource - typically a workspace-role gate (owner / admin required) or a cross-tenant access attempt. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Speechify.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Speechify.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Speechify.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Speechify.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } if (__effectiveReadResponseAsString) { @@ -558,6 +599,8 @@ partial void ProcessTestWebhookConnectionResponseContent( /// can recognise the test and skip its real side effect. Pass
/// `tool_id` from the edit-form flow so the server signs the probe
/// with the tool's stored HMAC secret.
+ /// Needs the `content.manage` permission, as creating a tool does: the
+ /// probe signs with a stored tool's secret for the URL in the request.
/// A field this endpoint does not define is refused with `400
/// validation_failed` naming every unknown field, rather than accepted
/// and silently dropped. diff --git a/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.Update.g.cs b/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.Update.g.cs index aea4a871..96926134 100644 --- a/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.Update.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ToolDefinitionsClient.Update.g.cs @@ -47,8 +47,12 @@ partial void ProcessUpdateResponseContent( /// /// Update Tool
- /// Update a tool. Tool kind is immutable — create a new tool to change
+ /// Update a tool. Tool kind is immutable - create a new tool to change
/// it.
+ /// `config` replaces the stored config whole; it is never merged. To
+ /// change one part of it (one `openapi` operation's `response` mapping,
+ /// say), read the tool with `GET`, edit that part, and send the full
+ /// config back.
/// A field this endpoint does not define is refused with `400
/// validation_failed` naming every unknown field, rather than accepted
/// and silently dropped.
@@ -83,8 +87,12 @@ partial void ProcessUpdateResponseContent( } /// /// Update Tool
- /// Update a tool. Tool kind is immutable — create a new tool to change
+ /// Update a tool. Tool kind is immutable - create a new tool to change
/// it.
+ /// `config` replaces the stored config whole; it is never merged. To
+ /// change one part of it (one `openapi` operation's `response` mapping,
+ /// say), read the tool with `GET`, edit that part, and send the full
+ /// config back.
/// A field this endpoint does not define is refused with `400
/// validation_failed` naming every unknown field, rather than accepted
/// and silently dropped.
@@ -621,8 +629,12 @@ partial void ProcessUpdateResponseContent( } /// /// Update Tool
- /// Update a tool. Tool kind is immutable — create a new tool to change
+ /// Update a tool. Tool kind is immutable - create a new tool to change
/// it.
+ /// `config` replaces the stored config whole; it is never merged. To
+ /// change one part of it (one `openapi` operation's `response` mapping,
+ /// say), read the tool with `GET`, edit that part, and send the full
+ /// config back.
/// A field this endpoint does not define is refused with `400
/// validation_failed` naming every unknown field, rather than accepted
/// and silently dropped.
diff --git a/src/libs/Speechify/openapi.yaml b/src/libs/Speechify/openapi.yaml index 0de78504..bb82993a 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; `