Compare commits

...
Author SHA1 Message Date
Nicolò Boschi 2ecd34c437 fix(cli): pass u64 limit/offset to regenerated client
The Rust client was regenerated with limit/offset typed as Option<u64>
(unsigned, minimum 0 in the OpenAPI spec), but the api.rs wrappers still
passed Option<i64>, breaking `cargo build` (and the test-rust-cli /
test-doc-examples CI jobs). Cast the values to u64 at each call site
(list_documents, list_memories, list_entities, get_graph, list_tags),
matching the existing pattern already used for list_documents.
2026-06-23 13:48:46 +02:00
+29 -7
View File
@@ -425,8 +425,8 @@ impl ApiClient {
.client
.list_documents(
agent_id,
limit.map(|l| l as i64),
offset.map(|o| o as i64),
limit.map(|l| l as u64),
offset.map(|o| o as u64),
q,
None,
None,
@@ -524,8 +524,8 @@ impl ApiClient {
bank_id,
None, // consolidation_state
None, // document_id
limit,
offset,
limit.map(|l| l as u64),
offset.map(|o| o as u64),
q,
None, // state
type_filter,
@@ -546,7 +546,12 @@ impl ApiClient {
self.runtime.block_on(async {
let response = self
.client
.list_entities(bank_id, limit, offset, None)
.list_entities(
bank_id,
limit.map(|l| l as u64),
offset.map(|o| o as u64),
None,
)
.await?;
Ok(response.into_inner())
})
@@ -664,7 +669,17 @@ impl ApiClient {
self.runtime.block_on(async {
let response = self
.client
.get_graph(bank_id, None, None, limit, None, None, None, type_filter, None)
.get_graph(
bank_id,
None,
None,
limit.map(|l| l as u64),
None,
None,
None,
type_filter,
None,
)
.await?;
Ok(response.into_inner())
})
@@ -726,7 +741,14 @@ impl ApiClient {
self.runtime.block_on(async {
let response = self
.client
.list_tags(bank_id, limit, offset, q, None, None)
.list_tags(
bank_id,
limit.map(|l| l as u64),
offset.map(|o| o as u64),
q,
None,
None,
)
.await?;
Ok(response.into_inner())
})