diff --git a/src/libs/Speechify/Generated/Speechify.AssetsClient.DeleteAsset.g.cs b/src/libs/Speechify/Generated/Speechify.FilesClient.Delete.g.cs similarity index 90% rename from src/libs/Speechify/Generated/Speechify.AssetsClient.DeleteAsset.g.cs rename to src/libs/Speechify/Generated/Speechify.FilesClient.Delete.g.cs index b3d70a1..ae3a247 100644 --- a/src/libs/Speechify/Generated/Speechify.AssetsClient.DeleteAsset.g.cs +++ b/src/libs/Speechify/Generated/Speechify.FilesClient.Delete.g.cs @@ -3,11 +3,11 @@ namespace Speechify { - public partial class AssetsClient + public partial class FilesClient { - private static readonly global::Speechify.EndPointSecurityRequirement s_DeleteAssetSecurityRequirement0 = + private static readonly global::Speechify.EndPointSecurityRequirement s_DeleteSecurityRequirement0 = new global::Speechify.EndPointSecurityRequirement { Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] @@ -21,51 +21,47 @@ public partial class AssetsClient }, }, }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_DeleteAssetSecurityRequirements = + private static readonly global::Speechify.EndPointSecurityRequirement[] s_DeleteSecurityRequirements = new global::Speechify.EndPointSecurityRequirement[] - { s_DeleteAssetSecurityRequirement0, + { s_DeleteSecurityRequirement0, }; - partial void PrepareDeleteAssetArguments( + partial void PrepareDeleteArguments( global::System.Net.Http.HttpClient httpClient, - ref string storeId, - ref string assetId, + ref string fileId, ref string? speechifyVersion); - partial void PrepareDeleteAssetRequest( + partial void PrepareDeleteRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string storeId, - string assetId, + string fileId, string? speechifyVersion); - partial void ProcessDeleteAssetResponse( + partial void ProcessDeleteResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); - partial void ProcessDeleteAssetResponseContent( + partial void ProcessDeleteResponseContent( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage, ref string content); /// - /// Delete Asset
- /// Delete an asset.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + /// Delete File
+ /// Delete a file and its bytes. A run already holding it as an attachment
+ /// stops being able to read it.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). ///
- /// - /// + /// /// /// 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 DeleteAssetAsync( - string storeId, - string assetId, + public async global::System.Threading.Tasks.Task DeleteAsync( + string fileId, string? speechifyVersion = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { - var __response = await DeleteAssetAsResponseAsync( - storeId: storeId, - assetId: assetId, + var __response = await DeleteAsResponseAsync( + fileId: fileId, speechifyVersion: speechifyVersion, requestOptions: requestOptions, cancellationToken: cancellationToken @@ -74,36 +70,34 @@ partial void ProcessDeleteAssetResponseContent( return __response.Body; } /// - /// Delete Asset
- /// Delete an asset.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + /// Delete File
+ /// Delete a file and its bytes. A run already holding it as an attachment
+ /// stops being able to read it.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). ///
- /// - /// + /// /// /// 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> DeleteAssetAsResponseAsync( - string storeId, - string assetId, + public async global::System.Threading.Tasks.Task> DeleteAsResponseAsync( + string fileId, string? speechifyVersion = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); - PrepareDeleteAssetArguments( + PrepareDeleteArguments( httpClient: HttpClient, - storeId: ref storeId, - assetId: ref assetId, + fileId: ref fileId, speechifyVersion: ref speechifyVersion); var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( availableAuthorizations: Authorizations, - securityRequirements: s_DeleteAssetSecurityRequirements, - operationName: "DeleteAssetAsync"); + securityRequirements: s_DeleteSecurityRequirements, + operationName: "DeleteAsync"); using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( clientOptions: Options, @@ -123,7 +117,7 @@ partial void ProcessDeleteAssetResponseContent( { var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/stores/{storeId}/assets/{assetId}", + path: $"/v1/files/{fileId}", baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); __path = global::Speechify.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -168,11 +162,10 @@ partial void ProcessDeleteAssetResponseContent( PrepareRequest( client: HttpClient, request: __httpRequest); - PrepareDeleteAssetRequest( + PrepareDeleteRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - storeId: storeId!, - assetId: assetId!, + fileId: fileId!, speechifyVersion: speechifyVersion); return __httpRequest; @@ -190,9 +183,9 @@ partial void ProcessDeleteAssetResponseContent( await global::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DeleteAsset", - methodName: "DeleteAssetAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets/{assetId}\"", + operationId: "Delete", + methodName: "DeleteAsync", + pathTemplate: "$\"/v1/files/{fileId}\"", httpMethod: "DELETE", baseUri: BaseUri, request: __httpRequest!, @@ -224,9 +217,9 @@ partial void ProcessDeleteAssetResponseContent( await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DeleteAsset", - methodName: "DeleteAssetAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets/{assetId}\"", + operationId: "Delete", + methodName: "DeleteAsync", + pathTemplate: "$\"/v1/files/{fileId}\"", httpMethod: "DELETE", baseUri: BaseUri, request: __httpRequest!, @@ -265,9 +258,9 @@ partial void ProcessDeleteAssetResponseContent( await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DeleteAsset", - methodName: "DeleteAssetAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets/{assetId}\"", + operationId: "Delete", + methodName: "DeleteAsync", + pathTemplate: "$\"/v1/files/{fileId}\"", httpMethod: "DELETE", baseUri: BaseUri, request: __httpRequest!, @@ -305,7 +298,7 @@ partial void ProcessDeleteAssetResponseContent( ProcessResponse( client: HttpClient, response: __response); - ProcessDeleteAssetResponse( + ProcessDeleteResponse( httpClient: HttpClient, httpResponseMessage: __response); if (__response.IsSuccessStatusCode) @@ -313,9 +306,9 @@ partial void ProcessDeleteAssetResponseContent( await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DeleteAsset", - methodName: "DeleteAssetAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets/{assetId}\"", + operationId: "Delete", + methodName: "DeleteAsync", + pathTemplate: "$\"/v1/files/{fileId}\"", httpMethod: "DELETE", baseUri: BaseUri, request: __httpRequest!, @@ -335,9 +328,9 @@ partial void ProcessDeleteAssetResponseContent( await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "DeleteAsset", - methodName: "DeleteAssetAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets/{assetId}\"", + operationId: "Delete", + methodName: "DeleteAsync", + pathTemplate: "$\"/v1/files/{fileId}\"", httpMethod: "DELETE", baseUri: BaseUri, request: __httpRequest!, @@ -513,7 +506,7 @@ partial void ProcessDeleteAssetResponseContent( client: HttpClient, response: __response, content: ref __content); - ProcessDeleteAssetResponseContent( + ProcessDeleteResponseContent( httpClient: HttpClient, httpResponseMessage: __response, content: ref __content); diff --git a/src/libs/Speechify/Generated/Speechify.AssetsClient.GetAsset.g.cs b/src/libs/Speechify/Generated/Speechify.FilesClient.Get.g.cs similarity index 90% rename from src/libs/Speechify/Generated/Speechify.AssetsClient.GetAsset.g.cs rename to src/libs/Speechify/Generated/Speechify.FilesClient.Get.g.cs index f8847f4..46674df 100644 --- a/src/libs/Speechify/Generated/Speechify.AssetsClient.GetAsset.g.cs +++ b/src/libs/Speechify/Generated/Speechify.FilesClient.Get.g.cs @@ -3,11 +3,11 @@ namespace Speechify { - public partial class AssetsClient + public partial class FilesClient { - private static readonly global::Speechify.EndPointSecurityRequirement s_GetAssetSecurityRequirement0 = + private static readonly global::Speechify.EndPointSecurityRequirement s_GetSecurityRequirement0 = new global::Speechify.EndPointSecurityRequirement { Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] @@ -21,51 +21,46 @@ public partial class AssetsClient }, }, }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_GetAssetSecurityRequirements = + private static readonly global::Speechify.EndPointSecurityRequirement[] s_GetSecurityRequirements = new global::Speechify.EndPointSecurityRequirement[] - { s_GetAssetSecurityRequirement0, + { s_GetSecurityRequirement0, }; - partial void PrepareGetAssetArguments( + partial void PrepareGetArguments( global::System.Net.Http.HttpClient httpClient, - ref string storeId, - ref string assetId, + ref string fileId, ref string? speechifyVersion); - partial void PrepareGetAssetRequest( + partial void PrepareGetRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string storeId, - string assetId, + string fileId, string? speechifyVersion); - partial void ProcessGetAssetResponse( + partial void ProcessGetResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); - partial void ProcessGetAssetResponseContent( + partial void ProcessGetResponseContent( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage, ref string content); /// - /// Get Asset
- /// Read an asset's metadata.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + /// Get File
+ /// Read a file's metadata. A file past its `expires_at` answers 404.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). ///
- /// - /// + /// /// /// 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 GetAssetAsync( - string storeId, - string assetId, + public async global::System.Threading.Tasks.Task GetAsync( + string fileId, string? speechifyVersion = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { - var __response = await GetAssetAsResponseAsync( - storeId: storeId, - assetId: assetId, + var __response = await GetAsResponseAsync( + fileId: fileId, speechifyVersion: speechifyVersion, requestOptions: requestOptions, cancellationToken: cancellationToken @@ -74,36 +69,33 @@ partial void ProcessGetAssetResponseContent( return __response.Body; } /// - /// Get Asset
- /// Read an asset's metadata.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + /// Get File
+ /// Read a file's metadata. A file past its `expires_at` answers 404.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). ///
- /// - /// + /// /// /// 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> GetAssetAsResponseAsync( - string storeId, - string assetId, + public async global::System.Threading.Tasks.Task> GetAsResponseAsync( + string fileId, string? speechifyVersion = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); - PrepareGetAssetArguments( + PrepareGetArguments( httpClient: HttpClient, - storeId: ref storeId, - assetId: ref assetId, + fileId: ref fileId, speechifyVersion: ref speechifyVersion); var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( availableAuthorizations: Authorizations, - securityRequirements: s_GetAssetSecurityRequirements, - operationName: "GetAssetAsync"); + securityRequirements: s_GetSecurityRequirements, + operationName: "GetAsync"); using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( clientOptions: Options, @@ -123,7 +115,7 @@ partial void ProcessGetAssetResponseContent( { var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/stores/{storeId}/assets/{assetId}", + path: $"/v1/files/{fileId}", baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); __path = global::Speechify.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -168,11 +160,10 @@ partial void ProcessGetAssetResponseContent( PrepareRequest( client: HttpClient, request: __httpRequest); - PrepareGetAssetRequest( + PrepareGetRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - storeId: storeId!, - assetId: assetId!, + fileId: fileId!, speechifyVersion: speechifyVersion); return __httpRequest; @@ -190,9 +181,9 @@ partial void ProcessGetAssetResponseContent( await global::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetAsset", - methodName: "GetAssetAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets/{assetId}\"", + operationId: "Get", + methodName: "GetAsync", + pathTemplate: "$\"/v1/files/{fileId}\"", httpMethod: "GET", baseUri: BaseUri, request: __httpRequest!, @@ -224,9 +215,9 @@ partial void ProcessGetAssetResponseContent( await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetAsset", - methodName: "GetAssetAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets/{assetId}\"", + operationId: "Get", + methodName: "GetAsync", + pathTemplate: "$\"/v1/files/{fileId}\"", httpMethod: "GET", baseUri: BaseUri, request: __httpRequest!, @@ -265,9 +256,9 @@ partial void ProcessGetAssetResponseContent( await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetAsset", - methodName: "GetAssetAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets/{assetId}\"", + operationId: "Get", + methodName: "GetAsync", + pathTemplate: "$\"/v1/files/{fileId}\"", httpMethod: "GET", baseUri: BaseUri, request: __httpRequest!, @@ -305,7 +296,7 @@ partial void ProcessGetAssetResponseContent( ProcessResponse( client: HttpClient, response: __response); - ProcessGetAssetResponse( + ProcessGetResponse( httpClient: HttpClient, httpResponseMessage: __response); if (__response.IsSuccessStatusCode) @@ -313,9 +304,9 @@ partial void ProcessGetAssetResponseContent( await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetAsset", - methodName: "GetAssetAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets/{assetId}\"", + operationId: "Get", + methodName: "GetAsync", + pathTemplate: "$\"/v1/files/{fileId}\"", httpMethod: "GET", baseUri: BaseUri, request: __httpRequest!, @@ -335,9 +326,9 @@ partial void ProcessGetAssetResponseContent( await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetAsset", - methodName: "GetAssetAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets/{assetId}\"", + operationId: "Get", + methodName: "GetAsync", + pathTemplate: "$\"/v1/files/{fileId}\"", httpMethod: "GET", baseUri: BaseUri, request: __httpRequest!, @@ -513,7 +504,7 @@ partial void ProcessGetAssetResponseContent( client: HttpClient, response: __response, content: ref __content); - ProcessGetAssetResponseContent( + ProcessGetResponseContent( httpClient: HttpClient, httpResponseMessage: __response, content: ref __content); @@ -522,9 +513,9 @@ partial void ProcessGetAssetResponseContent( { __response.EnsureSuccessStatusCode(); - var __value = global::Speechify.StoreAsset.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Speechify.File.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - return new global::Speechify.AutoSDKHttpResponse( + return new global::Speechify.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, @@ -554,9 +545,9 @@ partial void ProcessGetAssetResponseContent( #endif ).ConfigureAwait(false); - var __value = await global::Speechify.StoreAsset.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Speechify.File.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); - return new global::Speechify.AutoSDKHttpResponse( + return new global::Speechify.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, diff --git a/src/libs/Speechify/Generated/Speechify.AssetsClient.GetAssetBytes.g.cs b/src/libs/Speechify/Generated/Speechify.FilesClient.GetContent.g.cs similarity index 91% rename from src/libs/Speechify/Generated/Speechify.AssetsClient.GetAssetBytes.g.cs rename to src/libs/Speechify/Generated/Speechify.FilesClient.GetContent.g.cs index 0f49736..f5b65a1 100644 --- a/src/libs/Speechify/Generated/Speechify.AssetsClient.GetAssetBytes.g.cs +++ b/src/libs/Speechify/Generated/Speechify.FilesClient.GetContent.g.cs @@ -3,11 +3,11 @@ namespace Speechify { - public partial class AssetsClient + public partial class FilesClient { - private static readonly global::Speechify.EndPointSecurityRequirement s_GetAssetBytesSecurityRequirement0 = + private static readonly global::Speechify.EndPointSecurityRequirement s_GetContentSecurityRequirement0 = new global::Speechify.EndPointSecurityRequirement { Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] @@ -21,51 +21,48 @@ public partial class AssetsClient }, }, }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_GetAssetBytesSecurityRequirements = + private static readonly global::Speechify.EndPointSecurityRequirement[] s_GetContentSecurityRequirements = new global::Speechify.EndPointSecurityRequirement[] - { s_GetAssetBytesSecurityRequirement0, + { s_GetContentSecurityRequirement0, }; - partial void PrepareGetAssetBytesArguments( + partial void PrepareGetContentArguments( global::System.Net.Http.HttpClient httpClient, - ref string storeId, - ref string assetId, + ref string fileId, ref string? speechifyVersion); - partial void PrepareGetAssetBytesRequest( + partial void PrepareGetContentRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string storeId, - string assetId, + string fileId, string? speechifyVersion); - partial void ProcessGetAssetBytesResponse( + partial void ProcessGetContentResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); - partial void ProcessGetAssetBytesResponseContent( + partial void ProcessGetContentResponseContent( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage, ref byte[] content); /// - /// Get Asset Bytes
- /// Stream the asset's bytes with its stored content type. Private and uncacheable.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + /// Get File Content
+ /// Download the file's bytes. Private, uncacheable, and always served as
+ /// an `application/octet-stream` attachment whatever the file's own type -
+ /// read `content_type` from the file object for what it actually is.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). ///
- /// - /// + /// /// /// 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 GetAssetBytesAsync( - string storeId, - string assetId, + public async global::System.Threading.Tasks.Task GetContentAsync( + string fileId, string? speechifyVersion = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { - var __response = await GetAssetBytesAsResponseAsync( - storeId: storeId, - assetId: assetId, + var __response = await GetContentAsResponseAsync( + fileId: fileId, speechifyVersion: speechifyVersion, requestOptions: requestOptions, cancellationToken: cancellationToken @@ -74,36 +71,35 @@ partial void ProcessGetAssetBytesResponseContent( return __response.Body; } /// - /// Get Asset Bytes
- /// Stream the asset's bytes with its stored content type. Private and uncacheable.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + /// Get File Content
+ /// Download the file's bytes. Private, uncacheable, and always served as
+ /// an `application/octet-stream` attachment whatever the file's own type -
+ /// read `content_type` from the file object for what it actually is.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). ///
- /// - /// + /// /// /// 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 GetAssetBytesAsStreamAsync( - string storeId, - string assetId, + public async global::System.Threading.Tasks.Task GetContentAsStreamAsync( + string fileId, string? speechifyVersion = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); - PrepareGetAssetBytesArguments( + PrepareGetContentArguments( httpClient: HttpClient, - storeId: ref storeId, - assetId: ref assetId, + fileId: ref fileId, speechifyVersion: ref speechifyVersion); var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( availableAuthorizations: Authorizations, - securityRequirements: s_GetAssetBytesSecurityRequirements, - operationName: "GetAssetBytesAsync"); + securityRequirements: s_GetContentSecurityRequirements, + operationName: "GetContentAsync"); using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( clientOptions: Options, @@ -123,7 +119,7 @@ partial void ProcessGetAssetBytesResponseContent( { var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/stores/{storeId}/assets/{assetId}/bytes", + path: $"/v1/files/{fileId}/content", baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); __path = global::Speechify.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -168,11 +164,10 @@ partial void ProcessGetAssetBytesResponseContent( PrepareRequest( client: HttpClient, request: __httpRequest); - PrepareGetAssetBytesRequest( + PrepareGetContentRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - storeId: storeId!, - assetId: assetId!, + fileId: fileId!, speechifyVersion: speechifyVersion); return __httpRequest; @@ -190,9 +185,9 @@ partial void ProcessGetAssetBytesResponseContent( await global::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetAssetBytes", - methodName: "GetAssetBytesAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets/{assetId}/bytes\"", + operationId: "GetContent", + methodName: "GetContentAsync", + pathTemplate: "$\"/v1/files/{fileId}/content\"", httpMethod: "GET", baseUri: BaseUri, request: __httpRequest!, @@ -224,9 +219,9 @@ partial void ProcessGetAssetBytesResponseContent( await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetAssetBytes", - methodName: "GetAssetBytesAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets/{assetId}/bytes\"", + operationId: "GetContent", + methodName: "GetContentAsync", + pathTemplate: "$\"/v1/files/{fileId}/content\"", httpMethod: "GET", baseUri: BaseUri, request: __httpRequest!, @@ -265,9 +260,9 @@ partial void ProcessGetAssetBytesResponseContent( await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetAssetBytes", - methodName: "GetAssetBytesAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets/{assetId}/bytes\"", + operationId: "GetContent", + methodName: "GetContentAsync", + pathTemplate: "$\"/v1/files/{fileId}/content\"", httpMethod: "GET", baseUri: BaseUri, request: __httpRequest!, @@ -305,7 +300,7 @@ partial void ProcessGetAssetBytesResponseContent( ProcessResponse( client: HttpClient, response: __response); - ProcessGetAssetBytesResponse( + ProcessGetContentResponse( httpClient: HttpClient, httpResponseMessage: __response); if (__response.IsSuccessStatusCode) @@ -313,9 +308,9 @@ partial void ProcessGetAssetBytesResponseContent( await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetAssetBytes", - methodName: "GetAssetBytesAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets/{assetId}/bytes\"", + operationId: "GetContent", + methodName: "GetContentAsync", + pathTemplate: "$\"/v1/files/{fileId}/content\"", httpMethod: "GET", baseUri: BaseUri, request: __httpRequest!, @@ -335,9 +330,9 @@ partial void ProcessGetAssetBytesResponseContent( await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetAssetBytes", - methodName: "GetAssetBytesAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets/{assetId}/bytes\"", + operationId: "GetContent", + methodName: "GetContentAsync", + pathTemplate: "$\"/v1/files/{fileId}/content\"", httpMethod: "GET", baseUri: BaseUri, request: __httpRequest!, @@ -552,36 +547,35 @@ partial void ProcessGetAssetBytesResponseContent( } } /// - /// Get Asset Bytes
- /// Stream the asset's bytes with its stored content type. Private and uncacheable.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + /// Get File Content
+ /// Download the file's bytes. Private, uncacheable, and always served as
+ /// an `application/octet-stream` attachment whatever the file's own type -
+ /// read `content_type` from the file object for what it actually is.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). ///
- /// - /// + /// /// /// 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> GetAssetBytesAsResponseAsync( - string storeId, - string assetId, + public async global::System.Threading.Tasks.Task> GetContentAsResponseAsync( + string fileId, string? speechifyVersion = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); - PrepareGetAssetBytesArguments( + PrepareGetContentArguments( httpClient: HttpClient, - storeId: ref storeId, - assetId: ref assetId, + fileId: ref fileId, speechifyVersion: ref speechifyVersion); var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( availableAuthorizations: Authorizations, - securityRequirements: s_GetAssetBytesSecurityRequirements, - operationName: "GetAssetBytesAsync"); + securityRequirements: s_GetContentSecurityRequirements, + operationName: "GetContentAsync"); using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( clientOptions: Options, @@ -601,7 +595,7 @@ partial void ProcessGetAssetBytesResponseContent( { var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/stores/{storeId}/assets/{assetId}/bytes", + path: $"/v1/files/{fileId}/content", baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); __path = global::Speechify.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -646,11 +640,10 @@ partial void ProcessGetAssetBytesResponseContent( PrepareRequest( client: HttpClient, request: __httpRequest); - PrepareGetAssetBytesRequest( + PrepareGetContentRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - storeId: storeId!, - assetId: assetId!, + fileId: fileId!, speechifyVersion: speechifyVersion); return __httpRequest; @@ -668,9 +661,9 @@ partial void ProcessGetAssetBytesResponseContent( await global::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetAssetBytes", - methodName: "GetAssetBytesAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets/{assetId}/bytes\"", + operationId: "GetContent", + methodName: "GetContentAsync", + pathTemplate: "$\"/v1/files/{fileId}/content\"", httpMethod: "GET", baseUri: BaseUri, request: __httpRequest!, @@ -702,9 +695,9 @@ partial void ProcessGetAssetBytesResponseContent( await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetAssetBytes", - methodName: "GetAssetBytesAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets/{assetId}/bytes\"", + operationId: "GetContent", + methodName: "GetContentAsync", + pathTemplate: "$\"/v1/files/{fileId}/content\"", httpMethod: "GET", baseUri: BaseUri, request: __httpRequest!, @@ -743,9 +736,9 @@ partial void ProcessGetAssetBytesResponseContent( await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetAssetBytes", - methodName: "GetAssetBytesAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets/{assetId}/bytes\"", + operationId: "GetContent", + methodName: "GetContentAsync", + pathTemplate: "$\"/v1/files/{fileId}/content\"", httpMethod: "GET", baseUri: BaseUri, request: __httpRequest!, @@ -783,7 +776,7 @@ partial void ProcessGetAssetBytesResponseContent( ProcessResponse( client: HttpClient, response: __response); - ProcessGetAssetBytesResponse( + ProcessGetContentResponse( httpClient: HttpClient, httpResponseMessage: __response); if (__response.IsSuccessStatusCode) @@ -791,9 +784,9 @@ partial void ProcessGetAssetBytesResponseContent( await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetAssetBytes", - methodName: "GetAssetBytesAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets/{assetId}/bytes\"", + operationId: "GetContent", + methodName: "GetContentAsync", + pathTemplate: "$\"/v1/files/{fileId}/content\"", httpMethod: "GET", baseUri: BaseUri, request: __httpRequest!, @@ -813,9 +806,9 @@ partial void ProcessGetAssetBytesResponseContent( await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetAssetBytes", - methodName: "GetAssetBytesAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets/{assetId}/bytes\"", + operationId: "GetContent", + methodName: "GetContentAsync", + pathTemplate: "$\"/v1/files/{fileId}/content\"", httpMethod: "GET", baseUri: BaseUri, request: __httpRequest!, @@ -987,7 +980,7 @@ partial void ProcessGetAssetBytesResponseContent( #endif ).ConfigureAwait(false); - ProcessGetAssetBytesResponseContent( + ProcessGetContentResponseContent( httpClient: HttpClient, httpResponseMessage: __response, content: ref __content); diff --git a/src/libs/Speechify/Generated/Speechify.AssetsClient.ListAssets.g.cs b/src/libs/Speechify/Generated/Speechify.FilesClient.List.g.cs similarity index 88% rename from src/libs/Speechify/Generated/Speechify.AssetsClient.ListAssets.g.cs rename to src/libs/Speechify/Generated/Speechify.FilesClient.List.g.cs index c49b8c8..41a11f8 100644 --- a/src/libs/Speechify/Generated/Speechify.AssetsClient.ListAssets.g.cs +++ b/src/libs/Speechify/Generated/Speechify.FilesClient.List.g.cs @@ -3,11 +3,11 @@ namespace Speechify { - public partial class AssetsClient + public partial class FilesClient { - private static readonly global::Speechify.EndPointSecurityRequirement s_ListAssetsSecurityRequirement0 = + private static readonly global::Speechify.EndPointSecurityRequirement s_ListSecurityRequirement0 = new global::Speechify.EndPointSecurityRequirement { Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] @@ -21,58 +21,70 @@ public partial class AssetsClient }, }, }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_ListAssetsSecurityRequirements = + private static readonly global::Speechify.EndPointSecurityRequirement[] s_ListSecurityRequirements = new global::Speechify.EndPointSecurityRequirement[] - { s_ListAssetsSecurityRequirement0, + { s_ListSecurityRequirement0, }; - partial void PrepareListAssetsArguments( + partial void PrepareListArguments( global::System.Net.Http.HttpClient httpClient, - ref string storeId, ref string? cursor, ref int? limit, + ref string? projectId, + ref string? userIdentity, + ref global::Speechify.V1FilesGetParametersKind? kind, ref string? speechifyVersion); - partial void PrepareListAssetsRequest( + partial void PrepareListRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string storeId, string? cursor, int? limit, + string? projectId, + string? userIdentity, + global::Speechify.V1FilesGetParametersKind? kind, string? speechifyVersion); - partial void ProcessListAssetsResponse( + partial void ProcessListResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); - partial void ProcessListAssetsResponseContent( + partial void ProcessListResponseContent( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage, ref string content); /// - /// List Assets
- /// List a store's assets, newest first.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + /// List Files
+ /// List the workspace's live files, newest first. A file that has passed
+ /// its `expires_at` is gone from this list and from every read.
+ /// Cursor-paginated; walk pages while `has_more` is true.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). ///
- /// /// /// /// Default Value: 50 /// + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task ListAssetsAsync( - string storeId, + public async global::System.Threading.Tasks.Task ListAsync( string? cursor = default, int? limit = default, + string? projectId = default, + string? userIdentity = default, + global::Speechify.V1FilesGetParametersKind? kind = default, string? speechifyVersion = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { - var __response = await ListAssetsAsResponseAsync( - storeId: storeId, + var __response = await ListAsResponseAsync( cursor: cursor, limit: limit, + projectId: projectId, + userIdentity: userIdentity, + kind: kind, speechifyVersion: speechifyVersion, requestOptions: requestOptions, cancellationToken: cancellationToken @@ -81,41 +93,49 @@ partial void ProcessListAssetsResponseContent( return __response.Body; } /// - /// List Assets
- /// List a store's assets, newest first.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + /// List Files
+ /// List the workspace's live files, newest first. A file that has passed
+ /// its `expires_at` is gone from this list and from every read.
+ /// Cursor-paginated; walk pages while `has_more` is true.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). ///
- /// /// /// /// Default Value: 50 /// + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task> ListAssetsAsResponseAsync( - string storeId, + public async global::System.Threading.Tasks.Task> ListAsResponseAsync( string? cursor = default, int? limit = default, + string? projectId = default, + string? userIdentity = default, + global::Speechify.V1FilesGetParametersKind? kind = default, string? speechifyVersion = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); - PrepareListAssetsArguments( + PrepareListArguments( httpClient: HttpClient, - storeId: ref storeId, cursor: ref cursor, limit: ref limit, + projectId: ref projectId, + userIdentity: ref userIdentity, + kind: ref kind, speechifyVersion: ref speechifyVersion); var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( availableAuthorizations: Authorizations, - securityRequirements: s_ListAssetsSecurityRequirements, - operationName: "ListAssetsAsync"); + securityRequirements: s_ListSecurityRequirements, + operationName: "ListAsync"); using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( clientOptions: Options, @@ -135,11 +155,14 @@ partial void ProcessListAssetsResponseContent( { var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/stores/{storeId}/assets", + path: "/v1/files", baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("cursor", cursor) .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("project_id", projectId) + .AddOptionalParameter("user_identity", userIdentity) + .AddOptionalParameter("kind", kind?.ToValueString()) ; var __path = __pathBuilder.ToString(); __path = global::Speechify.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -184,12 +207,14 @@ partial void ProcessListAssetsResponseContent( PrepareRequest( client: HttpClient, request: __httpRequest); - PrepareListAssetsRequest( + PrepareListRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - storeId: storeId!, cursor: cursor, limit: limit, + projectId: projectId, + userIdentity: userIdentity, + kind: kind, speechifyVersion: speechifyVersion); return __httpRequest; @@ -207,9 +232,9 @@ partial void ProcessListAssetsResponseContent( await global::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListAssets", - methodName: "ListAssetsAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets\"", + operationId: "List", + methodName: "ListAsync", + pathTemplate: "\"/v1/files\"", httpMethod: "GET", baseUri: BaseUri, request: __httpRequest!, @@ -241,9 +266,9 @@ partial void ProcessListAssetsResponseContent( await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListAssets", - methodName: "ListAssetsAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets\"", + operationId: "List", + methodName: "ListAsync", + pathTemplate: "\"/v1/files\"", httpMethod: "GET", baseUri: BaseUri, request: __httpRequest!, @@ -282,9 +307,9 @@ partial void ProcessListAssetsResponseContent( await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListAssets", - methodName: "ListAssetsAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets\"", + operationId: "List", + methodName: "ListAsync", + pathTemplate: "\"/v1/files\"", httpMethod: "GET", baseUri: BaseUri, request: __httpRequest!, @@ -322,7 +347,7 @@ partial void ProcessListAssetsResponseContent( ProcessResponse( client: HttpClient, response: __response); - ProcessListAssetsResponse( + ProcessListResponse( httpClient: HttpClient, httpResponseMessage: __response); if (__response.IsSuccessStatusCode) @@ -330,9 +355,9 @@ partial void ProcessListAssetsResponseContent( await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListAssets", - methodName: "ListAssetsAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets\"", + operationId: "List", + methodName: "ListAsync", + pathTemplate: "\"/v1/files\"", httpMethod: "GET", baseUri: BaseUri, request: __httpRequest!, @@ -352,9 +377,9 @@ partial void ProcessListAssetsResponseContent( await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "ListAssets", - methodName: "ListAssetsAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets\"", + operationId: "List", + methodName: "ListAsync", + pathTemplate: "\"/v1/files\"", httpMethod: "GET", baseUri: BaseUri, request: __httpRequest!, @@ -530,7 +555,7 @@ partial void ProcessListAssetsResponseContent( client: HttpClient, response: __response, content: ref __content); - ProcessListAssetsResponseContent( + ProcessListResponseContent( httpClient: HttpClient, httpResponseMessage: __response, content: ref __content); @@ -539,9 +564,9 @@ partial void ProcessListAssetsResponseContent( { __response.EnsureSuccessStatusCode(); - var __value = global::Speechify.ListStoreAssetsResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Speechify.ListFilesResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - return new global::Speechify.AutoSDKHttpResponse( + return new global::Speechify.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, @@ -571,9 +596,9 @@ partial void ProcessListAssetsResponseContent( #endif ).ConfigureAwait(false); - var __value = await global::Speechify.ListStoreAssetsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Speechify.ListFilesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); - return new global::Speechify.AutoSDKHttpResponse( + return new global::Speechify.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, diff --git a/src/libs/Speechify/Generated/Speechify.AssetsClient.UploadAsset.g.cs b/src/libs/Speechify/Generated/Speechify.FilesClient.Upload.g.cs similarity index 79% rename from src/libs/Speechify/Generated/Speechify.AssetsClient.UploadAsset.g.cs rename to src/libs/Speechify/Generated/Speechify.FilesClient.Upload.g.cs index 327b1a5..f7edda5 100644 --- a/src/libs/Speechify/Generated/Speechify.AssetsClient.UploadAsset.g.cs +++ b/src/libs/Speechify/Generated/Speechify.FilesClient.Upload.g.cs @@ -3,11 +3,11 @@ namespace Speechify { - public partial class AssetsClient + public partial class FilesClient { - private static readonly global::Speechify.EndPointSecurityRequirement s_UploadAssetSecurityRequirement0 = + private static readonly global::Speechify.EndPointSecurityRequirement s_UploadSecurityRequirement0 = new global::Speechify.EndPointSecurityRequirement { Authorizations = new global::Speechify.EndPointAuthorizationRequirement[] @@ -21,52 +21,62 @@ public partial class AssetsClient }, }, }; - private static readonly global::Speechify.EndPointSecurityRequirement[] s_UploadAssetSecurityRequirements = + private static readonly global::Speechify.EndPointSecurityRequirement[] s_UploadSecurityRequirements = new global::Speechify.EndPointSecurityRequirement[] - { s_UploadAssetSecurityRequirement0, + { s_UploadSecurityRequirement0, }; - partial void PrepareUploadAssetArguments( + partial void PrepareUploadArguments( global::System.Net.Http.HttpClient httpClient, - ref string storeId, ref string? speechifyVersion, - global::Speechify.UploadAssetRequest request); - partial void PrepareUploadAssetRequest( + global::Speechify.UploadRequest2 request); + partial void PrepareUploadRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string storeId, string? speechifyVersion, - global::Speechify.UploadAssetRequest request); - partial void ProcessUploadAssetResponse( + global::Speechify.UploadRequest2 request); + partial void ProcessUploadResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); - partial void ProcessUploadAssetResponseContent( + partial void ProcessUploadResponseContent( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage, ref string content); /// - /// Upload Asset
- /// Upload one file (multipart form field `file`, at most 25 MiB). The
- /// part's content type is stored and served back from `bytes_path`.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + /// Upload File
+ /// Upload one file (multipart form field `file`, at most 25 MiB) so a run
+ /// can be handed it: pass the returned `id` in `attachments` on
+ /// `POST /v1/agents/{agent_id}/runs`, a team run, or a trigger's run spec.
+ /// Scope it with `user_identity` to the person it belongs to, and only a
+ /// run acting for that person can read it; leave it empty and any run in
+ /// the workspace can.
+ /// `kind` decides how long it lives. The default, `ephemeral`, is deleted
+ /// automatically 14 days after upload (`expires_at`) - working material
+ /// rather than a corpus; for documents an agent should search later, use a
+ /// knowledge base. Send `kind: kept` for something that survives until you
+ /// delete it, and give a `kept` file a `path` to publish it where a
+ /// hosted-API route can serve it. A workspace's `kept` files are bounded by
+ /// its plan; past the ceiling an upload answers `409`
+ /// `file_storage_limit_reached`.
+ /// An agent reads an attached file inside the run through its `read_file`
+ /// tool: PDF, HTML, Markdown and plain text are extracted, and an image is
+ /// transcribed and described by a vision model.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). ///
- /// /// /// /// 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 UploadAssetAsync( - string storeId, + public async global::System.Threading.Tasks.Task UploadAsync( - global::Speechify.UploadAssetRequest request, + global::Speechify.UploadRequest2 request, string? speechifyVersion = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { - var __response = await UploadAssetAsResponseAsync( - storeId: storeId, + var __response = await UploadAsResponseAsync( request: request, speechifyVersion: speechifyVersion, @@ -77,21 +87,34 @@ partial void ProcessUploadAssetResponseContent( return __response.Body; } /// - /// Upload Asset
- /// Upload one file (multipart form field `file`, at most 25 MiB). The
- /// part's content type is stored and served back from `bytes_path`.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + /// Upload File
+ /// Upload one file (multipart form field `file`, at most 25 MiB) so a run
+ /// can be handed it: pass the returned `id` in `attachments` on
+ /// `POST /v1/agents/{agent_id}/runs`, a team run, or a trigger's run spec.
+ /// Scope it with `user_identity` to the person it belongs to, and only a
+ /// run acting for that person can read it; leave it empty and any run in
+ /// the workspace can.
+ /// `kind` decides how long it lives. The default, `ephemeral`, is deleted
+ /// automatically 14 days after upload (`expires_at`) - working material
+ /// rather than a corpus; for documents an agent should search later, use a
+ /// knowledge base. Send `kind: kept` for something that survives until you
+ /// delete it, and give a `kept` file a `path` to publish it where a
+ /// hosted-API route can serve it. A workspace's `kept` files are bounded by
+ /// its plan; past the ceiling an upload answers `409`
+ /// `file_storage_limit_reached`.
+ /// An agent reads an attached file inside the run through its `read_file`
+ /// tool: PDF, HTML, Markdown and plain text are extracted, and an image is
+ /// transcribed and described by a vision model.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). ///
- /// /// /// /// 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> UploadAssetAsResponseAsync( - string storeId, + public async global::System.Threading.Tasks.Task> UploadAsResponseAsync( - global::Speechify.UploadAssetRequest request, + global::Speechify.UploadRequest2 request, string? speechifyVersion = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -100,17 +123,16 @@ partial void ProcessUploadAssetResponseContent( PrepareArguments( client: HttpClient); - PrepareUploadAssetArguments( + PrepareUploadArguments( httpClient: HttpClient, - storeId: ref storeId, speechifyVersion: ref speechifyVersion, request: request); var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( availableAuthorizations: Authorizations, - securityRequirements: s_UploadAssetSecurityRequirements, - operationName: "UploadAssetAsync"); + securityRequirements: s_UploadSecurityRequirements, + operationName: "UploadAsync"); using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( clientOptions: Options, @@ -130,7 +152,7 @@ partial void ProcessUploadAssetResponseContent( { var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/stores/{storeId}/assets", + path: "/v1/files", baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); __path = global::Speechify.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -207,6 +229,39 @@ request.Filename is null __contentFile.Headers.ContentDisposition.FileNameStar = null; } + if (request.UserIdentity != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.UserIdentity ?? string.Empty), + name: "\"user_identity\""); + + } + if (request.Kind != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent((request.Kind).HasValue ? (request.Kind).GetValueOrDefault().ToValueString() : string.Empty), + name: "\"kind\""); + + } + if (request.Path != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Path ?? string.Empty), + name: "\"path\""); + + } + if (request.ProjectId != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.ProjectId ?? string.Empty), + name: "\"project_id\""); + + } + __httpRequest.Content = __httpRequestContent; global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( @@ -217,10 +272,9 @@ request.Filename is null PrepareRequest( client: HttpClient, request: __httpRequest); - PrepareUploadAssetRequest( + PrepareUploadRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - storeId: storeId!, speechifyVersion: speechifyVersion, request: request); @@ -239,9 +293,9 @@ request.Filename is null await global::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UploadAsset", - methodName: "UploadAssetAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets\"", + operationId: "Upload", + methodName: "UploadAsync", + pathTemplate: "\"/v1/files\"", httpMethod: "POST", baseUri: BaseUri, request: __httpRequest!, @@ -273,9 +327,9 @@ request.Filename is null await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UploadAsset", - methodName: "UploadAssetAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets\"", + operationId: "Upload", + methodName: "UploadAsync", + pathTemplate: "\"/v1/files\"", httpMethod: "POST", baseUri: BaseUri, request: __httpRequest!, @@ -314,9 +368,9 @@ request.Filename is null await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UploadAsset", - methodName: "UploadAssetAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets\"", + operationId: "Upload", + methodName: "UploadAsync", + pathTemplate: "\"/v1/files\"", httpMethod: "POST", baseUri: BaseUri, request: __httpRequest!, @@ -354,7 +408,7 @@ request.Filename is null ProcessResponse( client: HttpClient, response: __response); - ProcessUploadAssetResponse( + ProcessUploadResponse( httpClient: HttpClient, httpResponseMessage: __response); if (__response.IsSuccessStatusCode) @@ -362,9 +416,9 @@ request.Filename is null await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UploadAsset", - methodName: "UploadAssetAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets\"", + operationId: "Upload", + methodName: "UploadAsync", + pathTemplate: "\"/v1/files\"", httpMethod: "POST", baseUri: BaseUri, request: __httpRequest!, @@ -384,9 +438,9 @@ request.Filename is null await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UploadAsset", - methodName: "UploadAssetAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets\"", + operationId: "Upload", + methodName: "UploadAsync", + pathTemplate: "\"/v1/files\"", httpMethod: "POST", baseUri: BaseUri, request: __httpRequest!, @@ -549,6 +603,43 @@ request.Filename is null 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)); + } // Request body exceeded a per-endpoint size limit (e.g. KB document upload cap, batch-call CSV cap, audio-asset WAV cap). if ((int)__response.StatusCode == 413) { @@ -636,7 +727,7 @@ request.Filename is null client: HttpClient, response: __response, content: ref __content); - ProcessUploadAssetResponseContent( + ProcessUploadResponseContent( httpClient: HttpClient, httpResponseMessage: __response, content: ref __content); @@ -645,9 +736,9 @@ request.Filename is null { __response.EnsureSuccessStatusCode(); - var __value = global::Speechify.StoreAsset.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Speechify.File.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - return new global::Speechify.AutoSDKHttpResponse( + return new global::Speechify.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, @@ -677,9 +768,9 @@ request.Filename is null #endif ).ConfigureAwait(false); - var __value = await global::Speechify.StoreAsset.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Speechify.File.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); - return new global::Speechify.AutoSDKHttpResponse( + return new global::Speechify.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, @@ -720,12 +811,26 @@ request.Filename is null } } /// - /// Upload Asset
- /// Upload one file (multipart form field `file`, at most 25 MiB). The
- /// part's content type is stored and served back from `bytes_path`.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + /// Upload File
+ /// Upload one file (multipart form field `file`, at most 25 MiB) so a run
+ /// can be handed it: pass the returned `id` in `attachments` on
+ /// `POST /v1/agents/{agent_id}/runs`, a team run, or a trigger's run spec.
+ /// Scope it with `user_identity` to the person it belongs to, and only a
+ /// run acting for that person can read it; leave it empty and any run in
+ /// the workspace can.
+ /// `kind` decides how long it lives. The default, `ephemeral`, is deleted
+ /// automatically 14 days after upload (`expires_at`) - working material
+ /// rather than a corpus; for documents an agent should search later, use a
+ /// knowledge base. Send `kind: kept` for something that survives until you
+ /// delete it, and give a `kept` file a `path` to publish it where a
+ /// hosted-API route can serve it. A workspace's `kept` files are bounded by
+ /// its plan; past the ceiling an upload answers `409`
+ /// `file_storage_limit_reached`.
+ /// An agent reads an attached file inside the run through its `read_file`
+ /// tool: PDF, HTML, Markdown and plain text are extracted, and an image is
+ /// transcribed and described by a vision model.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). ///
- /// /// /// /// The file to store (at most 25 MiB). @@ -733,25 +838,54 @@ request.Filename is null /// /// The file to store (at most 25 MiB). /// + /// + /// The person this file is for, in your own vocabulary - the same value
+ /// a run, a conversation and a widget session take. Only a run acting
+ /// for that person can read it. Omit for a workspace-wide file. + /// + /// + /// How long to keep it. `ephemeral` (the default) is working material
+ /// for a run and is deleted after 14 days. `kept` survives until you
+ /// delete it - use it for anything an agent produced that you intend to
+ /// keep or serve. + /// + /// + /// Publish the file under this name so a hosted-API route can serve it,
+ /// for example `index.html` or `reports/q3.html`. Unique among the
+ /// workspace's live files, and only valid on a `kept` file with no
+ /// `user_identity` - a path on something that expires in a fortnight is
+ /// a URL that breaks, and a route answers whoever holds the URL, so it
+ /// has no person to scope to. A path already in use answers `409`. + /// + /// + /// The project to create the file in, as a `proj_...` id; omit for the
+ /// caller's default. + /// /// 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 UploadAssetAsync( - string storeId, + public async global::System.Threading.Tasks.Task UploadAsync( byte[] file, string filename, string? speechifyVersion = default, + string? userIdentity = default, + global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind? kind = default, + string? path = default, + string? projectId = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { - var __request = new global::Speechify.UploadAssetRequest + var __request = new global::Speechify.UploadRequest2 { File = file, Filename = filename, + UserIdentity = userIdentity, + Kind = kind, + Path = path, + ProjectId = projectId, }; - return await UploadAssetAsync( - storeId: storeId, + return await UploadAsync( speechifyVersion: speechifyVersion, request: __request, requestOptions: requestOptions, @@ -759,12 +893,26 @@ request.Filename is null } /// - /// Upload Asset
- /// Upload one file (multipart form field `file`, at most 25 MiB). The
- /// part's content type is stored and served back from `bytes_path`.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + /// Upload File
+ /// Upload one file (multipart form field `file`, at most 25 MiB) so a run
+ /// can be handed it: pass the returned `id` in `attachments` on
+ /// `POST /v1/agents/{agent_id}/runs`, a team run, or a trigger's run spec.
+ /// Scope it with `user_identity` to the person it belongs to, and only a
+ /// run acting for that person can read it; leave it empty and any run in
+ /// the workspace can.
+ /// `kind` decides how long it lives. The default, `ephemeral`, is deleted
+ /// automatically 14 days after upload (`expires_at`) - working material
+ /// rather than a corpus; for documents an agent should search later, use a
+ /// knowledge base. Send `kind: kept` for something that survives until you
+ /// delete it, and give a `kept` file a `path` to publish it where a
+ /// hosted-API route can serve it. A workspace's `kept` files are bounded by
+ /// its plan; past the ceiling an upload answers `409`
+ /// `file_storage_limit_reached`.
+ /// An agent reads an attached file inside the run through its `read_file`
+ /// tool: PDF, HTML, Markdown and plain text are extracted, and an image is
+ /// transcribed and described by a vision model.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). ///
- /// /// /// /// The file to store (at most 25 MiB). @@ -772,37 +920,66 @@ request.Filename is null /// /// The file to store (at most 25 MiB). /// + /// + /// The person this file is for, in your own vocabulary - the same value
+ /// a run, a conversation and a widget session take. Only a run acting
+ /// for that person can read it. Omit for a workspace-wide file. + /// + /// + /// How long to keep it. `ephemeral` (the default) is working material
+ /// for a run and is deleted after 14 days. `kept` survives until you
+ /// delete it - use it for anything an agent produced that you intend to
+ /// keep or serve. + /// + /// + /// Publish the file under this name so a hosted-API route can serve it,
+ /// for example `index.html` or `reports/q3.html`. Unique among the
+ /// workspace's live files, and only valid on a `kept` file with no
+ /// `user_identity` - a path on something that expires in a fortnight is
+ /// a URL that breaks, and a route answers whoever holds the URL, so it
+ /// has no person to scope to. A path already in use answers `409`. + /// + /// + /// The project to create the file in, as a `proj_...` id; omit for the
+ /// caller's default. + /// /// 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 UploadAssetAsync( - string storeId, + public async global::System.Threading.Tasks.Task UploadAsync( global::System.IO.Stream file, string filename, string? speechifyVersion = default, + string? userIdentity = default, + global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind? kind = default, + string? path = default, + string? projectId = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { file = file ?? throw new global::System.ArgumentNullException(nameof(file)); - var request = new global::Speechify.UploadAssetRequest + var request = new global::Speechify.UploadRequest2 { File = global::System.Array.Empty(), Filename = filename, + UserIdentity = userIdentity, + Kind = kind, + Path = path, + ProjectId = projectId, }; PrepareArguments( client: HttpClient); - PrepareUploadAssetArguments( + PrepareUploadArguments( httpClient: HttpClient, - storeId: ref storeId, speechifyVersion: ref speechifyVersion, request: request); var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( availableAuthorizations: Authorizations, - securityRequirements: s_UploadAssetSecurityRequirements, - operationName: "UploadAssetAsync"); + securityRequirements: s_UploadSecurityRequirements, + operationName: "UploadAsync"); using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( clientOptions: Options, @@ -822,7 +999,7 @@ request.Filename is null { var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/stores/{storeId}/assets", + path: "/v1/files", baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); __path = global::Speechify.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -899,6 +1076,39 @@ request.Filename is null __contentFile.Headers.ContentDisposition.FileNameStar = null; } + if (request.UserIdentity != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.UserIdentity ?? string.Empty), + name: "\"user_identity\""); + + } + if (request.Kind != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent((request.Kind).HasValue ? (request.Kind).GetValueOrDefault().ToValueString() : string.Empty), + name: "\"kind\""); + + } + if (request.Path != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Path ?? string.Empty), + name: "\"path\""); + + } + if (request.ProjectId != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.ProjectId ?? string.Empty), + name: "\"project_id\""); + + } + __httpRequest.Content = __httpRequestContent; global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( @@ -909,10 +1119,9 @@ request.Filename is null PrepareRequest( client: HttpClient, request: __httpRequest); - PrepareUploadAssetRequest( + PrepareUploadRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - storeId: storeId!, speechifyVersion: speechifyVersion, request: request); @@ -931,9 +1140,9 @@ request.Filename is null await global::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UploadAsset", - methodName: "UploadAssetAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets\"", + operationId: "Upload", + methodName: "UploadAsync", + pathTemplate: "\"/v1/files\"", httpMethod: "POST", baseUri: BaseUri, request: __httpRequest!, @@ -965,9 +1174,9 @@ request.Filename is null await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UploadAsset", - methodName: "UploadAssetAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets\"", + operationId: "Upload", + methodName: "UploadAsync", + pathTemplate: "\"/v1/files\"", httpMethod: "POST", baseUri: BaseUri, request: __httpRequest!, @@ -1006,9 +1215,9 @@ request.Filename is null await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UploadAsset", - methodName: "UploadAssetAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets\"", + operationId: "Upload", + methodName: "UploadAsync", + pathTemplate: "\"/v1/files\"", httpMethod: "POST", baseUri: BaseUri, request: __httpRequest!, @@ -1046,7 +1255,7 @@ request.Filename is null ProcessResponse( client: HttpClient, response: __response); - ProcessUploadAssetResponse( + ProcessUploadResponse( httpClient: HttpClient, httpResponseMessage: __response); if (__response.IsSuccessStatusCode) @@ -1054,9 +1263,9 @@ request.Filename is null await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UploadAsset", - methodName: "UploadAssetAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets\"", + operationId: "Upload", + methodName: "UploadAsync", + pathTemplate: "\"/v1/files\"", httpMethod: "POST", baseUri: BaseUri, request: __httpRequest!, @@ -1076,9 +1285,9 @@ request.Filename is null await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UploadAsset", - methodName: "UploadAssetAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets\"", + operationId: "Upload", + methodName: "UploadAsync", + pathTemplate: "\"/v1/files\"", httpMethod: "POST", baseUri: BaseUri, request: __httpRequest!, @@ -1241,6 +1450,43 @@ request.Filename is null 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)); + } // Request body exceeded a per-endpoint size limit (e.g. KB document upload cap, batch-call CSV cap, audio-asset WAV cap). if ((int)__response.StatusCode == 413) { @@ -1328,7 +1574,7 @@ request.Filename is null client: HttpClient, response: __response, content: ref __content); - ProcessUploadAssetResponseContent( + ProcessUploadResponseContent( httpClient: HttpClient, httpResponseMessage: __response, content: ref __content); @@ -1338,7 +1584,7 @@ request.Filename is null __response.EnsureSuccessStatusCode(); return - global::Speechify.StoreAsset.FromJson(__content, JsonSerializerContext) ?? + global::Speechify.File.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } catch (global::System.Exception __ex) @@ -1366,7 +1612,7 @@ request.Filename is null ).ConfigureAwait(false); return - await global::Speechify.StoreAsset.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + await global::Speechify.File.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); } catch (global::System.Exception __ex) @@ -1404,12 +1650,26 @@ request.Filename is null } } /// - /// Upload Asset
- /// Upload one file (multipart form field `file`, at most 25 MiB). The
- /// part's content type is stored and served back from `bytes_path`.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + /// Upload File
+ /// Upload one file (multipart form field `file`, at most 25 MiB) so a run
+ /// can be handed it: pass the returned `id` in `attachments` on
+ /// `POST /v1/agents/{agent_id}/runs`, a team run, or a trigger's run spec.
+ /// Scope it with `user_identity` to the person it belongs to, and only a
+ /// run acting for that person can read it; leave it empty and any run in
+ /// the workspace can.
+ /// `kind` decides how long it lives. The default, `ephemeral`, is deleted
+ /// automatically 14 days after upload (`expires_at`) - working material
+ /// rather than a corpus; for documents an agent should search later, use a
+ /// knowledge base. Send `kind: kept` for something that survives until you
+ /// delete it, and give a `kept` file a `path` to publish it where a
+ /// hosted-API route can serve it. A workspace's `kept` files are bounded by
+ /// its plan; past the ceiling an upload answers `409`
+ /// `file_storage_limit_reached`.
+ /// An agent reads an attached file inside the run through its `read_file`
+ /// tool: PDF, HTML, Markdown and plain text are extracted, and an image is
+ /// transcribed and described by a vision model.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). ///
- /// /// /// /// The file to store (at most 25 MiB). @@ -1417,37 +1677,66 @@ request.Filename is null /// /// The file to store (at most 25 MiB). /// + /// + /// The person this file is for, in your own vocabulary - the same value
+ /// a run, a conversation and a widget session take. Only a run acting
+ /// for that person can read it. Omit for a workspace-wide file. + /// + /// + /// How long to keep it. `ephemeral` (the default) is working material
+ /// for a run and is deleted after 14 days. `kept` survives until you
+ /// delete it - use it for anything an agent produced that you intend to
+ /// keep or serve. + /// + /// + /// Publish the file under this name so a hosted-API route can serve it,
+ /// for example `index.html` or `reports/q3.html`. Unique among the
+ /// workspace's live files, and only valid on a `kept` file with no
+ /// `user_identity` - a path on something that expires in a fortnight is
+ /// a URL that breaks, and a route answers whoever holds the URL, so it
+ /// has no person to scope to. A path already in use answers `409`. + /// + /// + /// The project to create the file in, as a `proj_...` id; omit for the
+ /// caller's default. + /// /// 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> UploadAssetAsResponseAsync( - string storeId, + public async global::System.Threading.Tasks.Task> UploadAsResponseAsync( global::System.IO.Stream file, string filename, string? speechifyVersion = default, + string? userIdentity = default, + global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind? kind = default, + string? path = default, + string? projectId = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { file = file ?? throw new global::System.ArgumentNullException(nameof(file)); - var request = new global::Speechify.UploadAssetRequest + var request = new global::Speechify.UploadRequest2 { File = global::System.Array.Empty(), Filename = filename, + UserIdentity = userIdentity, + Kind = kind, + Path = path, + ProjectId = projectId, }; PrepareArguments( client: HttpClient); - PrepareUploadAssetArguments( + PrepareUploadArguments( httpClient: HttpClient, - storeId: ref storeId, speechifyVersion: ref speechifyVersion, request: request); var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations( availableAuthorizations: Authorizations, - securityRequirements: s_UploadAssetSecurityRequirements, - operationName: "UploadAssetAsync"); + securityRequirements: s_UploadSecurityRequirements, + operationName: "UploadAsync"); using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( clientOptions: Options, @@ -1467,7 +1756,7 @@ request.Filename is null { var __pathBuilder = new global::Speechify.PathBuilder( - path: $"/v1/stores/{storeId}/assets", + path: "/v1/files", baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); __path = global::Speechify.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -1544,6 +1833,39 @@ request.Filename is null __contentFile.Headers.ContentDisposition.FileNameStar = null; } + if (request.UserIdentity != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.UserIdentity ?? string.Empty), + name: "\"user_identity\""); + + } + if (request.Kind != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent((request.Kind).HasValue ? (request.Kind).GetValueOrDefault().ToValueString() : string.Empty), + name: "\"kind\""); + + } + if (request.Path != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Path ?? string.Empty), + name: "\"path\""); + + } + if (request.ProjectId != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.ProjectId ?? string.Empty), + name: "\"project_id\""); + + } + __httpRequest.Content = __httpRequestContent; global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders( @@ -1554,10 +1876,9 @@ request.Filename is null PrepareRequest( client: HttpClient, request: __httpRequest); - PrepareUploadAssetRequest( + PrepareUploadRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - storeId: storeId!, speechifyVersion: speechifyVersion, request: request); @@ -1576,9 +1897,9 @@ request.Filename is null await global::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UploadAsset", - methodName: "UploadAssetAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets\"", + operationId: "Upload", + methodName: "UploadAsync", + pathTemplate: "\"/v1/files\"", httpMethod: "POST", baseUri: BaseUri, request: __httpRequest!, @@ -1610,9 +1931,9 @@ request.Filename is null await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UploadAsset", - methodName: "UploadAssetAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets\"", + operationId: "Upload", + methodName: "UploadAsync", + pathTemplate: "\"/v1/files\"", httpMethod: "POST", baseUri: BaseUri, request: __httpRequest!, @@ -1651,9 +1972,9 @@ request.Filename is null await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UploadAsset", - methodName: "UploadAssetAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets\"", + operationId: "Upload", + methodName: "UploadAsync", + pathTemplate: "\"/v1/files\"", httpMethod: "POST", baseUri: BaseUri, request: __httpRequest!, @@ -1691,7 +2012,7 @@ request.Filename is null ProcessResponse( client: HttpClient, response: __response); - ProcessUploadAssetResponse( + ProcessUploadResponse( httpClient: HttpClient, httpResponseMessage: __response); if (__response.IsSuccessStatusCode) @@ -1699,9 +2020,9 @@ request.Filename is null await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UploadAsset", - methodName: "UploadAssetAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets\"", + operationId: "Upload", + methodName: "UploadAsync", + pathTemplate: "\"/v1/files\"", httpMethod: "POST", baseUri: BaseUri, request: __httpRequest!, @@ -1721,9 +2042,9 @@ request.Filename is null await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "UploadAsset", - methodName: "UploadAssetAsync", - pathTemplate: "$\"/v1/stores/{storeId}/assets\"", + operationId: "Upload", + methodName: "UploadAsync", + pathTemplate: "\"/v1/files\"", httpMethod: "POST", baseUri: BaseUri, request: __httpRequest!, @@ -1886,6 +2207,43 @@ request.Filename is null 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)); + } // Request body exceeded a per-endpoint size limit (e.g. KB document upload cap, batch-call CSV cap, audio-asset WAV cap). if ((int)__response.StatusCode == 413) { @@ -1973,7 +2331,7 @@ request.Filename is null client: HttpClient, response: __response, content: ref __content); - ProcessUploadAssetResponseContent( + ProcessUploadResponseContent( httpClient: HttpClient, httpResponseMessage: __response, content: ref __content); @@ -1982,9 +2340,9 @@ request.Filename is null { __response.EnsureSuccessStatusCode(); - var __value = global::Speechify.StoreAsset.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Speechify.File.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - return new global::Speechify.AutoSDKHttpResponse( + return new global::Speechify.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, @@ -2014,9 +2372,9 @@ request.Filename is null #endif ).ConfigureAwait(false); - var __value = await global::Speechify.StoreAsset.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Speechify.File.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); - return new global::Speechify.AutoSDKHttpResponse( + return new global::Speechify.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, diff --git a/src/libs/Speechify/Generated/Speechify.AssetsClient.g.cs b/src/libs/Speechify/Generated/Speechify.FilesClient.g.cs similarity index 93% rename from src/libs/Speechify/Generated/Speechify.AssetsClient.g.cs rename to src/libs/Speechify/Generated/Speechify.FilesClient.g.cs index a3d34ab..9c66608 100644 --- a/src/libs/Speechify/Generated/Speechify.AssetsClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.FilesClient.g.cs @@ -7,7 +7,7 @@ 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 AssetsClient : global::Speechify.IAssetsClient, global::System.IDisposable + public sealed partial class FilesClient : global::Speechify.IFilesClient, global::System.IDisposable { /// /// https://api.speechify.ai @@ -51,7 +51,7 @@ public sealed partial class AssetsClient : global::Speechify.IAssetsClient, glob /// - /// Creates a new instance of the AssetsClient. + /// Creates a new instance of the FilesClient. /// 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. /// @@ -59,7 +59,7 @@ public sealed partial class AssetsClient : global::Speechify.IAssetsClient, glob /// 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 AssetsClient( + public FilesClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, global::System.Collections.Generic.List? authorizations = null, @@ -73,14 +73,14 @@ public AssetsClient( } /// - /// Creates a new instance of the AssetsClient with explicit options but no base URL override. + /// Creates a new instance of the FilesClient 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 AssetsClient( + public FilesClient( global::System.Net.Http.HttpClient? httpClient, global::System.Collections.Generic.List? authorizations, global::Speechify.AutoSDKClientOptions? options, @@ -94,7 +94,7 @@ public AssetsClient( } /// - /// Creates a new instance of the AssetsClient. + /// Creates a new instance of the FilesClient. /// 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. /// @@ -103,7 +103,7 @@ public AssetsClient( /// 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 AssetsClient( + public FilesClient( global::System.Net.Http.HttpClient? httpClient, global::System.Uri? baseUri, global::System.Collections.Generic.List? authorizations, diff --git a/src/libs/Speechify/Generated/Speechify.IAssetsClient.UploadAsset.g.cs b/src/libs/Speechify/Generated/Speechify.IAssetsClient.UploadAsset.g.cs deleted file mode 100644 index 32f04d3..0000000 --- a/src/libs/Speechify/Generated/Speechify.IAssetsClient.UploadAsset.g.cs +++ /dev/null @@ -1,119 +0,0 @@ -#nullable enable - -namespace Speechify -{ - public partial interface IAssetsClient - { - /// - /// Upload Asset
- /// Upload one file (multipart form field `file`, at most 25 MiB). The
- /// part's content type is stored and served back from `bytes_path`.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). - ///
- /// - /// - /// - /// 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 UploadAssetAsync( - string storeId, - - global::Speechify.UploadAssetRequest request, - string? speechifyVersion = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Upload Asset
- /// Upload one file (multipart form field `file`, at most 25 MiB). The
- /// part's content type is stored and served back from `bytes_path`.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). - ///
- /// - /// - /// - /// 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> UploadAssetAsResponseAsync( - string storeId, - - global::Speechify.UploadAssetRequest request, - string? speechifyVersion = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Upload Asset
- /// Upload one file (multipart form field `file`, at most 25 MiB). The
- /// part's content type is stored and served back from `bytes_path`.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). - ///
- /// - /// - /// - /// The file to store (at most 25 MiB). - /// - /// - /// The file to store (at most 25 MiB). - /// - /// 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 UploadAssetAsync( - string storeId, - byte[] file, - string filename, - string? speechifyVersion = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// Upload Asset
- /// Upload one file (multipart form field `file`, at most 25 MiB). The
- /// part's content type is stored and served back from `bytes_path`.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). - ///
- /// - /// - /// - /// The file to store (at most 25 MiB). - /// - /// - /// The file to store (at most 25 MiB). - /// - /// 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 UploadAssetAsync( - string storeId, - global::System.IO.Stream file, - string filename, - string? speechifyVersion = default, - global::Speechify.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Upload Asset
- /// Upload one file (multipart form field `file`, at most 25 MiB). The
- /// part's content type is stored and served back from `bytes_path`.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). - ///
- /// - /// - /// - /// The file to store (at most 25 MiB). - /// - /// - /// The file to store (at most 25 MiB). - /// - /// 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> UploadAssetAsResponseAsync( - string storeId, - global::System.IO.Stream file, - string filename, - 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.IAssetsClient.GetAsset.g.cs b/src/libs/Speechify/Generated/Speechify.IFilesClient.Delete.g.cs similarity index 61% rename from src/libs/Speechify/Generated/Speechify.IAssetsClient.GetAsset.g.cs rename to src/libs/Speechify/Generated/Speechify.IFilesClient.Delete.g.cs index 31c458a..0994f87 100644 --- a/src/libs/Speechify/Generated/Speechify.IAssetsClient.GetAsset.g.cs +++ b/src/libs/Speechify/Generated/Speechify.IFilesClient.Delete.g.cs @@ -2,39 +2,37 @@ namespace Speechify { - public partial interface IAssetsClient + public partial interface IFilesClient { /// - /// Get Asset
- /// Read an asset's metadata.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + /// Delete File
+ /// Delete a file and its bytes. A run already holding it as an attachment
+ /// stops being able to read it.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). ///
- /// - /// + /// /// /// 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 GetAssetAsync( - string storeId, - string assetId, + global::System.Threading.Tasks.Task DeleteAsync( + string fileId, string? speechifyVersion = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Get Asset
- /// Read an asset's metadata.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + /// Delete File
+ /// Delete a file and its bytes. A run already holding it as an attachment
+ /// stops being able to read it.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). ///
- /// - /// + /// /// /// 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> GetAssetAsResponseAsync( - string storeId, - string assetId, + global::System.Threading.Tasks.Task> DeleteAsResponseAsync( + string fileId, string? speechifyVersion = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Speechify/Generated/Speechify.IAssetsClient.DeleteAsset.g.cs b/src/libs/Speechify/Generated/Speechify.IFilesClient.Get.g.cs similarity index 62% rename from src/libs/Speechify/Generated/Speechify.IAssetsClient.DeleteAsset.g.cs rename to src/libs/Speechify/Generated/Speechify.IFilesClient.Get.g.cs index 595eb05..e3f1e9c 100644 --- a/src/libs/Speechify/Generated/Speechify.IAssetsClient.DeleteAsset.g.cs +++ b/src/libs/Speechify/Generated/Speechify.IFilesClient.Get.g.cs @@ -2,39 +2,35 @@ namespace Speechify { - public partial interface IAssetsClient + public partial interface IFilesClient { /// - /// Delete Asset
- /// Delete an asset.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + /// Get File
+ /// Read a file's metadata. A file past its `expires_at` answers 404.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). ///
- /// - /// + /// /// /// 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 DeleteAssetAsync( - string storeId, - string assetId, + global::System.Threading.Tasks.Task GetAsync( + string fileId, string? speechifyVersion = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Delete Asset
- /// Delete an asset.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + /// Get File
+ /// Read a file's metadata. A file past its `expires_at` answers 404.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). ///
- /// - /// + /// /// /// 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> DeleteAssetAsResponseAsync( - string storeId, - string assetId, + global::System.Threading.Tasks.Task> GetAsResponseAsync( + string fileId, string? speechifyVersion = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Speechify/Generated/Speechify.IAssetsClient.GetAssetBytes.g.cs b/src/libs/Speechify/Generated/Speechify.IFilesClient.GetContent.g.cs similarity index 55% rename from src/libs/Speechify/Generated/Speechify.IAssetsClient.GetAssetBytes.g.cs rename to src/libs/Speechify/Generated/Speechify.IFilesClient.GetContent.g.cs index 83425da..a8cdf6b 100644 --- a/src/libs/Speechify/Generated/Speechify.IAssetsClient.GetAssetBytes.g.cs +++ b/src/libs/Speechify/Generated/Speechify.IFilesClient.GetContent.g.cs @@ -2,56 +2,56 @@ namespace Speechify { - public partial interface IAssetsClient + public partial interface IFilesClient { /// - /// Get Asset Bytes
- /// Stream the asset's bytes with its stored content type. Private and uncacheable.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + /// Get File Content
+ /// Download the file's bytes. Private, uncacheable, and always served as
+ /// an `application/octet-stream` attachment whatever the file's own type -
+ /// read `content_type` from the file object for what it actually is.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). ///
- /// - /// + /// /// /// 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 GetAssetBytesAsync( - string storeId, - string assetId, + global::System.Threading.Tasks.Task GetContentAsync( + string fileId, string? speechifyVersion = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Get Asset Bytes
- /// Stream the asset's bytes with its stored content type. Private and uncacheable.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + /// Get File Content
+ /// Download the file's bytes. Private, uncacheable, and always served as
+ /// an `application/octet-stream` attachment whatever the file's own type -
+ /// read `content_type` from the file object for what it actually is.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). ///
- /// - /// + /// /// /// 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 GetAssetBytesAsStreamAsync( - string storeId, - string assetId, + global::System.Threading.Tasks.Task GetContentAsStreamAsync( + string fileId, string? speechifyVersion = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Get Asset Bytes
- /// Stream the asset's bytes with its stored content type. Private and uncacheable.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + /// Get File Content
+ /// Download the file's bytes. Private, uncacheable, and always served as
+ /// an `application/octet-stream` attachment whatever the file's own type -
+ /// read `content_type` from the file object for what it actually is.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). ///
- /// - /// + /// /// /// 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> GetAssetBytesAsResponseAsync( - string storeId, - string assetId, + global::System.Threading.Tasks.Task> GetContentAsResponseAsync( + string fileId, string? speechifyVersion = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Speechify/Generated/Speechify.IAssetsClient.ListAssets.g.cs b/src/libs/Speechify/Generated/Speechify.IFilesClient.List.g.cs similarity index 55% rename from src/libs/Speechify/Generated/Speechify.IAssetsClient.ListAssets.g.cs rename to src/libs/Speechify/Generated/Speechify.IFilesClient.List.g.cs index 0530200..f200dbf 100644 --- a/src/libs/Speechify/Generated/Speechify.IAssetsClient.ListAssets.g.cs +++ b/src/libs/Speechify/Generated/Speechify.IFilesClient.List.g.cs @@ -2,47 +2,59 @@ namespace Speechify { - public partial interface IAssetsClient + public partial interface IFilesClient { /// - /// List Assets
- /// List a store's assets, newest first.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + /// List Files
+ /// List the workspace's live files, newest first. A file that has passed
+ /// its `expires_at` is gone from this list and from every read.
+ /// Cursor-paginated; walk pages while `has_more` is true.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). ///
- /// /// /// /// Default Value: 50 /// + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task ListAssetsAsync( - string storeId, + global::System.Threading.Tasks.Task ListAsync( string? cursor = default, int? limit = default, + string? projectId = default, + string? userIdentity = default, + global::Speechify.V1FilesGetParametersKind? kind = default, string? speechifyVersion = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// - /// List Assets
- /// List a store's assets, newest first.
- /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise). + /// List Files
+ /// List the workspace's live files, newest first. A file that has passed
+ /// its `expires_at` is gone from this list and from every read.
+ /// Cursor-paginated; walk pages while `has_more` is true.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). ///
- /// /// /// /// Default Value: 50 /// + /// + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task> ListAssetsAsResponseAsync( - string storeId, + global::System.Threading.Tasks.Task> ListAsResponseAsync( string? cursor = default, int? limit = default, + string? projectId = default, + string? userIdentity = default, + global::Speechify.V1FilesGetParametersKind? kind = default, string? speechifyVersion = default, global::Speechify.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Speechify/Generated/Speechify.IFilesClient.Upload.g.cs b/src/libs/Speechify/Generated/Speechify.IFilesClient.Upload.g.cs new file mode 100644 index 0000000..6f925e3 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.IFilesClient.Upload.g.cs @@ -0,0 +1,265 @@ +#nullable enable + +namespace Speechify +{ + public partial interface IFilesClient + { + /// + /// Upload File
+ /// Upload one file (multipart form field `file`, at most 25 MiB) so a run
+ /// can be handed it: pass the returned `id` in `attachments` on
+ /// `POST /v1/agents/{agent_id}/runs`, a team run, or a trigger's run spec.
+ /// Scope it with `user_identity` to the person it belongs to, and only a
+ /// run acting for that person can read it; leave it empty and any run in
+ /// the workspace can.
+ /// `kind` decides how long it lives. The default, `ephemeral`, is deleted
+ /// automatically 14 days after upload (`expires_at`) - working material
+ /// rather than a corpus; for documents an agent should search later, use a
+ /// knowledge base. Send `kind: kept` for something that survives until you
+ /// delete it, and give a `kept` file a `path` to publish it where a
+ /// hosted-API route can serve it. A workspace's `kept` files are bounded by
+ /// its plan; past the ceiling an upload answers `409`
+ /// `file_storage_limit_reached`.
+ /// An agent reads an attached file inside the run through its `read_file`
+ /// tool: PDF, HTML, Markdown and plain text are extracted, and an image is
+ /// transcribed and described by a vision model.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). + ///
+ /// + /// + /// 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 UploadAsync( + + global::Speechify.UploadRequest2 request, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upload File
+ /// Upload one file (multipart form field `file`, at most 25 MiB) so a run
+ /// can be handed it: pass the returned `id` in `attachments` on
+ /// `POST /v1/agents/{agent_id}/runs`, a team run, or a trigger's run spec.
+ /// Scope it with `user_identity` to the person it belongs to, and only a
+ /// run acting for that person can read it; leave it empty and any run in
+ /// the workspace can.
+ /// `kind` decides how long it lives. The default, `ephemeral`, is deleted
+ /// automatically 14 days after upload (`expires_at`) - working material
+ /// rather than a corpus; for documents an agent should search later, use a
+ /// knowledge base. Send `kind: kept` for something that survives until you
+ /// delete it, and give a `kept` file a `path` to publish it where a
+ /// hosted-API route can serve it. A workspace's `kept` files are bounded by
+ /// its plan; past the ceiling an upload answers `409`
+ /// `file_storage_limit_reached`.
+ /// An agent reads an attached file inside the run through its `read_file`
+ /// tool: PDF, HTML, Markdown and plain text are extracted, and an image is
+ /// transcribed and described by a vision model.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). + ///
+ /// + /// + /// 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> UploadAsResponseAsync( + + global::Speechify.UploadRequest2 request, + string? speechifyVersion = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upload File
+ /// Upload one file (multipart form field `file`, at most 25 MiB) so a run
+ /// can be handed it: pass the returned `id` in `attachments` on
+ /// `POST /v1/agents/{agent_id}/runs`, a team run, or a trigger's run spec.
+ /// Scope it with `user_identity` to the person it belongs to, and only a
+ /// run acting for that person can read it; leave it empty and any run in
+ /// the workspace can.
+ /// `kind` decides how long it lives. The default, `ephemeral`, is deleted
+ /// automatically 14 days after upload (`expires_at`) - working material
+ /// rather than a corpus; for documents an agent should search later, use a
+ /// knowledge base. Send `kind: kept` for something that survives until you
+ /// delete it, and give a `kept` file a `path` to publish it where a
+ /// hosted-API route can serve it. A workspace's `kept` files are bounded by
+ /// its plan; past the ceiling an upload answers `409`
+ /// `file_storage_limit_reached`.
+ /// An agent reads an attached file inside the run through its `read_file`
+ /// tool: PDF, HTML, Markdown and plain text are extracted, and an image is
+ /// transcribed and described by a vision model.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). + ///
+ /// + /// + /// The file to store (at most 25 MiB). + /// + /// + /// The file to store (at most 25 MiB). + /// + /// + /// The person this file is for, in your own vocabulary - the same value
+ /// a run, a conversation and a widget session take. Only a run acting
+ /// for that person can read it. Omit for a workspace-wide file. + /// + /// + /// How long to keep it. `ephemeral` (the default) is working material
+ /// for a run and is deleted after 14 days. `kept` survives until you
+ /// delete it - use it for anything an agent produced that you intend to
+ /// keep or serve. + /// + /// + /// Publish the file under this name so a hosted-API route can serve it,
+ /// for example `index.html` or `reports/q3.html`. Unique among the
+ /// workspace's live files, and only valid on a `kept` file with no
+ /// `user_identity` - a path on something that expires in a fortnight is
+ /// a URL that breaks, and a route answers whoever holds the URL, so it
+ /// has no person to scope to. A path already in use answers `409`. + /// + /// + /// The project to create the file in, as a `proj_...` id; omit for the
+ /// caller's default. + /// + /// 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 UploadAsync( + byte[] file, + string filename, + string? speechifyVersion = default, + string? userIdentity = default, + global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind? kind = default, + string? path = default, + string? projectId = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Upload File
+ /// Upload one file (multipart form field `file`, at most 25 MiB) so a run
+ /// can be handed it: pass the returned `id` in `attachments` on
+ /// `POST /v1/agents/{agent_id}/runs`, a team run, or a trigger's run spec.
+ /// Scope it with `user_identity` to the person it belongs to, and only a
+ /// run acting for that person can read it; leave it empty and any run in
+ /// the workspace can.
+ /// `kind` decides how long it lives. The default, `ephemeral`, is deleted
+ /// automatically 14 days after upload (`expires_at`) - working material
+ /// rather than a corpus; for documents an agent should search later, use a
+ /// knowledge base. Send `kind: kept` for something that survives until you
+ /// delete it, and give a `kept` file a `path` to publish it where a
+ /// hosted-API route can serve it. A workspace's `kept` files are bounded by
+ /// its plan; past the ceiling an upload answers `409`
+ /// `file_storage_limit_reached`.
+ /// An agent reads an attached file inside the run through its `read_file`
+ /// tool: PDF, HTML, Markdown and plain text are extracted, and an image is
+ /// transcribed and described by a vision model.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). + ///
+ /// + /// + /// The file to store (at most 25 MiB). + /// + /// + /// The file to store (at most 25 MiB). + /// + /// + /// The person this file is for, in your own vocabulary - the same value
+ /// a run, a conversation and a widget session take. Only a run acting
+ /// for that person can read it. Omit for a workspace-wide file. + /// + /// + /// How long to keep it. `ephemeral` (the default) is working material
+ /// for a run and is deleted after 14 days. `kept` survives until you
+ /// delete it - use it for anything an agent produced that you intend to
+ /// keep or serve. + /// + /// + /// Publish the file under this name so a hosted-API route can serve it,
+ /// for example `index.html` or `reports/q3.html`. Unique among the
+ /// workspace's live files, and only valid on a `kept` file with no
+ /// `user_identity` - a path on something that expires in a fortnight is
+ /// a URL that breaks, and a route answers whoever holds the URL, so it
+ /// has no person to scope to. A path already in use answers `409`. + /// + /// + /// The project to create the file in, as a `proj_...` id; omit for the
+ /// caller's default. + /// + /// 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 UploadAsync( + global::System.IO.Stream file, + string filename, + string? speechifyVersion = default, + string? userIdentity = default, + global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind? kind = default, + string? path = default, + string? projectId = default, + global::Speechify.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upload File
+ /// Upload one file (multipart form field `file`, at most 25 MiB) so a run
+ /// can be handed it: pass the returned `id` in `attachments` on
+ /// `POST /v1/agents/{agent_id}/runs`, a team run, or a trigger's run spec.
+ /// Scope it with `user_identity` to the person it belongs to, and only a
+ /// run acting for that person can read it; leave it empty and any run in
+ /// the workspace can.
+ /// `kind` decides how long it lives. The default, `ephemeral`, is deleted
+ /// automatically 14 days after upload (`expires_at`) - working material
+ /// rather than a corpus; for documents an agent should search later, use a
+ /// knowledge base. Send `kind: kept` for something that survives until you
+ /// delete it, and give a `kept` file a `path` to publish it where a
+ /// hosted-API route can serve it. A workspace's `kept` files are bounded by
+ /// its plan; past the ceiling an upload answers `409`
+ /// `file_storage_limit_reached`.
+ /// An agent reads an attached file inside the run through its `read_file`
+ /// tool: PDF, HTML, Markdown and plain text are extracted, and an image is
+ /// transcribed and described by a vision model.
+ /// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise). + ///
+ /// + /// + /// The file to store (at most 25 MiB). + /// + /// + /// The file to store (at most 25 MiB). + /// + /// + /// The person this file is for, in your own vocabulary - the same value
+ /// a run, a conversation and a widget session take. Only a run acting
+ /// for that person can read it. Omit for a workspace-wide file. + /// + /// + /// How long to keep it. `ephemeral` (the default) is working material
+ /// for a run and is deleted after 14 days. `kept` survives until you
+ /// delete it - use it for anything an agent produced that you intend to
+ /// keep or serve. + /// + /// + /// Publish the file under this name so a hosted-API route can serve it,
+ /// for example `index.html` or `reports/q3.html`. Unique among the
+ /// workspace's live files, and only valid on a `kept` file with no
+ /// `user_identity` - a path on something that expires in a fortnight is
+ /// a URL that breaks, and a route answers whoever holds the URL, so it
+ /// has no person to scope to. A path already in use answers `409`. + /// + /// + /// The project to create the file in, as a `proj_...` id; omit for the
+ /// caller's default. + /// + /// 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> UploadAsResponseAsync( + global::System.IO.Stream file, + string filename, + string? speechifyVersion = default, + string? userIdentity = default, + global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind? kind = default, + string? path = 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.IAssetsClient.g.cs b/src/libs/Speechify/Generated/Speechify.IFilesClient.g.cs similarity index 96% rename from src/libs/Speechify/Generated/Speechify.IAssetsClient.g.cs rename to src/libs/Speechify/Generated/Speechify.IFilesClient.g.cs index 86fb6d4..b4944f3 100644 --- a/src/libs/Speechify/Generated/Speechify.IAssetsClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.IFilesClient.g.cs @@ -7,7 +7,7 @@ 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 IAssetsClient : global::System.IDisposable + public partial interface IFilesClient : global::System.IDisposable { /// /// The HttpClient instance. diff --git a/src/libs/Speechify/Generated/Speechify.IRoutesClient.CreateRoute.g.cs b/src/libs/Speechify/Generated/Speechify.IRoutesClient.CreateRoute.g.cs index 7d40734..123d1e3 100644 --- a/src/libs/Speechify/Generated/Speechify.IRoutesClient.CreateRoute.g.cs +++ b/src/libs/Speechify/Generated/Speechify.IRoutesClient.CreateRoute.g.cs @@ -93,7 +93,8 @@ public partial interface IRoutesClient /// `store_query` (store_id, collection, where, order_by, limit),
/// `store_document` (store_id, collection, document_id),
/// `run_latest` (trigger_id of a schedule trigger),
- /// `run` (trigger_id of a webhook trigger, wait_seconds). + /// `run` (trigger_id of a webhook trigger, wait_seconds),
+ /// `file` (file_path of a published file). /// /// /// diff --git a/src/libs/Speechify/Generated/Speechify.IRoutesClient.UpdateRoute.g.cs b/src/libs/Speechify/Generated/Speechify.IRoutesClient.UpdateRoute.g.cs index ff070e9..4067e40 100644 --- a/src/libs/Speechify/Generated/Speechify.IRoutesClient.UpdateRoute.g.cs +++ b/src/libs/Speechify/Generated/Speechify.IRoutesClient.UpdateRoute.g.cs @@ -61,7 +61,8 @@ public partial interface IRoutesClient /// `store_query` (store_id, collection, where, order_by, limit),
/// `store_document` (store_id, collection, document_id),
/// `run_latest` (trigger_id of a schedule trigger),
- /// `run` (trigger_id of a webhook trigger, wait_seconds). + /// `run` (trigger_id of a webhook trigger, wait_seconds),
+ /// `file` (file_path of a published file). /// /// /// diff --git a/src/libs/Speechify/Generated/Speechify.IRunsClient.CreateRun.g.cs b/src/libs/Speechify/Generated/Speechify.IRunsClient.CreateRun.g.cs index f4e7203..2221c76 100644 --- a/src/libs/Speechify/Generated/Speechify.IRunsClient.CreateRun.g.cs +++ b/src/libs/Speechify/Generated/Speechify.IRunsClient.CreateRun.g.cs @@ -199,6 +199,18 @@ public partial interface IRunsClient /// /// The task or goal to give the agent. The agent runs its brain against this over a short internal conversation and returns its result. The server's limit is 8000 **bytes**, so a mostly non-ASCII instruction reaches it before 8000 characters. /// + /// + /// The files to hand the agent, as `file_...` ids from
+ /// `POST /v1/files`. The
+ /// agent is told what it holds and reads one with its `read_file`
+ /// tool: PDF, HTML, Markdown and plain text are extracted, and an
+ /// image is transcribed and described by a vision model. At most 10.
+ /// Each id is checked at admission against this workspace **and**
+ /// against `user_identity`: a file uploaded for one person is not
+ /// readable by a run acting for another. An id that does not resolve
+ /// fails the request with a `400` naming `attachments` - the run is
+ /// never started over a file it cannot read. + /// /// /// Per-run values that seed the agent's flow variables (override its
/// stored defaults). The agent's prompt renders against the result
@@ -278,6 +290,7 @@ public partial interface IRunsClient string instruction, string? speechifyVersion = default, string? idempotencyKey = default, + global::System.Collections.Generic.IList? attachments = default, object? variables = default, int? maxTurns = default, string? userIdentity = default, diff --git a/src/libs/Speechify/Generated/Speechify.ISpeechifyClient.g.cs b/src/libs/Speechify/Generated/Speechify.ISpeechifyClient.g.cs index 8a8ddd3..1dce466 100644 --- a/src/libs/Speechify/Generated/Speechify.ISpeechifyClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ISpeechifyClient.g.cs @@ -63,11 +63,6 @@ public partial interface ISpeechifyClient : global::System.IDisposable ///
public AgentsClient Agents { get; } - /// - /// - /// - public AssetsClient Assets { get; } - /// /// /// @@ -113,6 +108,11 @@ public partial interface ISpeechifyClient : global::System.IDisposable /// public EndpointsClient Endpoints { get; } + /// + /// + /// + public FilesClient Files { get; } + /// /// /// diff --git a/src/libs/Speechify/Generated/Speechify.ITeamsClient.Run.g.cs b/src/libs/Speechify/Generated/Speechify.ITeamsClient.Run.g.cs index 75f0309..cfbc4d6 100644 --- a/src/libs/Speechify/Generated/Speechify.ITeamsClient.Run.g.cs +++ b/src/libs/Speechify/Generated/Speechify.ITeamsClient.Run.g.cs @@ -133,6 +133,18 @@ public partial interface ITeamsClient /// /// The task or goal to give the team. The manager agent runs its brain against this, delegating sub-goals to the members, and returns its aggregated result. The server's limit is 8000 **bytes**, so a mostly non-ASCII instruction reaches it before 8000 characters. /// + /// + /// The files to hand the team, as `file_...` ids from
+ /// `POST /v1/files`. The
+ /// agent is told what it holds and reads one with its `read_file`
+ /// tool: PDF, HTML, Markdown and plain text are extracted, and an
+ /// image is transcribed and described by a vision model. At most 10.
+ /// Each id is checked at admission against this workspace **and**
+ /// against `user_identity`: a file uploaded for one person is not
+ /// readable by a run acting for another. An id that does not resolve
+ /// fails the request with a `400` naming `attachments` - the run is
+ /// never started over a file it cannot read. + /// /// /// Per-run values that seed the manager's flow variables (override its
/// stored defaults). As on a single-agent run, the `system__*`
@@ -197,6 +209,7 @@ public partial interface ITeamsClient string instruction, string? speechifyVersion = default, string? idempotencyKey = default, + global::System.Collections.Generic.IList? attachments = default, object? variables = default, string? userIdentity = default, int? maxTurns = default, diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.FileKind.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.FileKind.g.cs new file mode 100644 index 0000000..8eb82c8 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.FileKind.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class FileKindJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.FileKind 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.FileKindExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.FileKind)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.FileKind); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.FileKind value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Speechify.FileKindExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.FileKindNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.FileKindNullable.g.cs new file mode 100644 index 0000000..f3d4ebb --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.FileKindNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class FileKindNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.FileKind? 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.FileKindExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.FileKind)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.FileKind?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.FileKind? 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.FileKindExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.V1FilesGetParametersKind.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.V1FilesGetParametersKind.g.cs new file mode 100644 index 0000000..3187d98 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.V1FilesGetParametersKind.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class V1FilesGetParametersKindJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.V1FilesGetParametersKind 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.V1FilesGetParametersKindExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.V1FilesGetParametersKind)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.V1FilesGetParametersKind); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.V1FilesGetParametersKind value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Speechify.V1FilesGetParametersKindExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.V1FilesGetParametersKindNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.V1FilesGetParametersKindNullable.g.cs new file mode 100644 index 0000000..819ad31 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.V1FilesGetParametersKindNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class V1FilesGetParametersKindNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.V1FilesGetParametersKind? 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.V1FilesGetParametersKindExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.V1FilesGetParametersKind)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.V1FilesGetParametersKind?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.V1FilesGetParametersKind? 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.V1FilesGetParametersKindExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind.g.cs new file mode 100644 index 0000000..5afc4bd --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class V1FilesPostRequestBodyContentMultipartFormDataSchemaKindJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind 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.V1FilesPostRequestBodyContentMultipartFormDataSchemaKindExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKindExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.V1FilesPostRequestBodyContentMultipartFormDataSchemaKindNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.V1FilesPostRequestBodyContentMultipartFormDataSchemaKindNullable.g.cs new file mode 100644 index 0000000..7605ae4 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.V1FilesPostRequestBodyContentMultipartFormDataSchemaKindNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Speechify.JsonConverters +{ + /// + public sealed class V1FilesPostRequestBodyContentMultipartFormDataSchemaKindNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind? 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.V1FilesPostRequestBodyContentMultipartFormDataSchemaKindExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind? 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.V1FilesPostRequestBodyContentMultipartFormDataSchemaKindExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Speechify/Generated/Speechify.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.JsonSerializerContext.g.cs index 7864d6c..834a193 100644 --- a/src/libs/Speechify/Generated/Speechify.JsonSerializerContext.g.cs +++ b/src/libs/Speechify/Generated/Speechify.JsonSerializerContext.g.cs @@ -605,6 +605,13 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AttachSkillRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateAgentSkillRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1FilesGetParametersKind), TypeInfoPropertyName = "V1FilesGetParametersKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.FileKind), TypeInfoPropertyName = "FileKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.FileSource))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.File))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListFilesResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind), TypeInfoPropertyName = "V1FilesPostRequestBodyContentMultipartFormDataSchemaKind2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.Store))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListStoresResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] @@ -632,9 +639,6 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreBatchResult))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreBatchResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreAsset))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListStoreAssetsResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListAgentStoresResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiAuthMode), TypeInfoPropertyName = "HostedApiAuthMode2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedAPI))] @@ -734,7 +738,7 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateDocumentRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.RunTestRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UploadRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UploadAssetRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UploadRequest2))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GetSpeechRequestAudioFormat?), TypeInfoPropertyName = "NullableGetSpeechRequestAudioFormat2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.GetSpeechRequestModel?), TypeInfoPropertyName = "NullableGetSpeechRequestModel2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] @@ -867,6 +871,9 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTriggerLastFireStatus?), TypeInfoPropertyName = "NullableAgentTriggerLastFireStatus2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateAgentTriggerRequestType?), TypeInfoPropertyName = "NullableCreateAgentTriggerRequestType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentTriggerFireResponseStatus?), TypeInfoPropertyName = "NullableAgentTriggerFireResponseStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1FilesGetParametersKind?), TypeInfoPropertyName = "NullableV1FilesGetParametersKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.FileKind?), TypeInfoPropertyName = "NullableFileKind2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind?), TypeInfoPropertyName = "NullableV1FilesPostRequestBodyContentMultipartFormDataSchemaKind2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreWhereClauseOp?), TypeInfoPropertyName = "NullableStoreWhereClauseOp2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreOrderByDirection?), TypeInfoPropertyName = "NullableStoreOrderByDirection2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreBatchWriteOp?), TypeInfoPropertyName = "NullableStoreBatchWriteOp2")] @@ -991,13 +998,13 @@ 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))] @@ -1541,6 +1548,18 @@ public override bool CanConvert(global::System.Type typeToConvert) || typeToConvert == typeof(global::Speechify.AgentTriggerFireResponseStatus?) + || typeToConvert == typeof(global::Speechify.V1FilesGetParametersKind) + + || typeToConvert == typeof(global::Speechify.V1FilesGetParametersKind?) + + || typeToConvert == typeof(global::Speechify.FileKind) + + || typeToConvert == typeof(global::Speechify.FileKind?) + + || typeToConvert == typeof(global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind) + + || typeToConvert == typeof(global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind?) + || typeToConvert == typeof(global::Speechify.StoreWhereClauseOp) || typeToConvert == typeof(global::Speechify.StoreWhereClauseOp?) @@ -2788,6 +2807,36 @@ public override bool CanConvert(global::System.Type typeToConvert) return new global::Speechify.JsonConverters.AgentTriggerFireResponseStatusNullableJsonConverter(); } + if (typeToConvert == typeof(global::Speechify.V1FilesGetParametersKind)) + { + return new global::Speechify.JsonConverters.V1FilesGetParametersKindJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.V1FilesGetParametersKind?)) + { + return new global::Speechify.JsonConverters.V1FilesGetParametersKindNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.FileKind)) + { + return new global::Speechify.JsonConverters.FileKindJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.FileKind?)) + { + return new global::Speechify.JsonConverters.FileKindNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind)) + { + return new global::Speechify.JsonConverters.V1FilesPostRequestBodyContentMultipartFormDataSchemaKindJsonConverter(); + } + + if (typeToConvert == typeof(global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind?)) + { + return new global::Speechify.JsonConverters.V1FilesPostRequestBodyContentMultipartFormDataSchemaKindNullableJsonConverter(); + } + if (typeToConvert == typeof(global::Speechify.StoreWhereClauseOp)) { return new global::Speechify.JsonConverters.StoreWhereClauseOpJsonConverter(); diff --git a/src/libs/Speechify/Generated/Speechify.JsonSerializerContextTypes.g.cs b/src/libs/Speechify/Generated/Speechify.JsonSerializerContextTypes.g.cs index 340a62d..964eb7e 100644 --- a/src/libs/Speechify/Generated/Speechify.JsonSerializerContextTypes.g.cs +++ b/src/libs/Speechify/Generated/Speechify.JsonSerializerContextTypes.g.cs @@ -2337,523 +2337,539 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Speechify.Store? Type576 { get; set; } + public global::Speechify.V1FilesGetParametersKind? Type576 { get; set; } /// /// /// - public global::Speechify.ListStoresResponse? Type577 { get; set; } + public global::Speechify.FileKind? Type577 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type578 { get; set; } + public global::Speechify.FileSource? Type578 { get; set; } /// /// /// - public global::Speechify.CreateStoreRequest? Type579 { get; set; } + public global::Speechify.File? Type579 { get; set; } /// /// /// - public global::Speechify.UpdateStoreRequest? Type580 { get; set; } + public global::Speechify.ListFilesResponse? Type580 { get; set; } /// /// /// - public global::Speechify.StoreCollection? Type581 { get; set; } + public global::System.Collections.Generic.IList? Type581 { get; set; } /// /// /// - public global::Speechify.ListStoreCollectionsResponse? Type582 { get; set; } + public global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind? Type582 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type583 { get; set; } + public global::Speechify.Store? Type583 { get; set; } /// /// /// - public global::Speechify.StoreDocumentSource? Type584 { get; set; } + public global::Speechify.ListStoresResponse? Type584 { get; set; } /// /// /// - public global::Speechify.StoreDocument? Type585 { get; set; } + public global::System.Collections.Generic.IList? Type585 { get; set; } /// /// /// - public global::Speechify.QueryStoreDocumentsResponse? Type586 { get; set; } + public global::Speechify.CreateStoreRequest? Type586 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type587 { get; set; } + public global::Speechify.UpdateStoreRequest? Type587 { get; set; } /// /// /// - public global::Speechify.WriteStoreDocumentRequest? Type588 { get; set; } + public global::Speechify.StoreCollection? Type588 { get; set; } /// /// /// - public global::Speechify.StoreWhereClauseOp? Type589 { get; set; } + public global::Speechify.ListStoreCollectionsResponse? Type589 { get; set; } /// /// /// - public global::Speechify.StoreWhereClause? Type590 { get; set; } + public global::System.Collections.Generic.IList? Type590 { get; set; } /// /// /// - public global::Speechify.StoreOrderByDirection? Type591 { get; set; } + public global::Speechify.StoreDocumentSource? Type591 { get; set; } /// /// /// - public global::Speechify.StoreOrderBy? Type592 { get; set; } + public global::Speechify.StoreDocument? Type592 { get; set; } /// /// /// - public global::Speechify.StoreDocumentQuery? Type593 { get; set; } + public global::Speechify.QueryStoreDocumentsResponse? Type593 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type594 { get; set; } + public global::System.Collections.Generic.IList? Type594 { get; set; } /// /// /// - public global::Speechify.StoreBatchWriteOp? Type595 { get; set; } + public global::Speechify.WriteStoreDocumentRequest? Type595 { get; set; } /// /// /// - public global::Speechify.StoreBatchWrite? Type596 { get; set; } + public global::Speechify.StoreWhereClauseOp? Type596 { get; set; } /// /// /// - public global::Speechify.StoreBatchRequest? Type597 { get; set; } + public global::Speechify.StoreWhereClause? Type597 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type598 { get; set; } + public global::Speechify.StoreOrderByDirection? Type598 { get; set; } /// /// /// - public global::Speechify.StoreBatchResultOp? Type599 { get; set; } + public global::Speechify.StoreOrderBy? Type599 { get; set; } /// /// /// - public global::Speechify.StoreBatchResult? Type600 { get; set; } + public global::Speechify.StoreDocumentQuery? Type600 { get; set; } /// /// /// - public global::Speechify.StoreBatchResponse? Type601 { get; set; } + public global::System.Collections.Generic.IList? Type601 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type602 { get; set; } + public global::Speechify.StoreBatchWriteOp? Type602 { get; set; } /// /// /// - public global::Speechify.StoreAsset? Type603 { get; set; } + public global::Speechify.StoreBatchWrite? Type603 { get; set; } /// /// /// - public global::Speechify.ListStoreAssetsResponse? Type604 { get; set; } + public global::Speechify.StoreBatchRequest? Type604 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type605 { get; set; } + public global::System.Collections.Generic.IList? Type605 { get; set; } /// /// /// - public global::Speechify.ListAgentStoresResponse? Type606 { get; set; } + public global::Speechify.StoreBatchResultOp? Type606 { get; set; } /// /// /// - public global::Speechify.HostedApiAuthMode? Type607 { get; set; } + public global::Speechify.StoreBatchResult? Type607 { get; set; } /// /// /// - public global::Speechify.HostedAPI? Type608 { get; set; } + public global::Speechify.StoreBatchResponse? Type608 { get; set; } /// /// /// - public global::Speechify.ListHostedAPIsResponse? Type609 { get; set; } + public global::System.Collections.Generic.IList? Type609 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type610 { get; set; } + public global::Speechify.ListAgentStoresResponse? Type610 { get; set; } /// /// /// - public global::Speechify.CreateHostedApiRequestAuthMode? Type611 { get; set; } + public global::Speechify.HostedApiAuthMode? Type611 { get; set; } /// /// /// - public global::Speechify.CreateHostedAPIRequest? Type612 { get; set; } + public global::Speechify.HostedAPI? Type612 { get; set; } /// /// /// - public global::Speechify.UpdateHostedApiRequestAuthMode? Type613 { get; set; } + public global::Speechify.ListHostedAPIsResponse? Type613 { get; set; } /// /// /// - public global::Speechify.UpdateHostedAPIRequest? Type614 { get; set; } + public global::System.Collections.Generic.IList? Type614 { get; set; } /// /// /// - public global::Speechify.HostedApiRouteMethod? Type615 { get; set; } + public global::Speechify.CreateHostedApiRequestAuthMode? Type615 { get; set; } /// /// /// - public global::Speechify.HostedApiResolverType? Type616 { get; set; } + public global::Speechify.CreateHostedAPIRequest? Type616 { get; set; } /// /// /// - public global::Speechify.HostedApiResolverWhereItemsOp? Type617 { get; set; } + public global::Speechify.UpdateHostedApiRequestAuthMode? Type617 { get; set; } /// /// /// - public global::Speechify.HostedApiResolverWhereItems? Type618 { get; set; } + public global::Speechify.UpdateHostedAPIRequest? Type618 { get; set; } /// /// /// - public global::Speechify.HostedApiResolverOrderByDirection? Type619 { get; set; } + public global::Speechify.HostedApiRouteMethod? Type619 { get; set; } /// /// /// - public global::Speechify.HostedApiResolverOrderBy? Type620 { get; set; } + public global::Speechify.HostedApiResolverType? Type620 { get; set; } /// /// /// - public global::Speechify.HostedAPIResolver? Type621 { get; set; } + public global::Speechify.HostedApiResolverWhereItemsOp? Type621 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type622 { get; set; } + public global::Speechify.HostedApiResolverWhereItems? Type622 { get; set; } /// /// /// - public global::Speechify.HostedAPIRoute? Type623 { get; set; } + public global::Speechify.HostedApiResolverOrderByDirection? Type623 { get; set; } /// /// /// - public global::Speechify.ListHostedAPIRoutesResponse? Type624 { get; set; } + public global::Speechify.HostedApiResolverOrderBy? Type624 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type625 { get; set; } + public global::Speechify.HostedAPIResolver? Type625 { get; set; } /// /// /// - public global::Speechify.CreateHostedApiRouteRequestMethod? Type626 { get; set; } + public global::System.Collections.Generic.IList? Type626 { get; set; } /// /// /// - public global::Speechify.CreateHostedAPIRouteRequest? Type627 { get; set; } + public global::Speechify.HostedAPIRoute? Type627 { get; set; } /// /// /// - public global::Speechify.UpdateHostedApiRouteRequestMethod? Type628 { get; set; } + public global::Speechify.ListHostedAPIRoutesResponse? Type628 { get; set; } /// /// /// - public global::Speechify.UpdateHostedAPIRouteRequest? Type629 { get; set; } + public global::System.Collections.Generic.IList? Type629 { get; set; } /// /// /// - public global::Speechify.HostedAPIKey? Type630 { get; set; } + public global::Speechify.CreateHostedApiRouteRequestMethod? Type630 { get; set; } /// /// /// - public global::Speechify.ListHostedAPIKeysResponse? Type631 { get; set; } + public global::Speechify.CreateHostedAPIRouteRequest? Type631 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type632 { get; set; } + public global::Speechify.UpdateHostedApiRouteRequestMethod? Type632 { get; set; } /// /// /// - public global::Speechify.CreateHostedAPIKeyRequest? Type633 { get; set; } + public global::Speechify.UpdateHostedAPIRouteRequest? Type633 { get; set; } /// /// /// - public global::Speechify.ContactIdentifierKind? Type634 { get; set; } + public global::Speechify.HostedAPIKey? Type634 { get; set; } /// /// /// - public global::Speechify.ContactIdentifierAssertedBy? Type635 { get; set; } + public global::Speechify.ListHostedAPIKeysResponse? Type635 { get; set; } /// /// /// - public global::Speechify.ContactIdentifier? Type636 { get; set; } + public global::System.Collections.Generic.IList? Type636 { get; set; } /// /// /// - public global::Speechify.Contact? Type637 { get; set; } + public global::Speechify.CreateHostedAPIKeyRequest? Type637 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type638 { get; set; } + public global::Speechify.ContactIdentifierKind? Type638 { get; set; } /// /// /// - public global::Speechify.ListContactsResponse? Type639 { get; set; } + public global::Speechify.ContactIdentifierAssertedBy? Type639 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type640 { get; set; } + public global::Speechify.ContactIdentifier? Type640 { get; set; } /// /// /// - public global::Speechify.UpdateContactRequest? Type641 { get; set; } + public global::Speechify.Contact? Type641 { get; set; } /// /// /// - public global::Speechify.DeleteContactResponse? Type642 { get; set; } + public global::System.Collections.Generic.IList? Type642 { get; set; } /// /// /// - public global::Speechify.AttachContactIdentifierRequestKind? Type643 { get; set; } + public global::Speechify.ListContactsResponse? Type643 { get; set; } /// /// /// - public global::Speechify.AttachContactIdentifierRequest? Type644 { get; set; } + public global::System.Collections.Generic.IList? Type644 { get; set; } /// /// /// - public global::Speechify.MergeContactsRequest? Type645 { get; set; } + public global::Speechify.UpdateContactRequest? Type645 { get; set; } /// /// /// - public global::Speechify.MergeContactsResponseMerged? Type646 { get; set; } + public global::Speechify.DeleteContactResponse? Type646 { get; set; } /// /// /// - public global::Speechify.MergeContactsResponse? Type647 { get; set; } + public global::Speechify.AttachContactIdentifierRequestKind? Type647 { get; set; } /// /// /// - public global::Speechify.BillingEntitlementsMaxLlmModelClass? Type648 { get; set; } + public global::Speechify.AttachContactIdentifierRequest? Type648 { get; set; } /// /// /// - public global::Speechify.BillingEntitlements? Type649 { get; set; } + public global::Speechify.MergeContactsRequest? Type649 { get; set; } /// /// /// - public global::Speechify.EntitlementsResponse? Type650 { get; set; } + public global::Speechify.MergeContactsResponseMerged? Type650 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type651 { get; set; } + public global::Speechify.MergeContactsResponse? Type651 { get; set; } /// /// /// - public global::Speechify.ContactResolver? Type652 { get; set; } + public global::Speechify.BillingEntitlementsMaxLlmModelClass? Type652 { get; set; } /// /// /// - public global::Speechify.PutContactResolverRequest? Type653 { get; set; } + public global::Speechify.BillingEntitlements? Type653 { get; set; } /// /// /// - public global::Speechify.WebhookEndpoint? Type654 { get; set; } + public global::Speechify.EntitlementsResponse? Type654 { get; set; } /// /// /// - public global::Speechify.ListWebhookEndpointsResponse? Type655 { get; set; } + public global::System.Collections.Generic.Dictionary? Type655 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type656 { get; set; } + public global::Speechify.ContactResolver? Type656 { get; set; } /// /// /// - public global::Speechify.CreateWebhookEndpointRequest? Type657 { get; set; } + public global::Speechify.PutContactResolverRequest? Type657 { get; set; } /// /// /// - public global::Speechify.UpdateWebhookEndpointRequest? Type658 { get; set; } + public global::Speechify.WebhookEndpoint? Type658 { get; set; } /// /// /// - public global::Speechify.WebhookEndpointDelivery? Type659 { get; set; } + public global::Speechify.ListWebhookEndpointsResponse? Type659 { get; set; } /// /// /// - public global::Speechify.ListWebhookEndpointDeliveriesResponse? Type660 { get; set; } + public global::System.Collections.Generic.IList? Type660 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type661 { get; set; } + public global::Speechify.CreateWebhookEndpointRequest? Type661 { get; set; } /// /// /// - public global::Speechify.Project? Type662 { get; set; } + public global::Speechify.UpdateWebhookEndpointRequest? Type662 { get; set; } /// /// /// - public global::Speechify.ListProjectsResponse? Type663 { get; set; } + public global::Speechify.WebhookEndpointDelivery? Type663 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type664 { get; set; } + public global::Speechify.ListWebhookEndpointDeliveriesResponse? Type664 { get; set; } /// /// /// - public global::Speechify.CreateProjectRequest? Type665 { get; set; } + public global::System.Collections.Generic.IList? Type665 { get; set; } /// /// /// - public global::Speechify.UpdateProjectRequest? Type666 { get; set; } + public global::Speechify.Project? Type666 { get; set; } /// /// /// - public global::Speechify.DeleteProjectRequestMode? Type667 { get; set; } + public global::Speechify.ListProjectsResponse? Type667 { get; set; } /// /// /// - public global::Speechify.DeleteProjectRequest? Type668 { get; set; } + public global::System.Collections.Generic.IList? Type668 { get; set; } /// /// /// - public global::Speechify.ProjectRestoredCounts? Type669 { get; set; } + public global::Speechify.CreateProjectRequest? Type669 { get; set; } /// /// /// - public global::Speechify.ProjectStillRevokedCounts? Type670 { get; set; } + public global::Speechify.UpdateProjectRequest? Type670 { get; set; } /// /// /// - public global::Speechify.ProjectRestore? Type671 { get; set; } + public global::Speechify.DeleteProjectRequestMode? Type671 { get; set; } /// /// /// - public global::Speechify.ProjectTeardownBlockerKind? Type672 { get; set; } + public global::Speechify.DeleteProjectRequest? Type672 { get; set; } /// /// /// - public global::Speechify.ProjectTeardownBlockerBlocksItems? Type673 { get; set; } + public global::Speechify.ProjectRestoredCounts? Type673 { get; set; } /// /// /// - public global::Speechify.ProjectTeardownBlocker? Type674 { get; set; } + public global::Speechify.ProjectStillRevokedCounts? Type674 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type675 { get; set; } + public global::Speechify.ProjectRestore? Type675 { get; set; } /// /// /// - public global::Speechify.ProjectTeardownGroup? Type676 { get; set; } + public global::Speechify.ProjectTeardownBlockerKind? Type676 { get; set; } /// /// /// - public global::Speechify.ProjectTeardown? Type677 { get; set; } + public global::Speechify.ProjectTeardownBlockerBlocksItems? Type677 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type678 { get; set; } + public global::Speechify.ProjectTeardownBlocker? Type678 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type679 { get; set; } + public global::System.Collections.Generic.IList? Type679 { get; set; } /// /// /// - public global::Speechify.ProjectResourceCounts? Type680 { get; set; } + public global::Speechify.ProjectTeardownGroup? Type680 { get; set; } /// /// /// - public global::Speechify.ProjectStats? Type681 { get; set; } + public global::Speechify.ProjectTeardown? Type681 { get; set; } /// /// /// - public global::Speechify.PromoteProjectRequest? Type682 { get; set; } + public global::System.Collections.Generic.IList? Type682 { get; set; } /// /// /// - public global::Speechify.PromoteCreated? Type683 { get; set; } + public global::System.Collections.Generic.IList? Type683 { get; set; } /// /// /// - public global::Speechify.PromoteReused? Type684 { get; set; } + public global::Speechify.ProjectResourceCounts? Type684 { get; set; } /// /// /// - public global::Speechify.PromoteAttentionKind? Type685 { get; set; } + public global::Speechify.ProjectStats? Type685 { get; set; } /// /// /// - public global::Speechify.PromoteAttentionReason? Type686 { get; set; } + public global::Speechify.PromoteProjectRequest? Type686 { get; set; } /// /// /// - public global::Speechify.PromoteAttention? Type687 { get; set; } + public global::Speechify.PromoteCreated? Type687 { get; set; } /// /// /// - public global::Speechify.PromoteProjectResponse? Type688 { get; set; } + public global::Speechify.PromoteReused? Type688 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type689 { get; set; } + public global::Speechify.PromoteAttentionKind? Type689 { get; set; } /// /// /// - public global::Speechify.ProjectAuditEventType? Type690 { get; set; } + public global::Speechify.PromoteAttentionReason? Type690 { get; set; } /// /// /// - public global::Speechify.ProjectAuditEvent? Type691 { get; set; } + public global::Speechify.PromoteAttention? Type691 { get; set; } /// /// /// - public global::Speechify.ProjectAuditResponse? Type692 { get; set; } + public global::Speechify.PromoteProjectResponse? Type692 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type693 { get; set; } + public global::System.Collections.Generic.IList? Type693 { get; set; } /// /// /// - public global::Speechify.ProjectMember? Type694 { get; set; } + public global::Speechify.ProjectAuditEventType? Type694 { get; set; } /// /// /// - public global::Speechify.ProjectMembersResponse? Type695 { get; set; } + public global::Speechify.ProjectAuditEvent? Type695 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type696 { get; set; } + public global::Speechify.ProjectAuditResponse? Type696 { get; set; } /// /// /// - public global::Speechify.GrantProjectMemberRequest? Type697 { get; set; } + public global::System.Collections.Generic.IList? Type697 { get; set; } /// /// /// - public global::Speechify.CreateRequest? Type698 { get; set; } + public global::Speechify.ProjectMember? Type698 { get; set; } /// /// /// - public global::Speechify.DetectRequest? Type699 { get; set; } + public global::Speechify.ProjectMembersResponse? Type699 { get; set; } /// /// /// - public global::Speechify.VerifyRequest? Type700 { get; set; } + public global::System.Collections.Generic.IList? Type700 { get; set; } /// /// /// - public global::Speechify.UploadDocumentRequest? Type701 { get; set; } + public global::Speechify.GrantProjectMemberRequest? Type701 { get; set; } /// /// /// - public global::Speechify.UpdateDocumentRequest? Type702 { get; set; } + public global::Speechify.CreateRequest? Type702 { get; set; } /// /// /// - public global::Speechify.RunTestRequest? Type703 { get; set; } + public global::Speechify.DetectRequest? Type703 { get; set; } /// /// /// - public global::Speechify.UploadRequest? Type704 { get; set; } + public global::Speechify.VerifyRequest? Type704 { get; set; } /// /// /// - public global::Speechify.UploadAssetRequest? Type705 { get; set; } + public global::Speechify.UploadDocumentRequest? Type705 { get; set; } + /// + /// + /// + public global::Speechify.UpdateDocumentRequest? Type706 { get; set; } + /// + /// + /// + public global::Speechify.RunTestRequest? Type707 { get; set; } + /// + /// + /// + public global::Speechify.UploadRequest? Type708 { get; set; } + /// + /// + /// + public global::Speechify.UploadRequest2? Type709 { get; set; } /// /// @@ -3266,31 +3282,31 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.List? ListType102 { get; set; } + public global::System.Collections.Generic.List? ListType102 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType103 { get; set; } + public global::System.Collections.Generic.List? ListType103 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType104 { get; set; } + public global::System.Collections.Generic.List? ListType104 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType105 { get; set; } + public global::System.Collections.Generic.List? ListType105 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType106 { get; set; } + public global::System.Collections.Generic.List? ListType106 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType107 { get; set; } + public global::System.Collections.Generic.List? ListType107 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType108 { get; set; } + public global::System.Collections.Generic.List? ListType108 { get; set; } /// /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Models.AgentRunInput.g.cs b/src/libs/Speechify/Generated/Speechify.Models.AgentRunInput.g.cs index 44517d2..064909f 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.AgentRunInput.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.AgentRunInput.g.cs @@ -39,6 +39,13 @@ public sealed partial class AgentRunInput [global::System.Text.Json.Serialization.JsonPropertyName("output_schema")] public object? OutputSchema { get; set; } + /// + /// The files the run was handed, frozen at creation. Absent for a
+ /// run with no attachment. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("attachments")] + public global::System.Collections.Generic.IList? Attachments { get; set; } + /// /// The team members this run may delegate sub-goals to, present only on a team run (started via `runTeam`). Each is a member agent with its role and hand-off note. Absent for a solo agent run. /// @@ -63,6 +70,10 @@ public sealed partial class AgentRunInput /// /// The JSON Schema the run's structured output must satisfy, frozen at creation. Absent for a prose-only run. /// + /// + /// The files the run was handed, frozen at creation. Absent for a
+ /// run with no attachment. + /// /// /// The team members this run may delegate sub-goals to, present only on a team run (started via `runTeam`). Each is a member agent with its role and hand-off note. Absent for a solo agent run. /// @@ -75,6 +86,7 @@ public AgentRunInput( int? maxTurns, string? userIdentity, object? outputSchema, + global::System.Collections.Generic.IList? attachments, global::System.Collections.Generic.IList? delegationTargets) { this.Instruction = instruction ?? throw new global::System.ArgumentNullException(nameof(instruction)); @@ -82,6 +94,7 @@ public AgentRunInput( this.MaxTurns = maxTurns; this.UserIdentity = userIdentity; this.OutputSchema = outputSchema; + this.Attachments = attachments; this.DelegationTargets = delegationTargets; } diff --git a/src/libs/Speechify/Generated/Speechify.Models.CreateAgentRunRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CreateAgentRunRequest.g.cs index 4275f95..3f19487 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.CreateAgentRunRequest.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.CreateAgentRunRequest.g.cs @@ -15,6 +15,21 @@ public sealed partial class CreateAgentRunRequest [global::System.Text.Json.Serialization.JsonRequired] public required string Instruction { get; set; } + /// + /// The files to hand the agent, as `file_...` ids from
+ /// `POST /v1/files`. The
+ /// agent is told what it holds and reads one with its `read_file`
+ /// tool: PDF, HTML, Markdown and plain text are extracted, and an
+ /// image is transcribed and described by a vision model. At most 10.
+ /// Each id is checked at admission against this workspace **and**
+ /// against `user_identity`: a file uploaded for one person is not
+ /// readable by a run acting for another. An id that does not resolve
+ /// fails the request with a `400` naming `attachments` - the run is
+ /// never started over a file it cannot read. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("attachments")] + public global::System.Collections.Generic.IList? Attachments { get; set; } + /// /// Per-run values that seed the agent's flow variables (override its
/// stored defaults). The agent's prompt renders against the result
@@ -113,6 +128,18 @@ public sealed partial class CreateAgentRunRequest /// /// The task or goal to give the agent. The agent runs its brain against this over a short internal conversation and returns its result. The server's limit is 8000 **bytes**, so a mostly non-ASCII instruction reaches it before 8000 characters. /// + /// + /// The files to hand the agent, as `file_...` ids from
+ /// `POST /v1/files`. The
+ /// agent is told what it holds and reads one with its `read_file`
+ /// tool: PDF, HTML, Markdown and plain text are extracted, and an
+ /// image is transcribed and described by a vision model. At most 10.
+ /// Each id is checked at admission against this workspace **and**
+ /// against `user_identity`: a file uploaded for one person is not
+ /// readable by a run acting for another. An id that does not resolve
+ /// fails the request with a `400` naming `attachments` - the run is
+ /// never started over a file it cannot read. + /// /// /// Per-run values that seed the agent's flow variables (override its
/// stored defaults). The agent's prompt renders against the result
@@ -189,6 +216,7 @@ public sealed partial class CreateAgentRunRequest #endif public CreateAgentRunRequest( string instruction, + global::System.Collections.Generic.IList? attachments, object? variables, int? maxTurns, string? userIdentity, @@ -196,6 +224,7 @@ public CreateAgentRunRequest( global::System.Collections.Generic.Dictionary? metadata) { this.Instruction = instruction ?? throw new global::System.ArgumentNullException(nameof(instruction)); + this.Attachments = attachments; this.Variables = variables; this.MaxTurns = maxTurns; this.UserIdentity = userIdentity; diff --git a/src/libs/Speechify/Generated/Speechify.Models.CreateHostedAPIRouteRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CreateHostedAPIRouteRequest.g.cs index 7b37c8b..a4c56bc 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.CreateHostedAPIRouteRequest.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.CreateHostedAPIRouteRequest.g.cs @@ -40,7 +40,8 @@ public sealed partial class CreateHostedAPIRouteRequest /// `store_query` (store_id, collection, where, order_by, limit),
/// `store_document` (store_id, collection, document_id),
/// `run_latest` (trigger_id of a schedule trigger),
- /// `run` (trigger_id of a webhook trigger, wait_seconds). + /// `run` (trigger_id of a webhook trigger, wait_seconds),
+ /// `file` (file_path of a published file). ///
[global::System.Text.Json.Serialization.JsonPropertyName("resolver")] [global::System.Text.Json.Serialization.JsonRequired] @@ -82,7 +83,8 @@ public sealed partial class CreateHostedAPIRouteRequest /// `store_query` (store_id, collection, where, order_by, limit),
/// `store_document` (store_id, collection, document_id),
/// `run_latest` (trigger_id of a schedule trigger),
- /// `run` (trigger_id of a webhook trigger, wait_seconds). + /// `run` (trigger_id of a webhook trigger, wait_seconds),
+ /// `file` (file_path of a published file). /// /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Models.CreateTeamRunRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.CreateTeamRunRequest.g.cs index e97552b..310cb76 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.CreateTeamRunRequest.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.CreateTeamRunRequest.g.cs @@ -15,6 +15,21 @@ public sealed partial class CreateTeamRunRequest [global::System.Text.Json.Serialization.JsonRequired] public required string Instruction { get; set; } + /// + /// The files to hand the team, as `file_...` ids from
+ /// `POST /v1/files`. The
+ /// agent is told what it holds and reads one with its `read_file`
+ /// tool: PDF, HTML, Markdown and plain text are extracted, and an
+ /// image is transcribed and described by a vision model. At most 10.
+ /// Each id is checked at admission against this workspace **and**
+ /// against `user_identity`: a file uploaded for one person is not
+ /// readable by a run acting for another. An id that does not resolve
+ /// fails the request with a `400` naming `attachments` - the run is
+ /// never started over a file it cannot read. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("attachments")] + public global::System.Collections.Generic.IList? Attachments { get; set; } + /// /// Per-run values that seed the manager's flow variables (override its
/// stored defaults). As on a single-agent run, the `system__*`
@@ -98,6 +113,18 @@ public sealed partial class CreateTeamRunRequest /// /// The task or goal to give the team. The manager agent runs its brain against this, delegating sub-goals to the members, and returns its aggregated result. The server's limit is 8000 **bytes**, so a mostly non-ASCII instruction reaches it before 8000 characters. /// + /// + /// The files to hand the team, as `file_...` ids from
+ /// `POST /v1/files`. The
+ /// agent is told what it holds and reads one with its `read_file`
+ /// tool: PDF, HTML, Markdown and plain text are extracted, and an
+ /// image is transcribed and described by a vision model. At most 10.
+ /// Each id is checked at admission against this workspace **and**
+ /// against `user_identity`: a file uploaded for one person is not
+ /// readable by a run acting for another. An id that does not resolve
+ /// fails the request with a `400` naming `attachments` - the run is
+ /// never started over a file it cannot read. + /// /// /// Per-run values that seed the manager's flow variables (override its
/// stored defaults). As on a single-agent run, the `system__*`
@@ -159,6 +186,7 @@ public sealed partial class CreateTeamRunRequest #endif public CreateTeamRunRequest( string instruction, + global::System.Collections.Generic.IList? attachments, object? variables, string? userIdentity, int? maxTurns, @@ -166,6 +194,7 @@ public CreateTeamRunRequest( global::System.Collections.Generic.Dictionary? metadata) { this.Instruction = instruction ?? throw new global::System.ArgumentNullException(nameof(instruction)); + this.Attachments = attachments; this.Variables = variables; this.UserIdentity = userIdentity; this.MaxTurns = maxTurns; diff --git a/src/libs/Speechify/Generated/Speechify.Models.DeleteAssetResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.DeleteResponse16.Json.g.cs similarity index 89% rename from src/libs/Speechify/Generated/Speechify.Models.DeleteAssetResponse.Json.g.cs rename to src/libs/Speechify/Generated/Speechify.Models.DeleteResponse16.Json.g.cs index 6ad5df5..ae0e2bf 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.DeleteAssetResponse.Json.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.DeleteResponse16.Json.g.cs @@ -2,7 +2,7 @@ namespace Speechify { - public sealed partial class DeleteAssetResponse + public sealed partial class DeleteResponse16 { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -47,20 +47,20 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Speechify.DeleteAssetResponse? FromJson( + public static global::Speechify.DeleteResponse16? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Speechify.DeleteAssetResponse), - jsonSerializerContext) as global::Speechify.DeleteAssetResponse; + typeof(global::Speechify.DeleteResponse16), + jsonSerializerContext) as global::Speechify.DeleteResponse16; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Speechify.DeleteAssetResponse? FromJson( + public static global::Speechify.DeleteResponse16? FromJson( string json) { return FromJson( @@ -75,7 +75,7 @@ public string ToJson( [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.DeleteAssetResponse? FromJson( + public static global::Speechify.DeleteResponse16? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -86,7 +86,7 @@ public string ToJson( global::Speechify.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -94,20 +94,20 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + 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.DeleteAssetResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.DeleteAssetResponse; + typeof(global::Speechify.DeleteResponse16), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.DeleteResponse16; } /// /// Deserializes a JSON stream using the generated default JsonSerializerContext. /// - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream) { return FromJsonStreamAsync( @@ -122,7 +122,7 @@ public string ToJson( [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( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -133,7 +133,7 @@ public string ToJson( global::Speechify.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Speechify/Generated/Speechify.Models.DeleteAssetResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.DeleteResponse16.g.cs similarity index 90% rename from src/libs/Speechify/Generated/Speechify.Models.DeleteAssetResponse.g.cs rename to src/libs/Speechify/Generated/Speechify.Models.DeleteResponse16.g.cs index 05155ce..dbc757a 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.DeleteAssetResponse.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.DeleteResponse16.g.cs @@ -6,7 +6,7 @@ namespace Speechify /// /// /// - public sealed partial class DeleteAssetResponse + public sealed partial class DeleteResponse16 { /// diff --git a/src/libs/Speechify/Generated/Speechify.Models.ErrorCode.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ErrorCode.g.cs index 459fe6b..b2120ba 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.ErrorCode.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.ErrorCode.g.cs @@ -208,6 +208,18 @@ public enum ErrorCode /// /// /// + FileNotFound, + /// + /// + /// + FilePathTaken, + /// + /// + /// + FileStorageLimitReached, + /// + /// + /// Forbidden, /// /// @@ -444,10 +456,6 @@ public enum ErrorCode /// /// /// - StoreAssetNotFound, - /// - /// - /// StoreBytesLimitReached, /// /// @@ -631,6 +639,9 @@ public static string ToValueString(this ErrorCode value) ErrorCode.CrossProjectReference => "cross_project_reference", ErrorCode.DestinationNotAllowed => "destination_not_allowed", ErrorCode.DurableRunsNotInPlan => "durable_runs_not_in_plan", + ErrorCode.FileNotFound => "file_not_found", + ErrorCode.FilePathTaken => "file_path_taken", + ErrorCode.FileStorageLimitReached => "file_storage_limit_reached", ErrorCode.Forbidden => "forbidden", ErrorCode.FundedBalanceRequired => "funded_balance_required", ErrorCode.HostedApiNotFound => "hosted_api_not_found", @@ -690,7 +701,6 @@ public static string ToValueString(this ErrorCode value) ErrorCode.SpeechMarksUnsupported => "speech_marks_unsupported", ErrorCode.SpendBudgetExceeded => "spend_budget_exceeded", ErrorCode.SpendCapExceeded => "spend_cap_exceeded", - ErrorCode.StoreAssetNotFound => "store_asset_not_found", ErrorCode.StoreBytesLimitReached => "store_bytes_limit_reached", ErrorCode.StoreDocumentLimitReached => "store_document_limit_reached", ErrorCode.StoreDocumentNotFound => "store_document_not_found", @@ -780,6 +790,9 @@ public static string ToValueString(this ErrorCode value) "cross_project_reference" => ErrorCode.CrossProjectReference, "destination_not_allowed" => ErrorCode.DestinationNotAllowed, "durable_runs_not_in_plan" => ErrorCode.DurableRunsNotInPlan, + "file_not_found" => ErrorCode.FileNotFound, + "file_path_taken" => ErrorCode.FilePathTaken, + "file_storage_limit_reached" => ErrorCode.FileStorageLimitReached, "forbidden" => ErrorCode.Forbidden, "funded_balance_required" => ErrorCode.FundedBalanceRequired, "hosted_api_not_found" => ErrorCode.HostedApiNotFound, @@ -839,7 +852,6 @@ public static string ToValueString(this ErrorCode value) "speech_marks_unsupported" => ErrorCode.SpeechMarksUnsupported, "spend_budget_exceeded" => ErrorCode.SpendBudgetExceeded, "spend_cap_exceeded" => ErrorCode.SpendCapExceeded, - "store_asset_not_found" => ErrorCode.StoreAssetNotFound, "store_bytes_limit_reached" => ErrorCode.StoreBytesLimitReached, "store_document_limit_reached" => ErrorCode.StoreDocumentLimitReached, "store_document_not_found" => ErrorCode.StoreDocumentNotFound, diff --git a/src/libs/Speechify/Generated/Speechify.Models.StoreAsset.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.File.Json.g.cs similarity index 89% rename from src/libs/Speechify/Generated/Speechify.Models.StoreAsset.Json.g.cs rename to src/libs/Speechify/Generated/Speechify.Models.File.Json.g.cs index e1ea246..126cc02 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.StoreAsset.Json.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.File.Json.g.cs @@ -2,7 +2,7 @@ namespace Speechify { - public sealed partial class StoreAsset + public sealed partial class File { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -47,20 +47,20 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Speechify.StoreAsset? FromJson( + public static global::Speechify.File? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Speechify.StoreAsset), - jsonSerializerContext) as global::Speechify.StoreAsset; + typeof(global::Speechify.File), + jsonSerializerContext) as global::Speechify.File; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Speechify.StoreAsset? FromJson( + public static global::Speechify.File? FromJson( string json) { return FromJson( @@ -75,7 +75,7 @@ public string ToJson( [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.StoreAsset? FromJson( + public static global::Speechify.File? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -86,7 +86,7 @@ public string ToJson( global::Speechify.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -94,20 +94,20 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + 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.StoreAsset), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.StoreAsset; + typeof(global::Speechify.File), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.File; } /// /// Deserializes a JSON stream using the generated default JsonSerializerContext. /// - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream) { return FromJsonStreamAsync( @@ -122,7 +122,7 @@ public string ToJson( [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( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -133,7 +133,7 @@ public string ToJson( global::Speechify.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Speechify/Generated/Speechify.Models.File.g.cs b/src/libs/Speechify/Generated/Speechify.Models.File.g.cs new file mode 100644 index 0000000..e8142ad --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.File.g.cs @@ -0,0 +1,199 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// One uploaded file a run can be handed. The bytes live in Speechify's
+ /// storage and are read either by an agent inside a run (its `read_file`
+ /// tool) or over `content_path`; this object is the metadata. + ///
+ public sealed partial class File + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The project the file belongs to; absent for the Default project. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] + public string? ProjectId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("filename")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Filename { get; set; } + + /// + /// The file's media type, normalised from the upload. An agent can read
+ /// `application/pdf`, `text/plain`, `text/markdown`, `text/html` and
+ /// `image/*` inside a run; any other type is stored and served but
+ /// reports itself unreadable to the agent. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("content_type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ContentType { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("size_bytes")] + [global::System.Text.Json.Serialization.JsonRequired] + public required long SizeBytes { get; set; } + + /// + /// The person this file was uploaded for. Only a run acting for that
+ /// same person can read it. Absent means workspace-wide: any run in the
+ /// workspace can. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("user_identity")] + public string? UserIdentity { get; set; } + + /// + /// The file's lifetime, declared at upload. `ephemeral` is working
+ /// material for a run and is deleted 14 days after upload; `kept`
+ /// survives until you delete it and carries no `expires_at` at all.
+ /// Only a `kept` file can be published at a `path`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("kind")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.FileKindJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Speechify.FileKind Kind { get; set; } + + /// + /// The name a serving layer addresses this file by, unique among the
+ /// workspace's live files. Slash-separated segments of letters, digits
+ /// and `. _ ~ -`; no leading slash and no `..`. Absent on a file
+ /// nothing publishes. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("path")] + public string? Path { get; set; } + + /// + /// The run whose tool call produced this file. Present only on a file
+ /// Speechify captured from a tool's response, absent on a customer upload. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("source")] + public global::Speechify.FileSource? Source { get; set; } + + /// + /// The API path the bytes stream from (prepend the API host). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content_path")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ContentPath { get; set; } + + /// + /// When an `ephemeral` file is deleted automatically, 14 days after
+ /// upload; after it passes, every read answers 404 and the bytes are
+ /// collected. **Absent on a `kept` file**, which does not expire -
+ /// rather than a far-future date you would have to recognise as "never". + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("expires_at")] + public global::System.DateTime? ExpiresAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime CreatedAt { 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 file's media type, normalised from the upload. An agent can read
+ /// `application/pdf`, `text/plain`, `text/markdown`, `text/html` and
+ /// `image/*` inside a run; any other type is stored and served but
+ /// reports itself unreadable to the agent. + /// + /// + /// + /// The file's lifetime, declared at upload. `ephemeral` is working
+ /// material for a run and is deleted 14 days after upload; `kept`
+ /// survives until you delete it and carries no `expires_at` at all.
+ /// Only a `kept` file can be published at a `path`. + /// + /// + /// The API path the bytes stream from (prepend the API host). + /// + /// + /// + /// The project the file belongs to; absent for the Default project. + /// + /// + /// The person this file was uploaded for. Only a run acting for that
+ /// same person can read it. Absent means workspace-wide: any run in the
+ /// workspace can. + /// + /// + /// The name a serving layer addresses this file by, unique among the
+ /// workspace's live files. Slash-separated segments of letters, digits
+ /// and `. _ ~ -`; no leading slash and no `..`. Absent on a file
+ /// nothing publishes. + /// + /// + /// The run whose tool call produced this file. Present only on a file
+ /// Speechify captured from a tool's response, absent on a customer upload. + /// + /// + /// When an `ephemeral` file is deleted automatically, 14 days after
+ /// upload; after it passes, every read answers 404 and the bytes are
+ /// collected. **Absent on a `kept` file**, which does not expire -
+ /// rather than a far-future date you would have to recognise as "never". + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public File( + string id, + string filename, + string contentType, + long sizeBytes, + global::Speechify.FileKind kind, + string contentPath, + global::System.DateTime createdAt, + string? projectId, + string? userIdentity, + string? path, + global::Speechify.FileSource? source, + global::System.DateTime? expiresAt) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.ProjectId = projectId; + this.Filename = filename ?? throw new global::System.ArgumentNullException(nameof(filename)); + this.ContentType = contentType ?? throw new global::System.ArgumentNullException(nameof(contentType)); + this.SizeBytes = sizeBytes; + this.UserIdentity = userIdentity; + this.Kind = kind; + this.Path = path; + this.Source = source; + this.ContentPath = contentPath ?? throw new global::System.ArgumentNullException(nameof(contentPath)); + this.ExpiresAt = expiresAt; + this.CreatedAt = createdAt; + } + + /// + /// Initializes a new instance of the class. + /// + public File() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.FileKind.g.cs b/src/libs/Speechify/Generated/Speechify.Models.FileKind.g.cs new file mode 100644 index 0000000..c40d0f0 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.FileKind.g.cs @@ -0,0 +1,54 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// The file's lifetime, declared at upload. `ephemeral` is working
+ /// material for a run and is deleted 14 days after upload; `kept`
+ /// survives until you delete it and carries no `expires_at` at all.
+ /// Only a `kept` file can be published at a `path`. + ///
+ public enum FileKind + { + /// + /// + /// + Ephemeral, + /// + /// + /// + Kept, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FileKindExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FileKind value) + { + return value switch + { + FileKind.Ephemeral => "ephemeral", + FileKind.Kept => "kept", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FileKind? ToEnum(string value) + { + return value switch + { + "ephemeral" => FileKind.Ephemeral, + "kept" => FileKind.Kept, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.FileSource.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.FileSource.Json.g.cs new file mode 100644 index 0000000..c80445d --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.FileSource.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Speechify +{ + public sealed partial class FileSource + { + /// + /// 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.FileSource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Speechify.FileSource), + jsonSerializerContext) as global::Speechify.FileSource; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Speechify.FileSource? 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.FileSource? 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.FileSource), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.FileSource; + } + + /// + /// 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.UploadAssetRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.FileSource.g.cs similarity index 52% rename from src/libs/Speechify/Generated/Speechify.Models.UploadAssetRequest.g.cs rename to src/libs/Speechify/Generated/Speechify.Models.FileSource.g.cs index 2d1710b..1e36d5e 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.UploadAssetRequest.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.FileSource.g.cs @@ -4,23 +4,24 @@ namespace Speechify { /// - /// + /// The run whose tool call produced this file. Present only on a file
+ /// Speechify captured from a tool's response, absent on a customer upload. ///
- public sealed partial class UploadAssetRequest + public sealed partial class FileSource { /// - /// The file to store (at most 25 MiB). + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("file")] + [global::System.Text.Json.Serialization.JsonPropertyName("run_id")] [global::System.Text.Json.Serialization.JsonRequired] - public required byte[] File { get; set; } + public required string RunId { get; set; } /// - /// The file to store (at most 25 MiB). + /// The journal step of the tool call that produced it. /// - [global::System.Text.Json.Serialization.JsonPropertyName("filename")] + [global::System.Text.Json.Serialization.JsonPropertyName("step")] [global::System.Text.Json.Serialization.JsonRequired] - public required string Filename { get; set; } + public required int Step { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -29,29 +30,27 @@ public sealed partial class UploadAssetRequest public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// - /// The file to store (at most 25 MiB). - /// - /// - /// The file to store (at most 25 MiB). + /// + /// + /// The journal step of the tool call that produced it. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif - public UploadAssetRequest( - byte[] file, - string filename) + public FileSource( + string runId, + int step) { - this.File = file ?? throw new global::System.ArgumentNullException(nameof(file)); - this.Filename = filename ?? throw new global::System.ArgumentNullException(nameof(filename)); + this.RunId = runId ?? throw new global::System.ArgumentNullException(nameof(runId)); + this.Step = step; } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public UploadAssetRequest() + public FileSource() { } diff --git a/src/libs/Speechify/Generated/Speechify.Models.HostedAPIResolver.g.cs b/src/libs/Speechify/Generated/Speechify.Models.HostedAPIResolver.g.cs index e0b0232..0d7bf67 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.HostedAPIResolver.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.HostedAPIResolver.g.cs @@ -8,7 +8,8 @@ namespace Speechify /// `store_query` (store_id, collection, where, order_by, limit),
/// `store_document` (store_id, collection, document_id),
/// `run_latest` (trigger_id of a schedule trigger),
- /// `run` (trigger_id of a webhook trigger, wait_seconds). + /// `run` (trigger_id of a webhook trigger, wait_seconds),
+ /// `file` (file_path of a published file). ///
public sealed partial class HostedAPIResolver { @@ -56,6 +57,24 @@ public sealed partial class HostedAPIResolver [global::System.Text.Json.Serialization.JsonPropertyName("limit")] public int? Limit { get; set; } + /// + /// The path a `kept` file was published under, for a `file` route.
+ /// The route answers that file's bytes under the file's own media type
+ /// - the only route type that does not return JSON - so a page renders
+ /// and a spreadsheet downloads. Must be a GET.
+ /// A literal path, or a `{{path.x}}` template that replaces the whole
+ /// value, so one route can serve many files: mount `/{name}` and the
+ /// URL segment names the published path. A template embedded in a
+ /// longer path (`a/{{path.x}}.html`) is refused - substitution here
+ /// replaces the value, it does not interpolate into it.
+ /// Only a `kept` file is reachable: working material handed to a run
+ /// cannot be published by pointing a route at it. A path with nothing
+ /// at it answers `404`, so an artifact can be wired before it is
+ /// uploaded and replaced without touching the route. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("file_path")] + public string? FilePath { get; set; } + /// /// /// @@ -88,6 +107,21 @@ public sealed partial class HostedAPIResolver /// /// Default page size; the consumer's `limit` query parameter overrides it. /// + /// + /// The path a `kept` file was published under, for a `file` route.
+ /// The route answers that file's bytes under the file's own media type
+ /// - the only route type that does not return JSON - so a page renders
+ /// and a spreadsheet downloads. Must be a GET.
+ /// A literal path, or a `{{path.x}}` template that replaces the whole
+ /// value, so one route can serve many files: mount `/{name}` and the
+ /// URL segment names the published path. A template embedded in a
+ /// longer path (`a/{{path.x}}.html`) is refused - substitution here
+ /// replaces the value, it does not interpolate into it.
+ /// Only a `kept` file is reachable: working material handed to a run
+ /// cannot be published by pointing a route at it. A path with nothing
+ /// at it answers `404`, so an artifact can be wired before it is
+ /// uploaded and replaced without touching the route. + /// /// /// /// How long a `run` route waits for the run before answering 202 (default 20; 0 answers 202 at once). @@ -103,6 +137,7 @@ public HostedAPIResolver( global::System.Collections.Generic.IList? where, global::Speechify.HostedApiResolverOrderBy? orderBy, int? limit, + string? filePath, string? triggerId, int? waitSeconds) { @@ -113,6 +148,7 @@ public HostedAPIResolver( this.Where = where; this.OrderBy = orderBy; this.Limit = limit; + this.FilePath = filePath; this.TriggerId = triggerId; this.WaitSeconds = waitSeconds; } diff --git a/src/libs/Speechify/Generated/Speechify.Models.HostedAPIRoute.g.cs b/src/libs/Speechify/Generated/Speechify.Models.HostedAPIRoute.g.cs index 6574d6e..f7aacc2 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.HostedAPIRoute.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.HostedAPIRoute.g.cs @@ -56,7 +56,8 @@ public sealed partial class HostedAPIRoute /// `store_query` (store_id, collection, where, order_by, limit),
/// `store_document` (store_id, collection, document_id),
/// `run_latest` (trigger_id of a schedule trigger),
- /// `run` (trigger_id of a webhook trigger, wait_seconds). + /// `run` (trigger_id of a webhook trigger, wait_seconds),
+ /// `file` (file_path of a published file). ///
[global::System.Text.Json.Serialization.JsonPropertyName("resolver")] [global::System.Text.Json.Serialization.JsonRequired] @@ -116,7 +117,8 @@ public sealed partial class HostedAPIRoute /// `store_query` (store_id, collection, where, order_by, limit),
/// `store_document` (store_id, collection, document_id),
/// `run_latest` (trigger_id of a schedule trigger),
- /// `run` (trigger_id of a webhook trigger, wait_seconds). + /// `run` (trigger_id of a webhook trigger, wait_seconds),
+ /// `file` (file_path of a published file). /// /// /// Cache-Control max-age on GET responses; 0 disables caching. diff --git a/src/libs/Speechify/Generated/Speechify.Models.HostedApiResolverType.g.cs b/src/libs/Speechify/Generated/Speechify.Models.HostedApiResolverType.g.cs index ec4375a..2a250ba 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.HostedApiResolverType.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.HostedApiResolverType.g.cs @@ -8,6 +8,10 @@ namespace Speechify ///
public enum HostedApiResolverType { + /// + /// + /// + File, /// /// /// @@ -38,6 +42,7 @@ public static string ToValueString(this HostedApiResolverType value) { return value switch { + HostedApiResolverType.File => "file", HostedApiResolverType.Run => "run", HostedApiResolverType.RunLatest => "run_latest", HostedApiResolverType.StoreDocument => "store_document", @@ -52,6 +57,7 @@ public static string ToValueString(this HostedApiResolverType value) { return value switch { + "file" => HostedApiResolverType.File, "run" => HostedApiResolverType.Run, "run_latest" => HostedApiResolverType.RunLatest, "store_document" => HostedApiResolverType.StoreDocument, diff --git a/src/libs/Speechify/Generated/Speechify.Models.ListStoreAssetsResponse.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ListFilesResponse.Json.g.cs similarity index 88% rename from src/libs/Speechify/Generated/Speechify.Models.ListStoreAssetsResponse.Json.g.cs rename to src/libs/Speechify/Generated/Speechify.Models.ListFilesResponse.Json.g.cs index c9e08ee..ccc06a3 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.ListStoreAssetsResponse.Json.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.ListFilesResponse.Json.g.cs @@ -2,7 +2,7 @@ namespace Speechify { - public sealed partial class ListStoreAssetsResponse + public sealed partial class ListFilesResponse { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -47,20 +47,20 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Speechify.ListStoreAssetsResponse? FromJson( + public static global::Speechify.ListFilesResponse? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Speechify.ListStoreAssetsResponse), - jsonSerializerContext) as global::Speechify.ListStoreAssetsResponse; + typeof(global::Speechify.ListFilesResponse), + jsonSerializerContext) as global::Speechify.ListFilesResponse; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Speechify.ListStoreAssetsResponse? FromJson( + public static global::Speechify.ListFilesResponse? FromJson( string json) { return FromJson( @@ -75,7 +75,7 @@ public string ToJson( [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.ListStoreAssetsResponse? FromJson( + public static global::Speechify.ListFilesResponse? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -86,7 +86,7 @@ public string ToJson( global::Speechify.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -94,20 +94,20 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + 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.ListStoreAssetsResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.ListStoreAssetsResponse; + typeof(global::Speechify.ListFilesResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.ListFilesResponse; } /// /// Deserializes a JSON stream using the generated default JsonSerializerContext. /// - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream) { return FromJsonStreamAsync( @@ -122,7 +122,7 @@ public string ToJson( [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( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -133,7 +133,7 @@ public string ToJson( global::Speechify.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Speechify/Generated/Speechify.Models.ListStoreAssetsResponse.g.cs b/src/libs/Speechify/Generated/Speechify.Models.ListFilesResponse.g.cs similarity index 81% rename from src/libs/Speechify/Generated/Speechify.Models.ListStoreAssetsResponse.g.cs rename to src/libs/Speechify/Generated/Speechify.Models.ListFilesResponse.g.cs index 1d57853..762caae 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.ListStoreAssetsResponse.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.ListFilesResponse.g.cs @@ -8,7 +8,7 @@ namespace Speechify /// list response via `allOf`. Ships `has_more` alongside `next_cursor`
/// as two equivalent end-of-pages signals (defense-in-depth). ///
- public sealed partial class ListStoreAssetsResponse + public sealed partial class ListFilesResponse { /// /// Opaque keyset cursor for the next page. Pass back as the
@@ -29,9 +29,9 @@ public sealed partial class ListStoreAssetsResponse /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("assets")] + [global::System.Text.Json.Serialization.JsonPropertyName("files")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Assets { get; set; } + public required global::System.Collections.Generic.IList Files { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -40,12 +40,12 @@ public sealed partial class ListStoreAssetsResponse public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); /// - /// Initializes a new instance of the class. + /// 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
@@ -55,20 +55,20 @@ public sealed partial class ListStoreAssetsResponse #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif - public ListStoreAssetsResponse( + public ListFilesResponse( bool hasMore, - global::System.Collections.Generic.IList assets, + global::System.Collections.Generic.IList files, string? nextCursor) { this.NextCursor = nextCursor; this.HasMore = hasMore; - this.Assets = assets ?? throw new global::System.ArgumentNullException(nameof(assets)); + this.Files = files ?? throw new global::System.ArgumentNullException(nameof(files)); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public ListStoreAssetsResponse() + public ListFilesResponse() { } diff --git a/src/libs/Speechify/Generated/Speechify.Models.StoreAsset.g.cs b/src/libs/Speechify/Generated/Speechify.Models.StoreAsset.g.cs deleted file mode 100644 index 4fb6f50..0000000 --- a/src/libs/Speechify/Generated/Speechify.Models.StoreAsset.g.cs +++ /dev/null @@ -1,108 +0,0 @@ - -#nullable enable - -namespace Speechify -{ - /// - /// - /// - public sealed partial class StoreAsset - { - /// - /// - /// - [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("filename")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Filename { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content_type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ContentType { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("size_bytes")] - [global::System.Text.Json.Serialization.JsonRequired] - public required long SizeBytes { get; set; } - - /// - /// The durable run (and its journal step) that wrote this version. Absent for a direct API write. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("source")] - public global::Speechify.StoreDocumentSource? Source { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime CreatedAt { get; set; } - - /// - /// The API path the bytes stream from (prepend the API host). - /// - [global::System.Text.Json.Serialization.JsonPropertyName("bytes_path")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string BytesPath { 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 path the bytes stream from (prepend the API host). - /// - /// - /// The durable run (and its journal step) that wrote this version. Absent for a direct API write. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public StoreAsset( - string id, - string filename, - string contentType, - long sizeBytes, - global::System.DateTime createdAt, - string bytesPath, - global::Speechify.StoreDocumentSource? source) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Filename = filename ?? throw new global::System.ArgumentNullException(nameof(filename)); - this.ContentType = contentType ?? throw new global::System.ArgumentNullException(nameof(contentType)); - this.SizeBytes = sizeBytes; - this.Source = source; - this.CreatedAt = createdAt; - this.BytesPath = bytesPath ?? throw new global::System.ArgumentNullException(nameof(bytesPath)); - } - - /// - /// Initializes a new instance of the class. - /// - public StoreAsset() - { - } - - } -} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.TriggerRunSpec.g.cs b/src/libs/Speechify/Generated/Speechify.Models.TriggerRunSpec.g.cs index 46ede35..701df2f 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.TriggerRunSpec.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.TriggerRunSpec.g.cs @@ -15,6 +15,17 @@ public sealed partial class TriggerRunSpec [global::System.Text.Json.Serialization.JsonRequired] public required string Instruction { get; set; } + /// + /// The files every run this trigger fires is handed, as `file_...`
+ /// ids from `POST /v1/files`. At most 10.
+ /// An `ephemeral` file expires 14 days after upload while a trigger
+ /// does not, so a fire whose attachment has lapsed is refused by the
+ /// run surface and the fire fails - loudly, rather than running the
+ /// agent over nothing. Attach a `kept` file to a standing trigger. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("attachments")] + public global::System.Collections.Generic.IList? Attachments { get; set; } + /// /// Variable seed for the run. A webhook fire's JSON body is merged in
/// under the webhook's `payload_variable` key. @@ -87,6 +98,14 @@ public sealed partial class TriggerRunSpec /// /// The goal instruction that drives the run (1-8000 characters). /// + /// + /// The files every run this trigger fires is handed, as `file_...`
+ /// ids from `POST /v1/files`. At most 10.
+ /// An `ephemeral` file expires 14 days after upload while a trigger
+ /// does not, so a fire whose attachment has lapsed is refused by the
+ /// run surface and the fire fails - loudly, rather than running the
+ /// agent over nothing. Attach a `kept` file to a standing trigger. + /// /// /// Variable seed for the run. A webhook fire's JSON body is merged in
/// under the webhook's `payload_variable` key. @@ -137,6 +156,7 @@ public sealed partial class TriggerRunSpec #endif public TriggerRunSpec( string instruction, + global::System.Collections.Generic.IList? attachments, object? variables, int? maxTurns, object? outputSchema, @@ -144,6 +164,7 @@ public TriggerRunSpec( global::System.Collections.Generic.Dictionary? metadata) { this.Instruction = instruction ?? throw new global::System.ArgumentNullException(nameof(instruction)); + this.Attachments = attachments; this.Variables = variables; this.MaxTurns = maxTurns; this.OutputSchema = outputSchema; diff --git a/src/libs/Speechify/Generated/Speechify.Models.UpdateHostedAPIRouteRequest.g.cs b/src/libs/Speechify/Generated/Speechify.Models.UpdateHostedAPIRouteRequest.g.cs index 382417e..e7b89b6 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.UpdateHostedAPIRouteRequest.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.UpdateHostedAPIRouteRequest.g.cs @@ -38,7 +38,8 @@ public sealed partial class UpdateHostedAPIRouteRequest /// `store_query` (store_id, collection, where, order_by, limit),
/// `store_document` (store_id, collection, document_id),
/// `run_latest` (trigger_id of a schedule trigger),
- /// `run` (trigger_id of a webhook trigger, wait_seconds). + /// `run` (trigger_id of a webhook trigger, wait_seconds),
+ /// `file` (file_path of a published file). ///
[global::System.Text.Json.Serialization.JsonPropertyName("resolver")] public global::Speechify.HostedAPIResolver? Resolver { get; set; } @@ -79,7 +80,8 @@ public sealed partial class UpdateHostedAPIRouteRequest /// `store_query` (store_id, collection, where, order_by, limit),
/// `store_document` (store_id, collection, document_id),
/// `run_latest` (trigger_id of a schedule trigger),
- /// `run` (trigger_id of a webhook trigger, wait_seconds). + /// `run` (trigger_id of a webhook trigger, wait_seconds),
+ /// `file` (file_path of a published file). /// /// /// diff --git a/src/libs/Speechify/Generated/Speechify.Models.UploadAssetRequest.Json.g.cs b/src/libs/Speechify/Generated/Speechify.Models.UploadRequest2.Json.g.cs similarity index 89% rename from src/libs/Speechify/Generated/Speechify.Models.UploadAssetRequest.Json.g.cs rename to src/libs/Speechify/Generated/Speechify.Models.UploadRequest2.Json.g.cs index 7447500..d568f08 100644 --- a/src/libs/Speechify/Generated/Speechify.Models.UploadAssetRequest.Json.g.cs +++ b/src/libs/Speechify/Generated/Speechify.Models.UploadRequest2.Json.g.cs @@ -2,7 +2,7 @@ namespace Speechify { - public sealed partial class UploadAssetRequest + public sealed partial class UploadRequest2 { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -47,20 +47,20 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Speechify.UploadAssetRequest? FromJson( + public static global::Speechify.UploadRequest2? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Speechify.UploadAssetRequest), - jsonSerializerContext) as global::Speechify.UploadAssetRequest; + typeof(global::Speechify.UploadRequest2), + jsonSerializerContext) as global::Speechify.UploadRequest2; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Speechify.UploadAssetRequest? FromJson( + public static global::Speechify.UploadRequest2? FromJson( string json) { return FromJson( @@ -75,7 +75,7 @@ public string ToJson( [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.UploadAssetRequest? FromJson( + public static global::Speechify.UploadRequest2? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -86,7 +86,7 @@ public string ToJson( global::Speechify.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -94,20 +94,20 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + 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.UploadAssetRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.UploadAssetRequest; + typeof(global::Speechify.UploadRequest2), + jsonSerializerContext).ConfigureAwait(false)) as global::Speechify.UploadRequest2; } /// /// Deserializes a JSON stream using the generated default JsonSerializerContext. /// - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream) { return FromJsonStreamAsync( @@ -122,7 +122,7 @@ public string ToJson( [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( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -133,7 +133,7 @@ public string ToJson( global::Speechify.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Speechify/Generated/Speechify.Models.UploadRequest2.g.cs b/src/libs/Speechify/Generated/Speechify.Models.UploadRequest2.g.cs new file mode 100644 index 0000000..0889a21 --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.UploadRequest2.g.cs @@ -0,0 +1,126 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// + /// + public sealed partial class UploadRequest2 + { + /// + /// The file to store (at most 25 MiB). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file")] + [global::System.Text.Json.Serialization.JsonRequired] + public required byte[] File { get; set; } + + /// + /// The file to store (at most 25 MiB). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("filename")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Filename { get; set; } + + /// + /// The person this file is for, in your own vocabulary - the same value
+ /// a run, a conversation and a widget session take. Only a run acting
+ /// for that person can read it. Omit for a workspace-wide file. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("user_identity")] + public string? UserIdentity { get; set; } + + /// + /// How long to keep it. `ephemeral` (the default) is working material
+ /// for a run and is deleted after 14 days. `kept` survives until you
+ /// delete it - use it for anything an agent produced that you intend to
+ /// keep or serve. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("kind")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Speechify.JsonConverters.V1FilesPostRequestBodyContentMultipartFormDataSchemaKindJsonConverter))] + public global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind? Kind { get; set; } + + /// + /// Publish the file under this name so a hosted-API route can serve it,
+ /// for example `index.html` or `reports/q3.html`. Unique among the
+ /// workspace's live files, and only valid on a `kept` file with no
+ /// `user_identity` - a path on something that expires in a fortnight is
+ /// a URL that breaks, and a route answers whoever holds the URL, so it
+ /// has no person to scope to. A path already in use answers `409`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("path")] + public string? Path { get; set; } + + /// + /// The project to create the file in, as a `proj_...` id; omit for the
+ /// caller's default. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] + public string? ProjectId { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The file to store (at most 25 MiB). + /// + /// + /// The file to store (at most 25 MiB). + /// + /// + /// The person this file is for, in your own vocabulary - the same value
+ /// a run, a conversation and a widget session take. Only a run acting
+ /// for that person can read it. Omit for a workspace-wide file. + /// + /// + /// How long to keep it. `ephemeral` (the default) is working material
+ /// for a run and is deleted after 14 days. `kept` survives until you
+ /// delete it - use it for anything an agent produced that you intend to
+ /// keep or serve. + /// + /// + /// Publish the file under this name so a hosted-API route can serve it,
+ /// for example `index.html` or `reports/q3.html`. Unique among the
+ /// workspace's live files, and only valid on a `kept` file with no
+ /// `user_identity` - a path on something that expires in a fortnight is
+ /// a URL that breaks, and a route answers whoever holds the URL, so it
+ /// has no person to scope to. A path already in use answers `409`. + /// + /// + /// The project to create the file in, as a `proj_...` id; omit for the
+ /// caller's default. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UploadRequest2( + byte[] file, + string filename, + string? userIdentity, + global::Speechify.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind? kind, + string? path, + string? projectId) + { + this.File = file ?? throw new global::System.ArgumentNullException(nameof(file)); + this.Filename = filename ?? throw new global::System.ArgumentNullException(nameof(filename)); + this.UserIdentity = userIdentity; + this.Kind = kind; + this.Path = path; + this.ProjectId = projectId; + } + + /// + /// Initializes a new instance of the class. + /// + public UploadRequest2() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.V1FilesGetParametersKind.g.cs b/src/libs/Speechify/Generated/Speechify.Models.V1FilesGetParametersKind.g.cs new file mode 100644 index 0000000..d1127eb --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.V1FilesGetParametersKind.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// + /// + public enum V1FilesGetParametersKind + { + /// + /// + /// + Ephemeral, + /// + /// + /// + Kept, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class V1FilesGetParametersKindExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this V1FilesGetParametersKind value) + { + return value switch + { + V1FilesGetParametersKind.Ephemeral => "ephemeral", + V1FilesGetParametersKind.Kept => "kept", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static V1FilesGetParametersKind? ToEnum(string value) + { + return value switch + { + "ephemeral" => V1FilesGetParametersKind.Ephemeral, + "kept" => V1FilesGetParametersKind.Kept, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.Models.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind.g.cs b/src/libs/Speechify/Generated/Speechify.Models.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind.g.cs new file mode 100644 index 0000000..e6e61ac --- /dev/null +++ b/src/libs/Speechify/Generated/Speechify.Models.V1FilesPostRequestBodyContentMultipartFormDataSchemaKind.g.cs @@ -0,0 +1,54 @@ + +#nullable enable + +namespace Speechify +{ + /// + /// How long to keep it. `ephemeral` (the default) is working material
+ /// for a run and is deleted after 14 days. `kept` survives until you
+ /// delete it - use it for anything an agent produced that you intend to
+ /// keep or serve. + ///
+ public enum V1FilesPostRequestBodyContentMultipartFormDataSchemaKind + { + /// + /// + /// + Ephemeral, + /// + /// + /// + Kept, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class V1FilesPostRequestBodyContentMultipartFormDataSchemaKindExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this V1FilesPostRequestBodyContentMultipartFormDataSchemaKind value) + { + return value switch + { + V1FilesPostRequestBodyContentMultipartFormDataSchemaKind.Ephemeral => "ephemeral", + V1FilesPostRequestBodyContentMultipartFormDataSchemaKind.Kept => "kept", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static V1FilesPostRequestBodyContentMultipartFormDataSchemaKind? ToEnum(string value) + { + return value switch + { + "ephemeral" => V1FilesPostRequestBodyContentMultipartFormDataSchemaKind.Ephemeral, + "kept" => V1FilesPostRequestBodyContentMultipartFormDataSchemaKind.Kept, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Speechify/Generated/Speechify.RoutesClient.CreateRoute.g.cs b/src/libs/Speechify/Generated/Speechify.RoutesClient.CreateRoute.g.cs index 4464d0c..629a1e5 100644 --- a/src/libs/Speechify/Generated/Speechify.RoutesClient.CreateRoute.g.cs +++ b/src/libs/Speechify/Generated/Speechify.RoutesClient.CreateRoute.g.cs @@ -706,7 +706,8 @@ partial void ProcessCreateRouteResponseContent( /// `store_query` (store_id, collection, where, order_by, limit),
/// `store_document` (store_id, collection, document_id),
/// `run_latest` (trigger_id of a schedule trigger),
- /// `run` (trigger_id of a webhook trigger, wait_seconds). + /// `run` (trigger_id of a webhook trigger, wait_seconds),
+ /// `file` (file_path of a published file). /// /// /// diff --git a/src/libs/Speechify/Generated/Speechify.RoutesClient.UpdateRoute.g.cs b/src/libs/Speechify/Generated/Speechify.RoutesClient.UpdateRoute.g.cs index f94fe09..7d49d54 100644 --- a/src/libs/Speechify/Generated/Speechify.RoutesClient.UpdateRoute.g.cs +++ b/src/libs/Speechify/Generated/Speechify.RoutesClient.UpdateRoute.g.cs @@ -670,7 +670,8 @@ partial void ProcessUpdateRouteResponseContent( /// `store_query` (store_id, collection, where, order_by, limit),
/// `store_document` (store_id, collection, document_id),
/// `run_latest` (trigger_id of a schedule trigger),
- /// `run` (trigger_id of a webhook trigger, wait_seconds). + /// `run` (trigger_id of a webhook trigger, wait_seconds),
+ /// `file` (file_path of a published file). /// /// /// diff --git a/src/libs/Speechify/Generated/Speechify.RunsClient.CreateRun.g.cs b/src/libs/Speechify/Generated/Speechify.RunsClient.CreateRun.g.cs index 9fb1cb6..4f82ad0 100644 --- a/src/libs/Speechify/Generated/Speechify.RunsClient.CreateRun.g.cs +++ b/src/libs/Speechify/Generated/Speechify.RunsClient.CreateRun.g.cs @@ -886,6 +886,18 @@ partial void ProcessCreateRunResponseContent( /// /// The task or goal to give the agent. The agent runs its brain against this over a short internal conversation and returns its result. The server's limit is 8000 **bytes**, so a mostly non-ASCII instruction reaches it before 8000 characters. /// + /// + /// The files to hand the agent, as `file_...` ids from
+ /// `POST /v1/files`. The
+ /// agent is told what it holds and reads one with its `read_file`
+ /// tool: PDF, HTML, Markdown and plain text are extracted, and an
+ /// image is transcribed and described by a vision model. At most 10.
+ /// Each id is checked at admission against this workspace **and**
+ /// against `user_identity`: a file uploaded for one person is not
+ /// readable by a run acting for another. An id that does not resolve
+ /// fails the request with a `400` naming `attachments` - the run is
+ /// never started over a file it cannot read. + /// /// /// Per-run values that seed the agent's flow variables (override its
/// stored defaults). The agent's prompt renders against the result
@@ -965,6 +977,7 @@ partial void ProcessCreateRunResponseContent( string instruction, string? speechifyVersion = default, string? idempotencyKey = default, + global::System.Collections.Generic.IList? attachments = default, object? variables = default, int? maxTurns = default, string? userIdentity = default, @@ -976,6 +989,7 @@ partial void ProcessCreateRunResponseContent( var __request = new global::Speechify.CreateAgentRunRequest { Instruction = instruction, + Attachments = attachments, Variables = variables, MaxTurns = maxTurns, UserIdentity = userIdentity, diff --git a/src/libs/Speechify/Generated/Speechify.SpeechifyClient.g.cs b/src/libs/Speechify/Generated/Speechify.SpeechifyClient.g.cs index ab8000a..0084505 100644 --- a/src/libs/Speechify/Generated/Speechify.SpeechifyClient.g.cs +++ b/src/libs/Speechify/Generated/Speechify.SpeechifyClient.g.cs @@ -80,16 +80,6 @@ public sealed partial class SpeechifyClient : global::Speechify.ISpeechifyClient JsonSerializerContextProvider = JsonSerializerContextProvider, }; - /// - /// - /// - public AssetsClient Assets => new AssetsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) - { - ReadResponseAsString = ReadResponseAsString, - CreateIdempotencyKey = CreateIdempotencyKey, - JsonSerializerContextProvider = JsonSerializerContextProvider, - }; - /// /// /// @@ -180,6 +170,16 @@ public sealed partial class SpeechifyClient : global::Speechify.ISpeechifyClient JsonSerializerContextProvider = JsonSerializerContextProvider, }; + /// + /// + /// + public FilesClient Files => new FilesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) + { + ReadResponseAsString = ReadResponseAsString, + CreateIdempotencyKey = CreateIdempotencyKey, + JsonSerializerContextProvider = JsonSerializerContextProvider, + }; + /// /// /// diff --git a/src/libs/Speechify/Generated/Speechify.TeamsClient.Run.g.cs b/src/libs/Speechify/Generated/Speechify.TeamsClient.Run.g.cs index a87d742..5a7323b 100644 --- a/src/libs/Speechify/Generated/Speechify.TeamsClient.Run.g.cs +++ b/src/libs/Speechify/Generated/Speechify.TeamsClient.Run.g.cs @@ -820,6 +820,18 @@ partial void ProcessRunResponseContent( /// /// The task or goal to give the team. The manager agent runs its brain against this, delegating sub-goals to the members, and returns its aggregated result. The server's limit is 8000 **bytes**, so a mostly non-ASCII instruction reaches it before 8000 characters. /// + /// + /// The files to hand the team, as `file_...` ids from
+ /// `POST /v1/files`. The
+ /// agent is told what it holds and reads one with its `read_file`
+ /// tool: PDF, HTML, Markdown and plain text are extracted, and an
+ /// image is transcribed and described by a vision model. At most 10.
+ /// Each id is checked at admission against this workspace **and**
+ /// against `user_identity`: a file uploaded for one person is not
+ /// readable by a run acting for another. An id that does not resolve
+ /// fails the request with a `400` naming `attachments` - the run is
+ /// never started over a file it cannot read. + /// /// /// Per-run values that seed the manager's flow variables (override its
/// stored defaults). As on a single-agent run, the `system__*`
@@ -884,6 +896,7 @@ partial void ProcessRunResponseContent( string instruction, string? speechifyVersion = default, string? idempotencyKey = default, + global::System.Collections.Generic.IList? attachments = default, object? variables = default, string? userIdentity = default, int? maxTurns = default, @@ -895,6 +908,7 @@ partial void ProcessRunResponseContent( var __request = new global::Speechify.CreateTeamRunRequest { Instruction = instruction, + Attachments = attachments, Variables = variables, UserIdentity = userIdentity, MaxTurns = maxTurns, diff --git a/src/libs/Speechify/openapi.yaml b/src/libs/Speechify/openapi.yaml index e1a80c5..4b51525 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":"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` distinguishes\nrequest-rate limiting (`rate_limited`) from concurrency exhaustion\n(`concurrency_limit_reached`). Carries `Retry-After` and the\nrequest-rate budget headers; a concurrency-exhaustion 429 also carries\n`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":"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` distinguishes\nrequest-rate limiting (`rate_limited`) from concurrency exhaustion\n(`concurrency_limit_reached`). Carries `Retry-After` and the\nrequest-rate budget headers; a concurrency-exhaustion 429 also carries\n`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":"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` distinguishes\nrequest-rate limiting (`rate_limited`) from concurrency exhaustion\n(`concurrency_limit_reached`). Carries `Retry-After` and the\nrequest-rate budget headers; a concurrency-exhaustion 429 also carries\n`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":"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` distinguishes\nrequest-rate limiting (`rate_limited`) from concurrency exhaustion\n(`concurrency_limit_reached`). Carries `Retry-After` and the\nrequest-rate budget headers; a concurrency-exhaustion 429 also carries\n`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":"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. KB\ndocument upload cap, batch-call CSV cap, audio-asset WAV 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` distinguishes\nrequest-rate limiting (`rate_limited`) from concurrency exhaustion\n(`concurrency_limit_reached`). Carries `Retry-After` and the\nrequest-rate budget headers; a concurrency-exhaustion 429 also carries\n`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":"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` distinguishes\nrequest-rate limiting (`rate_limited`) from concurrency exhaustion\n(`concurrency_limit_reached`). Carries `Retry-After` and the\nrequest-rate budget headers; a concurrency-exhaustion 429 also carries\n`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":"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` distinguishes\nrequest-rate limiting (`rate_limited`) from concurrency exhaustion\n(`concurrency_limit_reached`). Carries `Retry-After` and the\nrequest-rate budget headers; a concurrency-exhaustion 429 also carries\n`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":"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` distinguishes\nrequest-rate limiting (`rate_limited`) from concurrency exhaustion\n(`concurrency_limit_reached`). Carries `Retry-After` and the\nrequest-rate budget headers; a concurrency-exhaustion 429 also carries\n`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":"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` distinguishes\nrequest-rate limiting (`rate_limited`) from concurrency exhaustion\n(`concurrency_limit_reached`). Carries `Retry-After` and the\nrequest-rate budget headers; a concurrency-exhaustion 429 also carries\n`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":"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` distinguishes\nrequest-rate limiting (`rate_limited`) from concurrency exhaustion\n(`concurrency_limit_reached`). Carries `Retry-After` and the\nrequest-rate budget headers; a concurrency-exhaustion 429 also carries\n`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":"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. KB\ndocument upload cap, batch-call CSV cap, audio-asset WAV 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` distinguishes\nrequest-rate limiting (`rate_limited`) from concurrency exhaustion\n(`concurrency_limit_reached`). Carries `Retry-After` and the\nrequest-rate budget headers; a concurrency-exhaustion 429 also carries\n`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":"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. KB\ndocument upload cap, batch-call CSV cap, audio-asset WAV 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` distinguishes\nrequest-rate limiting (`rate_limited`) from concurrency exhaustion\n(`concurrency_limit_reached`). Carries `Retry-After` and the\nrequest-rate budget headers; a concurrency-exhaustion 429 also carries\n`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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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\n(`agent_publish_gate_failed`): the agent's configured suite did not\npass. `error.details` carries the verdict (per-case, per-criterion).","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. Not a verdict on the configuration; retry\nafter `Retry-After`. `error.details` lists the cases that could not\nrun.","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":"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\n(`agent_publish_gate_failed`): the target version did not pass the\nagent's configured suite. `error.details` carries the verdict.","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.\nNot a verdict on it; retry after `Retry-After`. `error.details`\nlists the cases that could not run.","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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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` distinguishes\nrequest-rate limiting (`rate_limited`) from concurrency exhaustion\n(`concurrency_limit_reached`). Carries `Retry-After` and the\nrequest-rate budget headers; a concurrency-exhaustion 429 also carries\n`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":"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 transport.","required":false,"schema":{"$ref":"#/components/schemas/ConversationTransport"}},{"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":"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":"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":"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 transport.","required":false,"schema":{"$ref":"#/components/schemas/ConversationTransport"}},{"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":"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":"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; `