Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions src/libs/Speechify/Generated/Speechify.AgentClient.CreateTool.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ partial void ProcessCreateToolResponseContent(
/// workspace tool definition AND attaches it to the agent in one<br/>
/// call. To attach a definition that already exists, use<br/>
/// `PUT /v1/agents/{agent_id}/tools/{tool_id}` instead.<br/>
/// Names are refused two ways: a `webhook` / `client` / `mcp` definition<br/>
/// is unique per **project**, a `builtin` is unique per **agent**, and an<br/>
/// agent may not carry both under one name. Either refusal is `409<br/>
/// tool_name_taken` with `error.details.held_by` naming the holder, which<br/>
/// for a definition is not necessarily attached to this agent.<br/>
/// A field this endpoint does not define is refused with `400<br/>
/// validation_failed` naming every unknown field, rather than accepted<br/>
/// and silently dropped.<br/>
Expand Down Expand Up @@ -95,6 +100,11 @@ partial void ProcessCreateToolResponseContent(
/// workspace tool definition AND attaches it to the agent in one<br/>
/// call. To attach a definition that already exists, use<br/>
/// `PUT /v1/agents/{agent_id}/tools/{tool_id}` instead.<br/>
/// Names are refused two ways: a `webhook` / `client` / `mcp` definition<br/>
/// is unique per **project**, a `builtin` is unique per **agent**, and an<br/>
/// agent may not carry both under one name. Either refusal is `409<br/>
/// tool_name_taken` with `error.details.held_by` naming the holder, which<br/>
/// for a definition is not necessarily attached to this agent.<br/>
/// A field this endpoint does not define is refused with `400<br/>
/// validation_failed` naming every unknown field, rather than accepted<br/>
/// and silently dropped.<br/>
Expand Down Expand Up @@ -496,24 +506,24 @@ partial void ProcessCreateToolResponseContent(
h => h.Key,
h => h.Value));
}
// The request conflicts with the current resource state - e.g. duplicate, optimistic-concurrency mismatch, or last-owner guard.
// The name is already taken. On `tool_name_taken`, `details.held_by` names what holds it - one of the agent's built-ins, or a tool definition in the agent's project, which `attached_to_agent: false` marks as one this agent's own tool list does not show. A holder deleted between the refusal and the lookup falls back to the generic `conflict` code with no `details`, rather than naming a resource the caller would no longer find.
if ((int)__response.StatusCode == 409)
{
string? __content_409 = null;
global::System.Exception? __exception_409 = null;
global::Speechify.Error? __value_409 = null;
global::Speechify.ToolNameTakenError? __value_409 = null;
try
{
if (__effectiveReadResponseAsString)
{
__content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_409 = global::Speechify.Error.FromJson(__content_409, JsonSerializerContext);
__value_409 = global::Speechify.ToolNameTakenError.FromJson(__content_409, JsonSerializerContext);
}
else
{
__content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_409 = global::Speechify.Error.FromJson(__content_409, JsonSerializerContext);
__value_409 = global::Speechify.ToolNameTakenError.FromJson(__content_409, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand All @@ -522,7 +532,7 @@ partial void ProcessCreateToolResponseContent(
}


throw global::Speechify.ApiException<global::Speechify.Error>.Create(
throw global::Speechify.ApiException<global::Speechify.ToolNameTakenError>.Create(
statusCode: __response.StatusCode,
message: __content_409 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_409,
Expand Down Expand Up @@ -638,6 +648,11 @@ partial void ProcessCreateToolResponseContent(
/// workspace tool definition AND attaches it to the agent in one<br/>
/// call. To attach a definition that already exists, use<br/>
/// `PUT /v1/agents/{agent_id}/tools/{tool_id}` instead.<br/>
/// Names are refused two ways: a `webhook` / `client` / `mcp` definition<br/>
/// is unique per **project**, a `builtin` is unique per **agent**, and an<br/>
/// agent may not carry both under one name. Either refusal is `409<br/>
/// tool_name_taken` with `error.details.held_by` naming the holder, which<br/>
/// for a definition is not necessarily attached to this agent.<br/>
/// A field this endpoint does not define is refused with `400<br/>
/// validation_failed` naming every unknown field, rather than accepted<br/>
/// and silently dropped.<br/>
Expand Down
16 changes: 14 additions & 2 deletions src/libs/Speechify/Generated/Speechify.AgentClient.DeleteTool.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@ partial void ProcessDeleteToolResponseContent(
/// Delete Agent Tool<br/>
/// Remove a tool from the agent. A built-in instance is deleted; an<br/>
/// attached external tool is detached (the workspace definition<br/>
/// survives and stays attachable elsewhere).
/// survives and stays attachable elsewhere).<br/>
/// A detached definition **keeps its name** in the agent's project, so<br/>
/// creating a new tool under that name here is refused with `409<br/>
/// tool_name_taken` even though the agent's tool list is empty. The<br/>
/// definition is listed at `GET /v1/agents/tool-definitions` under the<br/>
/// same id: re-attach it with `PUT /v1/agents/{agent_id}/tools/{tool_id}`,<br/>
/// or delete it there to free the name.
/// </summary>
/// <param name="agentId"></param>
/// <param name="toolId"></param>
Expand Down Expand Up @@ -78,7 +84,13 @@ partial void ProcessDeleteToolResponseContent(
/// Delete Agent Tool<br/>
/// Remove a tool from the agent. A built-in instance is deleted; an<br/>
/// attached external tool is detached (the workspace definition<br/>
/// survives and stays attachable elsewhere).
/// survives and stays attachable elsewhere).<br/>
/// A detached definition **keeps its name** in the agent's project, so<br/>
/// creating a new tool under that name here is refused with `409<br/>
/// tool_name_taken` even though the agent's tool list is empty. The<br/>
/// definition is listed at `GET /v1/agents/tool-definitions` under the<br/>
/// same id: re-attach it with `PUT /v1/agents/{agent_id}/tools/{tool_id}`,<br/>
/// or delete it there to free the name.
/// </summary>
/// <param name="agentId"></param>
/// <param name="toolId"></param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ partial void ProcessBatchDocumentsResponseContent(
/// Batch Write Documents<br/>
/// Apply up to 50 writes (`set`, `update`, `delete`) in order. Not atomic<br/>
/// across writes: it stops at the first failure, whose index the error<br/>
/// names, and reports every write it applied.<br/>
/// names, and reports every write it applied. A `set` or `update` naming a<br/>
/// reserved id (`query`, `batch`) is refused with 400 `validation_failed`.<br/>
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
/// </summary>
/// <param name="storeId"></param>
Expand Down Expand Up @@ -93,7 +94,8 @@ partial void ProcessBatchDocumentsResponseContent(
/// Batch Write Documents<br/>
/// Apply up to 50 writes (`set`, `update`, `delete`) in order. Not atomic<br/>
/// across writes: it stops at the first failure, whose index the error<br/>
/// names, and reports every write it applied.<br/>
/// names, and reports every write it applied. A `set` or `update` naming a<br/>
/// reserved id (`query`, `batch`) is refused with 400 `validation_failed`.<br/>
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
/// </summary>
/// <param name="storeId"></param>
Expand Down Expand Up @@ -715,7 +717,8 @@ partial void ProcessBatchDocumentsResponseContent(
/// Batch Write Documents<br/>
/// Apply up to 50 writes (`set`, `update`, `delete`) in order. Not atomic<br/>
/// across writes: it stops at the first failure, whose index the error<br/>
/// names, and reports every write it applied.<br/>
/// names, and reports every write it applied. A `set` or `update` naming a<br/>
/// reserved id (`query`, `batch`) is refused with 400 `validation_failed`.<br/>
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
/// </summary>
/// <param name="storeId"></param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ partial void ProcessCreateDocumentResponseContent(
/// Write a document, minting an id when none is given. Prefer `putDocument`<br/>
/// with a stable id you derive from the content, so a retry never<br/>
/// duplicates. Bounded by the store's document limit (409<br/>
/// `store_document_limit_reached`).<br/>
/// `store_document_limit_reached`). `query` and `batch` are reserved ids<br/>
/// (400 `validation_failed`).<br/>
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
/// </summary>
/// <param name="storeId"></param>
Expand Down Expand Up @@ -95,7 +96,8 @@ partial void ProcessCreateDocumentResponseContent(
/// Write a document, minting an id when none is given. Prefer `putDocument`<br/>
/// with a stable id you derive from the content, so a retry never<br/>
/// duplicates. Bounded by the store's document limit (409<br/>
/// `store_document_limit_reached`).<br/>
/// `store_document_limit_reached`). `query` and `batch` are reserved ids<br/>
/// (400 `validation_failed`).<br/>
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
/// </summary>
/// <param name="storeId"></param>
Expand Down Expand Up @@ -718,7 +720,8 @@ partial void ProcessCreateDocumentResponseContent(
/// Write a document, minting an id when none is given. Prefer `putDocument`<br/>
/// with a stable id you derive from the content, so a retry never<br/>
/// duplicates. Bounded by the store's document limit (409<br/>
/// `store_document_limit_reached`).<br/>
/// `store_document_limit_reached`). `query` and `batch` are reserved ids<br/>
/// (400 `validation_failed`).<br/>
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
/// </summary>
/// <param name="storeId"></param>
Expand All @@ -728,8 +731,9 @@ partial void ProcessCreateDocumentResponseContent(
/// Optional idempotency key. When omitted, the SDK generates one for this request.
/// </param>
/// <param name="id">
/// On `createDocument`, the id to write at (letters, digits, `_ . - : ~ @ +`, at most 200);<br/>
/// minted when absent. Ignored on `putDocument` / `updateDocument`, where the URL names it.
/// On `createDocument`, the id to write at (letters, digits, `_ . - : ~ @ +`, at most 200,<br/>
/// not the reserved `query` or `batch`); minted when absent. Ignored on `putDocument` /<br/>
/// `updateDocument`, where the URL names it.
/// </param>
/// <param name="data">
/// The document body (a JSON object, at most 256 KiB). On `updateDocument`, the fields to merge; a null removes a field.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ partial void ProcessPutDocumentResponseContent(
/// Write (create or replace) a document at this id. 201 for a new<br/>
/// document, 200 for a new version of an existing one. `data` must be a<br/>
/// JSON object of at most 256 KiB; its top-level scalar fields become the<br/>
/// queryable projection.<br/>
/// queryable projection. The reserved ids `query` and `batch` are refused<br/>
/// (400 `validation_failed`).<br/>
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
/// </summary>
/// <param name="storeId"></param>
Expand Down Expand Up @@ -93,7 +94,8 @@ partial void ProcessPutDocumentResponseContent(
/// Write (create or replace) a document at this id. 201 for a new<br/>
/// document, 200 for a new version of an existing one. `data` must be a<br/>
/// JSON object of at most 256 KiB; its top-level scalar fields become the<br/>
/// queryable projection.<br/>
/// queryable projection. The reserved ids `query` and `batch` are refused<br/>
/// (400 `validation_failed`).<br/>
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
/// </summary>
/// <param name="storeId"></param>
Expand Down Expand Up @@ -710,16 +712,18 @@ partial void ProcessPutDocumentResponseContent(
/// Write (create or replace) a document at this id. 201 for a new<br/>
/// document, 200 for a new version of an existing one. `data` must be a<br/>
/// JSON object of at most 256 KiB; its top-level scalar fields become the<br/>
/// queryable projection.<br/>
/// queryable projection. The reserved ids `query` and `batch` are refused<br/>
/// (400 `validation_failed`).<br/>
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
/// </summary>
/// <param name="storeId"></param>
/// <param name="collection"></param>
/// <param name="documentId"></param>
/// <param name="speechifyVersion"></param>
/// <param name="id">
/// On `createDocument`, the id to write at (letters, digits, `_ . - : ~ @ +`, at most 200);<br/>
/// minted when absent. Ignored on `putDocument` / `updateDocument`, where the URL names it.
/// On `createDocument`, the id to write at (letters, digits, `_ . - : ~ @ +`, at most 200,<br/>
/// not the reserved `query` or `batch`); minted when absent. Ignored on `putDocument` /<br/>
/// `updateDocument`, where the URL names it.
/// </param>
/// <param name="data">
/// The document body (a JSON object, at most 256 KiB). On `updateDocument`, the fields to merge; a null removes a field.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -675,8 +675,9 @@ partial void ProcessUpdateDocumentResponseContent(
/// <param name="documentId"></param>
/// <param name="speechifyVersion"></param>
/// <param name="id">
/// On `createDocument`, the id to write at (letters, digits, `_ . - : ~ @ +`, at most 200);<br/>
/// minted when absent. Ignored on `putDocument` / `updateDocument`, where the URL names it.
/// On `createDocument`, the id to write at (letters, digits, `_ . - : ~ @ +`, at most 200,<br/>
/// not the reserved `query` or `batch`); minted when absent. Ignored on `putDocument` /<br/>
/// `updateDocument`, where the URL names it.
/// </param>
/// <param name="data">
/// The document body (a JSON object, at most 256 KiB). On `updateDocument`, the fields to merge; a null removes a field.
Expand Down
Loading