diff --git a/src/libs/Speechify/Generated/Speechify.ConversationsClient.List.g.cs b/src/libs/Speechify/Generated/Speechify.ConversationsClient.List.g.cs
index aa89bb6b..d52fdce6 100644
--- a/src/libs/Speechify/Generated/Speechify.ConversationsClient.List.g.cs
+++ b/src/libs/Speechify/Generated/Speechify.ConversationsClient.List.g.cs
@@ -32,6 +32,8 @@ partial void PrepareListArguments(
ref string? agentId,
ref global::Speechify.ConversationStatus? status,
ref global::Speechify.ConversationTransport? transport,
+ ref global::Speechify.ConversationChannel? channel,
+ ref bool? live,
ref string? callerIdentity,
ref string? contactId,
ref string? q,
@@ -49,6 +51,8 @@ partial void PrepareListRequest(
string? agentId,
global::Speechify.ConversationStatus? status,
global::Speechify.ConversationTransport? transport,
+ global::Speechify.ConversationChannel? channel,
+ bool? live,
string? callerIdentity,
string? contactId,
string? q,
@@ -85,11 +89,28 @@ partial void ProcessListResponseContent(
///
///
///
- /// How the caller reached the agent. `web` is the browser /
+ /// Which runtime carried the conversation. `web` is the browser /
/// SDK realtime path; the `sip_*` and `phone` variants come
- /// from the telephony stack; `text` is the text/chat channel
- /// (turn-based, roomless, no call duration).
+ /// from the telephony stack; `text` is the turn-based, roomless
+ /// runtime (no call duration) that the message API and every
+ /// messaging channel share.
+ /// A conversation reports the transport it actually ran on:
+ /// `web`, `sip_inbound`, `sip_outbound` or `text`. `phone` is
+ /// selectable when filtering a list and matches calls in either
+ /// direction; `whatsapp` is reserved and matches nothing today.
+ /// To tell two conversations on the same transport apart, filter
+ /// or read `channel` instead.
///
+ ///
+ /// Which front door the conversation arrived through, one level
+ /// coarser than `transport`, and the value to display or group a
+ /// conversation's channel by. Both telephony directions are
+ /// `voice`; the browser / SDK realtime path is `web`; the message
+ /// API is `text`; a conversation reached over a provider front
+ /// door names that provider (`slack`) rather than the transport it
+ /// shares with the message API.
+ ///
+ ///
///
///
///
@@ -108,6 +129,8 @@ partial void ProcessListResponseContent(
string? agentId = default,
global::Speechify.ConversationStatus? status = default,
global::Speechify.ConversationTransport? transport = default,
+ global::Speechify.ConversationChannel? channel = default,
+ bool? live = default,
string? callerIdentity = default,
string? contactId = default,
string? q = default,
@@ -126,6 +149,8 @@ partial void ProcessListResponseContent(
agentId: agentId,
status: status,
transport: transport,
+ channel: channel,
+ live: live,
callerIdentity: callerIdentity,
contactId: contactId,
q: q,
@@ -159,11 +184,28 @@ partial void ProcessListResponseContent(
///
///
///
- /// How the caller reached the agent. `web` is the browser /
+ /// Which runtime carried the conversation. `web` is the browser /
/// SDK realtime path; the `sip_*` and `phone` variants come
- /// from the telephony stack; `text` is the text/chat channel
- /// (turn-based, roomless, no call duration).
+ /// from the telephony stack; `text` is the turn-based, roomless
+ /// runtime (no call duration) that the message API and every
+ /// messaging channel share.
+ /// A conversation reports the transport it actually ran on:
+ /// `web`, `sip_inbound`, `sip_outbound` or `text`. `phone` is
+ /// selectable when filtering a list and matches calls in either
+ /// direction; `whatsapp` is reserved and matches nothing today.
+ /// To tell two conversations on the same transport apart, filter
+ /// or read `channel` instead.
+ ///
+ ///
+ /// Which front door the conversation arrived through, one level
+ /// coarser than `transport`, and the value to display or group a
+ /// conversation's channel by. Both telephony directions are
+ /// `voice`; the browser / SDK realtime path is `web`; the message
+ /// API is `text`; a conversation reached over a provider front
+ /// door names that provider (`slack`) rather than the transport it
+ /// shares with the message API.
///
+ ///
///
///
///
@@ -182,6 +224,8 @@ partial void ProcessListResponseContent(
string? agentId = default,
global::Speechify.ConversationStatus? status = default,
global::Speechify.ConversationTransport? transport = default,
+ global::Speechify.ConversationChannel? channel = default,
+ bool? live = default,
string? callerIdentity = default,
string? contactId = default,
string? q = default,
@@ -203,6 +247,8 @@ partial void ProcessListResponseContent(
agentId: ref agentId,
status: ref status,
transport: ref transport,
+ channel: ref channel,
+ live: ref live,
callerIdentity: ref callerIdentity,
contactId: ref contactId,
q: ref q,
@@ -245,6 +291,8 @@ partial void ProcessListResponseContent(
.AddOptionalParameter("agent_id", agentId)
.AddOptionalParameter("status", status?.ToValueString())
.AddOptionalParameter("transport", transport?.ToValueString())
+ .AddOptionalParameter("channel", channel?.ToValueString())
+ .AddOptionalParameter("live", live?.ToString().ToLowerInvariant())
.AddOptionalParameter("caller_identity", callerIdentity)
.AddOptionalParameter("contact_id", contactId)
.AddOptionalParameter("q", q)
@@ -305,6 +353,8 @@ partial void ProcessListResponseContent(
agentId: agentId,
status: status,
transport: transport,
+ channel: channel,
+ live: live,
callerIdentity: callerIdentity,
contactId: contactId,
q: q,
diff --git a/src/libs/Speechify/Generated/Speechify.ConversationsClient.Stats.g.cs b/src/libs/Speechify/Generated/Speechify.ConversationsClient.Stats.g.cs
index e33e547e..c8ee4fa5 100644
--- a/src/libs/Speechify/Generated/Speechify.ConversationsClient.Stats.g.cs
+++ b/src/libs/Speechify/Generated/Speechify.ConversationsClient.Stats.g.cs
@@ -30,6 +30,8 @@ partial void PrepareStatsArguments(
ref string? agentId,
ref global::Speechify.ConversationStatus? status,
ref global::Speechify.ConversationTransport? transport,
+ ref global::Speechify.ConversationChannel? channel,
+ ref bool? live,
ref string? callerIdentity,
ref string? contactId,
ref string? q,
@@ -45,6 +47,8 @@ partial void PrepareStatsRequest(
string? agentId,
global::Speechify.ConversationStatus? status,
global::Speechify.ConversationTransport? transport,
+ global::Speechify.ConversationChannel? channel,
+ bool? live,
string? callerIdentity,
string? contactId,
string? q,
@@ -71,11 +75,28 @@ partial void ProcessStatsResponseContent(
///
///
///
- /// How the caller reached the agent. `web` is the browser /
+ /// Which runtime carried the conversation. `web` is the browser /
/// SDK realtime path; the `sip_*` and `phone` variants come
- /// from the telephony stack; `text` is the text/chat channel
- /// (turn-based, roomless, no call duration).
+ /// from the telephony stack; `text` is the turn-based, roomless
+ /// runtime (no call duration) that the message API and every
+ /// messaging channel share.
+ /// A conversation reports the transport it actually ran on:
+ /// `web`, `sip_inbound`, `sip_outbound` or `text`. `phone` is
+ /// selectable when filtering a list and matches calls in either
+ /// direction; `whatsapp` is reserved and matches nothing today.
+ /// To tell two conversations on the same transport apart, filter
+ /// or read `channel` instead.
///
+ ///
+ /// Which front door the conversation arrived through, one level
+ /// coarser than `transport`, and the value to display or group a
+ /// conversation's channel by. Both telephony directions are
+ /// `voice`; the browser / SDK realtime path is `web`; the message
+ /// API is `text`; a conversation reached over a provider front
+ /// door names that provider (`slack`) rather than the transport it
+ /// shares with the message API.
+ ///
+ ///
///
///
///
@@ -92,6 +113,8 @@ partial void ProcessStatsResponseContent(
string? agentId = default,
global::Speechify.ConversationStatus? status = default,
global::Speechify.ConversationTransport? transport = default,
+ global::Speechify.ConversationChannel? channel = default,
+ bool? live = default,
string? callerIdentity = default,
string? contactId = default,
string? q = default,
@@ -108,6 +131,8 @@ partial void ProcessStatsResponseContent(
agentId: agentId,
status: status,
transport: transport,
+ channel: channel,
+ live: live,
callerIdentity: callerIdentity,
contactId: contactId,
q: q,
@@ -131,11 +156,28 @@ partial void ProcessStatsResponseContent(
///
///
///
- /// How the caller reached the agent. `web` is the browser /
+ /// Which runtime carried the conversation. `web` is the browser /
/// SDK realtime path; the `sip_*` and `phone` variants come
- /// from the telephony stack; `text` is the text/chat channel
- /// (turn-based, roomless, no call duration).
+ /// from the telephony stack; `text` is the turn-based, roomless
+ /// runtime (no call duration) that the message API and every
+ /// messaging channel share.
+ /// A conversation reports the transport it actually ran on:
+ /// `web`, `sip_inbound`, `sip_outbound` or `text`. `phone` is
+ /// selectable when filtering a list and matches calls in either
+ /// direction; `whatsapp` is reserved and matches nothing today.
+ /// To tell two conversations on the same transport apart, filter
+ /// or read `channel` instead.
+ ///
+ ///
+ /// Which front door the conversation arrived through, one level
+ /// coarser than `transport`, and the value to display or group a
+ /// conversation's channel by. Both telephony directions are
+ /// `voice`; the browser / SDK realtime path is `web`; the message
+ /// API is `text`; a conversation reached over a provider front
+ /// door names that provider (`slack`) rather than the transport it
+ /// shares with the message API.
///
+ ///
///
///
///
@@ -152,6 +194,8 @@ partial void ProcessStatsResponseContent(
string? agentId = default,
global::Speechify.ConversationStatus? status = default,
global::Speechify.ConversationTransport? transport = default,
+ global::Speechify.ConversationChannel? channel = default,
+ bool? live = default,
string? callerIdentity = default,
string? contactId = default,
string? q = default,
@@ -171,6 +215,8 @@ partial void ProcessStatsResponseContent(
agentId: ref agentId,
status: ref status,
transport: ref transport,
+ channel: ref channel,
+ live: ref live,
callerIdentity: ref callerIdentity,
contactId: ref contactId,
q: ref q,
@@ -211,6 +257,8 @@ partial void ProcessStatsResponseContent(
.AddOptionalParameter("agent_id", agentId)
.AddOptionalParameter("status", status?.ToValueString())
.AddOptionalParameter("transport", transport?.ToValueString())
+ .AddOptionalParameter("channel", channel?.ToValueString())
+ .AddOptionalParameter("live", live?.ToString().ToLowerInvariant())
.AddOptionalParameter("caller_identity", callerIdentity)
.AddOptionalParameter("contact_id", contactId)
.AddOptionalParameter("q", q)
@@ -269,6 +317,8 @@ partial void ProcessStatsResponseContent(
agentId: agentId,
status: status,
transport: transport,
+ channel: channel,
+ live: live,
callerIdentity: callerIdentity,
contactId: contactId,
q: q,
diff --git a/src/libs/Speechify/Generated/Speechify.DocumentsClient.AggregateDocuments.g.cs b/src/libs/Speechify/Generated/Speechify.DocumentsClient.AggregateDocuments.g.cs
new file mode 100644
index 00000000..e642a150
--- /dev/null
+++ b/src/libs/Speechify/Generated/Speechify.DocumentsClient.AggregateDocuments.g.cs
@@ -0,0 +1,705 @@
+
+#nullable enable
+
+namespace Speechify
+{
+ public partial class DocumentsClient
+ {
+
+
+ private static readonly global::Speechify.EndPointSecurityRequirement s_AggregateDocumentsSecurityRequirement0 =
+ new global::Speechify.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Speechify.EndPointAuthorizationRequirement[]
+ { new global::Speechify.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Speechify.EndPointSecurityRequirement[] s_AggregateDocumentsSecurityRequirements =
+ new global::Speechify.EndPointSecurityRequirement[]
+ { s_AggregateDocumentsSecurityRequirement0,
+ };
+ partial void PrepareAggregateDocumentsArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref string storeId,
+ ref string collection,
+ ref string? speechifyVersion,
+ global::Speechify.StoreAggregateQuery request);
+ partial void PrepareAggregateDocumentsRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ string storeId,
+ string collection,
+ string? speechifyVersion,
+ global::Speechify.StoreAggregateQuery request);
+ partial void ProcessAggregateDocumentsResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessAggregateDocumentsResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Aggregate Documents
+ /// Count, sum, average, min or max over a collection, filtered with the
+ /// same `where` a query takes and optionally grouped by one field, in
+ /// one request. It runs on each document's indexed projection (its
+ /// top-level string / number / boolean / null fields), never on the
+ /// bodies: a nested value does not exist to it, a string longer than 256
+ /// characters groups by its first 256 and the answer says
+ /// `key_truncated` when that happened, and at most 100 groups come back,
+ /// largest first (`groups_truncated`). A read carrying a body, hence a
+ /// POST on a literal sub-path; `aggregate` is a reserved document id.
+ /// This is the last operation the query surface takes. A store is a
+ /// Firestore-shaped document store: filter, order, page and aggregate on
+ /// top-level fields. No joins, nested-field filters, full-text search or
+ /// SQL follow; a customer who needs more brings their own database
+ /// through a webhook or MCP tool, or pulls a collection into a run's
+ /// sandbox.
+ /// 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
+ ///
+ public async global::System.Threading.Tasks.Task AggregateDocumentsAsync(
+ string storeId,
+ string collection,
+
+ global::Speechify.StoreAggregateQuery request,
+ string? speechifyVersion = default,
+ global::Speechify.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await AggregateDocumentsAsResponseAsync(
+ storeId: storeId,
+ collection: collection,
+
+ request: request,
+ speechifyVersion: speechifyVersion,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Aggregate Documents
+ /// Count, sum, average, min or max over a collection, filtered with the
+ /// same `where` a query takes and optionally grouped by one field, in
+ /// one request. It runs on each document's indexed projection (its
+ /// top-level string / number / boolean / null fields), never on the
+ /// bodies: a nested value does not exist to it, a string longer than 256
+ /// characters groups by its first 256 and the answer says
+ /// `key_truncated` when that happened, and at most 100 groups come back,
+ /// largest first (`groups_truncated`). A read carrying a body, hence a
+ /// POST on a literal sub-path; `aggregate` is a reserved document id.
+ /// This is the last operation the query surface takes. A store is a
+ /// Firestore-shaped document store: filter, order, page and aggregate on
+ /// top-level fields. No joins, nested-field filters, full-text search or
+ /// SQL follow; a customer who needs more brings their own database
+ /// through a webhook or MCP tool, or pulls a collection into a run's
+ /// sandbox.
+ /// 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
+ ///
+ public async global::System.Threading.Tasks.Task> AggregateDocumentsAsResponseAsync(
+ string storeId,
+ string collection,
+
+ global::Speechify.StoreAggregateQuery request,
+ string? speechifyVersion = default,
+ global::Speechify.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ request = request ?? throw new global::System.ArgumentNullException(nameof(request));
+
+ PrepareArguments(
+ client: HttpClient);
+ PrepareAggregateDocumentsArguments(
+ httpClient: HttpClient,
+ storeId: ref storeId,
+ collection: ref collection,
+ speechifyVersion: ref speechifyVersion,
+ request: request);
+
+
+ var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_AggregateDocumentsSecurityRequirements,
+ operationName: "AggregateDocumentsAsync");
+
+ using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Speechify.PathBuilder(
+ path: $"/v1/stores/{storeId}/collections/{collection}/documents/aggregate",
+ baseUri: HttpClient.BaseAddress);
+ var __path = __pathBuilder.ToString();
+ __path = global::Speechify.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Post,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+
+ if (speechifyVersion != default)
+ {
+ __httpRequest.Headers.TryAddWithoutValidation("Speechify-Version", speechifyVersion.ToString());
+ }
+
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContent = new global::System.Net.Http.StringContent(
+ content: __httpRequestContentBody,
+ encoding: global::System.Text.Encoding.UTF8,
+ mediaType: "application/json");
+ __httpRequest.Content = __httpRequestContent;
+ global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareAggregateDocumentsRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ storeId: storeId!,
+ collection: collection!,
+ speechifyVersion: speechifyVersion,
+ request: request);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "AggregateDocuments",
+ methodName: "AggregateDocumentsAsync",
+ pathTemplate: "$\"/v1/stores/{storeId}/collections/{collection}/documents/aggregate\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "AggregateDocuments",
+ methodName: "AggregateDocumentsAsync",
+ pathTemplate: "$\"/v1/stores/{storeId}/collections/{collection}/documents/aggregate\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "AggregateDocuments",
+ methodName: "AggregateDocumentsAsync",
+ pathTemplate: "$\"/v1/stores/{storeId}/collections/{collection}/documents/aggregate\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessAggregateDocumentsResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "AggregateDocuments",
+ methodName: "AggregateDocumentsAsync",
+ pathTemplate: "$\"/v1/stores/{storeId}/collections/{collection}/documents/aggregate\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "AggregateDocuments",
+ methodName: "AggregateDocumentsAsync",
+ pathTemplate: "$\"/v1/stores/{storeId}/collections/{collection}/documents/aggregate\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // The request was malformed or failed validation. The response body is the standard `Error` envelope; for validation failures `error.fields` enumerates the offending fields as a `path -> message` map (code = `validation_failed`).
+ if ((int)__response.StatusCode == 400)
+ {
+ string? __content_400 = null;
+ global::System.Exception? __exception_400 = null;
+ global::Speechify.Error? __value_400 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_400 = global::Speechify.Error.FromJson(__content_400, JsonSerializerContext);
+ }
+ else
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_400 = global::Speechify.Error.FromJson(__content_400, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_400 = __ex;
+ }
+
+
+ throw global::Speechify.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_400,
+ responseBody: __content_400,
+ responseObject: __value_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Authentication is missing or invalid. The request did not carry a recognised credential (console session token, API key, or worker JWT).
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::Speechify.Error? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::Speechify.Error.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::Speechify.Error.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+
+ throw global::Speechify.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_401,
+ responseBody: __content_401,
+ responseObject: __value_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // The workspace has insufficient credits, or the request needs a plan tier the workspace is not on (e.g. voice cloning). Distinct from `Forbidden` so SDK consumers can drive upgrade UX.
+ if ((int)__response.StatusCode == 402)
+ {
+ string? __content_402 = null;
+ global::System.Exception? __exception_402 = null;
+ global::Speechify.Error? __value_402 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_402 = global::Speechify.Error.FromJson(__content_402, JsonSerializerContext);
+ }
+ else
+ {
+ __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_402 = global::Speechify.Error.FromJson(__content_402, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_402 = __ex;
+ }
+
+
+ throw global::Speechify.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_402 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_402,
+ responseBody: __content_402,
+ responseObject: __value_402,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // The referenced resource does not exist or is not visible to the caller's workspace.
+ if ((int)__response.StatusCode == 404)
+ {
+ string? __content_404 = null;
+ global::System.Exception? __exception_404 = null;
+ global::Speechify.Error? __value_404 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_404 = global::Speechify.Error.FromJson(__content_404, JsonSerializerContext);
+ }
+ else
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_404 = global::Speechify.Error.FromJson(__content_404, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_404 = __ex;
+ }
+
+
+ throw global::Speechify.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
+ responseBody: __content_404,
+ responseObject: __value_404,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessAggregateDocumentsResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Speechify.StoreAggregateResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Speechify.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Speechify.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Speechify.StoreAggregateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Speechify.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Speechify.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ ///
+ /// Aggregate Documents
+ /// Count, sum, average, min or max over a collection, filtered with the
+ /// same `where` a query takes and optionally grouped by one field, in
+ /// one request. It runs on each document's indexed projection (its
+ /// top-level string / number / boolean / null fields), never on the
+ /// bodies: a nested value does not exist to it, a string longer than 256
+ /// characters groups by its first 256 and the answer says
+ /// `key_truncated` when that happened, and at most 100 groups come back,
+ /// largest first (`groups_truncated`). A read carrying a body, hence a
+ /// POST on a literal sub-path; `aggregate` is a reserved document id.
+ /// This is the last operation the query surface takes. A store is a
+ /// Firestore-shaped document store: filter, order, page and aggregate on
+ /// top-level fields. No joins, nested-field filters, full-text search or
+ /// SQL follow; a customer who needs more brings their own database
+ /// through a webhook or MCP tool, or pulls a collection into a run's
+ /// sandbox.
+ /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Filters, ANDed, the same ones a query takes.
+ ///
+ ///
+ /// One projected field to group by. A string that reaches the index's 256-byte limit may have been cut there, and the answer says so.
+ ///
+ ///
+ /// 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 AggregateDocumentsAsync(
+ string storeId,
+ string collection,
+ global::System.Collections.Generic.IList metrics,
+ string? speechifyVersion = default,
+ global::System.Collections.Generic.IList? where = default,
+ string? groupBy = default,
+ global::Speechify.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __request = new global::Speechify.StoreAggregateQuery
+ {
+ Where = where,
+ GroupBy = groupBy,
+ Metrics = metrics,
+ };
+
+ return await AggregateDocumentsAsync(
+ storeId: storeId,
+ collection: collection,
+ speechifyVersion: speechifyVersion,
+ request: __request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Speechify/Generated/Speechify.DocumentsClient.DeleteDocument.g.cs b/src/libs/Speechify/Generated/Speechify.DocumentsClient.DeleteDocument.g.cs
index 6c646f2a..9e0713ae 100644
--- a/src/libs/Speechify/Generated/Speechify.DocumentsClient.DeleteDocument.g.cs
+++ b/src/libs/Speechify/Generated/Speechify.DocumentsClient.DeleteDocument.g.cs
@@ -30,14 +30,16 @@ partial void PrepareDeleteDocumentArguments(
ref string storeId,
ref string collection,
ref string documentId,
- ref string? speechifyVersion);
+ ref string? speechifyVersion,
+ ref string? ifMatch);
partial void PrepareDeleteDocumentRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string storeId,
string collection,
string documentId,
- string? speechifyVersion);
+ string? speechifyVersion,
+ string? ifMatch);
partial void ProcessDeleteDocumentResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
@@ -49,13 +51,15 @@ partial void ProcessDeleteDocumentResponseContent(
///
/// Delete Document
- /// Delete one document.
+ /// Delete one document. `If-Match` makes the delete conditional on the
+ /// `revision` you read, so it never removes a version written since.
/// 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
///
@@ -64,6 +68,7 @@ partial void ProcessDeleteDocumentResponseContent(
string collection,
string documentId,
string? speechifyVersion = default,
+ string? ifMatch = default,
global::Speechify.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -72,6 +77,7 @@ partial void ProcessDeleteDocumentResponseContent(
collection: collection,
documentId: documentId,
speechifyVersion: speechifyVersion,
+ ifMatch: ifMatch,
requestOptions: requestOptions,
cancellationToken: cancellationToken
).ConfigureAwait(false);
@@ -80,13 +86,15 @@ partial void ProcessDeleteDocumentResponseContent(
}
///
/// Delete Document
- /// Delete one document.
+ /// Delete one document. `If-Match` makes the delete conditional on the
+ /// `revision` you read, so it never removes a version written since.
/// 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
///
@@ -95,6 +103,7 @@ partial void ProcessDeleteDocumentResponseContent(
string collection,
string documentId,
string? speechifyVersion = default,
+ string? ifMatch = default,
global::Speechify.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -105,7 +114,8 @@ partial void ProcessDeleteDocumentResponseContent(
storeId: ref storeId,
collection: ref collection,
documentId: ref documentId,
- speechifyVersion: ref speechifyVersion);
+ speechifyVersion: ref speechifyVersion,
+ ifMatch: ref ifMatch);
var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations(
@@ -167,6 +177,10 @@ partial void ProcessDeleteDocumentResponseContent(
{
__httpRequest.Headers.TryAddWithoutValidation("Speechify-Version", speechifyVersion.ToString());
}
+ if (ifMatch != default)
+ {
+ __httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch.ToString());
+ }
global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders(
request: __httpRequest,
@@ -182,7 +196,8 @@ partial void ProcessDeleteDocumentResponseContent(
storeId: storeId!,
collection: collection!,
documentId: documentId!,
- speechifyVersion: speechifyVersion);
+ speechifyVersion: speechifyVersion,
+ ifMatch: ifMatch);
return __httpRequest;
}
@@ -509,6 +524,43 @@ partial void ProcessDeleteDocumentResponseContent(
h => h.Key,
h => h.Value));
}
+ // The `If-Match` precondition does not hold: the resource changed, or was deleted, after the version the request names. Nothing was written.
+ if ((int)__response.StatusCode == 412)
+ {
+ string? __content_412 = null;
+ global::System.Exception? __exception_412 = null;
+ global::Speechify.Error? __value_412 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_412 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_412 = global::Speechify.Error.FromJson(__content_412, JsonSerializerContext);
+ }
+ else
+ {
+ __content_412 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_412 = global::Speechify.Error.FromJson(__content_412, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_412 = __ex;
+ }
+
+
+ throw global::Speechify.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_412 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_412,
+ responseBody: __content_412,
+ responseObject: __value_412,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
if (__effectiveReadResponseAsString)
{
diff --git a/src/libs/Speechify/Generated/Speechify.DocumentsClient.PutDocument.g.cs b/src/libs/Speechify/Generated/Speechify.DocumentsClient.PutDocument.g.cs
index d1a73f66..c14a1678 100644
--- a/src/libs/Speechify/Generated/Speechify.DocumentsClient.PutDocument.g.cs
+++ b/src/libs/Speechify/Generated/Speechify.DocumentsClient.PutDocument.g.cs
@@ -31,6 +31,7 @@ partial void PreparePutDocumentArguments(
ref string collection,
ref string documentId,
ref string? speechifyVersion,
+ ref string? ifMatch,
global::Speechify.WriteStoreDocumentRequest request);
partial void PreparePutDocumentRequest(
global::System.Net.Http.HttpClient httpClient,
@@ -39,6 +40,7 @@ partial void PreparePutDocumentRequest(
string collection,
string documentId,
string? speechifyVersion,
+ string? ifMatch,
global::Speechify.WriteStoreDocumentRequest request);
partial void ProcessPutDocumentResponse(
global::System.Net.Http.HttpClient httpClient,
@@ -56,12 +58,18 @@ partial void ProcessPutDocumentResponseContent(
/// JSON object of at most 256 KiB; its top-level scalar fields become the
/// queryable projection. The reserved ids `query` and `batch` are refused
/// (400 `validation_failed`).
+ /// Writing from a document you read? Send its `ETag` (equivalently its
+ /// `revision`) in `If-Match` and the write applies only if nothing has
+ /// changed since,
+ /// answering 412 instead of overwriting somebody else's edit or bringing a
+ /// deleted document back.
/// 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
@@ -73,6 +81,7 @@ partial void ProcessPutDocumentResponseContent(
global::Speechify.WriteStoreDocumentRequest request,
string? speechifyVersion = default,
+ string? ifMatch = default,
global::Speechify.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -83,6 +92,7 @@ partial void ProcessPutDocumentResponseContent(
request: request,
speechifyVersion: speechifyVersion,
+ ifMatch: ifMatch,
requestOptions: requestOptions,
cancellationToken: cancellationToken
).ConfigureAwait(false);
@@ -96,12 +106,18 @@ partial void ProcessPutDocumentResponseContent(
/// JSON object of at most 256 KiB; its top-level scalar fields become the
/// queryable projection. The reserved ids `query` and `batch` are refused
/// (400 `validation_failed`).
+ /// Writing from a document you read? Send its `ETag` (equivalently its
+ /// `revision`) in `If-Match` and the write applies only if nothing has
+ /// changed since,
+ /// answering 412 instead of overwriting somebody else's edit or bringing a
+ /// deleted document back.
/// 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
@@ -113,6 +129,7 @@ partial void ProcessPutDocumentResponseContent(
global::Speechify.WriteStoreDocumentRequest request,
string? speechifyVersion = default,
+ string? ifMatch = default,
global::Speechify.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -126,6 +143,7 @@ partial void ProcessPutDocumentResponseContent(
collection: ref collection,
documentId: ref documentId,
speechifyVersion: ref speechifyVersion,
+ ifMatch: ref ifMatch,
request: request);
@@ -188,6 +206,10 @@ partial void ProcessPutDocumentResponseContent(
{
__httpRequest.Headers.TryAddWithoutValidation("Speechify-Version", speechifyVersion.ToString());
}
+ if (ifMatch != default)
+ {
+ __httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch.ToString());
+ }
var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
@@ -210,6 +232,7 @@ partial void ProcessPutDocumentResponseContent(
collection: collection!,
documentId: documentId!,
speechifyVersion: speechifyVersion,
+ ifMatch: ifMatch,
request: request);
return __httpRequest;
@@ -574,6 +597,43 @@ partial void ProcessPutDocumentResponseContent(
h => h.Key,
h => h.Value));
}
+ // The `If-Match` precondition does not hold: the resource changed, or was deleted, after the version the request names. Nothing was written.
+ if ((int)__response.StatusCode == 412)
+ {
+ string? __content_412 = null;
+ global::System.Exception? __exception_412 = null;
+ global::Speechify.Error? __value_412 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_412 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_412 = global::Speechify.Error.FromJson(__content_412, JsonSerializerContext);
+ }
+ else
+ {
+ __content_412 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_412 = global::Speechify.Error.FromJson(__content_412, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_412 = __ex;
+ }
+
+
+ throw global::Speechify.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_412 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_412,
+ responseBody: __content_412,
+ responseObject: __value_412,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
// A downstream dependency is degraded or the endpoint is intentionally disabled (e.g. phone-number purchase before ops setup).
if ((int)__response.StatusCode == 503)
{
@@ -714,12 +774,18 @@ partial void ProcessPutDocumentResponseContent(
/// JSON object of at most 256 KiB; its top-level scalar fields become the
/// queryable projection. The reserved ids `query` and `batch` are refused
/// (400 `validation_failed`).
+ /// Writing from a document you read? Send its `ETag` (equivalently its
+ /// `revision`) in `If-Match` and the write applies only if nothing has
+ /// changed since,
+ /// answering 412 instead of overwriting somebody else's edit or bringing a
+ /// deleted document back.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
///
///
///
///
///
+ ///
///
/// On `createDocument`, the id to write at (letters, digits, `_ . - : ~ @ +`, at most 200,
/// not the reserved `query` or `batch`); minted when absent. Ignored on `putDocument` /
@@ -737,6 +803,7 @@ partial void ProcessPutDocumentResponseContent(
string documentId,
object data,
string? speechifyVersion = default,
+ string? ifMatch = default,
string? id = default,
global::Speechify.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -752,6 +819,7 @@ partial void ProcessPutDocumentResponseContent(
collection: collection,
documentId: documentId,
speechifyVersion: speechifyVersion,
+ ifMatch: ifMatch,
request: __request,
requestOptions: requestOptions,
cancellationToken: cancellationToken).ConfigureAwait(false);
diff --git a/src/libs/Speechify/Generated/Speechify.DocumentsClient.QueryDocuments.g.cs b/src/libs/Speechify/Generated/Speechify.DocumentsClient.QueryDocuments.g.cs
index 3659eed4..136722da 100644
--- a/src/libs/Speechify/Generated/Speechify.DocumentsClient.QueryDocuments.g.cs
+++ b/src/libs/Speechify/Generated/Speechify.DocumentsClient.QueryDocuments.g.cs
@@ -53,7 +53,9 @@ partial void ProcessQueryDocumentsResponseContent(
/// order on one with `order_by`, page with `limit` + `cursor`. Values
/// compare with JSON semantics (numbers as numbers, strings lexically, so
/// ISO-8601 timestamps order as dates). A read carrying a body, hence a
- /// POST on a literal sub-path; `query` and `batch` are reserved document ids.
+ /// POST on a literal sub-path; `query`, `aggregate` and `batch` are
+ /// reserved document ids. For a count or a total, `aggregate` answers in
+ /// one request instead of a page walk.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
///
///
@@ -90,7 +92,9 @@ partial void ProcessQueryDocumentsResponseContent(
/// order on one with `order_by`, page with `limit` + `cursor`. Values
/// compare with JSON semantics (numbers as numbers, strings lexically, so
/// ISO-8601 timestamps order as dates). A read carrying a body, hence a
- /// POST on a literal sub-path; `query` and `batch` are reserved document ids.
+ /// POST on a literal sub-path; `query`, `aggregate` and `batch` are
+ /// reserved document ids. For a count or a total, `aggregate` answers in
+ /// one request instead of a page walk.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
///
///
@@ -630,7 +634,9 @@ partial void ProcessQueryDocumentsResponseContent(
/// order on one with `order_by`, page with `limit` + `cursor`. Values
/// compare with JSON semantics (numbers as numbers, strings lexically, so
/// ISO-8601 timestamps order as dates). A read carrying a body, hence a
- /// POST on a literal sub-path; `query` and `batch` are reserved document ids.
+ /// POST on a literal sub-path; `query`, `aggregate` and `batch` are
+ /// reserved document ids. For a count or a total, `aggregate` answers in
+ /// one request instead of a page walk.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
///
///
diff --git a/src/libs/Speechify/Generated/Speechify.DocumentsClient.UpdateDocument.g.cs b/src/libs/Speechify/Generated/Speechify.DocumentsClient.UpdateDocument.g.cs
index 7aa0dcc2..ca8d9cda 100644
--- a/src/libs/Speechify/Generated/Speechify.DocumentsClient.UpdateDocument.g.cs
+++ b/src/libs/Speechify/Generated/Speechify.DocumentsClient.UpdateDocument.g.cs
@@ -31,6 +31,7 @@ partial void PrepareUpdateDocumentArguments(
ref string collection,
ref string documentId,
ref string? speechifyVersion,
+ ref string? ifMatch,
global::Speechify.WriteStoreDocumentRequest request);
partial void PrepareUpdateDocumentRequest(
global::System.Net.Http.HttpClient httpClient,
@@ -39,6 +40,7 @@ partial void PrepareUpdateDocumentRequest(
string collection,
string documentId,
string? speechifyVersion,
+ string? ifMatch,
global::Speechify.WriteStoreDocumentRequest request);
partial void ProcessUpdateDocumentResponse(
global::System.Net.Http.HttpClient httpClient,
@@ -52,13 +54,16 @@ partial void ProcessUpdateDocumentResponseContent(
///
/// Update Document
/// Shallow-merge `data` into the stored document (a JSON null removes a
- /// field) and write the result as a new version.
+ /// field) and write the result as a new version. `If-Match` makes the
+ /// merge conditional on the `revision` you read, so a patch never lands on
+ /// top of an edit you have not seen.
/// 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
@@ -70,6 +75,7 @@ partial void ProcessUpdateDocumentResponseContent(
global::Speechify.WriteStoreDocumentRequest request,
string? speechifyVersion = default,
+ string? ifMatch = default,
global::Speechify.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -80,6 +86,7 @@ partial void ProcessUpdateDocumentResponseContent(
request: request,
speechifyVersion: speechifyVersion,
+ ifMatch: ifMatch,
requestOptions: requestOptions,
cancellationToken: cancellationToken
).ConfigureAwait(false);
@@ -89,13 +96,16 @@ partial void ProcessUpdateDocumentResponseContent(
///
/// Update Document
/// Shallow-merge `data` into the stored document (a JSON null removes a
- /// field) and write the result as a new version.
+ /// field) and write the result as a new version. `If-Match` makes the
+ /// merge conditional on the `revision` you read, so a patch never lands on
+ /// top of an edit you have not seen.
/// 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
@@ -107,6 +117,7 @@ partial void ProcessUpdateDocumentResponseContent(
global::Speechify.WriteStoreDocumentRequest request,
string? speechifyVersion = default,
+ string? ifMatch = default,
global::Speechify.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -120,6 +131,7 @@ partial void ProcessUpdateDocumentResponseContent(
collection: ref collection,
documentId: ref documentId,
speechifyVersion: ref speechifyVersion,
+ ifMatch: ref ifMatch,
request: request);
@@ -182,6 +194,10 @@ partial void ProcessUpdateDocumentResponseContent(
{
__httpRequest.Headers.TryAddWithoutValidation("Speechify-Version", speechifyVersion.ToString());
}
+ if (ifMatch != default)
+ {
+ __httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch.ToString());
+ }
var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
@@ -204,6 +220,7 @@ partial void ProcessUpdateDocumentResponseContent(
collection: collection!,
documentId: documentId!,
speechifyVersion: speechifyVersion,
+ ifMatch: ifMatch,
request: request);
return __httpRequest;
@@ -531,6 +548,43 @@ partial void ProcessUpdateDocumentResponseContent(
h => h.Key,
h => h.Value));
}
+ // The `If-Match` precondition does not hold: the resource changed, or was deleted, after the version the request names. Nothing was written.
+ if ((int)__response.StatusCode == 412)
+ {
+ string? __content_412 = null;
+ global::System.Exception? __exception_412 = null;
+ global::Speechify.Error? __value_412 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_412 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_412 = global::Speechify.Error.FromJson(__content_412, JsonSerializerContext);
+ }
+ else
+ {
+ __content_412 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_412 = global::Speechify.Error.FromJson(__content_412, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_412 = __ex;
+ }
+
+
+ throw global::Speechify.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_412 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_412,
+ responseBody: __content_412,
+ responseObject: __value_412,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
// A downstream dependency is degraded or the endpoint is intentionally disabled (e.g. phone-number purchase before ops setup).
if ((int)__response.StatusCode == 503)
{
@@ -667,13 +721,16 @@ partial void ProcessUpdateDocumentResponseContent(
///
/// Update Document
/// Shallow-merge `data` into the stored document (a JSON null removes a
- /// field) and write the result as a new version.
+ /// field) and write the result as a new version. `If-Match` makes the
+ /// merge conditional on the `revision` you read, so a patch never lands on
+ /// top of an edit you have not seen.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
///
///
///
///
///
+ ///
///
/// On `createDocument`, the id to write at (letters, digits, `_ . - : ~ @ +`, at most 200,
/// not the reserved `query` or `batch`); minted when absent. Ignored on `putDocument` /
@@ -691,6 +748,7 @@ partial void ProcessUpdateDocumentResponseContent(
string documentId,
object data,
string? speechifyVersion = default,
+ string? ifMatch = default,
string? id = default,
global::Speechify.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -706,6 +764,7 @@ partial void ProcessUpdateDocumentResponseContent(
collection: collection,
documentId: documentId,
speechifyVersion: speechifyVersion,
+ ifMatch: ifMatch,
request: __request,
requestOptions: requestOptions,
cancellationToken: cancellationToken).ConfigureAwait(false);
diff --git a/src/libs/Speechify/Generated/Speechify.HostedApisClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.HostedApisClient.Create.g.cs
index 9529c00d..3a797c65 100644
--- a/src/libs/Speechify/Generated/Speechify.HostedApisClient.Create.g.cs
+++ b/src/libs/Speechify/Generated/Speechify.HostedApisClient.Create.g.cs
@@ -676,7 +676,13 @@ partial void ProcessCreateResponseContent(
///
/// Runs the API may start per UTC day through its run routes; 1000 when omitted.
///
+ ///
+ /// Reads the API may serve from storage per UTC day; 100000 when omitted.
+ ///
///
+ ///
+ /// Register the key set end-user tokens are verified against (an `https` URL on a public host).
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
@@ -689,7 +695,9 @@ partial void ProcessCreateResponseContent(
global::Speechify.CreateHostedApiRequestAuthMode? authMode = default,
global::System.Collections.Generic.IList? corsOrigins = default,
int? dailyRunCap = default,
+ int? dailyReadCap = default,
string? projectId = default,
+ string? userTokenJwksUrl = default,
global::Speechify.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -701,7 +709,9 @@ partial void ProcessCreateResponseContent(
AuthMode = authMode,
CorsOrigins = corsOrigins,
DailyRunCap = dailyRunCap,
+ DailyReadCap = dailyReadCap,
ProjectId = projectId,
+ UserTokenJwksUrl = userTokenJwksUrl,
};
return await CreateAsync(
diff --git a/src/libs/Speechify/Generated/Speechify.HostedApisClient.GetUsage.g.cs b/src/libs/Speechify/Generated/Speechify.HostedApisClient.GetUsage.g.cs
new file mode 100644
index 00000000..b2f6d7a2
--- /dev/null
+++ b/src/libs/Speechify/Generated/Speechify.HostedApisClient.GetUsage.g.cs
@@ -0,0 +1,599 @@
+
+#nullable enable
+
+namespace Speechify
+{
+ public partial class HostedApisClient
+ {
+
+
+ private static readonly global::Speechify.EndPointSecurityRequirement s_GetUsageSecurityRequirement0 =
+ new global::Speechify.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Speechify.EndPointAuthorizationRequirement[]
+ { new global::Speechify.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Speechify.EndPointSecurityRequirement[] s_GetUsageSecurityRequirements =
+ new global::Speechify.EndPointSecurityRequirement[]
+ { s_GetUsageSecurityRequirement0,
+ };
+ partial void PrepareGetUsageArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref string apiId,
+ ref string? speechifyVersion);
+ partial void PrepareGetUsageRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ string apiId,
+ string? speechifyVersion);
+ partial void ProcessGetUsageResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessGetUsageResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Get Hosted API Usage
+ /// Today's reads and runs against the API's daily caps, with each route's
+ /// share of the reads. A read is a request a store, file or run_latest
+ /// route answered from storage; a response served from the cache is not
+ /// one. `counters_available` is false where nothing counts (no Redis), so
+ /// a zero is never mistaken for a quiet day.
+ /// 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
+ ///
+ public async global::System.Threading.Tasks.Task GetUsageAsync(
+ string apiId,
+ string? speechifyVersion = default,
+ global::Speechify.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetUsageAsResponseAsync(
+ apiId: apiId,
+ speechifyVersion: speechifyVersion,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get Hosted API Usage
+ /// Today's reads and runs against the API's daily caps, with each route's
+ /// share of the reads. A read is a request a store, file or run_latest
+ /// route answered from storage; a response served from the cache is not
+ /// one. `counters_available` is false where nothing counts (no Redis), so
+ /// a zero is never mistaken for a quiet day.
+ /// 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
+ ///
+ public async global::System.Threading.Tasks.Task> GetUsageAsResponseAsync(
+ string apiId,
+ string? speechifyVersion = default,
+ global::Speechify.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGetUsageArguments(
+ httpClient: HttpClient,
+ apiId: ref apiId,
+ speechifyVersion: ref speechifyVersion);
+
+
+ var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetUsageSecurityRequirements,
+ operationName: "GetUsageAsync");
+
+ using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Speechify.PathBuilder(
+ path: $"/v1/apis/{apiId}/usage",
+ baseUri: HttpClient.BaseAddress);
+ var __path = __pathBuilder.ToString();
+ __path = global::Speechify.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+
+ if (speechifyVersion != default)
+ {
+ __httpRequest.Headers.TryAddWithoutValidation("Speechify-Version", speechifyVersion.ToString());
+ }
+
+ global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareGetUsageRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ apiId: apiId!,
+ speechifyVersion: speechifyVersion);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetUsage",
+ methodName: "GetUsageAsync",
+ pathTemplate: "$\"/v1/apis/{apiId}/usage\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetUsage",
+ methodName: "GetUsageAsync",
+ pathTemplate: "$\"/v1/apis/{apiId}/usage\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetUsage",
+ methodName: "GetUsageAsync",
+ pathTemplate: "$\"/v1/apis/{apiId}/usage\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessGetUsageResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetUsage",
+ methodName: "GetUsageAsync",
+ pathTemplate: "$\"/v1/apis/{apiId}/usage\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetUsage",
+ methodName: "GetUsageAsync",
+ pathTemplate: "$\"/v1/apis/{apiId}/usage\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // The request was malformed or failed validation. The response body is the standard `Error` envelope; for validation failures `error.fields` enumerates the offending fields as a `path -> message` map (code = `validation_failed`).
+ if ((int)__response.StatusCode == 400)
+ {
+ string? __content_400 = null;
+ global::System.Exception? __exception_400 = null;
+ global::Speechify.Error? __value_400 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_400 = global::Speechify.Error.FromJson(__content_400, JsonSerializerContext);
+ }
+ else
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_400 = global::Speechify.Error.FromJson(__content_400, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_400 = __ex;
+ }
+
+
+ throw global::Speechify.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_400,
+ responseBody: __content_400,
+ responseObject: __value_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Authentication is missing or invalid. The request did not carry a recognised credential (console session token, API key, or worker JWT).
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::Speechify.Error? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::Speechify.Error.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::Speechify.Error.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+
+ throw global::Speechify.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_401,
+ responseBody: __content_401,
+ responseObject: __value_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // The workspace has insufficient credits, or the request needs a plan tier the workspace is not on (e.g. voice cloning). Distinct from `Forbidden` so SDK consumers can drive upgrade UX.
+ if ((int)__response.StatusCode == 402)
+ {
+ string? __content_402 = null;
+ global::System.Exception? __exception_402 = null;
+ global::Speechify.Error? __value_402 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_402 = global::Speechify.Error.FromJson(__content_402, JsonSerializerContext);
+ }
+ else
+ {
+ __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_402 = global::Speechify.Error.FromJson(__content_402, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_402 = __ex;
+ }
+
+
+ throw global::Speechify.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_402 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_402,
+ responseBody: __content_402,
+ responseObject: __value_402,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // The referenced resource does not exist or is not visible to the caller's workspace.
+ if ((int)__response.StatusCode == 404)
+ {
+ string? __content_404 = null;
+ global::System.Exception? __exception_404 = null;
+ global::Speechify.Error? __value_404 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_404 = global::Speechify.Error.FromJson(__content_404, JsonSerializerContext);
+ }
+ else
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_404 = global::Speechify.Error.FromJson(__content_404, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_404 = __ex;
+ }
+
+
+ throw global::Speechify.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
+ responseBody: __content_404,
+ responseObject: __value_404,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetUsageResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Speechify.HostedAPIUsage.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Speechify.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Speechify.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Speechify.HostedAPIUsage.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Speechify.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Speechify.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Speechify/Generated/Speechify.HostedApisClient.RotateUserTokenSecret.g.cs b/src/libs/Speechify/Generated/Speechify.HostedApisClient.RotateUserTokenSecret.g.cs
new file mode 100644
index 00000000..782b44bb
--- /dev/null
+++ b/src/libs/Speechify/Generated/Speechify.HostedApisClient.RotateUserTokenSecret.g.cs
@@ -0,0 +1,622 @@
+
+#nullable enable
+
+namespace Speechify
+{
+ public partial class HostedApisClient
+ {
+
+
+ private static readonly global::Speechify.EndPointSecurityRequirement s_RotateUserTokenSecretSecurityRequirement0 =
+ new global::Speechify.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Speechify.EndPointAuthorizationRequirement[]
+ { new global::Speechify.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Speechify.EndPointSecurityRequirement[] s_RotateUserTokenSecretSecurityRequirements =
+ new global::Speechify.EndPointSecurityRequirement[]
+ { s_RotateUserTokenSecretSecurityRequirement0,
+ };
+ partial void PrepareRotateUserTokenSecretArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref string apiId,
+ ref string? speechifyVersion,
+ ref string? idempotencyKey);
+ partial void PrepareRotateUserTokenSecretRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ string apiId,
+ string? speechifyVersion,
+ string? idempotencyKey);
+ partial void ProcessRotateUserTokenSecretResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessRotateUserTokenSecretResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Rotate End-User Token Secret
+ /// Mint the signing secret end-user tokens are verified against, replacing
+ /// any previous one at once: every token signed with the old secret stops
+ /// verifying. The plaintext is in this response and nowhere else; later
+ /// reads show `user_token_secret_hint`. Your backend signs a JWT with it
+ /// (HS256) carrying `sub` (the user, at most 256 characters) and `exp`
+ /// (within 24 hours), and the consumer presents it as
+ /// `Authorization: Bearer <token>`. Register `user_token_jwks_url`
+ /// instead to verify with your own keys.
+ /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
+ ///
+ ///
+ ///
+ ///
+ /// Optional idempotency key. When omitted, the SDK generates one for this request.
+ ///
+ /// 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 RotateUserTokenSecretAsync(
+ string apiId,
+ string? speechifyVersion = default,
+ string? idempotencyKey = default,
+ global::Speechify.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await RotateUserTokenSecretAsResponseAsync(
+ apiId: apiId,
+ speechifyVersion: speechifyVersion,
+ idempotencyKey: idempotencyKey,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Rotate End-User Token Secret
+ /// Mint the signing secret end-user tokens are verified against, replacing
+ /// any previous one at once: every token signed with the old secret stops
+ /// verifying. The plaintext is in this response and nowhere else; later
+ /// reads show `user_token_secret_hint`. Your backend signs a JWT with it
+ /// (HS256) carrying `sub` (the user, at most 256 characters) and `exp`
+ /// (within 24 hours), and the consumer presents it as
+ /// `Authorization: Bearer <token>`. Register `user_token_jwks_url`
+ /// instead to verify with your own keys.
+ /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
+ ///
+ ///
+ ///
+ ///
+ /// Optional idempotency key. When omitted, the SDK generates one for this request.
+ ///
+ /// 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> RotateUserTokenSecretAsResponseAsync(
+ string apiId,
+ string? speechifyVersion = default,
+ string? idempotencyKey = default,
+ global::Speechify.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareRotateUserTokenSecretArguments(
+ httpClient: HttpClient,
+ apiId: ref apiId,
+ speechifyVersion: ref speechifyVersion,
+ idempotencyKey: ref idempotencyKey);
+
+
+ var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_RotateUserTokenSecretSecurityRequirements,
+ operationName: "RotateUserTokenSecretAsync");
+
+ using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Speechify.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Speechify.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Speechify.PathBuilder(
+ path: $"/v1/apis/{apiId}/rotate-user-token-secret",
+ baseUri: HttpClient.BaseAddress);
+ var __path = __pathBuilder.ToString();
+ __path = global::Speechify.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Post,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+
+ if (speechifyVersion != default)
+ {
+ __httpRequest.Headers.TryAddWithoutValidation("Speechify-Version", speechifyVersion.ToString());
+ }
+ var __idempotencyKey = global::System.String.IsNullOrWhiteSpace(idempotencyKey)
+ ? CreateIdempotencyKey()
+ : idempotencyKey;
+ __httpRequest.Headers.TryAddWithoutValidation("Idempotency-Key", __idempotencyKey);
+
+ global::Speechify.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareRotateUserTokenSecretRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ apiId: apiId!,
+ speechifyVersion: speechifyVersion,
+ idempotencyKey: idempotencyKey);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "RotateUserTokenSecret",
+ methodName: "RotateUserTokenSecretAsync",
+ pathTemplate: "$\"/v1/apis/{apiId}/rotate-user-token-secret\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "RotateUserTokenSecret",
+ methodName: "RotateUserTokenSecretAsync",
+ pathTemplate: "$\"/v1/apis/{apiId}/rotate-user-token-secret\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Speechify.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Speechify.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "RotateUserTokenSecret",
+ methodName: "RotateUserTokenSecretAsync",
+ pathTemplate: "$\"/v1/apis/{apiId}/rotate-user-token-secret\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Speechify.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessRotateUserTokenSecretResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "RotateUserTokenSecret",
+ methodName: "RotateUserTokenSecretAsync",
+ pathTemplate: "$\"/v1/apis/{apiId}/rotate-user-token-secret\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "RotateUserTokenSecret",
+ methodName: "RotateUserTokenSecretAsync",
+ pathTemplate: "$\"/v1/apis/{apiId}/rotate-user-token-secret\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // The request was malformed or failed validation. The response body is the standard `Error` envelope; for validation failures `error.fields` enumerates the offending fields as a `path -> message` map (code = `validation_failed`).
+ if ((int)__response.StatusCode == 400)
+ {
+ string? __content_400 = null;
+ global::System.Exception? __exception_400 = null;
+ global::Speechify.Error? __value_400 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_400 = global::Speechify.Error.FromJson(__content_400, JsonSerializerContext);
+ }
+ else
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_400 = global::Speechify.Error.FromJson(__content_400, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_400 = __ex;
+ }
+
+
+ throw global::Speechify.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_400,
+ responseBody: __content_400,
+ responseObject: __value_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Authentication is missing or invalid. The request did not carry a recognised credential (console session token, API key, or worker JWT).
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::Speechify.Error? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::Speechify.Error.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::Speechify.Error.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+
+ throw global::Speechify.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_401,
+ responseBody: __content_401,
+ responseObject: __value_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // The workspace has insufficient credits, or the request needs a plan tier the workspace is not on (e.g. voice cloning). Distinct from `Forbidden` so SDK consumers can drive upgrade UX.
+ if ((int)__response.StatusCode == 402)
+ {
+ string? __content_402 = null;
+ global::System.Exception? __exception_402 = null;
+ global::Speechify.Error? __value_402 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_402 = global::Speechify.Error.FromJson(__content_402, JsonSerializerContext);
+ }
+ else
+ {
+ __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_402 = global::Speechify.Error.FromJson(__content_402, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_402 = __ex;
+ }
+
+
+ throw global::Speechify.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_402 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_402,
+ responseBody: __content_402,
+ responseObject: __value_402,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // The referenced resource does not exist or is not visible to the caller's workspace.
+ if ((int)__response.StatusCode == 404)
+ {
+ string? __content_404 = null;
+ global::System.Exception? __exception_404 = null;
+ global::Speechify.Error? __value_404 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_404 = global::Speechify.Error.FromJson(__content_404, JsonSerializerContext);
+ }
+ else
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_404 = global::Speechify.Error.FromJson(__content_404, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_404 = __ex;
+ }
+
+
+ throw global::Speechify.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
+ responseBody: __content_404,
+ responseObject: __value_404,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessRotateUserTokenSecretResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Speechify.HostedAPIUserTokenSecret.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Speechify.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Speechify.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Speechify.HostedAPIUserTokenSecret.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Speechify.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Speechify.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Speechify.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Speechify/Generated/Speechify.HostedApisClient.Update.g.cs b/src/libs/Speechify/Generated/Speechify.HostedApisClient.Update.g.cs
index 0abfd503..dae4df07 100644
--- a/src/libs/Speechify/Generated/Speechify.HostedApisClient.Update.g.cs
+++ b/src/libs/Speechify/Generated/Speechify.HostedApisClient.Update.g.cs
@@ -49,7 +49,9 @@ partial void ProcessUpdateResponseContent(
/// Update Hosted API
/// Update a hosted API (merge-patch). Switching to `public` is refused
/// while a `run` route exists: an anonymous caller must not start runs
- /// that spend the workspace's budget.
+ /// that spend the workspace's budget. Switching away from `user_token`
+ /// is refused while a route binds `{{user.*}}`: nothing else supplies
+ /// a user.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
///
///
@@ -81,7 +83,9 @@ partial void ProcessUpdateResponseContent(
/// Update Hosted API
/// Update a hosted API (merge-patch). Switching to `public` is refused
/// while a `run` route exists: an anonymous caller must not start runs
- /// that spend the workspace's budget.
+ /// that spend the workspace's budget. Switching away from `user_token`
+ /// is refused while a route binds `{{user.*}}`: nothing else supplies
+ /// a user.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
///
///
@@ -615,7 +619,9 @@ partial void ProcessUpdateResponseContent(
/// Update Hosted API
/// Update a hosted API (merge-patch). Switching to `public` is refused
/// while a `run` route exists: an anonymous caller must not start runs
- /// that spend the workspace's budget.
+ /// that spend the workspace's budget. Switching away from `user_token`
+ /// is refused while a route binds `{{user.*}}`: nothing else supplies
+ /// a user.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
///
///
@@ -628,6 +634,10 @@ partial void ProcessUpdateResponseContent(
/// A paused API answers 503 to every consumer request.
///
///
+ ///
+ ///
+ /// Replace the registered key set; an empty string removes it, after which the signing secret verifies tokens again.
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
@@ -640,6 +650,8 @@ partial void ProcessUpdateResponseContent(
global::System.Collections.Generic.IList? corsOrigins = default,
bool? enabled = default,
int? dailyRunCap = default,
+ int? dailyReadCap = default,
+ string? userTokenJwksUrl = default,
global::Speechify.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -651,6 +663,8 @@ partial void ProcessUpdateResponseContent(
CorsOrigins = corsOrigins,
Enabled = enabled,
DailyRunCap = dailyRunCap,
+ DailyReadCap = dailyReadCap,
+ UserTokenJwksUrl = userTokenJwksUrl,
};
return await UpdateAsync(
diff --git a/src/libs/Speechify/Generated/Speechify.IConversationsClient.List.g.cs b/src/libs/Speechify/Generated/Speechify.IConversationsClient.List.g.cs
index 2769f0ae..d74c0238 100644
--- a/src/libs/Speechify/Generated/Speechify.IConversationsClient.List.g.cs
+++ b/src/libs/Speechify/Generated/Speechify.IConversationsClient.List.g.cs
@@ -22,11 +22,28 @@ public partial interface IConversationsClient
///
///
///
- /// How the caller reached the agent. `web` is the browser /
+ /// Which runtime carried the conversation. `web` is the browser /
/// SDK realtime path; the `sip_*` and `phone` variants come
- /// from the telephony stack; `text` is the text/chat channel
- /// (turn-based, roomless, no call duration).
+ /// from the telephony stack; `text` is the turn-based, roomless
+ /// runtime (no call duration) that the message API and every
+ /// messaging channel share.
+ /// A conversation reports the transport it actually ran on:
+ /// `web`, `sip_inbound`, `sip_outbound` or `text`. `phone` is
+ /// selectable when filtering a list and matches calls in either
+ /// direction; `whatsapp` is reserved and matches nothing today.
+ /// To tell two conversations on the same transport apart, filter
+ /// or read `channel` instead.
///
+ ///
+ /// Which front door the conversation arrived through, one level
+ /// coarser than `transport`, and the value to display or group a
+ /// conversation's channel by. Both telephony directions are
+ /// `voice`; the browser / SDK realtime path is `web`; the message
+ /// API is `text`; a conversation reached over a provider front
+ /// door names that provider (`slack`) rather than the transport it
+ /// shares with the message API.
+ ///
+ ///
///
///
///
@@ -45,6 +62,8 @@ public partial interface IConversationsClient
string? agentId = default,
global::Speechify.ConversationStatus? status = default,
global::Speechify.ConversationTransport? transport = default,
+ global::Speechify.ConversationChannel? channel = default,
+ bool? live = default,
string? callerIdentity = default,
string? contactId = default,
string? q = default,
@@ -74,11 +93,28 @@ public partial interface IConversationsClient
///
///
///
- /// How the caller reached the agent. `web` is the browser /
+ /// Which runtime carried the conversation. `web` is the browser /
/// SDK realtime path; the `sip_*` and `phone` variants come
- /// from the telephony stack; `text` is the text/chat channel
- /// (turn-based, roomless, no call duration).
+ /// from the telephony stack; `text` is the turn-based, roomless
+ /// runtime (no call duration) that the message API and every
+ /// messaging channel share.
+ /// A conversation reports the transport it actually ran on:
+ /// `web`, `sip_inbound`, `sip_outbound` or `text`. `phone` is
+ /// selectable when filtering a list and matches calls in either
+ /// direction; `whatsapp` is reserved and matches nothing today.
+ /// To tell two conversations on the same transport apart, filter
+ /// or read `channel` instead.
+ ///
+ ///
+ /// Which front door the conversation arrived through, one level
+ /// coarser than `transport`, and the value to display or group a
+ /// conversation's channel by. Both telephony directions are
+ /// `voice`; the browser / SDK realtime path is `web`; the message
+ /// API is `text`; a conversation reached over a provider front
+ /// door names that provider (`slack`) rather than the transport it
+ /// shares with the message API.
///
+ ///
///
///
///
@@ -97,6 +133,8 @@ public partial interface IConversationsClient
string? agentId = default,
global::Speechify.ConversationStatus? status = default,
global::Speechify.ConversationTransport? transport = default,
+ global::Speechify.ConversationChannel? channel = default,
+ bool? live = default,
string? callerIdentity = default,
string? contactId = default,
string? q = default,
diff --git a/src/libs/Speechify/Generated/Speechify.IConversationsClient.Stats.g.cs b/src/libs/Speechify/Generated/Speechify.IConversationsClient.Stats.g.cs
index cdd473e5..30264f3e 100644
--- a/src/libs/Speechify/Generated/Speechify.IConversationsClient.Stats.g.cs
+++ b/src/libs/Speechify/Generated/Speechify.IConversationsClient.Stats.g.cs
@@ -12,11 +12,28 @@ public partial interface IConversationsClient
///
///
///
- /// How the caller reached the agent. `web` is the browser /
+ /// Which runtime carried the conversation. `web` is the browser /
/// SDK realtime path; the `sip_*` and `phone` variants come
- /// from the telephony stack; `text` is the text/chat channel
- /// (turn-based, roomless, no call duration).
+ /// from the telephony stack; `text` is the turn-based, roomless
+ /// runtime (no call duration) that the message API and every
+ /// messaging channel share.
+ /// A conversation reports the transport it actually ran on:
+ /// `web`, `sip_inbound`, `sip_outbound` or `text`. `phone` is
+ /// selectable when filtering a list and matches calls in either
+ /// direction; `whatsapp` is reserved and matches nothing today.
+ /// To tell two conversations on the same transport apart, filter
+ /// or read `channel` instead.
///
+ ///
+ /// Which front door the conversation arrived through, one level
+ /// coarser than `transport`, and the value to display or group a
+ /// conversation's channel by. Both telephony directions are
+ /// `voice`; the browser / SDK realtime path is `web`; the message
+ /// API is `text`; a conversation reached over a provider front
+ /// door names that provider (`slack`) rather than the transport it
+ /// shares with the message API.
+ ///
+ ///
///
///
///
@@ -33,6 +50,8 @@ public partial interface IConversationsClient
string? agentId = default,
global::Speechify.ConversationStatus? status = default,
global::Speechify.ConversationTransport? transport = default,
+ global::Speechify.ConversationChannel? channel = default,
+ bool? live = default,
string? callerIdentity = default,
string? contactId = default,
string? q = default,
@@ -52,11 +71,28 @@ public partial interface IConversationsClient
///
///
///
- /// How the caller reached the agent. `web` is the browser /
+ /// Which runtime carried the conversation. `web` is the browser /
/// SDK realtime path; the `sip_*` and `phone` variants come
- /// from the telephony stack; `text` is the text/chat channel
- /// (turn-based, roomless, no call duration).
+ /// from the telephony stack; `text` is the turn-based, roomless
+ /// runtime (no call duration) that the message API and every
+ /// messaging channel share.
+ /// A conversation reports the transport it actually ran on:
+ /// `web`, `sip_inbound`, `sip_outbound` or `text`. `phone` is
+ /// selectable when filtering a list and matches calls in either
+ /// direction; `whatsapp` is reserved and matches nothing today.
+ /// To tell two conversations on the same transport apart, filter
+ /// or read `channel` instead.
+ ///
+ ///
+ /// Which front door the conversation arrived through, one level
+ /// coarser than `transport`, and the value to display or group a
+ /// conversation's channel by. Both telephony directions are
+ /// `voice`; the browser / SDK realtime path is `web`; the message
+ /// API is `text`; a conversation reached over a provider front
+ /// door names that provider (`slack`) rather than the transport it
+ /// shares with the message API.
///
+ ///
///
///
///
@@ -73,6 +109,8 @@ public partial interface IConversationsClient
string? agentId = default,
global::Speechify.ConversationStatus? status = default,
global::Speechify.ConversationTransport? transport = default,
+ global::Speechify.ConversationChannel? channel = default,
+ bool? live = default,
string? callerIdentity = default,
string? contactId = default,
string? q = default,
diff --git a/src/libs/Speechify/Generated/Speechify.IDocumentsClient.AggregateDocuments.g.cs b/src/libs/Speechify/Generated/Speechify.IDocumentsClient.AggregateDocuments.g.cs
new file mode 100644
index 00000000..62135d93
--- /dev/null
+++ b/src/libs/Speechify/Generated/Speechify.IDocumentsClient.AggregateDocuments.g.cs
@@ -0,0 +1,117 @@
+#nullable enable
+
+namespace Speechify
+{
+ public partial interface IDocumentsClient
+ {
+ ///
+ /// Aggregate Documents
+ /// Count, sum, average, min or max over a collection, filtered with the
+ /// same `where` a query takes and optionally grouped by one field, in
+ /// one request. It runs on each document's indexed projection (its
+ /// top-level string / number / boolean / null fields), never on the
+ /// bodies: a nested value does not exist to it, a string longer than 256
+ /// characters groups by its first 256 and the answer says
+ /// `key_truncated` when that happened, and at most 100 groups come back,
+ /// largest first (`groups_truncated`). A read carrying a body, hence a
+ /// POST on a literal sub-path; `aggregate` is a reserved document id.
+ /// This is the last operation the query surface takes. A store is a
+ /// Firestore-shaped document store: filter, order, page and aggregate on
+ /// top-level fields. No joins, nested-field filters, full-text search or
+ /// SQL follow; a customer who needs more brings their own database
+ /// through a webhook or MCP tool, or pulls a collection into a run's
+ /// sandbox.
+ /// 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 AggregateDocumentsAsync(
+ string storeId,
+ string collection,
+
+ global::Speechify.StoreAggregateQuery request,
+ string? speechifyVersion = default,
+ global::Speechify.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Aggregate Documents
+ /// Count, sum, average, min or max over a collection, filtered with the
+ /// same `where` a query takes and optionally grouped by one field, in
+ /// one request. It runs on each document's indexed projection (its
+ /// top-level string / number / boolean / null fields), never on the
+ /// bodies: a nested value does not exist to it, a string longer than 256
+ /// characters groups by its first 256 and the answer says
+ /// `key_truncated` when that happened, and at most 100 groups come back,
+ /// largest first (`groups_truncated`). A read carrying a body, hence a
+ /// POST on a literal sub-path; `aggregate` is a reserved document id.
+ /// This is the last operation the query surface takes. A store is a
+ /// Firestore-shaped document store: filter, order, page and aggregate on
+ /// top-level fields. No joins, nested-field filters, full-text search or
+ /// SQL follow; a customer who needs more brings their own database
+ /// through a webhook or MCP tool, or pulls a collection into a run's
+ /// sandbox.
+ /// 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> AggregateDocumentsAsResponseAsync(
+ string storeId,
+ string collection,
+
+ global::Speechify.StoreAggregateQuery request,
+ string? speechifyVersion = default,
+ global::Speechify.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Aggregate Documents
+ /// Count, sum, average, min or max over a collection, filtered with the
+ /// same `where` a query takes and optionally grouped by one field, in
+ /// one request. It runs on each document's indexed projection (its
+ /// top-level string / number / boolean / null fields), never on the
+ /// bodies: a nested value does not exist to it, a string longer than 256
+ /// characters groups by its first 256 and the answer says
+ /// `key_truncated` when that happened, and at most 100 groups come back,
+ /// largest first (`groups_truncated`). A read carrying a body, hence a
+ /// POST on a literal sub-path; `aggregate` is a reserved document id.
+ /// This is the last operation the query surface takes. A store is a
+ /// Firestore-shaped document store: filter, order, page and aggregate on
+ /// top-level fields. No joins, nested-field filters, full-text search or
+ /// SQL follow; a customer who needs more brings their own database
+ /// through a webhook or MCP tool, or pulls a collection into a run's
+ /// sandbox.
+ /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Filters, ANDed, the same ones a query takes.
+ ///
+ ///
+ /// One projected field to group by. A string that reaches the index's 256-byte limit may have been cut there, and the answer says so.
+ ///
+ ///
+ /// 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 AggregateDocumentsAsync(
+ string storeId,
+ string collection,
+ global::System.Collections.Generic.IList metrics,
+ string? speechifyVersion = default,
+ global::System.Collections.Generic.IList? where = default,
+ string? groupBy = 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.IDocumentsClient.DeleteDocument.g.cs b/src/libs/Speechify/Generated/Speechify.IDocumentsClient.DeleteDocument.g.cs
index 51276210..3ad58d06 100644
--- a/src/libs/Speechify/Generated/Speechify.IDocumentsClient.DeleteDocument.g.cs
+++ b/src/libs/Speechify/Generated/Speechify.IDocumentsClient.DeleteDocument.g.cs
@@ -6,13 +6,15 @@ public partial interface IDocumentsClient
{
///
/// Delete Document
- /// Delete one document.
+ /// Delete one document. `If-Match` makes the delete conditional on the
+ /// `revision` you read, so it never removes a version written since.
/// 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
///
@@ -21,17 +23,20 @@ public partial interface IDocumentsClient
string collection,
string documentId,
string? speechifyVersion = default,
+ string? ifMatch = default,
global::Speechify.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
///
/// Delete Document
- /// Delete one document.
+ /// Delete one document. `If-Match` makes the delete conditional on the
+ /// `revision` you read, so it never removes a version written since.
/// 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
///
@@ -40,6 +45,7 @@ public partial interface IDocumentsClient
string collection,
string documentId,
string? speechifyVersion = default,
+ string? ifMatch = default,
global::Speechify.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
diff --git a/src/libs/Speechify/Generated/Speechify.IDocumentsClient.PutDocument.g.cs b/src/libs/Speechify/Generated/Speechify.IDocumentsClient.PutDocument.g.cs
index 19b231b6..711c6eab 100644
--- a/src/libs/Speechify/Generated/Speechify.IDocumentsClient.PutDocument.g.cs
+++ b/src/libs/Speechify/Generated/Speechify.IDocumentsClient.PutDocument.g.cs
@@ -11,12 +11,18 @@ public partial interface IDocumentsClient
/// JSON object of at most 256 KiB; its top-level scalar fields become the
/// queryable projection. The reserved ids `query` and `batch` are refused
/// (400 `validation_failed`).
+ /// Writing from a document you read? Send its `ETag` (equivalently its
+ /// `revision`) in `If-Match` and the write applies only if nothing has
+ /// changed since,
+ /// answering 412 instead of overwriting somebody else's edit or bringing a
+ /// deleted document back.
/// 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
@@ -28,6 +34,7 @@ public partial interface IDocumentsClient
global::Speechify.WriteStoreDocumentRequest request,
string? speechifyVersion = default,
+ string? ifMatch = default,
global::Speechify.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
///
@@ -37,12 +44,18 @@ public partial interface IDocumentsClient
/// JSON object of at most 256 KiB; its top-level scalar fields become the
/// queryable projection. The reserved ids `query` and `batch` are refused
/// (400 `validation_failed`).
+ /// Writing from a document you read? Send its `ETag` (equivalently its
+ /// `revision`) in `If-Match` and the write applies only if nothing has
+ /// changed since,
+ /// answering 412 instead of overwriting somebody else's edit or bringing a
+ /// deleted document back.
/// 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
@@ -54,6 +67,7 @@ public partial interface IDocumentsClient
global::Speechify.WriteStoreDocumentRequest request,
string? speechifyVersion = default,
+ string? ifMatch = default,
global::Speechify.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
///
@@ -63,12 +77,18 @@ public partial interface IDocumentsClient
/// JSON object of at most 256 KiB; its top-level scalar fields become the
/// queryable projection. The reserved ids `query` and `batch` are refused
/// (400 `validation_failed`).
+ /// Writing from a document you read? Send its `ETag` (equivalently its
+ /// `revision`) in `If-Match` and the write applies only if nothing has
+ /// changed since,
+ /// answering 412 instead of overwriting somebody else's edit or bringing a
+ /// deleted document back.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
///
///
///
///
///
+ ///
///
/// On `createDocument`, the id to write at (letters, digits, `_ . - : ~ @ +`, at most 200,
/// not the reserved `query` or `batch`); minted when absent. Ignored on `putDocument` /
@@ -86,6 +106,7 @@ public partial interface IDocumentsClient
string documentId,
object data,
string? speechifyVersion = default,
+ string? ifMatch = default,
string? id = default,
global::Speechify.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/Speechify/Generated/Speechify.IDocumentsClient.QueryDocuments.g.cs b/src/libs/Speechify/Generated/Speechify.IDocumentsClient.QueryDocuments.g.cs
index 3092e71d..5f8168db 100644
--- a/src/libs/Speechify/Generated/Speechify.IDocumentsClient.QueryDocuments.g.cs
+++ b/src/libs/Speechify/Generated/Speechify.IDocumentsClient.QueryDocuments.g.cs
@@ -10,7 +10,9 @@ public partial interface IDocumentsClient
/// order on one with `order_by`, page with `limit` + `cursor`. Values
/// compare with JSON semantics (numbers as numbers, strings lexically, so
/// ISO-8601 timestamps order as dates). A read carrying a body, hence a
- /// POST on a literal sub-path; `query` and `batch` are reserved document ids.
+ /// POST on a literal sub-path; `query`, `aggregate` and `batch` are
+ /// reserved document ids. For a count or a total, `aggregate` answers in
+ /// one request instead of a page walk.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
///
///
@@ -34,7 +36,9 @@ public partial interface IDocumentsClient
/// order on one with `order_by`, page with `limit` + `cursor`. Values
/// compare with JSON semantics (numbers as numbers, strings lexically, so
/// ISO-8601 timestamps order as dates). A read carrying a body, hence a
- /// POST on a literal sub-path; `query` and `batch` are reserved document ids.
+ /// POST on a literal sub-path; `query`, `aggregate` and `batch` are
+ /// reserved document ids. For a count or a total, `aggregate` answers in
+ /// one request instead of a page walk.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
///
///
@@ -58,7 +62,9 @@ public partial interface IDocumentsClient
/// order on one with `order_by`, page with `limit` + `cursor`. Values
/// compare with JSON semantics (numbers as numbers, strings lexically, so
/// ISO-8601 timestamps order as dates). A read carrying a body, hence a
- /// POST on a literal sub-path; `query` and `batch` are reserved document ids.
+ /// POST on a literal sub-path; `query`, `aggregate` and `batch` are
+ /// reserved document ids. For a count or a total, `aggregate` answers in
+ /// one request instead of a page walk.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
///
///
diff --git a/src/libs/Speechify/Generated/Speechify.IDocumentsClient.UpdateDocument.g.cs b/src/libs/Speechify/Generated/Speechify.IDocumentsClient.UpdateDocument.g.cs
index 868cb8f4..c7d27480 100644
--- a/src/libs/Speechify/Generated/Speechify.IDocumentsClient.UpdateDocument.g.cs
+++ b/src/libs/Speechify/Generated/Speechify.IDocumentsClient.UpdateDocument.g.cs
@@ -7,13 +7,16 @@ public partial interface IDocumentsClient
///
/// Update Document
/// Shallow-merge `data` into the stored document (a JSON null removes a
- /// field) and write the result as a new version.
+ /// field) and write the result as a new version. `If-Match` makes the
+ /// merge conditional on the `revision` you read, so a patch never lands on
+ /// top of an edit you have not seen.
/// 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
@@ -25,18 +28,22 @@ public partial interface IDocumentsClient
global::Speechify.WriteStoreDocumentRequest request,
string? speechifyVersion = default,
+ string? ifMatch = default,
global::Speechify.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
///
/// Update Document
/// Shallow-merge `data` into the stored document (a JSON null removes a
- /// field) and write the result as a new version.
+ /// field) and write the result as a new version. `If-Match` makes the
+ /// merge conditional on the `revision` you read, so a patch never lands on
+ /// top of an edit you have not seen.
/// 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
@@ -48,18 +55,22 @@ public partial interface IDocumentsClient
global::Speechify.WriteStoreDocumentRequest request,
string? speechifyVersion = default,
+ string? ifMatch = default,
global::Speechify.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
///
/// Update Document
/// Shallow-merge `data` into the stored document (a JSON null removes a
- /// field) and write the result as a new version.
+ /// field) and write the result as a new version. `If-Match` makes the
+ /// merge conditional on the `revision` you read, so a patch never lands on
+ /// top of an edit you have not seen.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
///
///
///
///
///
+ ///
///
/// On `createDocument`, the id to write at (letters, digits, `_ . - : ~ @ +`, at most 200,
/// not the reserved `query` or `batch`); minted when absent. Ignored on `putDocument` /
@@ -77,6 +88,7 @@ public partial interface IDocumentsClient
string documentId,
object data,
string? speechifyVersion = default,
+ string? ifMatch = default,
string? id = default,
global::Speechify.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/Speechify/Generated/Speechify.IHostedApisClient.Create.g.cs b/src/libs/Speechify/Generated/Speechify.IHostedApisClient.Create.g.cs
index 91b26c15..db3d6902 100644
--- a/src/libs/Speechify/Generated/Speechify.IHostedApisClient.Create.g.cs
+++ b/src/libs/Speechify/Generated/Speechify.IHostedApisClient.Create.g.cs
@@ -68,7 +68,13 @@ public partial interface IHostedApisClient
///
/// Runs the API may start per UTC day through its run routes; 1000 when omitted.
///
+ ///
+ /// Reads the API may serve from storage per UTC day; 100000 when omitted.
+ ///
///
+ ///
+ /// Register the key set end-user tokens are verified against (an `https` URL on a public host).
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
@@ -81,7 +87,9 @@ public partial interface IHostedApisClient
global::Speechify.CreateHostedApiRequestAuthMode? authMode = default,
global::System.Collections.Generic.IList? corsOrigins = default,
int? dailyRunCap = default,
+ int? dailyReadCap = default,
string? projectId = default,
+ string? userTokenJwksUrl = default,
global::Speechify.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
diff --git a/src/libs/Speechify/Generated/Speechify.IHostedApisClient.GetUsage.g.cs b/src/libs/Speechify/Generated/Speechify.IHostedApisClient.GetUsage.g.cs
new file mode 100644
index 00000000..59004f8f
--- /dev/null
+++ b/src/libs/Speechify/Generated/Speechify.IHostedApisClient.GetUsage.g.cs
@@ -0,0 +1,46 @@
+#nullable enable
+
+namespace Speechify
+{
+ public partial interface IHostedApisClient
+ {
+ ///
+ /// Get Hosted API Usage
+ /// Today's reads and runs against the API's daily caps, with each route's
+ /// share of the reads. A read is a request a store, file or run_latest
+ /// route answered from storage; a response served from the cache is not
+ /// one. `counters_available` is false where nothing counts (no Redis), so
+ /// a zero is never mistaken for a quiet day.
+ /// 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 GetUsageAsync(
+ string apiId,
+ string? speechifyVersion = default,
+ global::Speechify.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get Hosted API Usage
+ /// Today's reads and runs against the API's daily caps, with each route's
+ /// share of the reads. A read is a request a store, file or run_latest
+ /// route answered from storage; a response served from the cache is not
+ /// one. `counters_available` is false where nothing counts (no Redis), so
+ /// a zero is never mistaken for a quiet day.
+ /// 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> GetUsageAsResponseAsync(
+ string apiId,
+ 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.IHostedApisClient.RotateUserTokenSecret.g.cs b/src/libs/Speechify/Generated/Speechify.IHostedApisClient.RotateUserTokenSecret.g.cs
new file mode 100644
index 00000000..8d619ab9
--- /dev/null
+++ b/src/libs/Speechify/Generated/Speechify.IHostedApisClient.RotateUserTokenSecret.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Speechify
+{
+ public partial interface IHostedApisClient
+ {
+ ///
+ /// Rotate End-User Token Secret
+ /// Mint the signing secret end-user tokens are verified against, replacing
+ /// any previous one at once: every token signed with the old secret stops
+ /// verifying. The plaintext is in this response and nowhere else; later
+ /// reads show `user_token_secret_hint`. Your backend signs a JWT with it
+ /// (HS256) carrying `sub` (the user, at most 256 characters) and `exp`
+ /// (within 24 hours), and the consumer presents it as
+ /// `Authorization: Bearer <token>`. Register `user_token_jwks_url`
+ /// instead to verify with your own keys.
+ /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
+ ///
+ ///
+ ///
+ ///
+ /// Optional idempotency key. When omitted, the SDK generates one for this request.
+ ///
+ /// 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 RotateUserTokenSecretAsync(
+ string apiId,
+ string? speechifyVersion = default,
+ string? idempotencyKey = default,
+ global::Speechify.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Rotate End-User Token Secret
+ /// Mint the signing secret end-user tokens are verified against, replacing
+ /// any previous one at once: every token signed with the old secret stops
+ /// verifying. The plaintext is in this response and nowhere else; later
+ /// reads show `user_token_secret_hint`. Your backend signs a JWT with it
+ /// (HS256) carrying `sub` (the user, at most 256 characters) and `exp`
+ /// (within 24 hours), and the consumer presents it as
+ /// `Authorization: Bearer <token>`. Register `user_token_jwks_url`
+ /// instead to verify with your own keys.
+ /// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
+ ///
+ ///
+ ///
+ ///
+ /// Optional idempotency key. When omitted, the SDK generates one for this request.
+ ///
+ /// 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> RotateUserTokenSecretAsResponseAsync(
+ string apiId,
+ string? speechifyVersion = default,
+ string? idempotencyKey = 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.IHostedApisClient.Update.g.cs b/src/libs/Speechify/Generated/Speechify.IHostedApisClient.Update.g.cs
index 9bcbdcc7..e7e5699e 100644
--- a/src/libs/Speechify/Generated/Speechify.IHostedApisClient.Update.g.cs
+++ b/src/libs/Speechify/Generated/Speechify.IHostedApisClient.Update.g.cs
@@ -8,7 +8,9 @@ public partial interface IHostedApisClient
/// Update Hosted API
/// Update a hosted API (merge-patch). Switching to `public` is refused
/// while a `run` route exists: an anonymous caller must not start runs
- /// that spend the workspace's budget.
+ /// that spend the workspace's budget. Switching away from `user_token`
+ /// is refused while a route binds `{{user.*}}`: nothing else supplies
+ /// a user.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
///
///
@@ -28,7 +30,9 @@ public partial interface IHostedApisClient
/// Update Hosted API
/// Update a hosted API (merge-patch). Switching to `public` is refused
/// while a `run` route exists: an anonymous caller must not start runs
- /// that spend the workspace's budget.
+ /// that spend the workspace's budget. Switching away from `user_token`
+ /// is refused while a route binds `{{user.*}}`: nothing else supplies
+ /// a user.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
///
///
@@ -48,7 +52,9 @@ public partial interface IHostedApisClient
/// Update Hosted API
/// Update a hosted API (merge-patch). Switching to `public` is refused
/// while a `run` route exists: an anonymous caller must not start runs
- /// that spend the workspace's budget.
+ /// that spend the workspace's budget. Switching away from `user_token`
+ /// is refused while a route binds `{{user.*}}`: nothing else supplies
+ /// a user.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
///
///
@@ -61,6 +67,10 @@ public partial interface IHostedApisClient
/// A paused API answers 503 to every consumer request.
///
///
+ ///
+ ///
+ /// Replace the registered key set; an empty string removes it, after which the signing secret verifies tokens again.
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
@@ -73,6 +83,8 @@ public partial interface IHostedApisClient
global::System.Collections.Generic.IList? corsOrigins = default,
bool? enabled = default,
int? dailyRunCap = default,
+ int? dailyReadCap = default,
+ string? userTokenJwksUrl = default,
global::Speechify.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
diff --git a/src/libs/Speechify/Generated/Speechify.IRoutesClient.CreateRoute.g.cs b/src/libs/Speechify/Generated/Speechify.IRoutesClient.CreateRoute.g.cs
index 123d1e31..07b56ebc 100644
--- a/src/libs/Speechify/Generated/Speechify.IRoutesClient.CreateRoute.g.cs
+++ b/src/libs/Speechify/Generated/Speechify.IRoutesClient.CreateRoute.g.cs
@@ -11,10 +11,16 @@ public partial interface IRoutesClient
/// structured output of a schedule trigger's runs; `run` starts a run
/// through a webhook trigger per request (POST only, never on a public
/// API) and waits up to `wait_seconds` before answering 202 with a
- /// handle to poll at `/_runs/{run_id}`. Where-clause values and the
+ /// handle to poll at `/_runs/{run_id}`; `file` serves one published file,
+ /// or a whole published tree when the path ends in `*` (`/app/*` with
+ /// `file_root` and `file_index`). Where-clause values and the
/// document id may be `{{query.x}}`, `{{path.x}}` or `{{body.x}}`
- /// templates bound from the consumer's request; a clause whose template
- /// is absent is skipped.
+ /// templates bound from the consumer's request, or `{{user.x}}` claims
+ /// of the verified end-user token on a `user_token` API; a clause whose
+ /// template is absent is skipped. Two bindings are refused at write
+ /// time: `{{user.*}}` on an API that does not verify end-user tokens,
+ /// and a clause on `user_identity` bound from a request template, which
+ /// would let any caller read any user's rows.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
///
///
@@ -41,10 +47,16 @@ public partial interface IRoutesClient
/// structured output of a schedule trigger's runs; `run` starts a run
/// through a webhook trigger per request (POST only, never on a public
/// API) and waits up to `wait_seconds` before answering 202 with a
- /// handle to poll at `/_runs/{run_id}`. Where-clause values and the
+ /// handle to poll at `/_runs/{run_id}`; `file` serves one published file,
+ /// or a whole published tree when the path ends in `*` (`/app/*` with
+ /// `file_root` and `file_index`). Where-clause values and the
/// document id may be `{{query.x}}`, `{{path.x}}` or `{{body.x}}`
- /// templates bound from the consumer's request; a clause whose template
- /// is absent is skipped.
+ /// templates bound from the consumer's request, or `{{user.x}}` claims
+ /// of the verified end-user token on a `user_token` API; a clause whose
+ /// template is absent is skipped. Two bindings are refused at write
+ /// time: `{{user.*}}` on an API that does not verify end-user tokens,
+ /// and a clause on `user_identity` bound from a request template, which
+ /// would let any caller read any user's rows.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
///
///
@@ -71,10 +83,16 @@ public partial interface IRoutesClient
/// structured output of a schedule trigger's runs; `run` starts a run
/// through a webhook trigger per request (POST only, never on a public
/// API) and waits up to `wait_seconds` before answering 202 with a
- /// handle to poll at `/_runs/{run_id}`. Where-clause values and the
+ /// handle to poll at `/_runs/{run_id}`; `file` serves one published file,
+ /// or a whole published tree when the path ends in `*` (`/app/*` with
+ /// `file_root` and `file_index`). Where-clause values and the
/// document id may be `{{query.x}}`, `{{path.x}}` or `{{body.x}}`
- /// templates bound from the consumer's request; a clause whose template
- /// is absent is skipped.
+ /// templates bound from the consumer's request, or `{{user.x}}` claims
+ /// of the verified end-user token on a `user_token` API; a clause whose
+ /// template is absent is skipped. Two bindings are refused at write
+ /// time: `{{user.*}}` on an API that does not verify end-user tokens,
+ /// and a clause on `user_identity` bound from a request template, which
+ /// would let any caller read any user's rows.
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
///
///
@@ -92,9 +110,13 @@ public partial interface IRoutesClient
/// What answers a route. `type` selects the fields that apply:
/// `store_query` (store_id, collection, where, order_by, limit),
/// `store_document` (store_id, collection, document_id),
+ /// `store_aggregate` (store_id, collection, where, group_by, metrics:
+ /// a summary in one request, from the same implementation as the
+ /// collection's `aggregate` operation),
/// `run_latest` (trigger_id of a schedule trigger),
/// `run` (trigger_id of a webhook trigger, wait_seconds),
- /// `file` (file_path of a published file).
+ /// `file` (file_path of one published file; or, on a route whose path
+ /// ends in `*`, file_root and file_index for a whole published tree).
///
///
///
diff --git a/src/libs/Speechify/Generated/Speechify.IRoutesClient.UpdateRoute.g.cs b/src/libs/Speechify/Generated/Speechify.IRoutesClient.UpdateRoute.g.cs
index 4067e40e..87ecd2f5 100644
--- a/src/libs/Speechify/Generated/Speechify.IRoutesClient.UpdateRoute.g.cs
+++ b/src/libs/Speechify/Generated/Speechify.IRoutesClient.UpdateRoute.g.cs
@@ -60,9 +60,13 @@ public partial interface IRoutesClient
/// What answers a route. `type` selects the fields that apply:
/// `store_query` (store_id, collection, where, order_by, limit),
/// `store_document` (store_id, collection, document_id),
+ /// `store_aggregate` (store_id, collection, where, group_by, metrics:
+ /// a summary in one request, from the same implementation as the
+ /// collection's `aggregate` operation),
/// `run_latest` (trigger_id of a schedule trigger),
/// `run` (trigger_id of a webhook trigger, wait_seconds),
- /// `file` (file_path of a published file).
+ /// `file` (file_path of one published file; or, on a route whose path
+ /// ends in `*`, file_root and file_index for a whole published tree).
///
///
///
diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.ConversationChannel.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.ConversationChannel.g.cs
new file mode 100644
index 00000000..85418203
--- /dev/null
+++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.ConversationChannel.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Speechify.JsonConverters
+{
+ ///
+ public sealed class ConversationChannelJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Speechify.ConversationChannel 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.ConversationChannelExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Speechify.ConversationChannel)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Speechify.ConversationChannel);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Speechify.ConversationChannel value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Speechify.ConversationChannelExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.ConversationChannelNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.ConversationChannelNullable.g.cs
new file mode 100644
index 00000000..15bf98ea
--- /dev/null
+++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.ConversationChannelNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Speechify.JsonConverters
+{
+ ///
+ public sealed class ConversationChannelNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Speechify.ConversationChannel? 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.ConversationChannelExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Speechify.ConversationChannel)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Speechify.ConversationChannel?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Speechify.ConversationChannel? 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.ConversationChannelExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.PhoneNumberRelayHealth.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.StoreAggregateMetricOp.g.cs
similarity index 70%
rename from src/libs/Speechify/Generated/Speechify.JsonConverters.PhoneNumberRelayHealth.g.cs
rename to src/libs/Speechify/Generated/Speechify.JsonConverters.StoreAggregateMetricOp.g.cs
index ce26c388..dbd66f34 100644
--- a/src/libs/Speechify/Generated/Speechify.JsonConverters.PhoneNumberRelayHealth.g.cs
+++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.StoreAggregateMetricOp.g.cs
@@ -3,10 +3,10 @@
namespace Speechify.JsonConverters
{
///
- public sealed class PhoneNumberRelayHealthJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ public sealed class StoreAggregateMetricOpJsonConverter : global::System.Text.Json.Serialization.JsonConverter
{
///
- public override global::Speechify.PhoneNumberRelayHealth Read(
+ public override global::Speechify.StoreAggregateMetricOp Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
@@ -18,7 +18,7 @@ public sealed class PhoneNumberRelayHealthJsonConverter : global::System.Text.Js
var stringValue = reader.GetString();
if (stringValue != null)
{
- return global::Speechify.PhoneNumberRelayHealthExtensions.ToEnum(stringValue) ?? default;
+ return global::Speechify.StoreAggregateMetricOpExtensions.ToEnum(stringValue) ?? default;
}
break;
@@ -26,11 +26,11 @@ public sealed class PhoneNumberRelayHealthJsonConverter : global::System.Text.Js
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
- return (global::Speechify.PhoneNumberRelayHealth)numValue;
+ return (global::Speechify.StoreAggregateMetricOp)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
- return default(global::Speechify.PhoneNumberRelayHealth);
+ return default(global::Speechify.StoreAggregateMetricOp);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
@@ -42,12 +42,12 @@ public sealed class PhoneNumberRelayHealthJsonConverter : global::System.Text.Js
///
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
- global::Speechify.PhoneNumberRelayHealth value,
+ global::Speechify.StoreAggregateMetricOp value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
- writer.WriteStringValue(global::Speechify.PhoneNumberRelayHealthExtensions.ToValueString(value));
+ writer.WriteStringValue(global::Speechify.StoreAggregateMetricOpExtensions.ToValueString(value));
}
}
}
diff --git a/src/libs/Speechify/Generated/Speechify.JsonConverters.PhoneNumberRelayHealthNullable.g.cs b/src/libs/Speechify/Generated/Speechify.JsonConverters.StoreAggregateMetricOpNullable.g.cs
similarity index 72%
rename from src/libs/Speechify/Generated/Speechify.JsonConverters.PhoneNumberRelayHealthNullable.g.cs
rename to src/libs/Speechify/Generated/Speechify.JsonConverters.StoreAggregateMetricOpNullable.g.cs
index 6fdf1ab5..4683a54f 100644
--- a/src/libs/Speechify/Generated/Speechify.JsonConverters.PhoneNumberRelayHealthNullable.g.cs
+++ b/src/libs/Speechify/Generated/Speechify.JsonConverters.StoreAggregateMetricOpNullable.g.cs
@@ -3,10 +3,10 @@
namespace Speechify.JsonConverters
{
///
- public sealed class PhoneNumberRelayHealthNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ public sealed class StoreAggregateMetricOpNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
{
///
- public override global::Speechify.PhoneNumberRelayHealth? Read(
+ public override global::Speechify.StoreAggregateMetricOp? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
@@ -18,7 +18,7 @@ public sealed class PhoneNumberRelayHealthNullableJsonConverter : global::System
var stringValue = reader.GetString();
if (stringValue != null)
{
- return global::Speechify.PhoneNumberRelayHealthExtensions.ToEnum(stringValue);
+ return global::Speechify.StoreAggregateMetricOpExtensions.ToEnum(stringValue);
}
break;
@@ -26,11 +26,11 @@ public sealed class PhoneNumberRelayHealthNullableJsonConverter : global::System
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
- return (global::Speechify.PhoneNumberRelayHealth)numValue;
+ return (global::Speechify.StoreAggregateMetricOp)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
- return default(global::Speechify.PhoneNumberRelayHealth?);
+ return default(global::Speechify.StoreAggregateMetricOp?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
@@ -42,7 +42,7 @@ public sealed class PhoneNumberRelayHealthNullableJsonConverter : global::System
///
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
- global::Speechify.PhoneNumberRelayHealth? value,
+ global::Speechify.StoreAggregateMetricOp? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
@@ -53,7 +53,7 @@ public override void Write(
}
else
{
- writer.WriteStringValue(global::Speechify.PhoneNumberRelayHealthExtensions.ToValueString(value.Value));
+ writer.WriteStringValue(global::Speechify.StoreAggregateMetricOpExtensions.ToValueString(value.Value));
}
}
}
diff --git a/src/libs/Speechify/Generated/Speechify.JsonSerializerContext.g.cs b/src/libs/Speechify/Generated/Speechify.JsonSerializerContext.g.cs
index 2197a555..5c759dc7 100644
--- a/src/libs/Speechify/Generated/Speechify.JsonSerializerContext.g.cs
+++ b/src/libs/Speechify/Generated/Speechify.JsonSerializerContext.g.cs
@@ -198,6 +198,7 @@ namespace Speechify
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateConversationRequest))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationStatus), TypeInfoPropertyName = "ConversationStatus2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationTransport), TypeInfoPropertyName = "ConversationTransport2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationChannel), TypeInfoPropertyName = "ConversationChannel2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationEndReason), TypeInfoPropertyName = "ConversationEndReason2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.SkillPin))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentSnapshotInterruptionSensitivity), TypeInfoPropertyName = "AgentSnapshotInterruptionSensitivity2")]
@@ -506,14 +507,13 @@ namespace Speechify
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateShareLinkSessionRequest))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ShareLinkSession))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PhoneNumberProvider), TypeInfoPropertyName = "PhoneNumberProvider2")]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PhoneNumberRelayHealth), TypeInfoPropertyName = "PhoneNumberRelayHealth2")]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PhoneNumberRelay))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PhoneNumberCapability), TypeInfoPropertyName = "PhoneNumberCapability2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PhoneNumberReputationRisk), TypeInfoPropertyName = "PhoneNumberReputationRisk2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PhoneNumberReputation))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PhoneNumber))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListPhoneNumbersResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
internal sealed partial class SourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext
{
}
@@ -526,7 +526,6 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex
Converters = new global::System.Type[]
{
})]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TwilioImportSpec))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.TelnyxImportSpec))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ImportPhoneNumberRequest))]
@@ -640,6 +639,14 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreOrderBy))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreDocumentQuery))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreAggregateMetricOp), TypeInfoPropertyName = "StoreAggregateMetricOp2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreAggregateMetric))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreAggregateQuery))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreAggregateGroup))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreAggregateResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreBatchWriteOp), TypeInfoPropertyName = "StoreBatchWriteOp2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreBatchWrite))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreBatchRequest))]
@@ -657,6 +664,9 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateHostedAPIRequest))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateHostedApiRequestAuthMode), TypeInfoPropertyName = "UpdateHostedApiRequestAuthMode2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.UpdateHostedAPIRequest))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiUsageRoutesItems))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedAPIUsage))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiRouteMethod), TypeInfoPropertyName = "HostedApiRouteMethod2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiResolverType), TypeInfoPropertyName = "HostedApiResolverType2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiResolverWhereItemsOp), TypeInfoPropertyName = "HostedApiResolverWhereItemsOp2")]
@@ -676,6 +686,7 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ListHostedAPIKeysResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateHostedAPIKeyRequest))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedAPIUserTokenSecret))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ContactIdentifierKind), TypeInfoPropertyName = "ContactIdentifierKind2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ContactIdentifierAssertedBy), TypeInfoPropertyName = "ContactIdentifierAssertedBy2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ContactIdentifier))]
@@ -795,6 +806,7 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.DynamicVariableType?), TypeInfoPropertyName = "NullableDynamicVariableType2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationStatus?), TypeInfoPropertyName = "NullableConversationStatus2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationTransport?), TypeInfoPropertyName = "NullableConversationTransport2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationChannel?), TypeInfoPropertyName = "NullableConversationChannel2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ConversationEndReason?), TypeInfoPropertyName = "NullableConversationEndReason2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentSnapshotInterruptionSensitivity?), TypeInfoPropertyName = "NullableAgentSnapshotInterruptionSensitivity2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.AgentSnapshotBackgroundNoisePreset?), TypeInfoPropertyName = "NullableAgentSnapshotBackgroundNoisePreset2")]
@@ -868,7 +880,6 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.ShareLinkStatus?), TypeInfoPropertyName = "NullableShareLinkStatus2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.CreateShareLinkResponseStatus?), TypeInfoPropertyName = "NullableCreateShareLinkResponseStatus2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PhoneNumberProvider?), TypeInfoPropertyName = "NullablePhoneNumberProvider2")]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PhoneNumberRelayHealth?), TypeInfoPropertyName = "NullablePhoneNumberRelayHealth2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PhoneNumberCapability?), TypeInfoPropertyName = "NullablePhoneNumberCapability2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PhoneNumberReputationRisk?), TypeInfoPropertyName = "NullablePhoneNumberReputationRisk2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.PurchasedPhoneNumberProvider?), TypeInfoPropertyName = "NullablePurchasedPhoneNumberProvider2")]
@@ -888,6 +899,7 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex
[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.StoreAggregateMetricOp?), TypeInfoPropertyName = "NullableStoreAggregateMetricOp2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreBatchWriteOp?), TypeInfoPropertyName = "NullableStoreBatchWriteOp2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.StoreBatchResultOp?), TypeInfoPropertyName = "NullableStoreBatchResultOp2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Speechify.HostedApiAuthMode?), TypeInfoPropertyName = "NullableHostedApiAuthMode2")]
@@ -1014,18 +1026,6 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [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))]
internal sealed partial class SourceGenerationContextChunk1 : global::System.Text.Json.Serialization.JsonSerializerContext
{
}
@@ -1038,6 +1038,21 @@ internal sealed partial class SourceGenerationContextChunk1 : global::System.Tex
Converters = new global::System.Type[]
{
})]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
@@ -1277,6 +1292,10 @@ public override bool CanConvert(global::System.Type typeToConvert)
|| typeToConvert == typeof(global::Speechify.ConversationTransport?)
+ || typeToConvert == typeof(global::Speechify.ConversationChannel)
+
+ || typeToConvert == typeof(global::Speechify.ConversationChannel?)
+
|| typeToConvert == typeof(global::Speechify.ConversationEndReason)
|| typeToConvert == typeof(global::Speechify.ConversationEndReason?)
@@ -1525,10 +1544,6 @@ public override bool CanConvert(global::System.Type typeToConvert)
|| typeToConvert == typeof(global::Speechify.PhoneNumberProvider?)
- || typeToConvert == typeof(global::Speechify.PhoneNumberRelayHealth)
-
- || typeToConvert == typeof(global::Speechify.PhoneNumberRelayHealth?)
-
|| typeToConvert == typeof(global::Speechify.PhoneNumberCapability)
|| typeToConvert == typeof(global::Speechify.PhoneNumberCapability?)
@@ -1605,6 +1620,10 @@ public override bool CanConvert(global::System.Type typeToConvert)
|| typeToConvert == typeof(global::Speechify.StoreOrderByDirection?)
+ || typeToConvert == typeof(global::Speechify.StoreAggregateMetricOp)
+
+ || typeToConvert == typeof(global::Speechify.StoreAggregateMetricOp?)
+
|| typeToConvert == typeof(global::Speechify.StoreBatchWriteOp)
|| typeToConvert == typeof(global::Speechify.StoreBatchWriteOp?)
@@ -2104,6 +2123,16 @@ public override bool CanConvert(global::System.Type typeToConvert)
return new global::Speechify.JsonConverters.ConversationTransportNullableJsonConverter();
}
+ if (typeToConvert == typeof(global::Speechify.ConversationChannel))
+ {
+ return new global::Speechify.JsonConverters.ConversationChannelJsonConverter();
+ }
+
+ if (typeToConvert == typeof(global::Speechify.ConversationChannel?))
+ {
+ return new global::Speechify.JsonConverters.ConversationChannelNullableJsonConverter();
+ }
+
if (typeToConvert == typeof(global::Speechify.ConversationEndReason))
{
return new global::Speechify.JsonConverters.ConversationEndReasonJsonConverter();
@@ -2724,16 +2753,6 @@ public override bool CanConvert(global::System.Type typeToConvert)
return new global::Speechify.JsonConverters.PhoneNumberProviderNullableJsonConverter();
}
- if (typeToConvert == typeof(global::Speechify.PhoneNumberRelayHealth))
- {
- return new global::Speechify.JsonConverters.PhoneNumberRelayHealthJsonConverter();
- }
-
- if (typeToConvert == typeof(global::Speechify.PhoneNumberRelayHealth?))
- {
- return new global::Speechify.JsonConverters.PhoneNumberRelayHealthNullableJsonConverter();
- }
-
if (typeToConvert == typeof(global::Speechify.PhoneNumberCapability))
{
return new global::Speechify.JsonConverters.PhoneNumberCapabilityJsonConverter();
@@ -2924,6 +2943,16 @@ public override bool CanConvert(global::System.Type typeToConvert)
return new global::Speechify.JsonConverters.StoreOrderByDirectionNullableJsonConverter();
}
+ if (typeToConvert == typeof(global::Speechify.StoreAggregateMetricOp))
+ {
+ return new global::Speechify.JsonConverters.StoreAggregateMetricOpJsonConverter();
+ }
+
+ if (typeToConvert == typeof(global::Speechify.StoreAggregateMetricOp?))
+ {
+ return new global::Speechify.JsonConverters.StoreAggregateMetricOpNullableJsonConverter();
+ }
+
if (typeToConvert == typeof(global::Speechify.StoreBatchWriteOp))
{
return new global::Speechify.JsonConverters.StoreBatchWriteOpJsonConverter();
diff --git a/src/libs/Speechify/Generated/Speechify.JsonSerializerContextTypes.g.cs b/src/libs/Speechify/Generated/Speechify.JsonSerializerContextTypes.g.cs
index d537ed45..381cc9e6 100644
--- a/src/libs/Speechify/Generated/Speechify.JsonSerializerContextTypes.g.cs
+++ b/src/libs/Speechify/Generated/Speechify.JsonSerializerContextTypes.g.cs
@@ -757,2155 +757,2199 @@ public sealed partial class JsonSerializerContextTypes
///
///
///
- public global::Speechify.ConversationEndReason? Type181 { get; set; }
+ public global::Speechify.ConversationChannel? Type181 { get; set; }
///
///
///
- public global::Speechify.SkillPin? Type182 { get; set; }
+ public global::Speechify.ConversationEndReason? Type182 { get; set; }
///
///
///
- public global::Speechify.AgentSnapshotInterruptionSensitivity? Type183 { get; set; }
+ public global::Speechify.SkillPin? Type183 { get; set; }
///
///
///
- public global::Speechify.AgentSnapshotBackgroundNoisePreset? Type184 { get; set; }
+ public global::Speechify.AgentSnapshotInterruptionSensitivity? Type184 { get; set; }
///
///
///
- public global::Speechify.AgentSnapshot? Type185 { get; set; }
+ public global::Speechify.AgentSnapshotBackgroundNoisePreset? Type185 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type186 { get; set; }
+ public global::Speechify.AgentSnapshot? Type186 { get; set; }
///
///
///
- public global::Speechify.ConversationIvrSurrenderReason? Type187 { get; set; }
+ public global::System.Collections.Generic.IList? Type187 { get; set; }
///
///
///
- public global::Speechify.Conversation? Type188 { get; set; }
+ public global::Speechify.ConversationIvrSurrenderReason? Type188 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList