// Generated by the shared SDK contract. Do not edit.
use super::types::*;
use crate::invoke::{Error, InvokeOptions, Invoker, Result};
pub struct DocApi<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApi<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
pub fn authorities(&self) -> DocApiAuthorities<'a, I> {
DocApiAuthorities::new(self.invoker)
}
pub fn blocks(&self) -> DocApiBlocks<'a, I> {
DocApiBlocks::new(self.invoker)
}
pub fn bookmarks(&self) -> DocApiBookmarks<'a, I> {
DocApiBookmarks::new(self.invoker)
}
pub fn capabilities(&self) -> DocApiCapabilities<'a, I> {
DocApiCapabilities::new(self.invoker)
}
pub fn captions(&self) -> DocApiCaptions<'a, I> {
DocApiCaptions::new(self.invoker)
}
pub fn citations(&self) -> DocApiCitations<'a, I> {
DocApiCitations::new(self.invoker)
}
pub fn clipboard(&self) -> DocApiClipboard<'a, I> {
DocApiClipboard::new(self.invoker)
}
pub fn comments(&self) -> DocApiComments<'a, I> {
DocApiComments::new(self.invoker)
}
pub fn content_controls(&self) -> DocApiContentControls<'a, I> {
DocApiContentControls::new(self.invoker)
}
pub fn create(&self) -> DocApiCreate<'a, I> {
DocApiCreate::new(self.invoker)
}
pub fn cross_refs(&self) -> DocApiCrossRefs<'a, I> {
DocApiCrossRefs::new(self.invoker)
}
pub fn custom_xml(&self) -> DocApiCustomXml<'a, I> {
DocApiCustomXml::new(self.invoker)
}
pub fn diff(&self) -> DocApiDiff<'a, I> {
DocApiDiff::new(self.invoker)
}
pub fn export(&self) -> DocApiExport<'a, I> {
DocApiExport::new(self.invoker)
}
pub fn fields(&self) -> DocApiFields<'a, I> {
DocApiFields::new(self.invoker)
}
pub fn footnotes(&self) -> DocApiFootnotes<'a, I> {
DocApiFootnotes::new(self.invoker)
}
pub fn format(&self) -> DocApiFormat<'a, I> {
DocApiFormat::new(self.invoker)
}
pub fn header_footers(&self) -> DocApiHeaderFooters<'a, I> {
DocApiHeaderFooters::new(self.invoker)
}
pub fn history(&self) -> DocApiHistory<'a, I> {
DocApiHistory::new(self.invoker)
}
pub fn hyperlinks(&self) -> DocApiHyperlinks<'a, I> {
DocApiHyperlinks::new(self.invoker)
}
pub fn images(&self) -> DocApiImages<'a, I> {
DocApiImages::new(self.invoker)
}
pub fn index(&self) -> DocApiIndex<'a, I> {
DocApiIndex::new(self.invoker)
}
pub fn lists(&self) -> DocApiLists<'a, I> {
DocApiLists::new(self.invoker)
}
pub fn metadata(&self) -> DocApiMetadata<'a, I> {
DocApiMetadata::new(self.invoker)
}
pub fn mutations(&self) -> DocApiMutations<'a, I> {
DocApiMutations::new(self.invoker)
}
pub fn permission_ranges(&self) -> DocApiPermissionRanges<'a, I> {
DocApiPermissionRanges::new(self.invoker)
}
pub fn plan(&self) -> DocApiPlan<'a, I> {
DocApiPlan::new(self.invoker)
}
pub fn preset(&self) -> DocApiPreset<'a, I> {
DocApiPreset::new(self.invoker)
}
pub fn protection(&self) -> DocApiProtection<'a, I> {
DocApiProtection::new(self.invoker)
}
pub fn query(&self) -> DocApiQuery<'a, I> {
DocApiQuery::new(self.invoker)
}
pub fn ranges(&self) -> DocApiRanges<'a, I> {
DocApiRanges::new(self.invoker)
}
pub fn sections(&self) -> DocApiSections<'a, I> {
DocApiSections::new(self.invoker)
}
pub fn selection(&self) -> DocApiSelection<'a, I> {
DocApiSelection::new(self.invoker)
}
pub fn styles(&self) -> DocApiStyles<'a, I> {
DocApiStyles::new(self.invoker)
}
pub fn tables(&self) -> DocApiTables<'a, I> {
DocApiTables::new(self.invoker)
}
pub fn templates(&self) -> DocApiTemplates<'a, I> {
DocApiTemplates::new(self.invoker)
}
pub fn toc(&self) -> DocApiToc<'a, I> {
DocApiToc::new(self.invoker)
}
pub fn track_changes(&self) -> DocApiTrackChanges<'a, I> {
DocApiTrackChanges::new(self.invoker)
}
pub fn watermarks(&self) -> DocApiWatermarks<'a, I> {
DocApiWatermarks::new(self.invoker)
}
#[doc = "Clear all document body content, leaving a single empty paragraph."]
pub fn clear_content<'call>(
&'call self,
params: &'call DocClearContentBoundParams,
) -> impl std::future::Future<Output = Result<DocClearContentResult>> + Send + 'call {
self.clear_content_with_options(params, InvokeOptions::default())
}
#[doc = "Clear all document body content, leaving a single empty paragraph."]
pub async fn clear_content_with_options(
&self,
params: &DocClearContentBoundParams,
options: InvokeOptions,
) -> Result<DocClearContentResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.clearContent", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.clearContent".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Close the active editing session and clean up resources."]
pub fn close<'call>(
&'call self,
params: &'call DocCloseBoundParams,
) -> impl std::future::Future<Output = Result<DocCloseResult>> + Send + 'call {
self.close_with_options(params, InvokeOptions::default())
}
#[doc = "Close the active editing session and clean up resources."]
pub async fn close_with_options(
&self,
params: &DocCloseBoundParams,
options: InvokeOptions,
) -> Result<DocCloseResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self.invoker.invoke("doc.close", params, options).await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.close".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Delete content at a contiguous document selection. Accepts a SelectionTarget or mutation-ready ref. Supports cross-block deletion and optional block-edge expansion via behavior mode."]
pub fn delete<'call>(
&'call self,
params: &'call DocDeleteBoundParams,
) -> impl std::future::Future<Output = Result<DocDeleteResult>> + Send + 'call {
self.delete_with_options(params, InvokeOptions::default())
}
#[doc = "Delete content at a contiguous document selection. Accepts a SelectionTarget or mutation-ready ref. Supports cross-block deletion and optional block-edge expansion via behavior mode."]
pub async fn delete_with_options(
&self,
params: &DocDeleteBoundParams,
options: InvokeOptions,
) -> Result<DocDeleteResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self.invoker.invoke("doc.delete", params, options).await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.delete".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Run model-authored JavaScript IN-HOST against the live, SYNCHRONOUS Document API for the open session. Two globals are injected: `doc` (the synchronous Document API; do NOT await doc.* calls) and `console`. `return` a short summary; logs and the return value come back structured as { ok, result, logs, error }. Use for complex/multi-step workflows (loops, per-item branching, extract-then-generate) in ONE call instead of chaining many narrow tools. Large code can be passed on stdin."]
pub fn execute_code<'call>(
&'call self,
params: &'call DocExecuteCodeBoundParams,
) -> impl std::future::Future<Output = Result<DocExecuteCodeResult>> + Send + 'call {
self.execute_code_with_options(params, InvokeOptions::default())
}
#[doc = "Run model-authored JavaScript IN-HOST against the live, SYNCHRONOUS Document API for the open session. Two globals are injected: `doc` (the synchronous Document API; do NOT await doc.* calls) and `console`. `return` a short summary; logs and the return value come back structured as { ok, result, logs, error }. Use for complex/multi-step workflows (loops, per-item branching, extract-then-generate) in ONE call instead of chaining many narrow tools. Large code can be passed on stdin."]
pub async fn execute_code_with_options(
&self,
params: &DocExecuteCodeBoundParams,
options: InvokeOptions,
) -> Result<DocExecuteCodeResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.executeCode", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.executeCode".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Extract all document content with stable IDs for RAG pipelines. Returns blocks with full text, comments, and tracked changes: each with an ID compatible with scrollToElement()."]
pub fn extract<'call>(
&'call self,
params: &'call DocExtractBoundParams,
) -> impl std::future::Future<Output = Result<DocExtractResult>> + Send + 'call {
self.extract_with_options(params, InvokeOptions::default())
}
#[doc = "Extract all document content with stable IDs for RAG pipelines. Returns blocks with full text, comments, and tracked changes: each with an ID compatible with scrollToElement()."]
pub async fn extract_with_options(
&self,
params: &DocExtractBoundParams,
options: InvokeOptions,
) -> Result<DocExtractResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self.invoker.invoke("doc.extract", params, options).await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.extract".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Search the document for text or node matches using SDM/1 selectors. Returns discovery-grade results: for mutation targeting, use query.match instead."]
pub fn find<'call>(
&'call self,
params: &'call DocFindBoundParams,
) -> impl std::future::Future<Output = Result<DocFindResult>> + Send + 'call {
self.find_with_options(params, InvokeOptions::default())
}
#[doc = "Search the document for text or node matches using SDM/1 selectors. Returns discovery-grade results: for mutation targeting, use query.match instead."]
pub async fn find_with_options(
&self,
params: &DocFindBoundParams,
options: InvokeOptions,
) -> Result<DocFindResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self.invoker.invoke("doc.find", params, options).await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.find".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Legacy root-level alias for inline range formatting. Routes to `format.apply` for compatibility with older callers."]
pub fn format_range<'call>(
&'call self,
params: &'call DocFormatRangeBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatRangeResult>> + Send + 'call {
self.format_range_with_options(params, InvokeOptions::default())
}
#[doc = "Legacy root-level alias for inline range formatting. Routes to `format.apply` for compatibility with older callers."]
pub async fn format_range_with_options(
&self,
params: &DocFormatRangeBoundParams,
options: InvokeOptions,
) -> Result<DocFormatRangeResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.formatRange", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.formatRange".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Read the full document as an SDDocument structure."]
pub fn get<'call>(
&'call self,
params: &'call DocGetBoundParams,
) -> impl std::future::Future<Output = Result<DocGetResult>> + Send + 'call {
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Read the full document as an SDDocument structure."]
pub async fn get_with_options(
&self,
params: &DocGetBoundParams,
options: InvokeOptions,
) -> Result<DocGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self.invoker.invoke("doc.get", params, options).await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Extract the document content as an HTML string."]
pub fn get_html<'call>(
&'call self,
params: &'call DocGetHtmlBoundParams,
) -> impl std::future::Future<Output = Result<DocGetHtmlResult>> + Send + 'call {
self.get_html_with_options(params, InvokeOptions::default())
}
#[doc = "Extract the document content as an HTML string."]
pub async fn get_html_with_options(
&self,
params: &DocGetHtmlBoundParams,
options: InvokeOptions,
) -> Result<DocGetHtmlResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self.invoker.invoke("doc.getHtml", params, options).await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.getHtml".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Extract the document content as a Markdown string."]
pub fn get_markdown<'call>(
&'call self,
params: &'call DocGetMarkdownBoundParams,
) -> impl std::future::Future<Output = Result<DocGetMarkdownResult>> + Send + 'call {
self.get_markdown_with_options(params, InvokeOptions::default())
}
#[doc = "Extract the document content as a Markdown string."]
pub async fn get_markdown_with_options(
&self,
params: &DocGetMarkdownBoundParams,
options: InvokeOptions,
) -> Result<DocGetMarkdownResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.getMarkdown", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.getMarkdown".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Retrieve a single node by target position."]
pub fn get_node<'call>(
&'call self,
params: &'call DocGetNodeBoundParams,
) -> impl std::future::Future<Output = Result<DocGetNodeResult>> + Send + 'call {
self.get_node_with_options(params, InvokeOptions::default())
}
#[doc = "Retrieve a single node by target position."]
pub async fn get_node_with_options(
&self,
params: &DocGetNodeBoundParams,
options: InvokeOptions,
) -> Result<DocGetNodeResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self.invoker.invoke("doc.getNode", params, options).await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.getNode".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Resolve a block ID across the body, linked headers/footers, and supported textboxes, optionally restricted by story. Paragraphs at every table-cell depth and top-level body/header/footer tables are supported; notes, comments, glossary, and nested table containers are excluded."]
pub fn get_node_by_id<'call>(
&'call self,
params: &'call DocGetNodeByIdBoundParams,
) -> impl std::future::Future<Output = Result<DocGetNodeByIdResult>> + Send + 'call {
self.get_node_by_id_with_options(params, InvokeOptions::default())
}
#[doc = "Resolve a block ID across the body, linked headers/footers, and supported textboxes, optionally restricted by story. Paragraphs at every table-cell depth and top-level body/header/footer tables are supported; notes, comments, glossary, and nested table containers are excluded."]
pub async fn get_node_by_id_with_options(
&self,
params: &DocGetNodeByIdBoundParams,
options: InvokeOptions,
) -> Result<DocGetNodeByIdResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.getNodeById", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.getNodeById".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Extract the plain-text content of the document."]
pub fn get_text<'call>(
&'call self,
params: &'call DocGetTextBoundParams,
) -> impl std::future::Future<Output = Result<DocGetTextResult>> + Send + 'call {
self.get_text_with_options(params, InvokeOptions::default())
}
#[doc = "Extract the plain-text content of the document."]
pub async fn get_text_with_options(
&self,
params: &DocGetTextBoundParams,
options: InvokeOptions,
) -> Result<DocGetTextResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self.invoker.invoke("doc.getText", params, options).await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.getText".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Convert an HTML string into an SDM/1 structural fragment."]
pub fn html_to_fragment<'call>(
&'call self,
params: &'call DocHtmlToFragmentBoundParams,
) -> impl std::future::Future<Output = Result<DocHtmlToFragmentResult>> + Send + 'call {
self.html_to_fragment_with_options(params, InvokeOptions::default())
}
#[doc = "Convert an HTML string into an SDM/1 structural fragment."]
pub async fn html_to_fragment_with_options(
&self,
params: &DocHtmlToFragmentBoundParams,
options: InvokeOptions,
) -> Result<DocHtmlToFragmentResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.htmlToFragment", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.htmlToFragment".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Return document summary info including word, character, paragraph, heading, table, image, comment, tracked-change, SDT-field, list, and page counts, plus outline and capabilities."]
pub fn info<'call>(
&'call self,
params: &'call DocInfoBoundParams,
) -> impl std::future::Future<Output = Result<DocInfoResult>> + Send + 'call {
self.info_with_options(params, InvokeOptions::default())
}
#[doc = "Return document summary info including word, character, paragraph, heading, table, image, comment, tracked-change, SDT-field, list, and page counts, plus outline and capabilities."]
pub async fn info_with_options(
&self,
params: &DocInfoBoundParams,
options: InvokeOptions,
) -> Result<DocInfoResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self.invoker.invoke("doc.info", params, options).await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.info".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert content into the document. Text, rich, structural, and native OOXML input shapes: text-based (value + type) inserts inline content at a SelectionTarget or ref position within an existing block; structural SDFragment (content) inserts one or more blocks as siblings relative to a BlockNodeAddress target. When target/ref is omitted, content appends at the end of the document. Text mode supports text (default), markdown, and html. Native type:ooxml accepts namespaces and dependency manifests, or capture accepts a portable selection.extractOoxml result. Native copies remap package and review identities and require direct mode. Rich markdown/html and structural modes use `placement` (before/after/insideStart/insideEnd) to position relative to a block target."]
pub fn insert<'call>(
&'call self,
params: &'call DocInsertBoundParams,
) -> impl std::future::Future<Output = Result<DocInsertResult>> + Send + 'call {
self.insert_with_options(params, InvokeOptions::default())
}
#[doc = "Insert content into the document. Text, rich, structural, and native OOXML input shapes: text-based (value + type) inserts inline content at a SelectionTarget or ref position within an existing block; structural SDFragment (content) inserts one or more blocks as siblings relative to a BlockNodeAddress target. When target/ref is omitted, content appends at the end of the document. Text mode supports text (default), markdown, and html. Native type:ooxml accepts namespaces and dependency manifests, or capture accepts a portable selection.extractOoxml result. Native copies remap package and review identities and require direct mode. Rich markdown/html and structural modes use `placement` (before/after/insideStart/insideEnd) to position relative to a block target."]
pub async fn insert_with_options(
&self,
params: &DocInsertBoundParams,
options: InvokeOptions,
) -> Result<DocInsertResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self.invoker.invoke("doc.insert", params, options).await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.insert".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert a real Word line-break node at a collapsed text insertion point. Accepts the same target/ref shortcuts as insert, but only for point inserts."]
pub fn insert_line_break<'call>(
&'call self,
params: &'call DocInsertLineBreakBoundParams,
) -> impl std::future::Future<Output = Result<DocInsertLineBreakResult>> + Send + 'call {
self.insert_line_break_with_options(params, InvokeOptions::default())
}
#[doc = "Insert a real Word line-break node at a collapsed text insertion point. Accepts the same target/ref shortcuts as insert, but only for point inserts."]
pub async fn insert_line_break_with_options(
&self,
params: &DocInsertLineBreakBoundParams,
options: InvokeOptions,
) -> Result<DocInsertLineBreakResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.insertLineBreak", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.insertLineBreak".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert a real Word tab node at a collapsed text insertion point. Accepts the same target/ref shortcuts as insert, but only for point inserts."]
pub fn insert_tab<'call>(
&'call self,
params: &'call DocInsertTabBoundParams,
) -> impl std::future::Future<Output = Result<DocInsertTabResult>> + Send + 'call {
self.insert_tab_with_options(params, InvokeOptions::default())
}
#[doc = "Insert a real Word tab node at a collapsed text insertion point. Accepts the same target/ref shortcuts as insert, but only for point inserts."]
pub async fn insert_tab_with_options(
&self,
params: &DocInsertTabBoundParams,
options: InvokeOptions,
) -> Result<DocInsertTabResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.insertTab", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.insertTab".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Convert a Markdown string into an SDM/1 structural fragment."]
pub fn markdown_to_fragment<'call>(
&'call self,
params: &'call DocMarkdownToFragmentBoundParams,
) -> impl std::future::Future<Output = Result<DocMarkdownToFragmentResult>> + Send + 'call {
self.markdown_to_fragment_with_options(params, InvokeOptions::default())
}
#[doc = "Convert a Markdown string into an SDM/1 structural fragment."]
pub async fn markdown_to_fragment_with_options(
&self,
params: &DocMarkdownToFragmentBoundParams,
options: InvokeOptions,
) -> Result<DocMarkdownToFragmentResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.markdownToFragment", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.markdownToFragment".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Project document content as HTML with review, scope, diagnostics, and provenance metadata."]
pub fn project_html<'call>(
&'call self,
params: &'call DocProjectHtmlBoundParams,
) -> impl std::future::Future<Output = Result<DocProjectHtmlResult>> + Send + 'call {
self.project_html_with_options(params, InvokeOptions::default())
}
#[doc = "Project document content as HTML with review, scope, diagnostics, and provenance metadata."]
pub async fn project_html_with_options(
&self,
params: &DocProjectHtmlBoundParams,
options: InvokeOptions,
) -> Result<DocProjectHtmlResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.projectHtml", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.projectHtml".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Project document content as Markdown with review, scope, diagnostics, and provenance metadata."]
pub fn project_markdown<'call>(
&'call self,
params: &'call DocProjectMarkdownBoundParams,
) -> impl std::future::Future<Output = Result<DocProjectMarkdownResult>> + Send + 'call {
self.project_markdown_with_options(params, InvokeOptions::default())
}
#[doc = "Project document content as Markdown with review, scope, diagnostics, and provenance metadata."]
pub async fn project_markdown_with_options(
&self,
params: &DocProjectMarkdownBoundParams,
options: InvokeOptions,
) -> Result<DocProjectMarkdownResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.projectMarkdown", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.projectMarkdown".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Optional replaceMode:contents retains one paragraph, heading, or listItem container while applying text, HTML, Markdown, SDFragment, or native OOXML inlines. A retained snapshotId source restores exact same-session original markup with an expectedSnapshotId local precondition. These writes require direct mode; existing selection and structural behavior is unchanged. Replace content at a contiguous document selection. Text path accepts a SelectionTarget or ref plus replacement text. For explicit single-paragraph text selections, expectedText rejects mismatches with PRECONDITION_FAILED before mutation. Tracked text replacements accept replacementGranularity: word (default), phrase (join neighboring edits separated only by spaces), or range (replace the complete selection). This requires an explicit single-paragraph text selection. Rich string path accepts HTML or Markdown plus a BlockNodeAddress, SelectionTarget, or ref. Structural path accepts the same locator forms plus SDFragment content. A single-paragraph rich replacement may overlap pending insertions: tracked mode drops the covered part of your own insertion, nests a deletion inside another author's insertion, and adds the content as a new insertion; direct mode removes the covered part and leaves the rest pending. A tracked rich replacement spanning paragraphs that crosses a pending insertion, or a range that mixes pending insertions with comment, bookmark, field, or content-control markup, rejects without changes; capabilities.check reports the same result. An explicit {kind:'story', storyType:'body'} target replaces the complete main body in direct mode while preserving the destination DOCX package."]
pub fn replace<'call>(
&'call self,
params: &'call DocReplaceBoundParams,
) -> impl std::future::Future<Output = Result<DocReplaceResult>> + Send + 'call {
self.replace_with_options(params, InvokeOptions::default())
}
#[doc = "Optional replaceMode:contents retains one paragraph, heading, or listItem container while applying text, HTML, Markdown, SDFragment, or native OOXML inlines. A retained snapshotId source restores exact same-session original markup with an expectedSnapshotId local precondition. These writes require direct mode; existing selection and structural behavior is unchanged. Replace content at a contiguous document selection. Text path accepts a SelectionTarget or ref plus replacement text. For explicit single-paragraph text selections, expectedText rejects mismatches with PRECONDITION_FAILED before mutation. Tracked text replacements accept replacementGranularity: word (default), phrase (join neighboring edits separated only by spaces), or range (replace the complete selection). This requires an explicit single-paragraph text selection. Rich string path accepts HTML or Markdown plus a BlockNodeAddress, SelectionTarget, or ref. Structural path accepts the same locator forms plus SDFragment content. A single-paragraph rich replacement may overlap pending insertions: tracked mode drops the covered part of your own insertion, nests a deletion inside another author's insertion, and adds the content as a new insertion; direct mode removes the covered part and leaves the rest pending. A tracked rich replacement spanning paragraphs that crosses a pending insertion, or a range that mixes pending insertions with comment, bookmark, field, or content-control markup, rejects without changes; capabilities.check reports the same result. An explicit {kind:'story', storyType:'body'} target replaces the complete main body in direct mode while preserving the destination DOCX package."]
pub async fn replace_with_options(
&self,
params: &DocReplaceBoundParams,
options: InvokeOptions,
) -> Result<DocReplaceResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self.invoker.invoke("doc.replace", params, options).await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.replace".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Save the current session to the original file or a new path. Supports explicit review-preserving, final, and original export modes."]
pub fn save<'call>(
&'call self,
params: &'call DocSaveBoundParams,
) -> impl std::future::Future<Output = Result<DocSaveResult>> + Send + 'call {
self.save_with_options(params, InvokeOptions::default())
}
#[doc = "Save the current session to the original file or a new path. Supports explicit review-preserving, final, and original export modes."]
pub async fn save_with_options(
&self,
params: &DocSaveBoundParams,
options: InvokeOptions,
) -> Result<DocSaveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self.invoker.invoke("doc.save", params, options).await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.save".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiAuthorities<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiAuthorities<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
pub fn entries(&self) -> DocApiAuthoritiesEntries<'a, I> {
DocApiAuthoritiesEntries::new(self.invoker)
}
#[doc = "Update the configuration of an existing table-of-authorities block."]
pub fn configure<'call>(
&'call self,
params: &'call DocAuthoritiesConfigureBoundParams,
) -> impl std::future::Future<Output = Result<DocAuthoritiesConfigureResult>> + Send + 'call
{
self.configure_with_options(params, InvokeOptions::default())
}
#[doc = "Update the configuration of an existing table-of-authorities block."]
pub async fn configure_with_options(
&self,
params: &DocAuthoritiesConfigureBoundParams,
options: InvokeOptions,
) -> Result<DocAuthoritiesConfigureResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.authorities.configure", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.authorities.configure".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Get detailed information about a specific table-of-authorities block."]
pub fn get<'call>(
&'call self,
params: &'call DocAuthoritiesGetBoundParams,
) -> impl std::future::Future<Output = Result<DocAuthoritiesGetResult>> + Send + 'call {
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Get detailed information about a specific table-of-authorities block."]
pub async fn get_with_options(
&self,
params: &DocAuthoritiesGetBoundParams,
options: InvokeOptions,
) -> Result<DocAuthoritiesGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.authorities.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.authorities.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert a new table-of-authorities block at a target location."]
pub fn insert<'call>(
&'call self,
params: &'call DocAuthoritiesInsertBoundParams,
) -> impl std::future::Future<Output = Result<DocAuthoritiesInsertResult>> + Send + 'call {
self.insert_with_options(params, InvokeOptions::default())
}
#[doc = "Insert a new table-of-authorities block at a target location."]
pub async fn insert_with_options(
&self,
params: &DocAuthoritiesInsertBoundParams,
options: InvokeOptions,
) -> Result<DocAuthoritiesInsertResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.authorities.insert", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.authorities.insert".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List all table-of-authorities blocks in the document."]
pub fn list<'call>(
&'call self,
params: &'call DocAuthoritiesListBoundParams,
) -> impl std::future::Future<Output = Result<DocAuthoritiesListResult>> + Send + 'call {
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List all table-of-authorities blocks in the document."]
pub async fn list_with_options(
&self,
params: &DocAuthoritiesListBoundParams,
options: InvokeOptions,
) -> Result<DocAuthoritiesListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.authorities.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.authorities.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Rebuild a table-of-authorities block from its entries."]
pub fn rebuild<'call>(
&'call self,
params: &'call DocAuthoritiesRebuildBoundParams,
) -> impl std::future::Future<Output = Result<DocAuthoritiesRebuildResult>> + Send + 'call {
self.rebuild_with_options(params, InvokeOptions::default())
}
#[doc = "Rebuild a table-of-authorities block from its entries."]
pub async fn rebuild_with_options(
&self,
params: &DocAuthoritiesRebuildBoundParams,
options: InvokeOptions,
) -> Result<DocAuthoritiesRebuildResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.authorities.rebuild", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.authorities.rebuild".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove a table-of-authorities block from the document."]
pub fn remove<'call>(
&'call self,
params: &'call DocAuthoritiesRemoveBoundParams,
) -> impl std::future::Future<Output = Result<DocAuthoritiesRemoveResult>> + Send + 'call {
self.remove_with_options(params, InvokeOptions::default())
}
#[doc = "Remove a table-of-authorities block from the document."]
pub async fn remove_with_options(
&self,
params: &DocAuthoritiesRemoveBoundParams,
options: InvokeOptions,
) -> Result<DocAuthoritiesRemoveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.authorities.remove", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.authorities.remove".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiAuthoritiesEntries<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiAuthoritiesEntries<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Get detailed information about a specific TA authority entry."]
pub fn get<'call>(
&'call self,
params: &'call DocAuthoritiesEntriesGetBoundParams,
) -> impl std::future::Future<Output = Result<DocAuthoritiesEntriesGetResult>> + Send + 'call
{
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Get detailed information about a specific TA authority entry."]
pub async fn get_with_options(
&self,
params: &DocAuthoritiesEntriesGetBoundParams,
options: InvokeOptions,
) -> Result<DocAuthoritiesEntriesGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.authorities.entries.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.authorities.entries.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert a new TA authority entry field at a target location."]
pub fn insert<'call>(
&'call self,
params: &'call DocAuthoritiesEntriesInsertBoundParams,
) -> impl std::future::Future<Output = Result<DocAuthoritiesEntriesInsertResult>> + Send + 'call
{
self.insert_with_options(params, InvokeOptions::default())
}
#[doc = "Insert a new TA authority entry field at a target location."]
pub async fn insert_with_options(
&self,
params: &DocAuthoritiesEntriesInsertBoundParams,
options: InvokeOptions,
) -> Result<DocAuthoritiesEntriesInsertResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.authorities.entries.insert", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.authorities.entries.insert".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List all TA (authority entry) fields in the document."]
pub fn list<'call>(
&'call self,
params: &'call DocAuthoritiesEntriesListBoundParams,
) -> impl std::future::Future<Output = Result<DocAuthoritiesEntriesListResult>> + Send + 'call
{
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List all TA (authority entry) fields in the document."]
pub async fn list_with_options(
&self,
params: &DocAuthoritiesEntriesListBoundParams,
options: InvokeOptions,
) -> Result<DocAuthoritiesEntriesListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.authorities.entries.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.authorities.entries.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove a TA authority entry field from the document."]
pub fn remove<'call>(
&'call self,
params: &'call DocAuthoritiesEntriesRemoveBoundParams,
) -> impl std::future::Future<Output = Result<DocAuthoritiesEntriesRemoveResult>> + Send + 'call
{
self.remove_with_options(params, InvokeOptions::default())
}
#[doc = "Remove a TA authority entry field from the document."]
pub async fn remove_with_options(
&self,
params: &DocAuthoritiesEntriesRemoveBoundParams,
options: InvokeOptions,
) -> Result<DocAuthoritiesEntriesRemoveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.authorities.entries.remove", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.authorities.entries.remove".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Update the properties of an existing TA authority entry."]
pub fn update<'call>(
&'call self,
params: &'call DocAuthoritiesEntriesUpdateBoundParams,
) -> impl std::future::Future<Output = Result<DocAuthoritiesEntriesUpdateResult>> + Send + 'call
{
self.update_with_options(params, InvokeOptions::default())
}
#[doc = "Update the properties of an existing TA authority entry."]
pub async fn update_with_options(
&self,
params: &DocAuthoritiesEntriesUpdateBoundParams,
options: InvokeOptions,
) -> Result<DocAuthoritiesEntriesUpdateResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.authorities.entries.update", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.authorities.entries.update".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiBlocks<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiBlocks<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Delete an entire block node (paragraph, heading, list item, table, image, or sdt) deterministically."]
pub fn delete<'call>(
&'call self,
params: &'call DocBlocksDeleteBoundParams,
) -> impl std::future::Future<Output = Result<DocBlocksDeleteResult>> + Send + 'call {
self.delete_with_options(params, InvokeOptions::default())
}
#[doc = "Delete an entire block node (paragraph, heading, list item, table, image, or sdt) deterministically."]
pub async fn delete_with_options(
&self,
params: &DocBlocksDeleteBoundParams,
options: InvokeOptions,
) -> Result<DocBlocksDeleteResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.blocks.delete", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.blocks.delete".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Delete a contiguous range of top-level blocks between two endpoints (inclusive). Both endpoints must be direct children of the document node. Supports dry-run preview."]
pub fn delete_range<'call>(
&'call self,
params: &'call DocBlocksDeleteRangeBoundParams,
) -> impl std::future::Future<Output = Result<DocBlocksDeleteRangeResult>> + Send + 'call {
self.delete_range_with_options(params, InvokeOptions::default())
}
#[doc = "Delete a contiguous range of top-level blocks between two endpoints (inclusive). Both endpoints must be direct children of the document node. Supports dry-run preview."]
pub async fn delete_range_with_options(
&self,
params: &DocBlocksDeleteRangeBoundParams,
options: InvokeOptions,
) -> Result<DocBlocksDeleteRangeResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.blocks.deleteRange", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.blocks.deleteRange".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Find top-level body blocks containing a literal case-insensitive substring. Matches flattened block text, coalescing repeated hits and nested table paragraphs into one block. Scans at most 20,000 blocks inside the document host and returns compact previews without transferring full-text pages."]
pub fn find_text<'call>(
&'call self,
params: &'call DocBlocksFindTextBoundParams,
) -> impl std::future::Future<Output = Result<DocBlocksFindTextResult>> + Send + 'call {
self.find_text_with_options(params, InvokeOptions::default())
}
#[doc = "Find top-level body blocks containing a literal case-insensitive substring. Matches flattened block text, coalescing repeated hits and nested table paragraphs into one block. Scans at most 20,000 blocks inside the document host and returns compact previews without transferring full-text pages."]
pub async fn find_text_with_options(
&self,
params: &DocBlocksFindTextBoundParams,
options: InvokeOptions,
) -> Result<DocBlocksFindTextResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.blocks.findText", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.blocks.findText".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List top-level blocks in document order with IDs, types, text previews, and optional full text when includeText:true. Supports pagination via offset/limit after optional nodeTypes, nodeIds, and literal textSearch filtering, single-story scoping via `in: <StoryLocator>`, and final/original/redline projection of numbering metadata without changing block membership."]
pub fn list<'call>(
&'call self,
params: &'call DocBlocksListBoundParams,
) -> impl std::future::Future<Output = Result<DocBlocksListResult>> + Send + 'call {
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List top-level blocks in document order with IDs, types, text previews, and optional full text when includeText:true. Supports pagination via offset/limit after optional nodeTypes, nodeIds, and literal textSearch filtering, single-story scoping via `in: <StoryLocator>`, and final/original/redline projection of numbering metadata without changing block membership."]
pub async fn list_with_options(
&self,
params: &DocBlocksListBoundParams,
options: InvokeOptions,
) -> Result<DocBlocksListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.blocks.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.blocks.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Merge two adjacent paragraphs in the same story. The first paragraph keeps its pPr; the second paragraph is removed. Rejects when either paragraph carries a w:sectPr or when their numbering definitions differ."]
pub fn merge<'call>(
&'call self,
params: &'call DocBlocksMergeBoundParams,
) -> impl std::future::Future<Output = Result<DocBlocksMergeResult>> + Send + 'call {
self.merge_with_options(params, InvokeOptions::default())
}
#[doc = "Merge two adjacent paragraphs in the same story. The first paragraph keeps its pPr; the second paragraph is removed. Rejects when either paragraph carries a w:sectPr or when their numbering definitions differ."]
pub async fn merge_with_options(
&self,
params: &DocBlocksMergeBoundParams,
options: InvokeOptions,
) -> Result<DocBlocksMergeResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.blocks.merge", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.blocks.merge".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Move a paragraph within the same story to a new anchor paragraph (before or after). Cross-story and relationship-bearing moves reject with named reasons. Tracked-mode authoring emits paired `<w:moveFrom>` / `<w:moveTo>` review state with explicit move range marker identity; safe content (no comment/bookmark/permission anchors and no pre-existing tracked wrappers) is required for tracked authoring."]
pub fn move_<'call>(
&'call self,
params: &'call DocBlocksMoveBoundParams,
) -> impl std::future::Future<Output = Result<DocBlocksMoveResult>> + Send + 'call {
self.move_with_options(params, InvokeOptions::default())
}
#[doc = "Move a paragraph within the same story to a new anchor paragraph (before or after). Cross-story and relationship-bearing moves reject with named reasons. Tracked-mode authoring emits paired `<w:moveFrom>` / `<w:moveTo>` review state with explicit move range marker identity; safe content (no comment/bookmark/permission anchors and no pre-existing tracked wrappers) is required for tracked authoring."]
pub async fn move_with_options(
&self,
params: &DocBlocksMoveBoundParams,
options: InvokeOptions,
) -> Result<DocBlocksMoveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.blocks.move", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.blocks.move".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Split a paragraph at a visible-text offset, producing two paragraphs. Preserves unambiguous simple run properties around the cut. Rejects when the paragraph contains fields, content controls, drawings, equations, or unsupported tracked-change wrappers."]
pub fn split<'call>(
&'call self,
params: &'call DocBlocksSplitBoundParams,
) -> impl std::future::Future<Output = Result<DocBlocksSplitResult>> + Send + 'call {
self.split_with_options(params, InvokeOptions::default())
}
#[doc = "Split a paragraph at a visible-text offset, producing two paragraphs. Preserves unambiguous simple run properties around the cut. Rejects when the paragraph contains fields, content controls, drawings, equations, or unsupported tracked-change wrappers."]
pub async fn split_with_options(
&self,
params: &DocBlocksSplitBoundParams,
options: InvokeOptions,
) -> Result<DocBlocksSplitResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.blocks.split", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.blocks.split".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiBookmarks<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiBookmarks<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Get detailed information about a specific bookmark."]
pub fn get<'call>(
&'call self,
params: &'call DocBookmarksGetBoundParams,
) -> impl std::future::Future<Output = Result<DocBookmarksGetResult>> + Send + 'call {
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Get detailed information about a specific bookmark."]
pub async fn get_with_options(
&self,
params: &DocBookmarksGetBoundParams,
options: InvokeOptions,
) -> Result<DocBookmarksGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.bookmarks.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.bookmarks.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert a new named bookmark at a target location."]
pub fn insert<'call>(
&'call self,
params: &'call DocBookmarksInsertBoundParams,
) -> impl std::future::Future<Output = Result<DocBookmarksInsertResult>> + Send + 'call {
self.insert_with_options(params, InvokeOptions::default())
}
#[doc = "Insert a new named bookmark at a target location."]
pub async fn insert_with_options(
&self,
params: &DocBookmarksInsertBoundParams,
options: InvokeOptions,
) -> Result<DocBookmarksInsertResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.bookmarks.insert", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.bookmarks.insert".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List all bookmarks in the document."]
pub fn list<'call>(
&'call self,
params: &'call DocBookmarksListBoundParams,
) -> impl std::future::Future<Output = Result<DocBookmarksListResult>> + Send + 'call {
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List all bookmarks in the document."]
pub async fn list_with_options(
&self,
params: &DocBookmarksListBoundParams,
options: InvokeOptions,
) -> Result<DocBookmarksListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.bookmarks.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.bookmarks.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove a bookmark from the document."]
pub fn remove<'call>(
&'call self,
params: &'call DocBookmarksRemoveBoundParams,
) -> impl std::future::Future<Output = Result<DocBookmarksRemoveResult>> + Send + 'call {
self.remove_with_options(params, InvokeOptions::default())
}
#[doc = "Remove a bookmark from the document."]
pub async fn remove_with_options(
&self,
params: &DocBookmarksRemoveBoundParams,
options: InvokeOptions,
) -> Result<DocBookmarksRemoveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.bookmarks.remove", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.bookmarks.remove".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Rename an existing bookmark."]
pub fn rename<'call>(
&'call self,
params: &'call DocBookmarksRenameBoundParams,
) -> impl std::future::Future<Output = Result<DocBookmarksRenameResult>> + Send + 'call {
self.rename_with_options(params, InvokeOptions::default())
}
#[doc = "Rename an existing bookmark."]
pub async fn rename_with_options(
&self,
params: &DocBookmarksRenameBoundParams,
options: InvokeOptions,
) -> Result<DocBookmarksRenameResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.bookmarks.rename", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.bookmarks.rename".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiCapabilities<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiCapabilities<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Check an exact HTML or Markdown insert, replace, or detailed projection against the current document without mutating it."]
pub fn check<'call>(
&'call self,
params: &'call DocCapabilitiesCheckBoundParams,
) -> impl std::future::Future<Output = Result<DocCapabilitiesCheckResult>> + Send + 'call {
self.check_with_options(params, InvokeOptions::default())
}
#[doc = "Check an exact HTML or Markdown insert, replace, or detailed projection against the current document without mutating it."]
pub async fn check_with_options(
&self,
params: &DocCapabilitiesCheckBoundParams,
options: InvokeOptions,
) -> Result<DocCapabilitiesCheckResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.capabilities.check", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.capabilities.check".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Query runtime capabilities supported by the current document engine."]
pub fn get<'call>(
&'call self,
params: &'call DocCapabilitiesGetBoundParams,
) -> impl std::future::Future<Output = Result<DocCapabilitiesGetResult>> + Send + 'call {
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Query runtime capabilities supported by the current document engine."]
pub async fn get_with_options(
&self,
params: &DocCapabilitiesGetBoundParams,
options: InvokeOptions,
) -> Result<DocCapabilitiesGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.capabilities.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.capabilities.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Resolve availability, tracked-mode support, and dry-run support for one concrete operation request."]
pub fn resolve<'call>(
&'call self,
params: &'call DocCapabilitiesResolveBoundParams,
) -> impl std::future::Future<Output = Result<DocCapabilitiesResolveResult>> + Send + 'call
{
self.resolve_with_options(params, InvokeOptions::default())
}
#[doc = "Resolve availability, tracked-mode support, and dry-run support for one concrete operation request."]
pub async fn resolve_with_options(
&self,
params: &DocCapabilitiesResolveBoundParams,
options: InvokeOptions,
) -> Result<DocCapabilitiesResolveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.capabilities.resolve", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.capabilities.resolve".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiCaptions<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiCaptions<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Configure numbering format for a caption label."]
pub fn configure<'call>(
&'call self,
params: &'call DocCaptionsConfigureBoundParams,
) -> impl std::future::Future<Output = Result<DocCaptionsConfigureResult>> + Send + 'call {
self.configure_with_options(params, InvokeOptions::default())
}
#[doc = "Configure numbering format for a caption label."]
pub async fn configure_with_options(
&self,
params: &DocCaptionsConfigureBoundParams,
options: InvokeOptions,
) -> Result<DocCaptionsConfigureResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.captions.configure", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.captions.configure".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Get detailed information about a specific caption paragraph."]
pub fn get<'call>(
&'call self,
params: &'call DocCaptionsGetBoundParams,
) -> impl std::future::Future<Output = Result<DocCaptionsGetResult>> + Send + 'call {
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Get detailed information about a specific caption paragraph."]
pub async fn get_with_options(
&self,
params: &DocCaptionsGetBoundParams,
options: InvokeOptions,
) -> Result<DocCaptionsGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.captions.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.captions.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert a new caption paragraph adjacent to a target block."]
pub fn insert<'call>(
&'call self,
params: &'call DocCaptionsInsertBoundParams,
) -> impl std::future::Future<Output = Result<DocCaptionsInsertResult>> + Send + 'call {
self.insert_with_options(params, InvokeOptions::default())
}
#[doc = "Insert a new caption paragraph adjacent to a target block."]
pub async fn insert_with_options(
&self,
params: &DocCaptionsInsertBoundParams,
options: InvokeOptions,
) -> Result<DocCaptionsInsertResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.captions.insert", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.captions.insert".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List all caption paragraphs in the document."]
pub fn list<'call>(
&'call self,
params: &'call DocCaptionsListBoundParams,
) -> impl std::future::Future<Output = Result<DocCaptionsListResult>> + Send + 'call {
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List all caption paragraphs in the document."]
pub async fn list_with_options(
&self,
params: &DocCaptionsListBoundParams,
options: InvokeOptions,
) -> Result<DocCaptionsListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.captions.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.captions.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove a caption paragraph from the document."]
pub fn remove<'call>(
&'call self,
params: &'call DocCaptionsRemoveBoundParams,
) -> impl std::future::Future<Output = Result<DocCaptionsRemoveResult>> + Send + 'call {
self.remove_with_options(params, InvokeOptions::default())
}
#[doc = "Remove a caption paragraph from the document."]
pub async fn remove_with_options(
&self,
params: &DocCaptionsRemoveBoundParams,
options: InvokeOptions,
) -> Result<DocCaptionsRemoveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.captions.remove", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.captions.remove".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Append patch text to an existing caption paragraph."]
pub fn update<'call>(
&'call self,
params: &'call DocCaptionsUpdateBoundParams,
) -> impl std::future::Future<Output = Result<DocCaptionsUpdateResult>> + Send + 'call {
self.update_with_options(params, InvokeOptions::default())
}
#[doc = "Append patch text to an existing caption paragraph."]
pub async fn update_with_options(
&self,
params: &DocCaptionsUpdateBoundParams,
options: InvokeOptions,
) -> Result<DocCaptionsUpdateResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.captions.update", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.captions.update".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiCitations<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiCitations<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
pub fn bibliography(&self) -> DocApiCitationsBibliography<'a, I> {
DocApiCitationsBibliography::new(self.invoker)
}
pub fn sources(&self) -> DocApiCitationsSources<'a, I> {
DocApiCitationsSources::new(self.invoker)
}
#[doc = "Get detailed information about a specific citation mark."]
pub fn get<'call>(
&'call self,
params: &'call DocCitationsGetBoundParams,
) -> impl std::future::Future<Output = Result<DocCitationsGetResult>> + Send + 'call {
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Get detailed information about a specific citation mark."]
pub async fn get_with_options(
&self,
params: &DocCitationsGetBoundParams,
options: InvokeOptions,
) -> Result<DocCitationsGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.citations.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.citations.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert a new citation mark at a target location."]
pub fn insert<'call>(
&'call self,
params: &'call DocCitationsInsertBoundParams,
) -> impl std::future::Future<Output = Result<DocCitationsInsertResult>> + Send + 'call {
self.insert_with_options(params, InvokeOptions::default())
}
#[doc = "Insert a new citation mark at a target location."]
pub async fn insert_with_options(
&self,
params: &DocCitationsInsertBoundParams,
options: InvokeOptions,
) -> Result<DocCitationsInsertResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.citations.insert", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.citations.insert".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List all citation marks in the document."]
pub fn list<'call>(
&'call self,
params: &'call DocCitationsListBoundParams,
) -> impl std::future::Future<Output = Result<DocCitationsListResult>> + Send + 'call {
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List all citation marks in the document."]
pub async fn list_with_options(
&self,
params: &DocCitationsListBoundParams,
options: InvokeOptions,
) -> Result<DocCitationsListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.citations.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.citations.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove a citation mark from the document."]
pub fn remove<'call>(
&'call self,
params: &'call DocCitationsRemoveBoundParams,
) -> impl std::future::Future<Output = Result<DocCitationsRemoveResult>> + Send + 'call {
self.remove_with_options(params, InvokeOptions::default())
}
#[doc = "Remove a citation mark from the document."]
pub async fn remove_with_options(
&self,
params: &DocCitationsRemoveBoundParams,
options: InvokeOptions,
) -> Result<DocCitationsRemoveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.citations.remove", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.citations.remove".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Update an existing citation mark's source references."]
pub fn update<'call>(
&'call self,
params: &'call DocCitationsUpdateBoundParams,
) -> impl std::future::Future<Output = Result<DocCitationsUpdateResult>> + Send + 'call {
self.update_with_options(params, InvokeOptions::default())
}
#[doc = "Update an existing citation mark's source references."]
pub async fn update_with_options(
&self,
params: &DocCitationsUpdateBoundParams,
options: InvokeOptions,
) -> Result<DocCitationsUpdateResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.citations.update", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.citations.update".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiCitationsBibliography<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiCitationsBibliography<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Configure the bibliography style."]
pub fn configure<'call>(
&'call self,
params: &'call DocCitationsBibliographyConfigureBoundParams,
) -> impl std::future::Future<Output = Result<DocCitationsBibliographyConfigureResult>> + Send + 'call
{
self.configure_with_options(params, InvokeOptions::default())
}
#[doc = "Configure the bibliography style."]
pub async fn configure_with_options(
&self,
params: &DocCitationsBibliographyConfigureBoundParams,
options: InvokeOptions,
) -> Result<DocCitationsBibliographyConfigureResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.citations.bibliography.configure", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.citations.bibliography.configure".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Get information about the bibliography block."]
pub fn get<'call>(
&'call self,
params: &'call DocCitationsBibliographyGetBoundParams,
) -> impl std::future::Future<Output = Result<DocCitationsBibliographyGetResult>> + Send + 'call
{
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Get information about the bibliography block."]
pub async fn get_with_options(
&self,
params: &DocCitationsBibliographyGetBoundParams,
options: InvokeOptions,
) -> Result<DocCitationsBibliographyGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.citations.bibliography.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.citations.bibliography.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert a bibliography block at a target location."]
pub fn insert<'call>(
&'call self,
params: &'call DocCitationsBibliographyInsertBoundParams,
) -> impl std::future::Future<Output = Result<DocCitationsBibliographyInsertResult>> + Send + 'call
{
self.insert_with_options(params, InvokeOptions::default())
}
#[doc = "Insert a bibliography block at a target location."]
pub async fn insert_with_options(
&self,
params: &DocCitationsBibliographyInsertBoundParams,
options: InvokeOptions,
) -> Result<DocCitationsBibliographyInsertResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.citations.bibliography.insert", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.citations.bibliography.insert".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Rebuild the bibliography from current sources."]
pub fn rebuild<'call>(
&'call self,
params: &'call DocCitationsBibliographyRebuildBoundParams,
) -> impl std::future::Future<Output = Result<DocCitationsBibliographyRebuildResult>> + Send + 'call
{
self.rebuild_with_options(params, InvokeOptions::default())
}
#[doc = "Rebuild the bibliography from current sources."]
pub async fn rebuild_with_options(
&self,
params: &DocCitationsBibliographyRebuildBoundParams,
options: InvokeOptions,
) -> Result<DocCitationsBibliographyRebuildResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.citations.bibliography.rebuild", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.citations.bibliography.rebuild".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove the bibliography block from the document."]
pub fn remove<'call>(
&'call self,
params: &'call DocCitationsBibliographyRemoveBoundParams,
) -> impl std::future::Future<Output = Result<DocCitationsBibliographyRemoveResult>> + Send + 'call
{
self.remove_with_options(params, InvokeOptions::default())
}
#[doc = "Remove the bibliography block from the document."]
pub async fn remove_with_options(
&self,
params: &DocCitationsBibliographyRemoveBoundParams,
options: InvokeOptions,
) -> Result<DocCitationsBibliographyRemoveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.citations.bibliography.remove", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.citations.bibliography.remove".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiCitationsSources<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiCitationsSources<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Get detailed information about a specific citation source."]
pub fn get<'call>(
&'call self,
params: &'call DocCitationsSourcesGetBoundParams,
) -> impl std::future::Future<Output = Result<DocCitationsSourcesGetResult>> + Send + 'call
{
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Get detailed information about a specific citation source."]
pub async fn get_with_options(
&self,
params: &DocCitationsSourcesGetBoundParams,
options: InvokeOptions,
) -> Result<DocCitationsSourcesGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.citations.sources.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.citations.sources.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Register a new citation source in the document store."]
pub fn insert<'call>(
&'call self,
params: &'call DocCitationsSourcesInsertBoundParams,
) -> impl std::future::Future<Output = Result<DocCitationsSourcesInsertResult>> + Send + 'call
{
self.insert_with_options(params, InvokeOptions::default())
}
#[doc = "Register a new citation source in the document store."]
pub async fn insert_with_options(
&self,
params: &DocCitationsSourcesInsertBoundParams,
options: InvokeOptions,
) -> Result<DocCitationsSourcesInsertResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.citations.sources.insert", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.citations.sources.insert".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List all citation sources in the document store."]
pub fn list<'call>(
&'call self,
params: &'call DocCitationsSourcesListBoundParams,
) -> impl std::future::Future<Output = Result<DocCitationsSourcesListResult>> + Send + 'call
{
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List all citation sources in the document store."]
pub async fn list_with_options(
&self,
params: &DocCitationsSourcesListBoundParams,
options: InvokeOptions,
) -> Result<DocCitationsSourcesListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.citations.sources.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.citations.sources.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove a citation source from the document store."]
pub fn remove<'call>(
&'call self,
params: &'call DocCitationsSourcesRemoveBoundParams,
) -> impl std::future::Future<Output = Result<DocCitationsSourcesRemoveResult>> + Send + 'call
{
self.remove_with_options(params, InvokeOptions::default())
}
#[doc = "Remove a citation source from the document store."]
pub async fn remove_with_options(
&self,
params: &DocCitationsSourcesRemoveBoundParams,
options: InvokeOptions,
) -> Result<DocCitationsSourcesRemoveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.citations.sources.remove", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.citations.sources.remove".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Update the fields of an existing citation source."]
pub fn update<'call>(
&'call self,
params: &'call DocCitationsSourcesUpdateBoundParams,
) -> impl std::future::Future<Output = Result<DocCitationsSourcesUpdateResult>> + Send + 'call
{
self.update_with_options(params, InvokeOptions::default())
}
#[doc = "Update the fields of an existing citation source."]
pub async fn update_with_options(
&self,
params: &DocCitationsSourcesUpdateBoundParams,
options: InvokeOptions,
) -> Result<DocCitationsSourcesUpdateResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.citations.sources.update", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.citations.sources.update".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiClipboard<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiClipboard<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Insert a parsed clipboard plan, v2 fragment, or raw ClipboardPayload through the v2 pasteFragment kernel operation."]
pub fn insert<'call>(
&'call self,
params: &'call DocClipboardInsertBoundParams,
) -> impl std::future::Future<Output = Result<DocClipboardInsertResult>> + Send + 'call {
self.insert_with_options(params, InvokeOptions::default())
}
#[doc = "Insert a parsed clipboard plan, v2 fragment, or raw ClipboardPayload through the v2 pasteFragment kernel operation."]
pub async fn insert_with_options(
&self,
params: &DocClipboardInsertBoundParams,
options: InvokeOptions,
) -> Result<DocClipboardInsertResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.clipboard.insert", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.clipboard.insert".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Parse and sanitize a ClipboardPayload into a deterministic v2 clipboard insert plan with diagnostics. Does not mutate the document."]
pub fn parse<'call>(
&'call self,
params: &'call DocClipboardParseBoundParams,
) -> impl std::future::Future<Output = Result<DocClipboardParseResult>> + Send + 'call {
self.parse_with_options(params, InvokeOptions::default())
}
#[doc = "Parse and sanitize a ClipboardPayload into a deterministic v2 clipboard insert plan with diagnostics. Does not mutate the document."]
pub async fn parse_with_options(
&self,
params: &DocClipboardParseBoundParams,
options: InvokeOptions,
) -> Result<DocClipboardParseResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.clipboard.parse", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.clipboard.parse".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Serialize the current or supplied model selection into text/plain, text/html, and application/x-superdoc-v2-fragment clipboard payloads."]
pub fn serialize_selection<'call>(
&'call self,
params: &'call DocClipboardSerializeSelectionBoundParams,
) -> impl std::future::Future<Output = Result<DocClipboardSerializeSelectionResult>> + Send + 'call
{
self.serialize_selection_with_options(params, InvokeOptions::default())
}
#[doc = "Serialize the current or supplied model selection into text/plain, text/html, and application/x-superdoc-v2-fragment clipboard payloads."]
pub async fn serialize_selection_with_options(
&self,
params: &DocClipboardSerializeSelectionBoundParams,
options: InvokeOptions,
) -> Result<DocClipboardSerializeSelectionResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.clipboard.serializeSelection", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.clipboard.serializeSelection".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiComments<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiComments<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Create a new comment thread (or reply when parentCommentId is given). Accepts TextAddress / TextTarget anchors, or a TrackedChangeCommentTarget that names a logical tracked-change id. The tracked-change target accepts both the explicit kind form and the Labs-compatible trackedChangeId-only form; the adapter normalizes it to a Word-compatible content anchor on the requested revision side. Callers may supply a durable externalId, or use the v1-compatible caller-supplied commentId alias, plus author fields and arbitrary JSON metadata for integration correlation. The caller-owned id remains distinct from the generated Word-compatible commentId."]
pub fn create<'call>(
&'call self,
params: &'call DocCommentsCreateBoundParams,
) -> impl std::future::Future<Output = Result<DocCommentsCreateResult>> + Send + 'call {
self.create_with_options(params, InvokeOptions::default())
}
#[doc = "Create a new comment thread (or reply when parentCommentId is given). Accepts TextAddress / TextTarget anchors, or a TrackedChangeCommentTarget that names a logical tracked-change id. The tracked-change target accepts both the explicit kind form and the Labs-compatible trackedChangeId-only form; the adapter normalizes it to a Word-compatible content anchor on the requested revision side. Callers may supply a durable externalId, or use the v1-compatible caller-supplied commentId alias, plus author fields and arbitrary JSON metadata for integration correlation. The caller-owned id remains distinct from the generated Word-compatible commentId."]
pub async fn create_with_options(
&self,
params: &DocCommentsCreateBoundParams,
options: InvokeOptions,
) -> Result<DocCommentsCreateResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.comments.create", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.comments.create".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove the targeted comment or reply by ID. Deleting a root does not delete descendant replies."]
pub fn delete<'call>(
&'call self,
params: &'call DocCommentsDeleteBoundParams,
) -> impl std::future::Future<Output = Result<DocCommentsDeleteResult>> + Send + 'call {
self.delete_with_options(params, InvokeOptions::default())
}
#[doc = "Remove the targeted comment or reply by ID. Deleting a root does not delete descendant replies."]
pub async fn delete_with_options(
&self,
params: &DocCommentsDeleteBoundParams,
options: InvokeOptions,
) -> Result<DocCommentsDeleteResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.comments.delete", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.comments.delete".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Retrieve a single comment thread by ID."]
pub fn get<'call>(
&'call self,
params: &'call DocCommentsGetBoundParams,
) -> impl std::future::Future<Output = Result<DocCommentsGetResult>> + Send + 'call {
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Retrieve a single comment thread by ID."]
pub async fn get_with_options(
&self,
params: &DocCommentsGetBoundParams,
options: InvokeOptions,
) -> Result<DocCommentsGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.comments.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.comments.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List all comment threads in the document."]
pub fn list<'call>(
&'call self,
params: &'call DocCommentsListBoundParams,
) -> impl std::future::Future<Output = Result<DocCommentsListResult>> + Send + 'call {
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List all comment threads in the document."]
pub async fn list_with_options(
&self,
params: &DocCommentsListBoundParams,
options: InvokeOptions,
) -> Result<DocCommentsListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.comments.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.comments.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Patch exactly one field on an existing comment (`text`, `target`, `status`, or `isInternal`). The `target` branch accepts a plain TextAddress or a TrackedChangeCommentTarget, with or without `kind: \"trackedChange\"`, that names a logical tracked-change id. The legacy `isInternal` input sets or clears the `sdcom:internal` attribute for v1 backward compatibility. Multi-field patches and no-op edits are rejected with `INVALID_INPUT`; reply target / status patches are rejected with `INVALID_CONTEXT`."]
pub fn patch<'call>(
&'call self,
params: &'call DocCommentsPatchBoundParams,
) -> impl std::future::Future<Output = Result<DocCommentsPatchResult>> + Send + 'call {
self.patch_with_options(params, InvokeOptions::default())
}
#[doc = "Patch exactly one field on an existing comment (`text`, `target`, `status`, or `isInternal`). The `target` branch accepts a plain TextAddress or a TrackedChangeCommentTarget, with or without `kind: \"trackedChange\"`, that names a logical tracked-change id. The legacy `isInternal` input sets or clears the `sdcom:internal` attribute for v1 backward compatibility. Multi-field patches and no-op edits are rejected with `INVALID_INPUT`; reply target / status patches are rejected with `INVALID_CONTEXT`."]
pub async fn patch_with_options(
&self,
params: &DocCommentsPatchBoundParams,
options: InvokeOptions,
) -> Result<DocCommentsPatchResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.comments.patch", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.comments.patch".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiContentControls<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiContentControls<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
pub fn checkbox(&self) -> DocApiContentControlsCheckbox<'a, I> {
DocApiContentControlsCheckbox::new(self.invoker)
}
pub fn choice_list(&self) -> DocApiContentControlsChoiceList<'a, I> {
DocApiContentControlsChoiceList::new(self.invoker)
}
pub fn date(&self) -> DocApiContentControlsDate<'a, I> {
DocApiContentControlsDate::new(self.invoker)
}
pub fn group(&self) -> DocApiContentControlsGroup<'a, I> {
DocApiContentControlsGroup::new(self.invoker)
}
pub fn repeating_section(&self) -> DocApiContentControlsRepeatingSection<'a, I> {
DocApiContentControlsRepeatingSection::new(self.invoker)
}
pub fn text(&self) -> DocApiContentControlsText<'a, I> {
DocApiContentControlsText::new(self.invoker)
}
#[doc = "Append content to the end of a content control."]
pub fn append_content<'call>(
&'call self,
params: &'call DocContentControlsAppendContentBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsAppendContentResult>> + Send + 'call
{
self.append_content_with_options(params, InvokeOptions::default())
}
#[doc = "Append content to the end of a content control."]
pub async fn append_content_with_options(
&self,
params: &DocContentControlsAppendContentBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsAppendContentResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.appendContent", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.appendContent".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove data binding metadata from a content control."]
pub fn clear_binding<'call>(
&'call self,
params: &'call DocContentControlsClearBindingBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsClearBindingResult>> + Send + 'call
{
self.clear_binding_with_options(params, InvokeOptions::default())
}
#[doc = "Remove data binding metadata from a content control."]
pub async fn clear_binding_with_options(
&self,
params: &DocContentControlsClearBindingBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsClearBindingResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.clearBinding", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.clearBinding".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Clear all content inside a content control, leaving it empty."]
pub fn clear_content<'call>(
&'call self,
params: &'call DocContentControlsClearContentBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsClearContentResult>> + Send + 'call
{
self.clear_content_with_options(params, InvokeOptions::default())
}
#[doc = "Clear all content inside a content control, leaving it empty."]
pub async fn clear_content_with_options(
&self,
params: &DocContentControlsClearContentBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsClearContentResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.clearContent", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.clearContent".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Copy a content control to a destination position. Copied SDTs receive new IDs."]
pub fn copy<'call>(
&'call self,
params: &'call DocContentControlsCopyBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsCopyResult>> + Send + 'call
{
self.copy_with_options(params, InvokeOptions::default())
}
#[doc = "Copy a content control to a destination position. Copied SDTs receive new IDs."]
pub async fn copy_with_options(
&self,
params: &DocContentControlsCopyBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsCopyResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.copy", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.copy".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Delete a content control and its content. Set overrideDeletionLock to remove a deletion-locked target without first unlocking it."]
pub fn delete<'call>(
&'call self,
params: &'call DocContentControlsDeleteBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsDeleteResult>> + Send + 'call
{
self.delete_with_options(params, InvokeOptions::default())
}
#[doc = "Delete a content control and its content. Set overrideDeletionLock to remove a deletion-locked target without first unlocking it."]
pub async fn delete_with_options(
&self,
params: &DocContentControlsDeleteBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsDeleteResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.delete", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.delete".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Retrieve a single content control by target."]
pub fn get<'call>(
&'call self,
params: &'call DocContentControlsGetBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsGetResult>> + Send + 'call {
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Retrieve a single content control by target."]
pub async fn get_with_options(
&self,
params: &DocContentControlsGetBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Get the data binding metadata (w:dataBinding) of a content control."]
pub fn get_binding<'call>(
&'call self,
params: &'call DocContentControlsGetBindingBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsGetBindingResult>> + Send + 'call
{
self.get_binding_with_options(params, InvokeOptions::default())
}
#[doc = "Get the data binding metadata (w:dataBinding) of a content control."]
pub async fn get_binding_with_options(
&self,
params: &DocContentControlsGetBindingBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsGetBindingResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.getBinding", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.getBinding".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Get the text content of a content control."]
pub fn get_content<'call>(
&'call self,
params: &'call DocContentControlsGetContentBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsGetContentResult>> + Send + 'call
{
self.get_content_with_options(params, InvokeOptions::default())
}
#[doc = "Get the text content of a content control."]
pub async fn get_content_with_options(
&self,
params: &DocContentControlsGetContentBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsGetContentResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.getContent", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.getContent".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Get the parent content control of the target, if any."]
pub fn get_parent<'call>(
&'call self,
params: &'call DocContentControlsGetParentBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsGetParentResult>> + Send + 'call
{
self.get_parent_with_options(params, InvokeOptions::default())
}
#[doc = "Get the parent content control of the target, if any."]
pub async fn get_parent_with_options(
&self,
params: &DocContentControlsGetParentBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsGetParentResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.getParent", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.getParent".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Get the raw sdtPr properties of a content control as a passthrough hash."]
pub fn get_raw_properties<'call>(
&'call self,
params: &'call DocContentControlsGetRawPropertiesBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsGetRawPropertiesResult>> + Send + 'call
{
self.get_raw_properties_with_options(params, InvokeOptions::default())
}
#[doc = "Get the raw sdtPr properties of a content control as a passthrough hash."]
pub async fn get_raw_properties_with_options(
&self,
params: &DocContentControlsGetRawPropertiesBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsGetRawPropertiesResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.getRawProperties", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.getRawProperties".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert content immediately after a content control."]
pub fn insert_after<'call>(
&'call self,
params: &'call DocContentControlsInsertAfterBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsInsertAfterResult>> + Send + 'call
{
self.insert_after_with_options(params, InvokeOptions::default())
}
#[doc = "Insert content immediately after a content control."]
pub async fn insert_after_with_options(
&self,
params: &DocContentControlsInsertAfterBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsInsertAfterResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.insertAfter", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.insertAfter".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert content immediately before a content control."]
pub fn insert_before<'call>(
&'call self,
params: &'call DocContentControlsInsertBeforeBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsInsertBeforeResult>> + Send + 'call
{
self.insert_before_with_options(params, InvokeOptions::default())
}
#[doc = "Insert content immediately before a content control."]
pub async fn insert_before_with_options(
&self,
params: &DocContentControlsInsertBeforeBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsInsertBeforeResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.insertBefore", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.insertBefore".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List all content controls in the document with optional type/tag filtering."]
pub fn list<'call>(
&'call self,
params: &'call DocContentControlsListBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsListResult>> + Send + 'call
{
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List all content controls in the document with optional type/tag filtering."]
pub async fn list_with_options(
&self,
params: &DocContentControlsListBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List direct child content controls nested inside the target."]
pub fn list_children<'call>(
&'call self,
params: &'call DocContentControlsListChildrenBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsListChildrenResult>> + Send + 'call
{
self.list_children_with_options(params, InvokeOptions::default())
}
#[doc = "List direct child content controls nested inside the target."]
pub async fn list_children_with_options(
&self,
params: &DocContentControlsListChildrenBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsListChildrenResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.listChildren", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.listChildren".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List content controls within a block range."]
pub fn list_in_range<'call>(
&'call self,
params: &'call DocContentControlsListInRangeBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsListInRangeResult>> + Send + 'call
{
self.list_in_range_with_options(params, InvokeOptions::default())
}
#[doc = "List content controls within a block range."]
pub async fn list_in_range_with_options(
&self,
params: &DocContentControlsListInRangeBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsListInRangeResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.listInRange", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.listInRange".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Move a content control to a new position: before or after another SDT, to the document start or end, or to an arbitrary caret inside a paragraph (the inParagraph destination) for drag-and-drop. Direct moves preserve the original ID; tracked-mode authoring supports safe top-level block SDTs (SDT-to-SDT destinations only) and remaps the destination SDT ID to avoid duplicate live anchors."]
pub fn move_<'call>(
&'call self,
params: &'call DocContentControlsMoveBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsMoveResult>> + Send + 'call
{
self.move_with_options(params, InvokeOptions::default())
}
#[doc = "Move a content control to a new position: before or after another SDT, to the document start or end, or to an arbitrary caret inside a paragraph (the inParagraph destination) for drag-and-drop. Direct moves preserve the original ID; tracked-mode authoring supports safe top-level block SDTs (SDT-to-SDT destinations only) and remaps the destination SDT ID to avoid duplicate live anchors."]
pub async fn move_with_options(
&self,
params: &DocContentControlsMoveBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsMoveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.move", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.move".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Normalize a content control tag between plain-string and JSON-encoded formats."]
pub fn normalize_tag_payload<'call>(
&'call self,
params: &'call DocContentControlsNormalizeTagPayloadBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsNormalizeTagPayloadResult>>
+ Send
+ 'call {
self.normalize_tag_payload_with_options(params, InvokeOptions::default())
}
#[doc = "Normalize a content control tag between plain-string and JSON-encoded formats."]
pub async fn normalize_tag_payload_with_options(
&self,
params: &DocContentControlsNormalizeTagPayloadBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsNormalizeTagPayloadResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.normalizeTagPayload", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.normalizeTagPayload".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Normalize a content control to resolve Word compatibility issues."]
pub fn normalize_word_compatibility<'call>(
&'call self,
params: &'call DocContentControlsNormalizeWordCompatibilityBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsNormalizeWordCompatibilityResult>>
+ Send
+ 'call {
self.normalize_word_compatibility_with_options(params, InvokeOptions::default())
}
#[doc = "Normalize a content control to resolve Word compatibility issues."]
pub async fn normalize_word_compatibility_with_options(
&self,
params: &DocContentControlsNormalizeWordCompatibilityBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsNormalizeWordCompatibilityResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke(
"doc.contentControls.normalizeWordCompatibility",
params,
options,
)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.normalizeWordCompatibility".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Patch metadata properties on a content control (tag, alias, appearance, color, etc.). V2 does not support placeholder or showingPlaceholder; defining either field rejects the entire patch without changing properties or content."]
pub fn patch<'call>(
&'call self,
params: &'call DocContentControlsPatchBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsPatchResult>> + Send + 'call
{
self.patch_with_options(params, InvokeOptions::default())
}
#[doc = "Patch metadata properties on a content control (tag, alias, appearance, color, etc.). V2 does not support placeholder or showingPlaceholder; defining either field rejects the entire patch without changing properties or content."]
pub async fn patch_with_options(
&self,
params: &DocContentControlsPatchBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsPatchResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.patch", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.patch".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Apply raw XML-level patches to the sdtPr subtree of a content control."]
pub fn patch_raw_properties<'call>(
&'call self,
params: &'call DocContentControlsPatchRawPropertiesBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsPatchRawPropertiesResult>>
+ Send
+ 'call {
self.patch_raw_properties_with_options(params, InvokeOptions::default())
}
#[doc = "Apply raw XML-level patches to the sdtPr subtree of a content control."]
pub async fn patch_raw_properties_with_options(
&self,
params: &DocContentControlsPatchRawPropertiesBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsPatchRawPropertiesResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.patchRawProperties", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.patchRawProperties".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Prepend content to the beginning of a content control."]
pub fn prepend_content<'call>(
&'call self,
params: &'call DocContentControlsPrependContentBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsPrependContentResult>> + Send + 'call
{
self.prepend_content_with_options(params, InvokeOptions::default())
}
#[doc = "Prepend content to the beginning of a content control."]
pub async fn prepend_content_with_options(
&self,
params: &DocContentControlsPrependContentBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsPrependContentResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.prependContent", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.prependContent".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Replace the entire content of a content control. For direct V2 edits, overrideContentLock replaces locked content in one history entry while preserving the target lock and identity."]
pub fn replace_content<'call>(
&'call self,
params: &'call DocContentControlsReplaceContentBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsReplaceContentResult>> + Send + 'call
{
self.replace_content_with_options(params, InvokeOptions::default())
}
#[doc = "Replace the entire content of a content control. For direct V2 edits, overrideContentLock replaces locked content in one history entry while preserving the target lock and identity."]
pub async fn replace_content_with_options(
&self,
params: &DocContentControlsReplaceContentBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsReplaceContentResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.replaceContent", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.replaceContent".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Select content controls matching a specific tag value."]
pub fn select_by_tag<'call>(
&'call self,
params: &'call DocContentControlsSelectByTagBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsSelectByTagResult>> + Send + 'call
{
self.select_by_tag_with_options(params, InvokeOptions::default())
}
#[doc = "Select content controls matching a specific tag value."]
pub async fn select_by_tag_with_options(
&self,
params: &DocContentControlsSelectByTagBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsSelectByTagResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.selectByTag", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.selectByTag".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Select content controls matching a specific title (alias) value."]
pub fn select_by_title<'call>(
&'call self,
params: &'call DocContentControlsSelectByTitleBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsSelectByTitleResult>> + Send + 'call
{
self.select_by_title_with_options(params, InvokeOptions::default())
}
#[doc = "Select content controls matching a specific title (alias) value."]
pub async fn select_by_title_with_options(
&self,
params: &DocContentControlsSelectByTitleBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsSelectByTitleResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.selectByTitle", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.selectByTitle".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set data binding metadata on a content control."]
pub fn set_binding<'call>(
&'call self,
params: &'call DocContentControlsSetBindingBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsSetBindingResult>> + Send + 'call
{
self.set_binding_with_options(params, InvokeOptions::default())
}
#[doc = "Set data binding metadata on a content control."]
pub async fn set_binding_with_options(
&self,
params: &DocContentControlsSetBindingBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsSetBindingResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.setBinding", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.setBinding".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the lock mode on a content control. In non-collaborative V2 sessions, addToHistory: false excludes this lock change while retaining the lock across Undo/Redo."]
pub fn set_lock_mode<'call>(
&'call self,
params: &'call DocContentControlsSetLockModeBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsSetLockModeResult>> + Send + 'call
{
self.set_lock_mode_with_options(params, InvokeOptions::default())
}
#[doc = "Set the lock mode on a content control. In non-collaborative V2 sessions, addToHistory: false excludes this lock change while retaining the lock across Undo/Redo."]
pub async fn set_lock_mode_with_options(
&self,
params: &DocContentControlsSetLockModeBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsSetLockModeResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.setLockMode", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.setLockMode".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Transition a content control to a different semantic type. Metadata-only; no implicit content rewrite."]
pub fn set_type<'call>(
&'call self,
params: &'call DocContentControlsSetTypeBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsSetTypeResult>> + Send + 'call
{
self.set_type_with_options(params, InvokeOptions::default())
}
#[doc = "Transition a content control to a different semantic type. Metadata-only; no implicit content rewrite."]
pub async fn set_type_with_options(
&self,
params: &DocContentControlsSetTypeBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsSetTypeResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.setType", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.setType".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove the content control wrapper, preserving its content in place."]
pub fn unwrap<'call>(
&'call self,
params: &'call DocContentControlsUnwrapBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsUnwrapResult>> + Send + 'call
{
self.unwrap_with_options(params, InvokeOptions::default())
}
#[doc = "Remove the content control wrapper, preserving its content in place."]
pub async fn unwrap_with_options(
&self,
params: &DocContentControlsUnwrapBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsUnwrapResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.unwrap", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.unwrap".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Validate a content control for Word compatibility issues."]
pub fn validate_word_compatibility<'call>(
&'call self,
params: &'call DocContentControlsValidateWordCompatibilityBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsValidateWordCompatibilityResult>>
+ Send
+ 'call {
self.validate_word_compatibility_with_options(params, InvokeOptions::default())
}
#[doc = "Validate a content control for Word compatibility issues."]
pub async fn validate_word_compatibility_with_options(
&self,
params: &DocContentControlsValidateWordCompatibilityBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsValidateWordCompatibilityResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke(
"doc.contentControls.validateWordCompatibility",
params,
options,
)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.validateWordCompatibility".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Wrap existing content with a new content control."]
pub fn wrap<'call>(
&'call self,
params: &'call DocContentControlsWrapBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsWrapResult>> + Send + 'call
{
self.wrap_with_options(params, InvokeOptions::default())
}
#[doc = "Wrap existing content with a new content control."]
pub async fn wrap_with_options(
&self,
params: &DocContentControlsWrapBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsWrapResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.wrap", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.wrap".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiContentControlsCheckbox<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiContentControlsCheckbox<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Get the checked state of a checkbox content control."]
pub fn get_state<'call>(
&'call self,
params: &'call DocContentControlsCheckboxGetStateBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsCheckboxGetStateResult>> + Send + 'call
{
self.get_state_with_options(params, InvokeOptions::default())
}
#[doc = "Get the checked state of a checkbox content control."]
pub async fn get_state_with_options(
&self,
params: &DocContentControlsCheckboxGetStateBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsCheckboxGetStateResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.checkbox.getState", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.checkbox.getState".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the checked state of a checkbox content control."]
pub fn set_state<'call>(
&'call self,
params: &'call DocContentControlsCheckboxSetStateBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsCheckboxSetStateResult>> + Send + 'call
{
self.set_state_with_options(params, InvokeOptions::default())
}
#[doc = "Set the checked state of a checkbox content control."]
pub async fn set_state_with_options(
&self,
params: &DocContentControlsCheckboxSetStateBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsCheckboxSetStateResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.checkbox.setState", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.checkbox.setState".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the checked and unchecked symbol glyphs for a checkbox content control."]
pub fn set_symbol_pair<'call>(
&'call self,
params: &'call DocContentControlsCheckboxSetSymbolPairBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsCheckboxSetSymbolPairResult>>
+ Send
+ 'call {
self.set_symbol_pair_with_options(params, InvokeOptions::default())
}
#[doc = "Set the checked and unchecked symbol glyphs for a checkbox content control."]
pub async fn set_symbol_pair_with_options(
&self,
params: &DocContentControlsCheckboxSetSymbolPairBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsCheckboxSetSymbolPairResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke(
"doc.contentControls.checkbox.setSymbolPair",
params,
options,
)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.checkbox.setSymbolPair".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Toggle the checked state of a checkbox content control."]
pub fn toggle<'call>(
&'call self,
params: &'call DocContentControlsCheckboxToggleBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsCheckboxToggleResult>> + Send + 'call
{
self.toggle_with_options(params, InvokeOptions::default())
}
#[doc = "Toggle the checked state of a checkbox content control."]
pub async fn toggle_with_options(
&self,
params: &DocContentControlsCheckboxToggleBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsCheckboxToggleResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.checkbox.toggle", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.checkbox.toggle".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiContentControlsChoiceList<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiContentControlsChoiceList<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Get the list items and selected value of a comboBox or dropDownList content control."]
pub fn get_items<'call>(
&'call self,
params: &'call DocContentControlsChoiceListGetItemsBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsChoiceListGetItemsResult>>
+ Send
+ 'call {
self.get_items_with_options(params, InvokeOptions::default())
}
#[doc = "Get the list items and selected value of a comboBox or dropDownList content control."]
pub async fn get_items_with_options(
&self,
params: &DocContentControlsChoiceListGetItemsBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsChoiceListGetItemsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.choiceList.getItems", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.choiceList.getItems".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Replace the list items of a comboBox or dropDownList content control."]
pub fn set_items<'call>(
&'call self,
params: &'call DocContentControlsChoiceListSetItemsBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsChoiceListSetItemsResult>>
+ Send
+ 'call {
self.set_items_with_options(params, InvokeOptions::default())
}
#[doc = "Replace the list items of a comboBox or dropDownList content control."]
pub async fn set_items_with_options(
&self,
params: &DocContentControlsChoiceListSetItemsBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsChoiceListSetItemsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.choiceList.setItems", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.choiceList.setItems".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the selected value of a comboBox or dropDownList content control."]
pub fn set_selected<'call>(
&'call self,
params: &'call DocContentControlsChoiceListSetSelectedBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsChoiceListSetSelectedResult>>
+ Send
+ 'call {
self.set_selected_with_options(params, InvokeOptions::default())
}
#[doc = "Set the selected value of a comboBox or dropDownList content control."]
pub async fn set_selected_with_options(
&self,
params: &DocContentControlsChoiceListSetSelectedBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsChoiceListSetSelectedResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke(
"doc.contentControls.choiceList.setSelected",
params,
options,
)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.choiceList.setSelected".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiContentControlsDate<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiContentControlsDate<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Clear the date value of a date content control."]
pub fn clear_value<'call>(
&'call self,
params: &'call DocContentControlsDateClearValueBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsDateClearValueResult>> + Send + 'call
{
self.clear_value_with_options(params, InvokeOptions::default())
}
#[doc = "Clear the date value of a date content control."]
pub async fn clear_value_with_options(
&self,
params: &DocContentControlsDateClearValueBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsDateClearValueResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.date.clearValue", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.date.clearValue".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the calendar type for a date content control."]
pub fn set_calendar<'call>(
&'call self,
params: &'call DocContentControlsDateSetCalendarBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsDateSetCalendarResult>> + Send + 'call
{
self.set_calendar_with_options(params, InvokeOptions::default())
}
#[doc = "Set the calendar type for a date content control."]
pub async fn set_calendar_with_options(
&self,
params: &DocContentControlsDateSetCalendarBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsDateSetCalendarResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.date.setCalendar", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.date.setCalendar".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the display format string for a date content control."]
pub fn set_display_format<'call>(
&'call self,
params: &'call DocContentControlsDateSetDisplayFormatBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsDateSetDisplayFormatResult>>
+ Send
+ 'call {
self.set_display_format_with_options(params, InvokeOptions::default())
}
#[doc = "Set the display format string for a date content control."]
pub async fn set_display_format_with_options(
&self,
params: &DocContentControlsDateSetDisplayFormatBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsDateSetDisplayFormatResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.date.setDisplayFormat", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.date.setDisplayFormat".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the display locale for a date content control."]
pub fn set_display_locale<'call>(
&'call self,
params: &'call DocContentControlsDateSetDisplayLocaleBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsDateSetDisplayLocaleResult>>
+ Send
+ 'call {
self.set_display_locale_with_options(params, InvokeOptions::default())
}
#[doc = "Set the display locale for a date content control."]
pub async fn set_display_locale_with_options(
&self,
params: &DocContentControlsDateSetDisplayLocaleBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsDateSetDisplayLocaleResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.date.setDisplayLocale", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.date.setDisplayLocale".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the XML storage format for a date content control."]
pub fn set_storage_format<'call>(
&'call self,
params: &'call DocContentControlsDateSetStorageFormatBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsDateSetStorageFormatResult>>
+ Send
+ 'call {
self.set_storage_format_with_options(params, InvokeOptions::default())
}
#[doc = "Set the XML storage format for a date content control."]
pub async fn set_storage_format_with_options(
&self,
params: &DocContentControlsDateSetStorageFormatBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsDateSetStorageFormatResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.date.setStorageFormat", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.date.setStorageFormat".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the date value of a date content control."]
pub fn set_value<'call>(
&'call self,
params: &'call DocContentControlsDateSetValueBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsDateSetValueResult>> + Send + 'call
{
self.set_value_with_options(params, InvokeOptions::default())
}
#[doc = "Set the date value of a date content control."]
pub async fn set_value_with_options(
&self,
params: &DocContentControlsDateSetValueBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsDateSetValueResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.date.setValue", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.date.setValue".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiContentControlsGroup<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiContentControlsGroup<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Remove the group designation from a group content control."]
pub fn ungroup<'call>(
&'call self,
params: &'call DocContentControlsGroupUngroupBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsGroupUngroupResult>> + Send + 'call
{
self.ungroup_with_options(params, InvokeOptions::default())
}
#[doc = "Remove the group designation from a group content control."]
pub async fn ungroup_with_options(
&self,
params: &DocContentControlsGroupUngroupBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsGroupUngroupResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.group.ungroup", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.group.ungroup".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Wrap a content control inside a new group content control. Always nests; not idempotent."]
pub fn wrap<'call>(
&'call self,
params: &'call DocContentControlsGroupWrapBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsGroupWrapResult>> + Send + 'call
{
self.wrap_with_options(params, InvokeOptions::default())
}
#[doc = "Wrap a content control inside a new group content control. Always nests; not idempotent."]
pub async fn wrap_with_options(
&self,
params: &DocContentControlsGroupWrapBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsGroupWrapResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.group.wrap", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.group.wrap".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiContentControlsRepeatingSection<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiContentControlsRepeatingSection<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Clone a repeating section item at the given index. Cloned SDTs receive new IDs."]
pub fn clone_item<'call>(
&'call self,
params: &'call DocContentControlsRepeatingSectionCloneItemBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsRepeatingSectionCloneItemResult>>
+ Send
+ 'call {
self.clone_item_with_options(params, InvokeOptions::default())
}
#[doc = "Clone a repeating section item at the given index. Cloned SDTs receive new IDs."]
pub async fn clone_item_with_options(
&self,
params: &DocContentControlsRepeatingSectionCloneItemBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsRepeatingSectionCloneItemResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke(
"doc.contentControls.repeatingSection.cloneItem",
params,
options,
)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.repeatingSection.cloneItem".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Delete a repeating section item at the given index."]
pub fn delete_item<'call>(
&'call self,
params: &'call DocContentControlsRepeatingSectionDeleteItemBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsRepeatingSectionDeleteItemResult>>
+ Send
+ 'call {
self.delete_item_with_options(params, InvokeOptions::default())
}
#[doc = "Delete a repeating section item at the given index."]
pub async fn delete_item_with_options(
&self,
params: &DocContentControlsRepeatingSectionDeleteItemBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsRepeatingSectionDeleteItemResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke(
"doc.contentControls.repeatingSection.deleteItem",
params,
options,
)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.repeatingSection.deleteItem".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert a new item after a specific index in a repeating section."]
pub fn insert_item_after<'call>(
&'call self,
params: &'call DocContentControlsRepeatingSectionInsertItemAfterBoundParams,
) -> impl std::future::Future<
Output = Result<DocContentControlsRepeatingSectionInsertItemAfterResult>,
> + Send
+ 'call {
self.insert_item_after_with_options(params, InvokeOptions::default())
}
#[doc = "Insert a new item after a specific index in a repeating section."]
pub async fn insert_item_after_with_options(
&self,
params: &DocContentControlsRepeatingSectionInsertItemAfterBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsRepeatingSectionInsertItemAfterResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke(
"doc.contentControls.repeatingSection.insertItemAfter",
params,
options,
)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id =
Some("doc.contentControls.repeatingSection.insertItemAfter".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert a new item before a specific index in a repeating section."]
pub fn insert_item_before<'call>(
&'call self,
params: &'call DocContentControlsRepeatingSectionInsertItemBeforeBoundParams,
) -> impl std::future::Future<
Output = Result<DocContentControlsRepeatingSectionInsertItemBeforeResult>,
> + Send
+ 'call {
self.insert_item_before_with_options(params, InvokeOptions::default())
}
#[doc = "Insert a new item before a specific index in a repeating section."]
pub async fn insert_item_before_with_options(
&self,
params: &DocContentControlsRepeatingSectionInsertItemBeforeBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsRepeatingSectionInsertItemBeforeResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke(
"doc.contentControls.repeatingSection.insertItemBefore",
params,
options,
)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id =
Some("doc.contentControls.repeatingSection.insertItemBefore".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List the repeating section items inside a repeating section content control."]
pub fn list_items<'call>(
&'call self,
params: &'call DocContentControlsRepeatingSectionListItemsBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsRepeatingSectionListItemsResult>>
+ Send
+ 'call {
self.list_items_with_options(params, InvokeOptions::default())
}
#[doc = "List the repeating section items inside a repeating section content control."]
pub async fn list_items_with_options(
&self,
params: &DocContentControlsRepeatingSectionListItemsBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsRepeatingSectionListItemsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke(
"doc.contentControls.repeatingSection.listItems",
params,
options,
)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.repeatingSection.listItems".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the allowInsertDelete flag on a repeating section."]
pub fn set_allow_insert_delete<'call>(
&'call self,
params: &'call DocContentControlsRepeatingSectionSetAllowInsertDeleteBoundParams,
) -> impl std::future::Future<
Output = Result<DocContentControlsRepeatingSectionSetAllowInsertDeleteResult>,
> + Send
+ 'call {
self.set_allow_insert_delete_with_options(params, InvokeOptions::default())
}
#[doc = "Set the allowInsertDelete flag on a repeating section."]
pub async fn set_allow_insert_delete_with_options(
&self,
params: &DocContentControlsRepeatingSectionSetAllowInsertDeleteBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsRepeatingSectionSetAllowInsertDeleteResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke(
"doc.contentControls.repeatingSection.setAllowInsertDelete",
params,
options,
)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id =
Some("doc.contentControls.repeatingSection.setAllowInsertDelete".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiContentControlsText<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiContentControlsText<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Clear the text value of a plain-text content control."]
pub fn clear_value<'call>(
&'call self,
params: &'call DocContentControlsTextClearValueBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsTextClearValueResult>> + Send + 'call
{
self.clear_value_with_options(params, InvokeOptions::default())
}
#[doc = "Clear the text value of a plain-text content control."]
pub async fn clear_value_with_options(
&self,
params: &DocContentControlsTextClearValueBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsTextClearValueResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.text.clearValue", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.text.clearValue".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the multiline attribute on a plain-text content control."]
pub fn set_multiline<'call>(
&'call self,
params: &'call DocContentControlsTextSetMultilineBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsTextSetMultilineResult>> + Send + 'call
{
self.set_multiline_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the multiline attribute on a plain-text content control."]
pub async fn set_multiline_with_options(
&self,
params: &DocContentControlsTextSetMultilineBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsTextSetMultilineResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.text.setMultiline", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.text.setMultiline".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the text value of a plain-text content control."]
pub fn set_value<'call>(
&'call self,
params: &'call DocContentControlsTextSetValueBoundParams,
) -> impl std::future::Future<Output = Result<DocContentControlsTextSetValueResult>> + Send + 'call
{
self.set_value_with_options(params, InvokeOptions::default())
}
#[doc = "Set the text value of a plain-text content control."]
pub async fn set_value_with_options(
&self,
params: &DocContentControlsTextSetValueBoundParams,
options: InvokeOptions,
) -> Result<DocContentControlsTextSetValueResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.contentControls.text.setValue", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.contentControls.text.setValue".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiCreate<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiCreate<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Create a new content control (SDT) in the document, optionally seeded with plain text or structured block preset content. Inline plain-text creation at a selection inherits the document run formatting at the caret or first selected character when inline is omitted; pending browser caret overrides are excluded. To include pending overrides, capture format.readSelection({ selection: \"current\" }) and pass its uniform values through inline. An explicit inline payload supplies fontFamily, fontSize, bold, italic, underline and strike values instead, with unspecified properties inheriting from the destination paragraph. It requires explicit content and commits formatting, content, tag and lockMode in one undoable operation. If inherited formatting cannot be resolved, creation returns CAPABILITY_UNAVAILABLE without changing the document or history; pass explicit inline values to bypass automatic inheritance."]
pub fn content_control<'call>(
&'call self,
params: &'call DocCreateContentControlBoundParams,
) -> impl std::future::Future<Output = Result<DocCreateContentControlResult>> + Send + 'call
{
self.content_control_with_options(params, InvokeOptions::default())
}
#[doc = "Create a new content control (SDT) in the document, optionally seeded with plain text or structured block preset content. Inline plain-text creation at a selection inherits the document run formatting at the caret or first selected character when inline is omitted; pending browser caret overrides are excluded. To include pending overrides, capture format.readSelection({ selection: \"current\" }) and pass its uniform values through inline. An explicit inline payload supplies fontFamily, fontSize, bold, italic, underline and strike values instead, with unspecified properties inheriting from the destination paragraph. It requires explicit content and commits formatting, content, tag and lockMode in one undoable operation. If inherited formatting cannot be resolved, creation returns CAPABILITY_UNAVAILABLE without changing the document or history; pass explicit inline values to bypass automatic inheritance."]
pub async fn content_control_with_options(
&self,
params: &DocCreateContentControlBoundParams,
options: InvokeOptions,
) -> Result<DocCreateContentControlResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.create.contentControl", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.create.contentControl".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Create a new heading at the target position."]
pub fn heading<'call>(
&'call self,
params: &'call DocCreateHeadingBoundParams,
) -> impl std::future::Future<Output = Result<DocCreateHeadingResult>> + Send + 'call {
self.heading_with_options(params, InvokeOptions::default())
}
#[doc = "Create a new heading at the target position."]
pub async fn heading_with_options(
&self,
params: &DocCreateHeadingBoundParams,
options: InvokeOptions,
) -> Result<DocCreateHeadingResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.create.heading", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.create.heading".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert a new image at the target position."]
pub fn image<'call>(
&'call self,
params: &'call DocCreateImageBoundParams,
) -> impl std::future::Future<Output = Result<DocCreateImageResult>> + Send + 'call {
self.image_with_options(params, InvokeOptions::default())
}
#[doc = "Insert a new image at the target position."]
pub async fn image_with_options(
&self,
params: &DocCreateImageBoundParams,
options: InvokeOptions,
) -> Result<DocCreateImageResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.create.image", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.create.image".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Create a standalone paragraph at the target position. To add a list item, use lists.insert instead."]
pub fn paragraph<'call>(
&'call self,
params: &'call DocCreateParagraphBoundParams,
) -> impl std::future::Future<Output = Result<DocCreateParagraphResult>> + Send + 'call {
self.paragraph_with_options(params, InvokeOptions::default())
}
#[doc = "Create a standalone paragraph at the target position. To add a list item, use lists.insert instead."]
pub async fn paragraph_with_options(
&self,
params: &DocCreateParagraphBoundParams,
options: InvokeOptions,
) -> Result<DocCreateParagraphResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.create.paragraph", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.create.paragraph".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Create a section break at the target location with optional initial section properties."]
pub fn section_break<'call>(
&'call self,
params: &'call DocCreateSectionBreakBoundParams,
) -> impl std::future::Future<Output = Result<DocCreateSectionBreakResult>> + Send + 'call {
self.section_break_with_options(params, InvokeOptions::default())
}
#[doc = "Create a section break at the target location with optional initial section properties."]
pub async fn section_break_with_options(
&self,
params: &DocCreateSectionBreakBoundParams,
options: InvokeOptions,
) -> Result<DocCreateSectionBreakResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.create.sectionBreak", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.create.sectionBreak".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Create a new table at the target position."]
pub fn table<'call>(
&'call self,
params: &'call DocCreateTableBoundParams,
) -> impl std::future::Future<Output = Result<DocCreateTableResult>> + Send + 'call {
self.table_with_options(params, InvokeOptions::default())
}
#[doc = "Create a new table at the target position."]
pub async fn table_with_options(
&self,
params: &DocCreateTableBoundParams,
options: InvokeOptions,
) -> Result<DocCreateTableResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.create.table", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.create.table".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert a new table of contents at the target position."]
pub fn table_of_contents<'call>(
&'call self,
params: &'call DocCreateTableOfContentsBoundParams,
) -> impl std::future::Future<Output = Result<DocCreateTableOfContentsResult>> + Send + 'call
{
self.table_of_contents_with_options(params, InvokeOptions::default())
}
#[doc = "Insert a new table of contents at the target position."]
pub async fn table_of_contents_with_options(
&self,
params: &DocCreateTableOfContentsBoundParams,
options: InvokeOptions,
) -> Result<DocCreateTableOfContentsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.create.tableOfContents", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.create.tableOfContents".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiCrossRefs<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiCrossRefs<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Get detailed information about a specific cross-reference field."]
pub fn get<'call>(
&'call self,
params: &'call DocCrossRefsGetBoundParams,
) -> impl std::future::Future<Output = Result<DocCrossRefsGetResult>> + Send + 'call {
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Get detailed information about a specific cross-reference field."]
pub async fn get_with_options(
&self,
params: &DocCrossRefsGetBoundParams,
options: InvokeOptions,
) -> Result<DocCrossRefsGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.crossRefs.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.crossRefs.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert a new cross-reference field at a target location."]
pub fn insert<'call>(
&'call self,
params: &'call DocCrossRefsInsertBoundParams,
) -> impl std::future::Future<Output = Result<DocCrossRefsInsertResult>> + Send + 'call {
self.insert_with_options(params, InvokeOptions::default())
}
#[doc = "Insert a new cross-reference field at a target location."]
pub async fn insert_with_options(
&self,
params: &DocCrossRefsInsertBoundParams,
options: InvokeOptions,
) -> Result<DocCrossRefsInsertResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.crossRefs.insert", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.crossRefs.insert".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List all cross-reference fields in the document."]
pub fn list<'call>(
&'call self,
params: &'call DocCrossRefsListBoundParams,
) -> impl std::future::Future<Output = Result<DocCrossRefsListResult>> + Send + 'call {
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List all cross-reference fields in the document."]
pub async fn list_with_options(
&self,
params: &DocCrossRefsListBoundParams,
options: InvokeOptions,
) -> Result<DocCrossRefsListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.crossRefs.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.crossRefs.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Rebuild (recalculate) a cross-reference field."]
pub fn rebuild<'call>(
&'call self,
params: &'call DocCrossRefsRebuildBoundParams,
) -> impl std::future::Future<Output = Result<DocCrossRefsRebuildResult>> + Send + 'call {
self.rebuild_with_options(params, InvokeOptions::default())
}
#[doc = "Rebuild (recalculate) a cross-reference field."]
pub async fn rebuild_with_options(
&self,
params: &DocCrossRefsRebuildBoundParams,
options: InvokeOptions,
) -> Result<DocCrossRefsRebuildResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.crossRefs.rebuild", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.crossRefs.rebuild".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove a cross-reference field from the document."]
pub fn remove<'call>(
&'call self,
params: &'call DocCrossRefsRemoveBoundParams,
) -> impl std::future::Future<Output = Result<DocCrossRefsRemoveResult>> + Send + 'call {
self.remove_with_options(params, InvokeOptions::default())
}
#[doc = "Remove a cross-reference field from the document."]
pub async fn remove_with_options(
&self,
params: &DocCrossRefsRemoveBoundParams,
options: InvokeOptions,
) -> Result<DocCrossRefsRemoveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.crossRefs.remove", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.crossRefs.remove".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiCustomXml<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiCustomXml<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
pub fn parts(&self) -> DocApiCustomXmlParts<'a, I> {
DocApiCustomXmlParts::new(self.invoker)
}
}
pub struct DocApiCustomXmlParts<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiCustomXmlParts<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Add a new Custom XML Data Storage Part to the document. Generates a fresh itemID GUID and emits the Properties Part."]
pub fn create<'call>(
&'call self,
params: &'call DocCustomXmlPartsCreateBoundParams,
) -> impl std::future::Future<Output = Result<DocCustomXmlPartsCreateResult>> + Send + 'call
{
self.create_with_options(params, InvokeOptions::default())
}
#[doc = "Add a new Custom XML Data Storage Part to the document. Generates a fresh itemID GUID and emits the Properties Part."]
pub async fn create_with_options(
&self,
params: &DocCustomXmlPartsCreateBoundParams,
options: InvokeOptions,
) -> Result<DocCustomXmlPartsCreateResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.customXml.parts.create", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.customXml.parts.create".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Get a single Custom XML Data Storage Part by itemID or package part name, including its full content. v1 partName targeting is limited to Word-style customXml/itemN.xml paths."]
pub fn get<'call>(
&'call self,
params: &'call DocCustomXmlPartsGetBoundParams,
) -> impl std::future::Future<Output = Result<DocCustomXmlPartsGetResult>> + Send + 'call {
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Get a single Custom XML Data Storage Part by itemID or package part name, including its full content. v1 partName targeting is limited to Word-style customXml/itemN.xml paths."]
pub async fn get_with_options(
&self,
params: &DocCustomXmlPartsGetBoundParams,
options: InvokeOptions,
) -> Result<DocCustomXmlPartsGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.customXml.parts.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.customXml.parts.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List Custom XML Data Storage Parts in the document, optionally filtered by root namespace or schema reference."]
pub fn list<'call>(
&'call self,
params: &'call DocCustomXmlPartsListBoundParams,
) -> impl std::future::Future<Output = Result<DocCustomXmlPartsListResult>> + Send + 'call {
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List Custom XML Data Storage Parts in the document, optionally filtered by root namespace or schema reference."]
pub async fn list_with_options(
&self,
params: &DocCustomXmlPartsListBoundParams,
options: InvokeOptions,
) -> Result<DocCustomXmlPartsListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.customXml.parts.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.customXml.parts.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Replace the content and/or schemaRefs of an existing Custom XML Data Storage Part. At least one of content or schemaRefs is required. v1 partName targeting is limited to Word-style customXml/itemN.xml paths."]
pub fn patch<'call>(
&'call self,
params: &'call DocCustomXmlPartsPatchBoundParams,
) -> impl std::future::Future<Output = Result<DocCustomXmlPartsPatchResult>> + Send + 'call
{
self.patch_with_options(params, InvokeOptions::default())
}
#[doc = "Replace the content and/or schemaRefs of an existing Custom XML Data Storage Part. At least one of content or schemaRefs is required. v1 partName targeting is limited to Word-style customXml/itemN.xml paths."]
pub async fn patch_with_options(
&self,
params: &DocCustomXmlPartsPatchBoundParams,
options: InvokeOptions,
) -> Result<DocCustomXmlPartsPatchResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.customXml.parts.patch", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.customXml.parts.patch".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove a Custom XML Data Storage Part and clean up all linked package files (item, props, rels, content-types entry). v1 partName targeting is limited to Word-style customXml/itemN.xml paths."]
pub fn remove<'call>(
&'call self,
params: &'call DocCustomXmlPartsRemoveBoundParams,
) -> impl std::future::Future<Output = Result<DocCustomXmlPartsRemoveResult>> + Send + 'call
{
self.remove_with_options(params, InvokeOptions::default())
}
#[doc = "Remove a Custom XML Data Storage Part and clean up all linked package files (item, props, rels, content-types entry). v1 partName targeting is limited to Word-style customXml/itemN.xml paths."]
pub async fn remove_with_options(
&self,
params: &DocCustomXmlPartsRemoveBoundParams,
options: InvokeOptions,
) -> Result<DocCustomXmlPartsRemoveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.customXml.parts.remove", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.customXml.parts.remove".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiDiff<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiDiff<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Apply a previously computed diff payload to the current document. The document fingerprint must match the diff base fingerprint. Omitted changeMode applies story content directly; explicit tracked mode governs all four story families (body, header/footer parts, footnotes, endnotes). Comments, styles, and numbering are always applied directly. Supported mixed full-diff payloads apply atomically across body, comments, styles, numbering, and header/footers. Unsupported/deferred families such as package-graph/media/hyperlink closure, settings/theme, and textboxes fail closed before mutation."]
pub fn apply<'call>(
&'call self,
params: &'call DocDiffApplyBoundParams,
) -> impl std::future::Future<Output = Result<DocDiffApplyResult>> + Send + 'call {
self.apply_with_options(params, InvokeOptions::default())
}
#[doc = "Apply a previously computed diff payload to the current document. The document fingerprint must match the diff base fingerprint. Omitted changeMode applies story content directly; explicit tracked mode governs all four story families (body, header/footer parts, footnotes, endnotes). Comments, styles, and numbering are always applied directly. Supported mixed full-diff payloads apply atomically across body, comments, styles, numbering, and header/footers. Unsupported/deferred families such as package-graph/media/hyperlink closure, settings/theme, and textboxes fail closed before mutation."]
pub async fn apply_with_options(
&self,
params: &DocDiffApplyBoundParams,
options: InvokeOptions,
) -> Result<DocDiffApplyResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.diff.apply", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.diff.apply".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Capture the current document's diffable state as a versioned snapshot. v2 capture requires source-complete state and reports coverage for body, comments, styles, numbering, and header/footers, with extended family coverage carried in the opaque payload. Legacy body-only v2 artifacts remain accepted for compare/apply compatibility."]
pub fn capture<'call>(
&'call self,
params: &'call DocDiffCaptureBoundParams,
) -> impl std::future::Future<Output = Result<DocDiffCaptureResult>> + Send + 'call {
self.capture_with_options(params, InvokeOptions::default())
}
#[doc = "Capture the current document's diffable state as a versioned snapshot. v2 capture requires source-complete state and reports coverage for body, comments, styles, numbering, and header/footers, with extended family coverage carried in the opaque payload. Legacy body-only v2 artifacts remain accepted for compare/apply compatibility."]
pub async fn capture_with_options(
&self,
params: &DocDiffCaptureBoundParams,
options: InvokeOptions,
) -> Result<DocDiffCaptureResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.diff.capture", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.diff.capture".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Compare the current document (base) against a previously captured target snapshot. Returns a versioned diff payload whose summary reports which components changed: body, comments, styles, numbering, header/footers, and parts."]
pub fn compare<'call>(
&'call self,
params: &'call DocDiffCompareBoundParams,
) -> impl std::future::Future<Output = Result<DocDiffCompareResult>> + Send + 'call {
self.compare_with_options(params, InvokeOptions::default())
}
#[doc = "Compare the current document (base) against a previously captured target snapshot. Returns a versioned diff payload whose summary reports which components changed: body, comments, styles, numbering, header/footers, and parts."]
pub async fn compare_with_options(
&self,
params: &DocDiffCompareBoundParams,
options: InvokeOptions,
) -> Result<DocDiffCompareResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.diff.compare", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.diff.compare".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiExport<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiExport<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Serialize a copy of the current document with independent policies for trackedChanges (review-preserving, final, original), comments (preserve, resolve, remove), and contentControls (preserve, flatten). Defaults preserve all three. Resolve closes every open comment thread in the copy. The mode alias selects trackedChanges; conflicting values and unknown policies reject with INVALID_INPUT. Unsupported revision semantics, loss of preserved comment anchors, and collaborative Document API export reject with CAPABILITY_UNSUPPORTED before returning bytes. Use browser export for collaborative sessions. Returns exported bytes and a structured report of allowed warnings without changing the live document."]
pub fn to_docx<'call>(
&'call self,
params: &'call DocExportToDocxBoundParams,
) -> impl std::future::Future<Output = Result<DocExportToDocxResult>> + Send + 'call {
self.to_docx_with_options(params, InvokeOptions::default())
}
#[doc = "Serialize a copy of the current document with independent policies for trackedChanges (review-preserving, final, original), comments (preserve, resolve, remove), and contentControls (preserve, flatten). Defaults preserve all three. Resolve closes every open comment thread in the copy. The mode alias selects trackedChanges; conflicting values and unknown policies reject with INVALID_INPUT. Unsupported revision semantics, loss of preserved comment anchors, and collaborative Document API export reject with CAPABILITY_UNSUPPORTED before returning bytes. Use browser export for collaborative sessions. Returns exported bytes and a structured report of allowed warnings without changing the live document."]
pub async fn to_docx_with_options(
&self,
params: &DocExportToDocxBoundParams,
options: InvokeOptions,
) -> Result<DocExportToDocxResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.export.toDocx", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.export.toDocx".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiFields<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiFields<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Get detailed information about a specific field."]
pub fn get<'call>(
&'call self,
params: &'call DocFieldsGetBoundParams,
) -> impl std::future::Future<Output = Result<DocFieldsGetResult>> + Send + 'call {
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Get detailed information about a specific field."]
pub async fn get_with_options(
&self,
params: &DocFieldsGetBoundParams,
options: InvokeOptions,
) -> Result<DocFieldsGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.fields.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.fields.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert a raw field code at a target location, optionally preserving cached result text."]
pub fn insert<'call>(
&'call self,
params: &'call DocFieldsInsertBoundParams,
) -> impl std::future::Future<Output = Result<DocFieldsInsertResult>> + Send + 'call {
self.insert_with_options(params, InvokeOptions::default())
}
#[doc = "Insert a raw field code at a target location, optionally preserving cached result text."]
pub async fn insert_with_options(
&self,
params: &DocFieldsInsertBoundParams,
options: InvokeOptions,
) -> Result<DocFieldsInsertResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.fields.insert", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.fields.insert".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List all fields in the document."]
pub fn list<'call>(
&'call self,
params: &'call DocFieldsListBoundParams,
) -> impl std::future::Future<Output = Result<DocFieldsListResult>> + Send + 'call {
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List all fields in the document."]
pub async fn list_with_options(
&self,
params: &DocFieldsListBoundParams,
options: InvokeOptions,
) -> Result<DocFieldsListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.fields.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.fields.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Rebuild (recalculate) a field."]
pub fn rebuild<'call>(
&'call self,
params: &'call DocFieldsRebuildBoundParams,
) -> impl std::future::Future<Output = Result<DocFieldsRebuildResult>> + Send + 'call {
self.rebuild_with_options(params, InvokeOptions::default())
}
#[doc = "Rebuild (recalculate) a field."]
pub async fn rebuild_with_options(
&self,
params: &DocFieldsRebuildBoundParams,
options: InvokeOptions,
) -> Result<DocFieldsRebuildResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.fields.rebuild", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.fields.rebuild".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove a field from the document."]
pub fn remove<'call>(
&'call self,
params: &'call DocFieldsRemoveBoundParams,
) -> impl std::future::Future<Output = Result<DocFieldsRemoveResult>> + Send + 'call {
self.remove_with_options(params, InvokeOptions::default())
}
#[doc = "Remove a field from the document."]
pub async fn remove_with_options(
&self,
params: &DocFieldsRemoveBoundParams,
options: InvokeOptions,
) -> Result<DocFieldsRemoveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.fields.remove", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.fields.remove".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiFootnotes<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiFootnotes<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Configure numbering and placement for footnotes or endnotes."]
pub fn configure<'call>(
&'call self,
params: &'call DocFootnotesConfigureBoundParams,
) -> impl std::future::Future<Output = Result<DocFootnotesConfigureResult>> + Send + 'call {
self.configure_with_options(params, InvokeOptions::default())
}
#[doc = "Configure numbering and placement for footnotes or endnotes."]
pub async fn configure_with_options(
&self,
params: &DocFootnotesConfigureBoundParams,
options: InvokeOptions,
) -> Result<DocFootnotesConfigureResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.footnotes.configure", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.footnotes.configure".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Get detailed information about a specific footnote or endnote."]
pub fn get<'call>(
&'call self,
params: &'call DocFootnotesGetBoundParams,
) -> impl std::future::Future<Output = Result<DocFootnotesGetResult>> + Send + 'call {
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Get detailed information about a specific footnote or endnote."]
pub async fn get_with_options(
&self,
params: &DocFootnotesGetBoundParams,
options: InvokeOptions,
) -> Result<DocFootnotesGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.footnotes.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.footnotes.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert a new footnote or endnote at a target location or the current selection."]
pub fn insert<'call>(
&'call self,
params: &'call DocFootnotesInsertBoundParams,
) -> impl std::future::Future<Output = Result<DocFootnotesInsertResult>> + Send + 'call {
self.insert_with_options(params, InvokeOptions::default())
}
#[doc = "Insert a new footnote or endnote at a target location or the current selection."]
pub async fn insert_with_options(
&self,
params: &DocFootnotesInsertBoundParams,
options: InvokeOptions,
) -> Result<DocFootnotesInsertResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.footnotes.insert", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.footnotes.insert".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List all footnotes and endnotes in the document."]
pub fn list<'call>(
&'call self,
params: &'call DocFootnotesListBoundParams,
) -> impl std::future::Future<Output = Result<DocFootnotesListResult>> + Send + 'call {
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List all footnotes and endnotes in the document."]
pub async fn list_with_options(
&self,
params: &DocFootnotesListBoundParams,
options: InvokeOptions,
) -> Result<DocFootnotesListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.footnotes.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.footnotes.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove a footnote or endnote from the document."]
pub fn remove<'call>(
&'call self,
params: &'call DocFootnotesRemoveBoundParams,
) -> impl std::future::Future<Output = Result<DocFootnotesRemoveResult>> + Send + 'call {
self.remove_with_options(params, InvokeOptions::default())
}
#[doc = "Remove a footnote or endnote from the document."]
pub async fn remove_with_options(
&self,
params: &DocFootnotesRemoveBoundParams,
options: InvokeOptions,
) -> Result<DocFootnotesRemoveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.footnotes.remove", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.footnotes.remove".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Update the content of an existing footnote or endnote."]
pub fn update<'call>(
&'call self,
params: &'call DocFootnotesUpdateBoundParams,
) -> impl std::future::Future<Output = Result<DocFootnotesUpdateResult>> + Send + 'call {
self.update_with_options(params, InvokeOptions::default())
}
#[doc = "Update the content of an existing footnote or endnote."]
pub async fn update_with_options(
&self,
params: &DocFootnotesUpdateBoundParams,
options: InvokeOptions,
) -> Result<DocFootnotesUpdateResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.footnotes.update", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.footnotes.update".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiFormat<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiFormat<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
pub fn paragraph(&self) -> DocApiFormatParagraph<'a, I> {
DocApiFormatParagraph::new(self.invoker)
}
#[doc = "Apply inline run-property patch changes to the target range with explicit set/clear semantics."]
pub fn apply<'call>(
&'call self,
params: &'call DocFormatApplyBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatApplyResult>> + Send + 'call {
self.apply_with_options(params, InvokeOptions::default())
}
#[doc = "Apply inline run-property patch changes to the target range with explicit set/clear semantics."]
pub async fn apply_with_options(
&self,
params: &DocFormatApplyBoundParams,
options: InvokeOptions,
) -> Result<DocFormatApplyResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.apply", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.apply".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `bCs` inline run property on the target text range."]
pub fn b_cs<'call>(
&'call self,
params: &'call DocFormatBCsBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatBCsResult>> + Send + 'call {
self.b_cs_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `bCs` inline run property on the target text range."]
pub async fn b_cs_with_options(
&self,
params: &DocFormatBCsBoundParams,
options: InvokeOptions,
) -> Result<DocFormatBCsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.bCs", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.bCs".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `bold` inline run property on the target text range."]
pub fn bold<'call>(
&'call self,
params: &'call DocFormatBoldBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatBoldResult>> + Send + 'call {
self.bold_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `bold` inline run property on the target text range."]
pub async fn bold_with_options(
&self,
params: &DocFormatBoldBoundParams,
options: InvokeOptions,
) -> Result<DocFormatBoldResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.bold", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.bold".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `border` inline run property on the target text range."]
pub fn border<'call>(
&'call self,
params: &'call DocFormatBorderBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatBorderResult>> + Send + 'call {
self.border_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `border` inline run property on the target text range."]
pub async fn border_with_options(
&self,
params: &DocFormatBorderBoundParams,
options: InvokeOptions,
) -> Result<DocFormatBorderResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.border", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.border".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `caps` inline run property on the target text range."]
pub fn caps<'call>(
&'call self,
params: &'call DocFormatCapsBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatCapsResult>> + Send + 'call {
self.caps_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `caps` inline run property on the target text range."]
pub async fn caps_with_options(
&self,
params: &DocFormatCapsBoundParams,
options: InvokeOptions,
) -> Result<DocFormatCapsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.caps", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.caps".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `charScale` inline run property on the target text range."]
pub fn char_scale<'call>(
&'call self,
params: &'call DocFormatCharScaleBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatCharScaleResult>> + Send + 'call {
self.char_scale_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `charScale` inline run property on the target text range."]
pub async fn char_scale_with_options(
&self,
params: &DocFormatCharScaleBoundParams,
options: InvokeOptions,
) -> Result<DocFormatCharScaleResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.charScale", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.charScale".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `color` inline run property on the target text range."]
pub fn color<'call>(
&'call self,
params: &'call DocFormatColorBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatColorResult>> + Send + 'call {
self.color_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `color` inline run property on the target text range."]
pub async fn color_with_options(
&self,
params: &DocFormatColorBoundParams,
options: InvokeOptions,
) -> Result<DocFormatColorResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.color", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.color".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `contextualAlternates` inline run property on the target text range."]
pub fn contextual_alternates<'call>(
&'call self,
params: &'call DocFormatContextualAlternatesBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatContextualAlternatesResult>> + Send + 'call
{
self.contextual_alternates_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `contextualAlternates` inline run property on the target text range."]
pub async fn contextual_alternates_with_options(
&self,
params: &DocFormatContextualAlternatesBoundParams,
options: InvokeOptions,
) -> Result<DocFormatContextualAlternatesResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.contextualAlternates", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.contextualAlternates".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `cs` inline run property on the target text range."]
pub fn cs<'call>(
&'call self,
params: &'call DocFormatCsBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatCsResult>> + Send + 'call {
self.cs_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `cs` inline run property on the target text range."]
pub async fn cs_with_options(
&self,
params: &DocFormatCsBoundParams,
options: InvokeOptions,
) -> Result<DocFormatCsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.cs", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.cs".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `dstrike` inline run property on the target text range."]
pub fn dstrike<'call>(
&'call self,
params: &'call DocFormatDstrikeBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatDstrikeResult>> + Send + 'call {
self.dstrike_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `dstrike` inline run property on the target text range."]
pub async fn dstrike_with_options(
&self,
params: &DocFormatDstrikeBoundParams,
options: InvokeOptions,
) -> Result<DocFormatDstrikeResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.dstrike", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.dstrike".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `eastAsianLayout` inline run property on the target text range."]
pub fn east_asian_layout<'call>(
&'call self,
params: &'call DocFormatEastAsianLayoutBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatEastAsianLayoutResult>> + Send + 'call
{
self.east_asian_layout_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `eastAsianLayout` inline run property on the target text range."]
pub async fn east_asian_layout_with_options(
&self,
params: &DocFormatEastAsianLayoutBoundParams,
options: InvokeOptions,
) -> Result<DocFormatEastAsianLayoutResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.eastAsianLayout", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.eastAsianLayout".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `em` inline run property on the target text range."]
pub fn em<'call>(
&'call self,
params: &'call DocFormatEmBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatEmResult>> + Send + 'call {
self.em_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `em` inline run property on the target text range."]
pub async fn em_with_options(
&self,
params: &DocFormatEmBoundParams,
options: InvokeOptions,
) -> Result<DocFormatEmResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.em", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.em".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `emboss` inline run property on the target text range."]
pub fn emboss<'call>(
&'call self,
params: &'call DocFormatEmbossBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatEmbossResult>> + Send + 'call {
self.emboss_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `emboss` inline run property on the target text range."]
pub async fn emboss_with_options(
&self,
params: &DocFormatEmbossBoundParams,
options: InvokeOptions,
) -> Result<DocFormatEmbossResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.emboss", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.emboss".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `fitText` inline run property on the target text range."]
pub fn fit_text<'call>(
&'call self,
params: &'call DocFormatFitTextBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatFitTextResult>> + Send + 'call {
self.fit_text_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `fitText` inline run property on the target text range."]
pub async fn fit_text_with_options(
&self,
params: &DocFormatFitTextBoundParams,
options: InvokeOptions,
) -> Result<DocFormatFitTextResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.fitText", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.fitText".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `fontFamily` inline run property on the target text range."]
pub fn font_family<'call>(
&'call self,
params: &'call DocFormatFontFamilyBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatFontFamilyResult>> + Send + 'call {
self.font_family_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `fontFamily` inline run property on the target text range."]
pub async fn font_family_with_options(
&self,
params: &DocFormatFontFamilyBoundParams,
options: InvokeOptions,
) -> Result<DocFormatFontFamilyResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.fontFamily", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.fontFamily".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `fontSize` inline run property on the target text range."]
pub fn font_size<'call>(
&'call self,
params: &'call DocFormatFontSizeBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatFontSizeResult>> + Send + 'call {
self.font_size_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `fontSize` inline run property on the target text range."]
pub async fn font_size_with_options(
&self,
params: &DocFormatFontSizeBoundParams,
options: InvokeOptions,
) -> Result<DocFormatFontSizeResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.fontSize", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.fontSize".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `fontSizeCs` inline run property on the target text range."]
pub fn font_size_cs<'call>(
&'call self,
params: &'call DocFormatFontSizeCsBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatFontSizeCsResult>> + Send + 'call {
self.font_size_cs_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `fontSizeCs` inline run property on the target text range."]
pub async fn font_size_cs_with_options(
&self,
params: &DocFormatFontSizeCsBoundParams,
options: InvokeOptions,
) -> Result<DocFormatFontSizeCsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.fontSizeCs", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.fontSizeCs".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `highlight` inline run property on the target text range."]
pub fn highlight<'call>(
&'call self,
params: &'call DocFormatHighlightBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatHighlightResult>> + Send + 'call {
self.highlight_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `highlight` inline run property on the target text range."]
pub async fn highlight_with_options(
&self,
params: &DocFormatHighlightBoundParams,
options: InvokeOptions,
) -> Result<DocFormatHighlightResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.highlight", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.highlight".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `iCs` inline run property on the target text range."]
pub fn i_cs<'call>(
&'call self,
params: &'call DocFormatICsBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatICsResult>> + Send + 'call {
self.i_cs_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `iCs` inline run property on the target text range."]
pub async fn i_cs_with_options(
&self,
params: &DocFormatICsBoundParams,
options: InvokeOptions,
) -> Result<DocFormatICsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.iCs", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.iCs".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `imprint` inline run property on the target text range."]
pub fn imprint<'call>(
&'call self,
params: &'call DocFormatImprintBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatImprintResult>> + Send + 'call {
self.imprint_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `imprint` inline run property on the target text range."]
pub async fn imprint_with_options(
&self,
params: &DocFormatImprintBoundParams,
options: InvokeOptions,
) -> Result<DocFormatImprintResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.imprint", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.imprint".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `italic` inline run property on the target text range."]
pub fn italic<'call>(
&'call self,
params: &'call DocFormatItalicBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatItalicResult>> + Send + 'call {
self.italic_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `italic` inline run property on the target text range."]
pub async fn italic_with_options(
&self,
params: &DocFormatItalicBoundParams,
options: InvokeOptions,
) -> Result<DocFormatItalicResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.italic", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.italic".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `kerning` inline run property on the target text range."]
pub fn kerning<'call>(
&'call self,
params: &'call DocFormatKerningBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatKerningResult>> + Send + 'call {
self.kerning_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `kerning` inline run property on the target text range."]
pub async fn kerning_with_options(
&self,
params: &DocFormatKerningBoundParams,
options: InvokeOptions,
) -> Result<DocFormatKerningResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.kerning", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.kerning".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `lang` inline run property on the target text range."]
pub fn lang<'call>(
&'call self,
params: &'call DocFormatLangBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatLangResult>> + Send + 'call {
self.lang_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `lang` inline run property on the target text range."]
pub async fn lang_with_options(
&self,
params: &DocFormatLangBoundParams,
options: InvokeOptions,
) -> Result<DocFormatLangResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.lang", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.lang".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `letterSpacing` inline run property on the target text range."]
pub fn letter_spacing<'call>(
&'call self,
params: &'call DocFormatLetterSpacingBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatLetterSpacingResult>> + Send + 'call
{
self.letter_spacing_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `letterSpacing` inline run property on the target text range."]
pub async fn letter_spacing_with_options(
&self,
params: &DocFormatLetterSpacingBoundParams,
options: InvokeOptions,
) -> Result<DocFormatLetterSpacingResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.letterSpacing", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.letterSpacing".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `ligatures` inline run property on the target text range."]
pub fn ligatures<'call>(
&'call self,
params: &'call DocFormatLigaturesBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatLigaturesResult>> + Send + 'call {
self.ligatures_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `ligatures` inline run property on the target text range."]
pub async fn ligatures_with_options(
&self,
params: &DocFormatLigaturesBoundParams,
options: InvokeOptions,
) -> Result<DocFormatLigaturesResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.ligatures", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.ligatures".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `numForm` inline run property on the target text range."]
pub fn num_form<'call>(
&'call self,
params: &'call DocFormatNumFormBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatNumFormResult>> + Send + 'call {
self.num_form_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `numForm` inline run property on the target text range."]
pub async fn num_form_with_options(
&self,
params: &DocFormatNumFormBoundParams,
options: InvokeOptions,
) -> Result<DocFormatNumFormResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.numForm", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.numForm".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `numSpacing` inline run property on the target text range."]
pub fn num_spacing<'call>(
&'call self,
params: &'call DocFormatNumSpacingBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatNumSpacingResult>> + Send + 'call {
self.num_spacing_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `numSpacing` inline run property on the target text range."]
pub async fn num_spacing_with_options(
&self,
params: &DocFormatNumSpacingBoundParams,
options: InvokeOptions,
) -> Result<DocFormatNumSpacingResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.numSpacing", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.numSpacing".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `oMath` inline run property on the target text range."]
pub fn o_math<'call>(
&'call self,
params: &'call DocFormatOMathBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatOMathResult>> + Send + 'call {
self.o_math_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `oMath` inline run property on the target text range."]
pub async fn o_math_with_options(
&self,
params: &DocFormatOMathBoundParams,
options: InvokeOptions,
) -> Result<DocFormatOMathResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.oMath", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.oMath".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `outline` inline run property on the target text range."]
pub fn outline<'call>(
&'call self,
params: &'call DocFormatOutlineBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatOutlineResult>> + Send + 'call {
self.outline_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `outline` inline run property on the target text range."]
pub async fn outline_with_options(
&self,
params: &DocFormatOutlineBoundParams,
options: InvokeOptions,
) -> Result<DocFormatOutlineResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.outline", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.outline".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `position` inline run property on the target text range."]
pub fn position<'call>(
&'call self,
params: &'call DocFormatPositionBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatPositionResult>> + Send + 'call {
self.position_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `position` inline run property on the target text range."]
pub async fn position_with_options(
&self,
params: &DocFormatPositionBoundParams,
options: InvokeOptions,
) -> Result<DocFormatPositionResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.position", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.position".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Read inline formatting across a selection or caret, reporting each property as uniform, mixed, unset or unresolvable."]
pub fn read_selection<'call>(
&'call self,
params: &'call DocFormatReadSelectionBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatReadSelectionResult>> + Send + 'call
{
self.read_selection_with_options(params, InvokeOptions::default())
}
#[doc = "Read inline formatting across a selection or caret, reporting each property as uniform, mixed, unset or unresolvable."]
pub async fn read_selection_with_options(
&self,
params: &DocFormatReadSelectionBoundParams,
options: InvokeOptions,
) -> Result<DocFormatReadSelectionResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.readSelection", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.readSelection".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `rFonts` inline run property on the target text range."]
pub fn r_fonts<'call>(
&'call self,
params: &'call DocFormatRFontsBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatRFontsResult>> + Send + 'call {
self.r_fonts_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `rFonts` inline run property on the target text range."]
pub async fn r_fonts_with_options(
&self,
params: &DocFormatRFontsBoundParams,
options: InvokeOptions,
) -> Result<DocFormatRFontsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.rFonts", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.rFonts".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `rStyle` inline run property on the target text range."]
pub fn r_style<'call>(
&'call self,
params: &'call DocFormatRStyleBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatRStyleResult>> + Send + 'call {
self.r_style_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `rStyle` inline run property on the target text range."]
pub async fn r_style_with_options(
&self,
params: &DocFormatRStyleBoundParams,
options: InvokeOptions,
) -> Result<DocFormatRStyleResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.rStyle", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.rStyle".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `rtl` inline run property on the target text range. This does not change paragraph direction; use `format.paragraph.setDirection` for paragraph-level RTL."]
pub fn rtl<'call>(
&'call self,
params: &'call DocFormatRtlBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatRtlResult>> + Send + 'call {
self.rtl_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `rtl` inline run property on the target text range. This does not change paragraph direction; use `format.paragraph.setDirection` for paragraph-level RTL."]
pub async fn rtl_with_options(
&self,
params: &DocFormatRtlBoundParams,
options: InvokeOptions,
) -> Result<DocFormatRtlResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.rtl", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.rtl".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `shading` inline run property on the target text range."]
pub fn shading<'call>(
&'call self,
params: &'call DocFormatShadingBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatShadingResult>> + Send + 'call {
self.shading_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `shading` inline run property on the target text range."]
pub async fn shading_with_options(
&self,
params: &DocFormatShadingBoundParams,
options: InvokeOptions,
) -> Result<DocFormatShadingResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.shading", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.shading".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `shadow` inline run property on the target text range."]
pub fn shadow<'call>(
&'call self,
params: &'call DocFormatShadowBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatShadowResult>> + Send + 'call {
self.shadow_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `shadow` inline run property on the target text range."]
pub async fn shadow_with_options(
&self,
params: &DocFormatShadowBoundParams,
options: InvokeOptions,
) -> Result<DocFormatShadowResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.shadow", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.shadow".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `smallCaps` inline run property on the target text range."]
pub fn small_caps<'call>(
&'call self,
params: &'call DocFormatSmallCapsBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatSmallCapsResult>> + Send + 'call {
self.small_caps_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `smallCaps` inline run property on the target text range."]
pub async fn small_caps_with_options(
&self,
params: &DocFormatSmallCapsBoundParams,
options: InvokeOptions,
) -> Result<DocFormatSmallCapsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.smallCaps", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.smallCaps".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `snapToGrid` inline run property on the target text range."]
pub fn snap_to_grid<'call>(
&'call self,
params: &'call DocFormatSnapToGridBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatSnapToGridResult>> + Send + 'call {
self.snap_to_grid_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `snapToGrid` inline run property on the target text range."]
pub async fn snap_to_grid_with_options(
&self,
params: &DocFormatSnapToGridBoundParams,
options: InvokeOptions,
) -> Result<DocFormatSnapToGridResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.snapToGrid", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.snapToGrid".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `specVanish` inline run property on the target text range."]
pub fn spec_vanish<'call>(
&'call self,
params: &'call DocFormatSpecVanishBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatSpecVanishResult>> + Send + 'call {
self.spec_vanish_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `specVanish` inline run property on the target text range."]
pub async fn spec_vanish_with_options(
&self,
params: &DocFormatSpecVanishBoundParams,
options: InvokeOptions,
) -> Result<DocFormatSpecVanishResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.specVanish", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.specVanish".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `strike` inline run property on the target text range."]
pub fn strike<'call>(
&'call self,
params: &'call DocFormatStrikeBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatStrikeResult>> + Send + 'call {
self.strike_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `strike` inline run property on the target text range."]
pub async fn strike_with_options(
&self,
params: &DocFormatStrikeBoundParams,
options: InvokeOptions,
) -> Result<DocFormatStrikeResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.strike", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.strike".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `stylisticSets` inline run property on the target text range."]
pub fn stylistic_sets<'call>(
&'call self,
params: &'call DocFormatStylisticSetsBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatStylisticSetsResult>> + Send + 'call
{
self.stylistic_sets_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `stylisticSets` inline run property on the target text range."]
pub async fn stylistic_sets_with_options(
&self,
params: &DocFormatStylisticSetsBoundParams,
options: InvokeOptions,
) -> Result<DocFormatStylisticSetsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.stylisticSets", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.stylisticSets".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `underline` inline run property on the target text range."]
pub fn underline<'call>(
&'call self,
params: &'call DocFormatUnderlineBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatUnderlineResult>> + Send + 'call {
self.underline_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `underline` inline run property on the target text range."]
pub async fn underline_with_options(
&self,
params: &DocFormatUnderlineBoundParams,
options: InvokeOptions,
) -> Result<DocFormatUnderlineResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.underline", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.underline".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `vanish` inline run property on the target text range."]
pub fn vanish<'call>(
&'call self,
params: &'call DocFormatVanishBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatVanishResult>> + Send + 'call {
self.vanish_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `vanish` inline run property on the target text range."]
pub async fn vanish_with_options(
&self,
params: &DocFormatVanishBoundParams,
options: InvokeOptions,
) -> Result<DocFormatVanishResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.vanish", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.vanish".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `vertAlign` inline run property on the target text range."]
pub fn vert_align<'call>(
&'call self,
params: &'call DocFormatVertAlignBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatVertAlignResult>> + Send + 'call {
self.vert_align_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `vertAlign` inline run property on the target text range."]
pub async fn vert_align_with_options(
&self,
params: &DocFormatVertAlignBoundParams,
options: InvokeOptions,
) -> Result<DocFormatVertAlignResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.vertAlign", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.vertAlign".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear the `webHidden` inline run property on the target text range."]
pub fn web_hidden<'call>(
&'call self,
params: &'call DocFormatWebHiddenBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatWebHiddenResult>> + Send + 'call {
self.web_hidden_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear the `webHidden` inline run property on the target text range."]
pub async fn web_hidden_with_options(
&self,
params: &DocFormatWebHiddenBoundParams,
options: InvokeOptions,
) -> Result<DocFormatWebHiddenResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.webHidden", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.webHidden".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiFormatParagraph<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiFormatParagraph<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Remove direct paragraph alignment, reverting to style-defined or default alignment."]
pub fn clear_alignment<'call>(
&'call self,
params: &'call DocFormatParagraphClearAlignmentBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatParagraphClearAlignmentResult>> + Send + 'call
{
self.clear_alignment_with_options(params, InvokeOptions::default())
}
#[doc = "Remove direct paragraph alignment, reverting to style-defined or default alignment."]
pub async fn clear_alignment_with_options(
&self,
params: &DocFormatParagraphClearAlignmentBoundParams,
options: InvokeOptions,
) -> Result<DocFormatParagraphClearAlignmentResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.paragraph.clearAlignment", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.paragraph.clearAlignment".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove all tab stops from a paragraph."]
pub fn clear_all_tab_stops<'call>(
&'call self,
params: &'call DocFormatParagraphClearAllTabStopsBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatParagraphClearAllTabStopsResult>> + Send + 'call
{
self.clear_all_tab_stops_with_options(params, InvokeOptions::default())
}
#[doc = "Remove all tab stops from a paragraph."]
pub async fn clear_all_tab_stops_with_options(
&self,
params: &DocFormatParagraphClearAllTabStopsBoundParams,
options: InvokeOptions,
) -> Result<DocFormatParagraphClearAllTabStopsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.paragraph.clearAllTabStops", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.paragraph.clearAllTabStops".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove border for a specific side or all sides of a paragraph."]
pub fn clear_border<'call>(
&'call self,
params: &'call DocFormatParagraphClearBorderBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatParagraphClearBorderResult>> + Send + 'call
{
self.clear_border_with_options(params, InvokeOptions::default())
}
#[doc = "Remove border for a specific side or all sides of a paragraph."]
pub async fn clear_border_with_options(
&self,
params: &DocFormatParagraphClearBorderBoundParams,
options: InvokeOptions,
) -> Result<DocFormatParagraphClearBorderResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.paragraph.clearBorder", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.paragraph.clearBorder".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove explicit paragraph direction, reverting to inherited or default (LTR)."]
pub fn clear_direction<'call>(
&'call self,
params: &'call DocFormatParagraphClearDirectionBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatParagraphClearDirectionResult>> + Send + 'call
{
self.clear_direction_with_options(params, InvokeOptions::default())
}
#[doc = "Remove explicit paragraph direction, reverting to inherited or default (LTR)."]
pub async fn clear_direction_with_options(
&self,
params: &DocFormatParagraphClearDirectionBoundParams,
options: InvokeOptions,
) -> Result<DocFormatParagraphClearDirectionResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.paragraph.clearDirection", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.paragraph.clearDirection".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove all direct paragraph indentation."]
pub fn clear_indentation<'call>(
&'call self,
params: &'call DocFormatParagraphClearIndentationBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatParagraphClearIndentationResult>> + Send + 'call
{
self.clear_indentation_with_options(params, InvokeOptions::default())
}
#[doc = "Remove all direct paragraph indentation."]
pub async fn clear_indentation_with_options(
&self,
params: &DocFormatParagraphClearIndentationBoundParams,
options: InvokeOptions,
) -> Result<DocFormatParagraphClearIndentationResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.paragraph.clearIndentation", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.paragraph.clearIndentation".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove all paragraph shading."]
pub fn clear_shading<'call>(
&'call self,
params: &'call DocFormatParagraphClearShadingBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatParagraphClearShadingResult>> + Send + 'call
{
self.clear_shading_with_options(params, InvokeOptions::default())
}
#[doc = "Remove all paragraph shading."]
pub async fn clear_shading_with_options(
&self,
params: &DocFormatParagraphClearShadingBoundParams,
options: InvokeOptions,
) -> Result<DocFormatParagraphClearShadingResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.paragraph.clearShading", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.paragraph.clearShading".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove all direct paragraph spacing."]
pub fn clear_spacing<'call>(
&'call self,
params: &'call DocFormatParagraphClearSpacingBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatParagraphClearSpacingResult>> + Send + 'call
{
self.clear_spacing_with_options(params, InvokeOptions::default())
}
#[doc = "Remove all direct paragraph spacing."]
pub async fn clear_spacing_with_options(
&self,
params: &DocFormatParagraphClearSpacingBoundParams,
options: InvokeOptions,
) -> Result<DocFormatParagraphClearSpacingResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.paragraph.clearSpacing", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.paragraph.clearSpacing".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove a tab stop at a given position."]
pub fn clear_tab_stop<'call>(
&'call self,
params: &'call DocFormatParagraphClearTabStopBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatParagraphClearTabStopResult>> + Send + 'call
{
self.clear_tab_stop_with_options(params, InvokeOptions::default())
}
#[doc = "Remove a tab stop at a given position."]
pub async fn clear_tab_stop_with_options(
&self,
params: &DocFormatParagraphClearTabStopBoundParams,
options: InvokeOptions,
) -> Result<DocFormatParagraphClearTabStopResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.paragraph.clearTabStop", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.paragraph.clearTabStop".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Strip all direct paragraph formatting while preserving style reference, numbering, and section metadata."]
pub fn reset_direct_formatting<'call>(
&'call self,
params: &'call DocFormatParagraphResetDirectFormattingBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatParagraphResetDirectFormattingResult>>
+ Send
+ 'call {
self.reset_direct_formatting_with_options(params, InvokeOptions::default())
}
#[doc = "Strip all direct paragraph formatting while preserving style reference, numbering, and section metadata."]
pub async fn reset_direct_formatting_with_options(
&self,
params: &DocFormatParagraphResetDirectFormattingBoundParams,
options: InvokeOptions,
) -> Result<DocFormatParagraphResetDirectFormattingResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke(
"doc.format.paragraph.resetDirectFormatting",
params,
options,
)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.paragraph.resetDirectFormatting".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set visual paragraph alignment on a paragraph-like block. For RTL paragraphs, left/right are translated to Word-compatible stored justification values."]
pub fn set_alignment<'call>(
&'call self,
params: &'call DocFormatParagraphSetAlignmentBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatParagraphSetAlignmentResult>> + Send + 'call
{
self.set_alignment_with_options(params, InvokeOptions::default())
}
#[doc = "Set visual paragraph alignment on a paragraph-like block. For RTL paragraphs, left/right are translated to Word-compatible stored justification values."]
pub async fn set_alignment_with_options(
&self,
params: &DocFormatParagraphSetAlignmentBoundParams,
options: InvokeOptions,
) -> Result<DocFormatParagraphSetAlignmentResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.paragraph.setAlignment", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.paragraph.setAlignment".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set border properties for a specific side of a paragraph."]
pub fn set_border<'call>(
&'call self,
params: &'call DocFormatParagraphSetBorderBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatParagraphSetBorderResult>> + Send + 'call
{
self.set_border_with_options(params, InvokeOptions::default())
}
#[doc = "Set border properties for a specific side of a paragraph."]
pub async fn set_border_with_options(
&self,
params: &DocFormatParagraphSetBorderBoundParams,
options: InvokeOptions,
) -> Result<DocFormatParagraphSetBorderResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.paragraph.setBorder", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.paragraph.setBorder".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set paragraph base direction (LTR or RTL via w:bidi). Optionally align text to match."]
pub fn set_direction<'call>(
&'call self,
params: &'call DocFormatParagraphSetDirectionBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatParagraphSetDirectionResult>> + Send + 'call
{
self.set_direction_with_options(params, InvokeOptions::default())
}
#[doc = "Set paragraph base direction (LTR or RTL via w:bidi). Optionally align text to match."]
pub async fn set_direction_with_options(
&self,
params: &DocFormatParagraphSetDirectionBoundParams,
options: InvokeOptions,
) -> Result<DocFormatParagraphSetDirectionResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.paragraph.setDirection", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.paragraph.setDirection".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set paragraph flow flags: contextual spacing, page-break-before, suppress-auto-hyphens, and the advanced layout toggles auto-space-DE, auto-space-DN, adjust-right-indent, and snap-to-grid."]
pub fn set_flow_options<'call>(
&'call self,
params: &'call DocFormatParagraphSetFlowOptionsBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatParagraphSetFlowOptionsResult>> + Send + 'call
{
self.set_flow_options_with_options(params, InvokeOptions::default())
}
#[doc = "Set paragraph flow flags: contextual spacing, page-break-before, suppress-auto-hyphens, and the advanced layout toggles auto-space-DE, auto-space-DN, adjust-right-indent, and snap-to-grid."]
pub async fn set_flow_options_with_options(
&self,
params: &DocFormatParagraphSetFlowOptionsBoundParams,
options: InvokeOptions,
) -> Result<DocFormatParagraphSetFlowOptionsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.paragraph.setFlowOptions", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.paragraph.setFlowOptions".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set paragraph indentation properties (signed left/right, firstLine, hanging) in twips."]
pub fn set_indentation<'call>(
&'call self,
params: &'call DocFormatParagraphSetIndentationBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatParagraphSetIndentationResult>> + Send + 'call
{
self.set_indentation_with_options(params, InvokeOptions::default())
}
#[doc = "Set paragraph indentation properties (signed left/right, firstLine, hanging) in twips."]
pub async fn set_indentation_with_options(
&self,
params: &DocFormatParagraphSetIndentationBoundParams,
options: InvokeOptions,
) -> Result<DocFormatParagraphSetIndentationResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.paragraph.setIndentation", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.paragraph.setIndentation".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set keep-with-next, keep-lines-together, and widow/orphan control flags."]
pub fn set_keep_options<'call>(
&'call self,
params: &'call DocFormatParagraphSetKeepOptionsBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatParagraphSetKeepOptionsResult>> + Send + 'call
{
self.set_keep_options_with_options(params, InvokeOptions::default())
}
#[doc = "Set keep-with-next, keep-lines-together, and widow/orphan control flags."]
pub async fn set_keep_options_with_options(
&self,
params: &DocFormatParagraphSetKeepOptionsBoundParams,
options: InvokeOptions,
) -> Result<DocFormatParagraphSetKeepOptionsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.paragraph.setKeepOptions", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.paragraph.setKeepOptions".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the paragraph mark's run properties (w:pPr/w:rPr), e.g. the font size or specVanish carried by the paragraph-end mark."]
pub fn set_mark_run_props<'call>(
&'call self,
params: &'call DocFormatParagraphSetMarkRunPropsBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatParagraphSetMarkRunPropsResult>> + Send + 'call
{
self.set_mark_run_props_with_options(params, InvokeOptions::default())
}
#[doc = "Set the paragraph mark's run properties (w:pPr/w:rPr), e.g. the font size or specVanish carried by the paragraph-end mark."]
pub async fn set_mark_run_props_with_options(
&self,
params: &DocFormatParagraphSetMarkRunPropsBoundParams,
options: InvokeOptions,
) -> Result<DocFormatParagraphSetMarkRunPropsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.paragraph.setMarkRunProps", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.paragraph.setMarkRunProps".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Attach numbering (numId + level) to an existing paragraph or heading so it joins a numbered sequence. Numbering is a paragraph property; the node and its style are otherwise unchanged, though any direct paragraph indent is cleared so the numbering level controls indentation. Direct edits only; tracked mode is unsupported."]
pub fn set_numbering<'call>(
&'call self,
params: &'call DocFormatParagraphSetNumberingBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatParagraphSetNumberingResult>> + Send + 'call
{
self.set_numbering_with_options(params, InvokeOptions::default())
}
#[doc = "Attach numbering (numId + level) to an existing paragraph or heading so it joins a numbered sequence. Numbering is a paragraph property; the node and its style are otherwise unchanged, though any direct paragraph indent is cleared so the numbering level controls indentation. Direct edits only; tracked mode is unsupported."]
pub async fn set_numbering_with_options(
&self,
params: &DocFormatParagraphSetNumberingBoundParams,
options: InvokeOptions,
) -> Result<DocFormatParagraphSetNumberingResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.paragraph.setNumbering", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.paragraph.setNumbering".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the paragraph outline level (0–9) or null to clear."]
pub fn set_outline_level<'call>(
&'call self,
params: &'call DocFormatParagraphSetOutlineLevelBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatParagraphSetOutlineLevelResult>> + Send + 'call
{
self.set_outline_level_with_options(params, InvokeOptions::default())
}
#[doc = "Set the paragraph outline level (0–9) or null to clear."]
pub async fn set_outline_level_with_options(
&self,
params: &DocFormatParagraphSetOutlineLevelBoundParams,
options: InvokeOptions,
) -> Result<DocFormatParagraphSetOutlineLevelResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.paragraph.setOutlineLevel", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.paragraph.setOutlineLevel".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set paragraph shading (background fill, pattern color, pattern type)."]
pub fn set_shading<'call>(
&'call self,
params: &'call DocFormatParagraphSetShadingBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatParagraphSetShadingResult>> + Send + 'call
{
self.set_shading_with_options(params, InvokeOptions::default())
}
#[doc = "Set paragraph shading (background fill, pattern color, pattern type)."]
pub async fn set_shading_with_options(
&self,
params: &DocFormatParagraphSetShadingBoundParams,
options: InvokeOptions,
) -> Result<DocFormatParagraphSetShadingResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.paragraph.setShading", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.paragraph.setShading".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set paragraph spacing properties (before, after, line, lineRule) in twips."]
pub fn set_spacing<'call>(
&'call self,
params: &'call DocFormatParagraphSetSpacingBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatParagraphSetSpacingResult>> + Send + 'call
{
self.set_spacing_with_options(params, InvokeOptions::default())
}
#[doc = "Set paragraph spacing properties (before, after, line, lineRule) in twips."]
pub async fn set_spacing_with_options(
&self,
params: &DocFormatParagraphSetSpacingBoundParams,
options: InvokeOptions,
) -> Result<DocFormatParagraphSetSpacingResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.paragraph.setSpacing", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.paragraph.setSpacing".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Add or replace a tab stop at a given position."]
pub fn set_tab_stop<'call>(
&'call self,
params: &'call DocFormatParagraphSetTabStopBoundParams,
) -> impl std::future::Future<Output = Result<DocFormatParagraphSetTabStopResult>> + Send + 'call
{
self.set_tab_stop_with_options(params, InvokeOptions::default())
}
#[doc = "Add or replace a tab stop at a given position."]
pub async fn set_tab_stop_with_options(
&self,
params: &DocFormatParagraphSetTabStopBoundParams,
options: InvokeOptions,
) -> Result<DocFormatParagraphSetTabStopResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.format.paragraph.setTabStop", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.format.paragraph.setTabStop".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiHeaderFooters<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiHeaderFooters<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
pub fn page_numbers(&self) -> DocApiHeaderFootersPageNumbers<'a, I> {
DocApiHeaderFootersPageNumbers::new(self.invoker)
}
pub fn parts(&self) -> DocApiHeaderFootersParts<'a, I> {
DocApiHeaderFootersParts::new(self.invoker)
}
pub fn refs(&self) -> DocApiHeaderFootersRefs<'a, I> {
DocApiHeaderFootersRefs::new(self.invoker)
}
#[doc = "Get a single header/footer slot entry by address."]
pub fn get<'call>(
&'call self,
params: &'call DocHeaderFootersGetBoundParams,
) -> impl std::future::Future<Output = Result<DocHeaderFootersGetResult>> + Send + 'call {
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Get a single header/footer slot entry by address."]
pub async fn get_with_options(
&self,
params: &DocHeaderFootersGetBoundParams,
options: InvokeOptions,
) -> Result<DocHeaderFootersGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.headerFooters.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.headerFooters.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List header/footer slot entries across sections."]
pub fn list<'call>(
&'call self,
params: &'call DocHeaderFootersListBoundParams,
) -> impl std::future::Future<Output = Result<DocHeaderFootersListResult>> + Send + 'call {
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List header/footer slot entries across sections."]
pub async fn list_with_options(
&self,
params: &DocHeaderFootersListBoundParams,
options: InvokeOptions,
) -> Result<DocHeaderFootersListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.headerFooters.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.headerFooters.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Resolve the effective header/footer reference for a slot, walking the section inheritance chain."]
pub fn resolve<'call>(
&'call self,
params: &'call DocHeaderFootersResolveBoundParams,
) -> impl std::future::Future<Output = Result<DocHeaderFootersResolveResult>> + Send + 'call
{
self.resolve_with_options(params, InvokeOptions::default())
}
#[doc = "Resolve the effective header/footer reference for a slot, walking the section inheritance chain."]
pub async fn resolve_with_options(
&self,
params: &DocHeaderFootersResolveBoundParams,
options: InvokeOptions,
) -> Result<DocHeaderFootersResolveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.headerFooters.resolve", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.headerFooters.resolve".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiHeaderFootersPageNumbers<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiHeaderFootersPageNumbers<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Read where a section shows page numbers, their alignment, the first-page choice, and the section's number style and start."]
pub fn get<'call>(
&'call self,
params: &'call DocHeaderFootersPageNumbersGetBoundParams,
) -> impl std::future::Future<Output = Result<DocHeaderFootersPageNumbersGetResult>> + Send + 'call
{
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Read where a section shows page numbers, their alignment, the first-page choice, and the section's number style and start."]
pub async fn get_with_options(
&self,
params: &DocHeaderFootersPageNumbersGetBoundParams,
options: InvokeOptions,
) -> Result<DocHeaderFootersPageNumbersGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.headerFooters.pageNumbers.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.headerFooters.pageNumbers.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Atomically number a section's pages with a live PAGE field in its header or footer, with alignment, a first-page choice, and an optional number style and start."]
pub fn insert<'call>(
&'call self,
params: &'call DocHeaderFootersPageNumbersInsertBoundParams,
) -> impl std::future::Future<Output = Result<DocHeaderFootersPageNumbersInsertResult>> + Send + 'call
{
self.insert_with_options(params, InvokeOptions::default())
}
#[doc = "Atomically number a section's pages with a live PAGE field in its header or footer, with alignment, a first-page choice, and an optional number style and start."]
pub async fn insert_with_options(
&self,
params: &DocHeaderFootersPageNumbersInsertBoundParams,
options: InvokeOptions,
) -> Result<DocHeaderFootersPageNumbersInsertResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.headerFooters.pageNumbers.insert", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.headerFooters.pageNumbers.insert".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Atomically remove a section's PAGE fields from its header, footer, or both, keeping other header and footer content."]
pub fn remove<'call>(
&'call self,
params: &'call DocHeaderFootersPageNumbersRemoveBoundParams,
) -> impl std::future::Future<Output = Result<DocHeaderFootersPageNumbersRemoveResult>> + Send + 'call
{
self.remove_with_options(params, InvokeOptions::default())
}
#[doc = "Atomically remove a section's PAGE fields from its header, footer, or both, keeping other header and footer content."]
pub async fn remove_with_options(
&self,
params: &DocHeaderFootersPageNumbersRemoveBoundParams,
options: InvokeOptions,
) -> Result<DocHeaderFootersPageNumbersRemoveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.headerFooters.pageNumbers.remove", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.headerFooters.pageNumbers.remove".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Atomically add a section's page numbers or change them: move them between header and footer, realign them, show or hide them on the first page, and set the number style and start."]
pub fn set<'call>(
&'call self,
params: &'call DocHeaderFootersPageNumbersSetBoundParams,
) -> impl std::future::Future<Output = Result<DocHeaderFootersPageNumbersSetResult>> + Send + 'call
{
self.set_with_options(params, InvokeOptions::default())
}
#[doc = "Atomically add a section's page numbers or change them: move them between header and footer, realign them, show or hide them on the first page, and set the number style and start."]
pub async fn set_with_options(
&self,
params: &DocHeaderFootersPageNumbersSetBoundParams,
options: InvokeOptions,
) -> Result<DocHeaderFootersPageNumbersSetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.headerFooters.pageNumbers.set", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.headerFooters.pageNumbers.set".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiHeaderFootersParts<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiHeaderFootersParts<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Create a new independent header/footer part, optionally cloned from an existing part."]
pub fn create<'call>(
&'call self,
params: &'call DocHeaderFootersPartsCreateBoundParams,
) -> impl std::future::Future<Output = Result<DocHeaderFootersPartsCreateResult>> + Send + 'call
{
self.create_with_options(params, InvokeOptions::default())
}
#[doc = "Create a new independent header/footer part, optionally cloned from an existing part."]
pub async fn create_with_options(
&self,
params: &DocHeaderFootersPartsCreateBoundParams,
options: InvokeOptions,
) -> Result<DocHeaderFootersPartsCreateResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.headerFooters.parts.create", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.headerFooters.parts.create".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Delete a header/footer part and its associated relationship when no section slots reference it."]
pub fn delete<'call>(
&'call self,
params: &'call DocHeaderFootersPartsDeleteBoundParams,
) -> impl std::future::Future<Output = Result<DocHeaderFootersPartsDeleteResult>> + Send + 'call
{
self.delete_with_options(params, InvokeOptions::default())
}
#[doc = "Delete a header/footer part and its associated relationship when no section slots reference it."]
pub async fn delete_with_options(
&self,
params: &DocHeaderFootersPartsDeleteBoundParams,
options: InvokeOptions,
) -> Result<DocHeaderFootersPartsDeleteResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.headerFooters.parts.delete", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.headerFooters.parts.delete".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List unique header/footer part records from document relationships."]
pub fn list<'call>(
&'call self,
params: &'call DocHeaderFootersPartsListBoundParams,
) -> impl std::future::Future<Output = Result<DocHeaderFootersPartsListResult>> + Send + 'call
{
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List unique header/footer part records from document relationships."]
pub async fn list_with_options(
&self,
params: &DocHeaderFootersPartsListBoundParams,
options: InvokeOptions,
) -> Result<DocHeaderFootersPartsListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.headerFooters.parts.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.headerFooters.parts.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiHeaderFootersRefs<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiHeaderFootersRefs<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Clear an explicit header/footer reference from a section slot."]
pub fn clear<'call>(
&'call self,
params: &'call DocHeaderFootersRefsClearBoundParams,
) -> impl std::future::Future<Output = Result<DocHeaderFootersRefsClearResult>> + Send + 'call
{
self.clear_with_options(params, InvokeOptions::default())
}
#[doc = "Clear an explicit header/footer reference from a section slot."]
pub async fn clear_with_options(
&self,
params: &DocHeaderFootersRefsClearBoundParams,
options: InvokeOptions,
) -> Result<DocHeaderFootersRefsClearResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.headerFooters.refs.clear", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.headerFooters.refs.clear".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set an explicit header/footer reference on a section slot."]
pub fn set<'call>(
&'call self,
params: &'call DocHeaderFootersRefsSetBoundParams,
) -> impl std::future::Future<Output = Result<DocHeaderFootersRefsSetResult>> + Send + 'call
{
self.set_with_options(params, InvokeOptions::default())
}
#[doc = "Set an explicit header/footer reference on a section slot."]
pub async fn set_with_options(
&self,
params: &DocHeaderFootersRefsSetBoundParams,
options: InvokeOptions,
) -> Result<DocHeaderFootersRefsSetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.headerFooters.refs.set", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.headerFooters.refs.set".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Link or unlink a header/footer slot to/from the previous section."]
pub fn set_linked_to_previous<'call>(
&'call self,
params: &'call DocHeaderFootersRefsSetLinkedToPreviousBoundParams,
) -> impl std::future::Future<Output = Result<DocHeaderFootersRefsSetLinkedToPreviousResult>>
+ Send
+ 'call {
self.set_linked_to_previous_with_options(params, InvokeOptions::default())
}
#[doc = "Link or unlink a header/footer slot to/from the previous section."]
pub async fn set_linked_to_previous_with_options(
&self,
params: &DocHeaderFootersRefsSetLinkedToPreviousBoundParams,
options: InvokeOptions,
) -> Result<DocHeaderFootersRefsSetLinkedToPreviousResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke(
"doc.headerFooters.refs.setLinkedToPrevious",
params,
options,
)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.headerFooters.refs.setLinkedToPrevious".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiHistory<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiHistory<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Query the current undo/redo history state of the document."]
pub fn get<'call>(
&'call self,
params: &'call DocHistoryGetBoundParams,
) -> impl std::future::Future<Output = Result<DocHistoryGetResult>> + Send + 'call {
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Query the current undo/redo history state of the document."]
pub async fn get_with_options(
&self,
params: &DocHistoryGetBoundParams,
options: InvokeOptions,
) -> Result<DocHistoryGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.history.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.history.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Redo the most recently undone action in the document."]
pub fn redo<'call>(
&'call self,
params: &'call DocHistoryRedoBoundParams,
) -> impl std::future::Future<Output = Result<DocHistoryRedoResult>> + Send + 'call {
self.redo_with_options(params, InvokeOptions::default())
}
#[doc = "Redo the most recently undone action in the document."]
pub async fn redo_with_options(
&self,
params: &DocHistoryRedoBoundParams,
options: InvokeOptions,
) -> Result<DocHistoryRedoResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.history.redo", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.history.redo".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Undo the most recent history-safe mutation in the document."]
pub fn undo<'call>(
&'call self,
params: &'call DocHistoryUndoBoundParams,
) -> impl std::future::Future<Output = Result<DocHistoryUndoResult>> + Send + 'call {
self.undo_with_options(params, InvokeOptions::default())
}
#[doc = "Undo the most recent history-safe mutation in the document."]
pub async fn undo_with_options(
&self,
params: &DocHistoryUndoBoundParams,
options: InvokeOptions,
) -> Result<DocHistoryUndoResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.history.undo", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.history.undo".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiHyperlinks<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiHyperlinks<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Retrieve details of a specific hyperlink by its inline address."]
pub fn get<'call>(
&'call self,
params: &'call DocHyperlinksGetBoundParams,
) -> impl std::future::Future<Output = Result<DocHyperlinksGetResult>> + Send + 'call {
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Retrieve details of a specific hyperlink by its inline address."]
pub async fn get_with_options(
&self,
params: &DocHyperlinksGetBoundParams,
options: InvokeOptions,
) -> Result<DocHyperlinksGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.hyperlinks.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.hyperlinks.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert new linked text at a target position."]
pub fn insert<'call>(
&'call self,
params: &'call DocHyperlinksInsertBoundParams,
) -> impl std::future::Future<Output = Result<DocHyperlinksInsertResult>> + Send + 'call {
self.insert_with_options(params, InvokeOptions::default())
}
#[doc = "Insert new linked text at a target position."]
pub async fn insert_with_options(
&self,
params: &DocHyperlinksInsertBoundParams,
options: InvokeOptions,
) -> Result<DocHyperlinksInsertResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.hyperlinks.insert", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.hyperlinks.insert".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List the hyperlinks of one story, with optional filtering by href, anchor, or display text. The body is listed by default; pass `in` with a footnote or endnote story to list that note."]
pub fn list<'call>(
&'call self,
params: &'call DocHyperlinksListBoundParams,
) -> impl std::future::Future<Output = Result<DocHyperlinksListResult>> + Send + 'call {
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List the hyperlinks of one story, with optional filtering by href, anchor, or display text. The body is listed by default; pass `in` with a footnote or endnote story to list that note."]
pub async fn list_with_options(
&self,
params: &DocHyperlinksListBoundParams,
options: InvokeOptions,
) -> Result<DocHyperlinksListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.hyperlinks.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.hyperlinks.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Update hyperlink metadata (destination, tooltip, target, rel) without changing display text."]
pub fn patch<'call>(
&'call self,
params: &'call DocHyperlinksPatchBoundParams,
) -> impl std::future::Future<Output = Result<DocHyperlinksPatchResult>> + Send + 'call {
self.patch_with_options(params, InvokeOptions::default())
}
#[doc = "Update hyperlink metadata (destination, tooltip, target, rel) without changing display text."]
pub async fn patch_with_options(
&self,
params: &DocHyperlinksPatchBoundParams,
options: InvokeOptions,
) -> Result<DocHyperlinksPatchResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.hyperlinks.patch", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.hyperlinks.patch".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove a hyperlink. Mode 'unwrap' preserves display text; 'deleteText' removes the linked content entirely."]
pub fn remove<'call>(
&'call self,
params: &'call DocHyperlinksRemoveBoundParams,
) -> impl std::future::Future<Output = Result<DocHyperlinksRemoveResult>> + Send + 'call {
self.remove_with_options(params, InvokeOptions::default())
}
#[doc = "Remove a hyperlink. Mode 'unwrap' preserves display text; 'deleteText' removes the linked content entirely."]
pub async fn remove_with_options(
&self,
params: &DocHyperlinksRemoveBoundParams,
options: InvokeOptions,
) -> Result<DocHyperlinksRemoveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.hyperlinks.remove", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.hyperlinks.remove".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Wrap an existing text range with a hyperlink. A range inside one pending tracked insertion is linked without authoring a revision: the insertion keeps its author and date and is split at the range boundaries. Ranges that cross a revision boundary or touch deleted, moved or several revisions are refused."]
pub fn wrap<'call>(
&'call self,
params: &'call DocHyperlinksWrapBoundParams,
) -> impl std::future::Future<Output = Result<DocHyperlinksWrapResult>> + Send + 'call {
self.wrap_with_options(params, InvokeOptions::default())
}
#[doc = "Wrap an existing text range with a hyperlink. A range inside one pending tracked insertion is linked without authoring a revision: the insertion keeps its author and date and is split at the range boundaries. Ranges that cross a revision boundary or touch deleted, moved or several revisions are refused."]
pub async fn wrap_with_options(
&self,
params: &DocHyperlinksWrapBoundParams,
options: InvokeOptions,
) -> Result<DocHyperlinksWrapResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.hyperlinks.wrap", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.hyperlinks.wrap".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiImages<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiImages<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Convert an inline image to floating placement."]
pub fn convert_to_floating<'call>(
&'call self,
params: &'call DocImagesConvertToFloatingBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesConvertToFloatingResult>> + Send + 'call
{
self.convert_to_floating_with_options(params, InvokeOptions::default())
}
#[doc = "Convert an inline image to floating placement."]
pub async fn convert_to_floating_with_options(
&self,
params: &DocImagesConvertToFloatingBoundParams,
options: InvokeOptions,
) -> Result<DocImagesConvertToFloatingResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.convertToFloating", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.convertToFloating".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Convert a floating image to inline placement."]
pub fn convert_to_inline<'call>(
&'call self,
params: &'call DocImagesConvertToInlineBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesConvertToInlineResult>> + Send + 'call
{
self.convert_to_inline_with_options(params, InvokeOptions::default())
}
#[doc = "Convert a floating image to inline placement."]
pub async fn convert_to_inline_with_options(
&self,
params: &DocImagesConvertToInlineBoundParams,
options: InvokeOptions,
) -> Result<DocImagesConvertToInlineResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.convertToInline", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.convertToInline".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Apply rectangular edge-percentage crop to an image."]
pub fn crop<'call>(
&'call self,
params: &'call DocImagesCropBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesCropResult>> + Send + 'call {
self.crop_with_options(params, InvokeOptions::default())
}
#[doc = "Apply rectangular edge-percentage crop to an image."]
pub async fn crop_with_options(
&self,
params: &DocImagesCropBoundParams,
options: InvokeOptions,
) -> Result<DocImagesCropResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.crop", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.crop".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Delete an image from the document."]
pub fn delete<'call>(
&'call self,
params: &'call DocImagesDeleteBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesDeleteResult>> + Send + 'call {
self.delete_with_options(params, InvokeOptions::default())
}
#[doc = "Delete an image from the document."]
pub async fn delete_with_options(
&self,
params: &DocImagesDeleteBoundParams,
options: InvokeOptions,
) -> Result<DocImagesDeleteResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.delete", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.delete".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set horizontal and/or vertical flip state for an image."]
pub fn flip<'call>(
&'call self,
params: &'call DocImagesFlipBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesFlipResult>> + Send + 'call {
self.flip_with_options(params, InvokeOptions::default())
}
#[doc = "Set horizontal and/or vertical flip state for an image."]
pub async fn flip_with_options(
&self,
params: &DocImagesFlipBoundParams,
options: InvokeOptions,
) -> Result<DocImagesFlipResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.flip", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.flip".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Get details for a specific image by its stable ID."]
pub fn get<'call>(
&'call self,
params: &'call DocImagesGetBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesGetResult>> + Send + 'call {
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Get details for a specific image by its stable ID."]
pub async fn get_with_options(
&self,
params: &DocImagesGetBoundParams,
options: InvokeOptions,
) -> Result<DocImagesGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert a caption paragraph below the image."]
pub fn insert_caption<'call>(
&'call self,
params: &'call DocImagesInsertCaptionBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesInsertCaptionResult>> + Send + 'call
{
self.insert_caption_with_options(params, InvokeOptions::default())
}
#[doc = "Insert a caption paragraph below the image."]
pub async fn insert_caption_with_options(
&self,
params: &DocImagesInsertCaptionBoundParams,
options: InvokeOptions,
) -> Result<DocImagesInsertCaptionResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.insertCaption", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.insertCaption".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List all images in the document."]
pub fn list<'call>(
&'call self,
params: &'call DocImagesListBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesListResult>> + Send + 'call {
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List all images in the document."]
pub async fn list_with_options(
&self,
params: &DocImagesListBoundParams,
options: InvokeOptions,
) -> Result<DocImagesListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Move an image to a new location in the document. Tracked-mode authoring supports safe sole inline-image body paragraphs and emits paired `<w:moveFrom>` / `<w:moveTo>` wrappers with explicit move range marker identity."]
pub fn move_<'call>(
&'call self,
params: &'call DocImagesMoveBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesMoveResult>> + Send + 'call {
self.move_with_options(params, InvokeOptions::default())
}
#[doc = "Move an image to a new location in the document. Tracked-mode authoring supports safe sole inline-image body paragraphs and emits paired `<w:moveFrom>` / `<w:moveTo>` wrappers with explicit move range marker identity."]
pub async fn move_with_options(
&self,
params: &DocImagesMoveBoundParams,
options: InvokeOptions,
) -> Result<DocImagesMoveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.move", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.move".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove the caption paragraph from below the image."]
pub fn remove_caption<'call>(
&'call self,
params: &'call DocImagesRemoveCaptionBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesRemoveCaptionResult>> + Send + 'call
{
self.remove_caption_with_options(params, InvokeOptions::default())
}
#[doc = "Remove the caption paragraph from below the image."]
pub async fn remove_caption_with_options(
&self,
params: &DocImagesRemoveCaptionBoundParams,
options: InvokeOptions,
) -> Result<DocImagesRemoveCaptionResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.removeCaption", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.removeCaption".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Replace the image source while preserving identity and placement."]
pub fn replace_source<'call>(
&'call self,
params: &'call DocImagesReplaceSourceBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesReplaceSourceResult>> + Send + 'call
{
self.replace_source_with_options(params, InvokeOptions::default())
}
#[doc = "Replace the image source while preserving identity and placement."]
pub async fn replace_source_with_options(
&self,
params: &DocImagesReplaceSourceBoundParams,
options: InvokeOptions,
) -> Result<DocImagesReplaceSourceResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.replaceSource", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.replaceSource".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove all cropping from an image."]
pub fn reset_crop<'call>(
&'call self,
params: &'call DocImagesResetCropBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesResetCropResult>> + Send + 'call {
self.reset_crop_with_options(params, InvokeOptions::default())
}
#[doc = "Remove all cropping from an image."]
pub async fn reset_crop_with_options(
&self,
params: &DocImagesResetCropBoundParams,
options: InvokeOptions,
) -> Result<DocImagesResetCropResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.resetCrop", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.resetCrop".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the absolute rotation angle for an image."]
pub fn rotate<'call>(
&'call self,
params: &'call DocImagesRotateBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesRotateResult>> + Send + 'call {
self.rotate_with_options(params, InvokeOptions::default())
}
#[doc = "Set the absolute rotation angle for an image."]
pub async fn rotate_with_options(
&self,
params: &DocImagesRotateBoundParams,
options: InvokeOptions,
) -> Result<DocImagesRotateResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.rotate", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.rotate".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Scale an image by a uniform factor applied to both dimensions."]
pub fn scale<'call>(
&'call self,
params: &'call DocImagesScaleBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesScaleResult>> + Send + 'call {
self.scale_with_options(params, InvokeOptions::default())
}
#[doc = "Scale an image by a uniform factor applied to both dimensions."]
pub async fn scale_with_options(
&self,
params: &DocImagesScaleBoundParams,
options: InvokeOptions,
) -> Result<DocImagesScaleResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.scale", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.scale".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the accessibility description (alt text) for an image."]
pub fn set_alt_text<'call>(
&'call self,
params: &'call DocImagesSetAltTextBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesSetAltTextResult>> + Send + 'call {
self.set_alt_text_with_options(params, InvokeOptions::default())
}
#[doc = "Set the accessibility description (alt text) for an image."]
pub async fn set_alt_text_with_options(
&self,
params: &DocImagesSetAltTextBoundParams,
options: InvokeOptions,
) -> Result<DocImagesSetAltTextResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.setAltText", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.setAltText".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set anchor behavior options for a floating image."]
pub fn set_anchor_options<'call>(
&'call self,
params: &'call DocImagesSetAnchorOptionsBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesSetAnchorOptionsResult>> + Send + 'call
{
self.set_anchor_options_with_options(params, InvokeOptions::default())
}
#[doc = "Set anchor behavior options for a floating image."]
pub async fn set_anchor_options_with_options(
&self,
params: &DocImagesSetAnchorOptionsBoundParams,
options: InvokeOptions,
) -> Result<DocImagesSetAnchorOptionsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.setAnchorOptions", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.setAnchorOptions".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Mark or unmark an image as decorative."]
pub fn set_decorative<'call>(
&'call self,
params: &'call DocImagesSetDecorativeBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesSetDecorativeResult>> + Send + 'call
{
self.set_decorative_with_options(params, InvokeOptions::default())
}
#[doc = "Mark or unmark an image as decorative."]
pub async fn set_decorative_with_options(
&self,
params: &DocImagesSetDecorativeBoundParams,
options: InvokeOptions,
) -> Result<DocImagesSetDecorativeResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.setDecorative", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.setDecorative".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or remove the hyperlink attached to an image."]
pub fn set_hyperlink<'call>(
&'call self,
params: &'call DocImagesSetHyperlinkBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesSetHyperlinkResult>> + Send + 'call {
self.set_hyperlink_with_options(params, InvokeOptions::default())
}
#[doc = "Set or remove the hyperlink attached to an image."]
pub async fn set_hyperlink_with_options(
&self,
params: &DocImagesSetHyperlinkBoundParams,
options: InvokeOptions,
) -> Result<DocImagesSetHyperlinkResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.setHyperlink", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.setHyperlink".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Lock or unlock the aspect ratio for an image."]
pub fn set_lock_aspect_ratio<'call>(
&'call self,
params: &'call DocImagesSetLockAspectRatioBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesSetLockAspectRatioResult>> + Send + 'call
{
self.set_lock_aspect_ratio_with_options(params, InvokeOptions::default())
}
#[doc = "Lock or unlock the aspect ratio for an image."]
pub async fn set_lock_aspect_ratio_with_options(
&self,
params: &DocImagesSetLockAspectRatioBoundParams,
options: InvokeOptions,
) -> Result<DocImagesSetLockAspectRatioResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.setLockAspectRatio", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.setLockAspectRatio".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the object name for an image."]
pub fn set_name<'call>(
&'call self,
params: &'call DocImagesSetNameBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesSetNameResult>> + Send + 'call {
self.set_name_with_options(params, InvokeOptions::default())
}
#[doc = "Set the object name for an image."]
pub async fn set_name_with_options(
&self,
params: &DocImagesSetNameBoundParams,
options: InvokeOptions,
) -> Result<DocImagesSetNameResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.setName", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.setName".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the anchor position for a floating image."]
pub fn set_position<'call>(
&'call self,
params: &'call DocImagesSetPositionBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesSetPositionResult>> + Send + 'call {
self.set_position_with_options(params, InvokeOptions::default())
}
#[doc = "Set the anchor position for a floating image."]
pub async fn set_position_with_options(
&self,
params: &DocImagesSetPositionBoundParams,
options: InvokeOptions,
) -> Result<DocImagesSetPositionResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.setPosition", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.setPosition".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set explicit width/height for an image."]
pub fn set_size<'call>(
&'call self,
params: &'call DocImagesSetSizeBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesSetSizeResult>> + Send + 'call {
self.set_size_with_options(params, InvokeOptions::default())
}
#[doc = "Set explicit width/height for an image."]
pub async fn set_size_with_options(
&self,
params: &DocImagesSetSizeBoundParams,
options: InvokeOptions,
) -> Result<DocImagesSetSizeResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.setSize", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.setSize".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the text-wrap distance margins for a floating image."]
pub fn set_wrap_distances<'call>(
&'call self,
params: &'call DocImagesSetWrapDistancesBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesSetWrapDistancesResult>> + Send + 'call
{
self.set_wrap_distances_with_options(params, InvokeOptions::default())
}
#[doc = "Set the text-wrap distance margins for a floating image."]
pub async fn set_wrap_distances_with_options(
&self,
params: &DocImagesSetWrapDistancesBoundParams,
options: InvokeOptions,
) -> Result<DocImagesSetWrapDistancesResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.setWrapDistances", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.setWrapDistances".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set which side(s) text wraps around a floating image."]
pub fn set_wrap_side<'call>(
&'call self,
params: &'call DocImagesSetWrapSideBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesSetWrapSideResult>> + Send + 'call {
self.set_wrap_side_with_options(params, InvokeOptions::default())
}
#[doc = "Set which side(s) text wraps around a floating image."]
pub async fn set_wrap_side_with_options(
&self,
params: &DocImagesSetWrapSideBoundParams,
options: InvokeOptions,
) -> Result<DocImagesSetWrapSideResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.setWrapSide", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.setWrapSide".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the text wrapping type for a floating image."]
pub fn set_wrap_type<'call>(
&'call self,
params: &'call DocImagesSetWrapTypeBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesSetWrapTypeResult>> + Send + 'call {
self.set_wrap_type_with_options(params, InvokeOptions::default())
}
#[doc = "Set the text wrapping type for a floating image."]
pub async fn set_wrap_type_with_options(
&self,
params: &DocImagesSetWrapTypeBoundParams,
options: InvokeOptions,
) -> Result<DocImagesSetWrapTypeResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.setWrapType", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.setWrapType".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the z-order (relativeHeight) for a floating image."]
pub fn set_z_order<'call>(
&'call self,
params: &'call DocImagesSetZOrderBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesSetZOrderResult>> + Send + 'call {
self.set_z_order_with_options(params, InvokeOptions::default())
}
#[doc = "Set the z-order (relativeHeight) for a floating image."]
pub async fn set_z_order_with_options(
&self,
params: &DocImagesSetZOrderBoundParams,
options: InvokeOptions,
) -> Result<DocImagesSetZOrderResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.setZOrder", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.setZOrder".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Update the text of an existing caption paragraph."]
pub fn update_caption<'call>(
&'call self,
params: &'call DocImagesUpdateCaptionBoundParams,
) -> impl std::future::Future<Output = Result<DocImagesUpdateCaptionResult>> + Send + 'call
{
self.update_caption_with_options(params, InvokeOptions::default())
}
#[doc = "Update the text of an existing caption paragraph."]
pub async fn update_caption_with_options(
&self,
params: &DocImagesUpdateCaptionBoundParams,
options: InvokeOptions,
) -> Result<DocImagesUpdateCaptionResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.images.updateCaption", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.images.updateCaption".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiIndex<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiIndex<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
pub fn entries(&self) -> DocApiIndexEntries<'a, I> {
DocApiIndexEntries::new(self.invoker)
}
#[doc = "Update the configuration of an existing index block."]
pub fn configure<'call>(
&'call self,
params: &'call DocIndexConfigureBoundParams,
) -> impl std::future::Future<Output = Result<DocIndexConfigureResult>> + Send + 'call {
self.configure_with_options(params, InvokeOptions::default())
}
#[doc = "Update the configuration of an existing index block."]
pub async fn configure_with_options(
&self,
params: &DocIndexConfigureBoundParams,
options: InvokeOptions,
) -> Result<DocIndexConfigureResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.index.configure", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.index.configure".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Get detailed information about a specific index block."]
pub fn get<'call>(
&'call self,
params: &'call DocIndexGetBoundParams,
) -> impl std::future::Future<Output = Result<DocIndexGetResult>> + Send + 'call {
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Get detailed information about a specific index block."]
pub async fn get_with_options(
&self,
params: &DocIndexGetBoundParams,
options: InvokeOptions,
) -> Result<DocIndexGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.index.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.index.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert a new index block at a target location."]
pub fn insert<'call>(
&'call self,
params: &'call DocIndexInsertBoundParams,
) -> impl std::future::Future<Output = Result<DocIndexInsertResult>> + Send + 'call {
self.insert_with_options(params, InvokeOptions::default())
}
#[doc = "Insert a new index block at a target location."]
pub async fn insert_with_options(
&self,
params: &DocIndexInsertBoundParams,
options: InvokeOptions,
) -> Result<DocIndexInsertResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.index.insert", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.index.insert".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List all index blocks in the document."]
pub fn list<'call>(
&'call self,
params: &'call DocIndexListBoundParams,
) -> impl std::future::Future<Output = Result<DocIndexListResult>> + Send + 'call {
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List all index blocks in the document."]
pub async fn list_with_options(
&self,
params: &DocIndexListBoundParams,
options: InvokeOptions,
) -> Result<DocIndexListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.index.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.index.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Rebuild (regenerate) an index block from its entries."]
pub fn rebuild<'call>(
&'call self,
params: &'call DocIndexRebuildBoundParams,
) -> impl std::future::Future<Output = Result<DocIndexRebuildResult>> + Send + 'call {
self.rebuild_with_options(params, InvokeOptions::default())
}
#[doc = "Rebuild (regenerate) an index block from its entries."]
pub async fn rebuild_with_options(
&self,
params: &DocIndexRebuildBoundParams,
options: InvokeOptions,
) -> Result<DocIndexRebuildResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.index.rebuild", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.index.rebuild".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove an index block from the document."]
pub fn remove<'call>(
&'call self,
params: &'call DocIndexRemoveBoundParams,
) -> impl std::future::Future<Output = Result<DocIndexRemoveResult>> + Send + 'call {
self.remove_with_options(params, InvokeOptions::default())
}
#[doc = "Remove an index block from the document."]
pub async fn remove_with_options(
&self,
params: &DocIndexRemoveBoundParams,
options: InvokeOptions,
) -> Result<DocIndexRemoveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.index.remove", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.index.remove".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiIndexEntries<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiIndexEntries<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Get detailed information about a specific XE index entry."]
pub fn get<'call>(
&'call self,
params: &'call DocIndexEntriesGetBoundParams,
) -> impl std::future::Future<Output = Result<DocIndexEntriesGetResult>> + Send + 'call {
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Get detailed information about a specific XE index entry."]
pub async fn get_with_options(
&self,
params: &DocIndexEntriesGetBoundParams,
options: InvokeOptions,
) -> Result<DocIndexEntriesGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.index.entries.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.index.entries.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert a new XE index entry field at a target location."]
pub fn insert<'call>(
&'call self,
params: &'call DocIndexEntriesInsertBoundParams,
) -> impl std::future::Future<Output = Result<DocIndexEntriesInsertResult>> + Send + 'call {
self.insert_with_options(params, InvokeOptions::default())
}
#[doc = "Insert a new XE index entry field at a target location."]
pub async fn insert_with_options(
&self,
params: &DocIndexEntriesInsertBoundParams,
options: InvokeOptions,
) -> Result<DocIndexEntriesInsertResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.index.entries.insert", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.index.entries.insert".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List all XE (index entry) fields in the document."]
pub fn list<'call>(
&'call self,
params: &'call DocIndexEntriesListBoundParams,
) -> impl std::future::Future<Output = Result<DocIndexEntriesListResult>> + Send + 'call {
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List all XE (index entry) fields in the document."]
pub async fn list_with_options(
&self,
params: &DocIndexEntriesListBoundParams,
options: InvokeOptions,
) -> Result<DocIndexEntriesListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.index.entries.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.index.entries.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove an XE index entry field from the document."]
pub fn remove<'call>(
&'call self,
params: &'call DocIndexEntriesRemoveBoundParams,
) -> impl std::future::Future<Output = Result<DocIndexEntriesRemoveResult>> + Send + 'call {
self.remove_with_options(params, InvokeOptions::default())
}
#[doc = "Remove an XE index entry field from the document."]
pub async fn remove_with_options(
&self,
params: &DocIndexEntriesRemoveBoundParams,
options: InvokeOptions,
) -> Result<DocIndexEntriesRemoveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.index.entries.remove", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.index.entries.remove".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Update the properties of an existing XE index entry."]
pub fn update<'call>(
&'call self,
params: &'call DocIndexEntriesUpdateBoundParams,
) -> impl std::future::Future<Output = Result<DocIndexEntriesUpdateResult>> + Send + 'call {
self.update_with_options(params, InvokeOptions::default())
}
#[doc = "Update the properties of an existing XE index entry."]
pub async fn update_with_options(
&self,
params: &DocIndexEntriesUpdateBoundParams,
options: InvokeOptions,
) -> Result<DocIndexEntriesUpdateResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.index.entries.update", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.index.entries.update".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiLists<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiLists<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Apply a numbering definition to a paragraph. When `/word/numbering.xml` is absent it is materialized atomically together with the package content-type override and document relationship. Seeds bullet or ordered single-level definitions when no `reuseNumId` is provided."]
pub fn apply<'call>(
&'call self,
params: &'call DocListsApplyBoundParams,
) -> impl std::future::Future<Output = Result<DocListsApplyResult>> + Send + 'call {
self.apply_with_options(params, InvokeOptions::default())
}
#[doc = "Apply a numbering definition to a paragraph. When `/word/numbering.xml` is absent it is materialized atomically together with the package content-type override and document relationship. Seeds bullet or ordered single-level definitions when no `reuseNumId` is provided."]
pub async fn apply_with_options(
&self,
params: &DocListsApplyBoundParams,
options: InvokeOptions,
) -> Result<DocListsApplyResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.apply", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.apply".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Apply a built-in list formatting preset to the target list."]
pub fn apply_preset<'call>(
&'call self,
params: &'call DocListsApplyPresetBoundParams,
) -> impl std::future::Future<Output = Result<DocListsApplyPresetResult>> + Send + 'call {
self.apply_preset_with_options(params, InvokeOptions::default())
}
#[doc = "Apply a built-in list formatting preset to the target list."]
pub async fn apply_preset_with_options(
&self,
params: &DocListsApplyPresetBoundParams,
options: InvokeOptions,
) -> Result<DocListsApplyPresetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.applyPreset", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.applyPreset".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Apply a reusable list style to the target list. Sequence-local: preserves other sequences and levels. V2 returns CAPABILITY_UNAVAILABLE when existing numbering cannot be preserved."]
pub fn apply_style<'call>(
&'call self,
params: &'call DocListsApplyStyleBoundParams,
) -> impl std::future::Future<Output = Result<DocListsApplyStyleResult>> + Send + 'call {
self.apply_style_with_options(params, InvokeOptions::default())
}
#[doc = "Apply a reusable list style to the target list. Sequence-local: preserves other sequences and levels. V2 returns CAPABILITY_UNAVAILABLE when existing numbering cannot be preserved."]
pub async fn apply_style_with_options(
&self,
params: &DocListsApplyStyleBoundParams,
options: InvokeOptions,
) -> Result<DocListsApplyStyleResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.applyStyle", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.applyStyle".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Advanced alias for lists.applyStyle. Apply a captured ListTemplate to the target list (abstract-scoped, no clone-on-write)."]
pub fn apply_template<'call>(
&'call self,
params: &'call DocListsApplyTemplateBoundParams,
) -> impl std::future::Future<Output = Result<DocListsApplyTemplateResult>> + Send + 'call {
self.apply_template_with_options(params, InvokeOptions::default())
}
#[doc = "Advanced alias for lists.applyStyle. Apply a captured ListTemplate to the target list (abstract-scoped, no clone-on-write)."]
pub async fn apply_template_with_options(
&self,
params: &DocListsApplyTemplateBoundParams,
options: InvokeOptions,
) -> Result<DocListsApplyTemplateResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.applyTemplate", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.applyTemplate".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Convert non-list paragraphs to list items under an existing list sequence."]
pub fn attach<'call>(
&'call self,
params: &'call DocListsAttachBoundParams,
) -> impl std::future::Future<Output = Result<DocListsAttachResult>> + Send + 'call {
self.attach_with_options(params, InvokeOptions::default())
}
#[doc = "Convert non-list paragraphs to list items under an existing list sequence."]
pub async fn attach_with_options(
&self,
params: &DocListsAttachBoundParams,
options: InvokeOptions,
) -> Result<DocListsAttachResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.attach", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.attach".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Check whether the target sequence can continue numbering from a previous compatible sequence."]
pub fn can_continue_previous<'call>(
&'call self,
params: &'call DocListsCanContinuePreviousBoundParams,
) -> impl std::future::Future<Output = Result<DocListsCanContinuePreviousResult>> + Send + 'call
{
self.can_continue_previous_with_options(params, InvokeOptions::default())
}
#[doc = "Check whether the target sequence can continue numbering from a previous compatible sequence."]
pub async fn can_continue_previous_with_options(
&self,
params: &DocListsCanContinuePreviousBoundParams,
options: InvokeOptions,
) -> Result<DocListsCanContinuePreviousResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.canContinuePrevious", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.canContinuePrevious".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Check whether two adjacent list sequences can be joined."]
pub fn can_join<'call>(
&'call self,
params: &'call DocListsCanJoinBoundParams,
) -> impl std::future::Future<Output = Result<DocListsCanJoinResult>> + Send + 'call {
self.can_join_with_options(params, InvokeOptions::default())
}
#[doc = "Check whether two adjacent list sequences can be joined."]
pub async fn can_join_with_options(
&self,
params: &DocListsCanJoinBoundParams,
options: InvokeOptions,
) -> Result<DocListsCanJoinResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.canJoin", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.canJoin".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Capture reusable effective list formatting, including full level overrides and Word defaults, without instance continuation checkpoints (startOverride)."]
pub fn capture_template<'call>(
&'call self,
params: &'call DocListsCaptureTemplateBoundParams,
) -> impl std::future::Future<Output = Result<DocListsCaptureTemplateResult>> + Send + 'call
{
self.capture_template_with_options(params, InvokeOptions::default())
}
#[doc = "Capture reusable effective list formatting, including full level overrides and Word defaults, without instance continuation checkpoints (startOverride)."]
pub async fn capture_template_with_options(
&self,
params: &DocListsCaptureTemplateBoundParams,
options: InvokeOptions,
) -> Result<DocListsCaptureTemplateResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.captureTemplate", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.captureTemplate".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove instance-level overrides for a specific list level, restoring abstract definition values."]
pub fn clear_level_overrides<'call>(
&'call self,
params: &'call DocListsClearLevelOverridesBoundParams,
) -> impl std::future::Future<Output = Result<DocListsClearLevelOverridesResult>> + Send + 'call
{
self.clear_level_overrides_with_options(params, InvokeOptions::default())
}
#[doc = "Remove instance-level overrides for a specific list level, restoring abstract definition values."]
pub async fn clear_level_overrides_with_options(
&self,
params: &DocListsClearLevelOverridesBoundParams,
options: InvokeOptions,
) -> Result<DocListsClearLevelOverridesResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.clearLevelOverrides", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.clearLevelOverrides".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Continue from the previous compatible list item in the same story. Adopts the previous paragraph's numId+ilvl. Rejects with named reasons when no compatible previous item exists or when an intervening structural boundary blocks the continuation."]
pub fn continue_<'call>(
&'call self,
params: &'call DocListsContinueBoundParams,
) -> impl std::future::Future<Output = Result<DocListsContinueResult>> + Send + 'call {
self.continue_with_options(params, InvokeOptions::default())
}
#[doc = "Continue from the previous compatible list item in the same story. Adopts the previous paragraph's numId+ilvl. Rejects with named reasons when no compatible previous item exists or when an intervening structural boundary blocks the continuation."]
pub async fn continue_with_options(
&self,
params: &DocListsContinueBoundParams,
options: InvokeOptions,
) -> Result<DocListsContinueResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.continue", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.continue".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Continue numbering from the nearest compatible previous list sequence."]
pub fn continue_previous<'call>(
&'call self,
params: &'call DocListsContinuePreviousBoundParams,
) -> impl std::future::Future<Output = Result<DocListsContinuePreviousResult>> + Send + 'call
{
self.continue_previous_with_options(params, InvokeOptions::default())
}
#[doc = "Continue numbering from the nearest compatible previous list sequence."]
pub async fn continue_previous_with_options(
&self,
params: &DocListsContinuePreviousBoundParams,
options: InvokeOptions,
) -> Result<DocListsContinuePreviousResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.continuePrevious", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.continuePrevious".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Convert list items to plain paragraphs, optionally prepending the rendered marker text."]
pub fn convert_to_text<'call>(
&'call self,
params: &'call DocListsConvertToTextBoundParams,
) -> impl std::future::Future<Output = Result<DocListsConvertToTextResult>> + Send + 'call {
self.convert_to_text_with_options(params, InvokeOptions::default())
}
#[doc = "Convert list items to plain paragraphs, optionally prepending the rendered marker text."]
pub async fn convert_to_text_with_options(
&self,
params: &DocListsConvertToTextBoundParams,
options: InvokeOptions,
) -> Result<DocListsConvertToTextResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.convertToText", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.convertToText".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Create a new list from one or more paragraphs. Supports optional preset or style for new sequences. When sequence.mode is \"continuePrevious\", preset and style are not allowed: the new items inherit formatting from the previous sequence."]
pub fn create<'call>(
&'call self,
params: &'call DocListsCreateBoundParams,
) -> impl std::future::Future<Output = Result<DocListsCreateResult>> + Send + 'call {
self.create_with_options(params, InvokeOptions::default())
}
#[doc = "Create a new list from one or more paragraphs. Supports optional preset or style for new sequences. When sequence.mode is \"continuePrevious\", preset and style are not allowed: the new items inherit formatting from the previous sequence."]
pub async fn create_with_options(
&self,
params: &DocListsCreateBoundParams,
options: InvokeOptions,
) -> Result<DocListsCreateResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.create", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.create".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Delete the entire list that contains the targeted list item. Removes ALL items in the same numbered sequence (the contiguous run of list items sharing the target's numbering) AND their text content from the document. Pass any single list item from the list as `target`; the op walks adjacent siblings to find the full list. Use this for \"remove the list\" / \"delete this list\" intents and for the cleanup step of a list-to-table conversion."]
pub fn delete<'call>(
&'call self,
params: &'call DocListsDeleteBoundParams,
) -> impl std::future::Future<Output = Result<DocListsDeleteResult>> + Send + 'call {
self.delete_with_options(params, InvokeOptions::default())
}
#[doc = "Delete the entire list that contains the targeted list item. Removes ALL items in the same numbered sequence (the contiguous run of list items sharing the target's numbering) AND their text content from the document. Pass any single list item from the list as `target`; the op walks adjacent siblings to find the full list. Use this for \"remove the list\" / \"delete this list\" intents and for the cleanup step of a list-to-table conversion."]
pub async fn delete_with_options(
&self,
params: &DocListsDeleteBoundParams,
options: InvokeOptions,
) -> Result<DocListsDeleteResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.delete", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.delete".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove numbering properties from list items, converting them to plain paragraphs."]
pub fn detach<'call>(
&'call self,
params: &'call DocListsDetachBoundParams,
) -> impl std::future::Future<Output = Result<DocListsDetachResult>> + Send + 'call {
self.detach_with_options(params, InvokeOptions::default())
}
#[doc = "Remove numbering properties from list items, converting them to plain paragraphs."]
pub async fn detach_with_options(
&self,
params: &DocListsDetachBoundParams,
options: InvokeOptions,
) -> Result<DocListsDetachResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.detach", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.detach".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Retrieve a specific list node by target."]
pub fn get<'call>(
&'call self,
params: &'call DocListsGetBoundParams,
) -> impl std::future::Future<Output = Result<DocListsGetResult>> + Send + 'call {
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Retrieve a specific list node by target."]
pub async fn get_with_options(
&self,
params: &DocListsGetBoundParams,
options: InvokeOptions,
) -> Result<DocListsGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Read the numbering-aware list state for a paragraph (numId, ilvl, abstract reference, level format). Returns null when the target is not a list item."]
pub fn get_state<'call>(
&'call self,
params: &'call DocListsGetStateBoundParams,
) -> impl std::future::Future<Output = Result<DocListsGetStateResult>> + Send + 'call {
self.get_state_with_options(params, InvokeOptions::default())
}
#[doc = "Read the numbering-aware list state for a paragraph (numId, ilvl, abstract reference, level format). Returns null when the target is not a list item."]
pub async fn get_state_with_options(
&self,
params: &DocListsGetStateBoundParams,
options: InvokeOptions,
) -> Result<DocListsGetStateResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.getState", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.getState".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Read the effective reusable style of a list, including instance-level overrides. Returns a ListStyle that can be applied to other lists via lists.applyStyle."]
pub fn get_style<'call>(
&'call self,
params: &'call DocListsGetStyleBoundParams,
) -> impl std::future::Future<Output = Result<DocListsGetStyleResult>> + Send + 'call {
self.get_style_with_options(params, InvokeOptions::default())
}
#[doc = "Read the effective reusable style of a list, including instance-level overrides. Returns a ListStyle that can be applied to other lists via lists.applyStyle."]
pub async fn get_style_with_options(
&self,
params: &DocListsGetStyleBoundParams,
options: InvokeOptions,
) -> Result<DocListsGetStyleResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.getStyle", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.getStyle".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Increase the indentation level of a list item."]
pub fn indent<'call>(
&'call self,
params: &'call DocListsIndentBoundParams,
) -> impl std::future::Future<Output = Result<DocListsIndentResult>> + Send + 'call {
self.indent_with_options(params, InvokeOptions::default())
}
#[doc = "Increase the indentation level of a list item."]
pub async fn indent_with_options(
&self,
params: &DocListsIndentBoundParams,
options: InvokeOptions,
) -> Result<DocListsIndentResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.indent", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.indent".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert a new list item before or after an existing list item. The new item inherits the target list context. Optional inheritFrom selects a same-story list item for paragraph and run formatting without changing placement or numbering. When omitted, existing paragraph-creation formatting, including next-style handling, is preserved."]
pub fn insert<'call>(
&'call self,
params: &'call DocListsInsertBoundParams,
) -> impl std::future::Future<Output = Result<DocListsInsertResult>> + Send + 'call {
self.insert_with_options(params, InvokeOptions::default())
}
#[doc = "Insert a new list item before or after an existing list item. The new item inherits the target list context. Optional inheritFrom selects a same-story list item for paragraph and run formatting without changing placement or numbering. When omitted, existing paragraph-creation formatting, including next-style handling, is preserved."]
pub async fn insert_with_options(
&self,
params: &DocListsInsertBoundParams,
options: InvokeOptions,
) -> Result<DocListsInsertResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.insert", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.insert".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Merge two adjacent list sequences into one."]
pub fn join<'call>(
&'call self,
params: &'call DocListsJoinBoundParams,
) -> impl std::future::Future<Output = Result<DocListsJoinResult>> + Send + 'call {
self.join_with_options(params, InvokeOptions::default())
}
#[doc = "Merge two adjacent list sequences into one."]
pub async fn join_with_options(
&self,
params: &DocListsJoinBoundParams,
options: InvokeOptions,
) -> Result<DocListsJoinResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.join", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.join".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List all list nodes in the document, optionally filtered by scope."]
pub fn list<'call>(
&'call self,
params: &'call DocListsListBoundParams,
) -> impl std::future::Future<Output = Result<DocListsListResult>> + Send + 'call {
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List all list nodes in the document, optionally filtered by scope."]
pub async fn list_with_options(
&self,
params: &DocListsListBoundParams,
options: InvokeOptions,
) -> Result<DocListsListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Compound: merge two adjacent list sequences into one. Reassigns numId on the absorbed sequence (no strict abstractNumId check: absorbed items adopt the absorbing definition) and deletes empty paragraphs between the two sequences. Use this instead of lists.join for the user-facing \"merge these lists\" intent."]
pub fn merge<'call>(
&'call self,
params: &'call DocListsMergeBoundParams,
) -> impl std::future::Future<Output = Result<DocListsMergeResult>> + Send + 'call {
self.merge_with_options(params, InvokeOptions::default())
}
#[doc = "Compound: merge two adjacent list sequences into one. Reassigns numId on the absorbed sequence (no strict abstractNumId check: absorbed items adopt the absorbing definition) and deletes empty paragraphs between the two sequences. Use this instead of lists.join for the user-facing \"merge these lists\" intent."]
pub async fn merge_with_options(
&self,
params: &DocListsMergeBoundParams,
options: InvokeOptions,
) -> Result<DocListsMergeResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.merge", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.merge".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Decrease the indentation level of a list item."]
pub fn outdent<'call>(
&'call self,
params: &'call DocListsOutdentBoundParams,
) -> impl std::future::Future<Output = Result<DocListsOutdentResult>> + Send + 'call {
self.outdent_with_options(params, InvokeOptions::default())
}
#[doc = "Decrease the indentation level of a list item."]
pub async fn outdent_with_options(
&self,
params: &DocListsOutdentBoundParams,
options: InvokeOptions,
) -> Result<DocListsOutdentResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.outdent", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.outdent".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Strip the `<w:numPr>` from a list-item paragraph. The numbering definition in `/word/numbering.xml` is intentionally NOT modified; orphan cleanup is handled by the export-side stripper."]
pub fn remove<'call>(
&'call self,
params: &'call DocListsRemoveBoundParams,
) -> impl std::future::Future<Output = Result<DocListsRemoveResult>> + Send + 'call {
self.remove_with_options(params, InvokeOptions::default())
}
#[doc = "Strip the `<w:numPr>` from a list-item paragraph. The numbering definition in `/word/numbering.xml` is intentionally NOT modified; orphan cleanup is handled by the export-side stripper."]
pub async fn remove_with_options(
&self,
params: &DocListsRemoveBoundParams,
options: InvokeOptions,
) -> Result<DocListsRemoveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.remove", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.remove".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Restart numbering at a list item. Creates a new `<w:num>` that references the existing `<w:abstractNumId>` with a `<w:lvlOverride><w:startOverride/></w:lvlOverride>`. Distant paragraphs sharing the old numId are intentionally untouched."]
pub fn restart<'call>(
&'call self,
params: &'call DocListsRestartBoundParams,
) -> impl std::future::Future<Output = Result<DocListsRestartResult>> + Send + 'call {
self.restart_with_options(params, InvokeOptions::default())
}
#[doc = "Restart numbering at a list item. Creates a new `<w:num>` that references the existing `<w:abstractNumId>` with a `<w:lvlOverride><w:startOverride/></w:lvlOverride>`. Distant paragraphs sharing the old numId are intentionally untouched."]
pub async fn restart_with_options(
&self,
params: &DocListsRestartBoundParams,
options: InvokeOptions,
) -> Result<DocListsRestartResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.restart", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.restart".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Restart numbering at the target list item with a specific value. If the item is mid-sequence, it is separated first."]
pub fn restart_at<'call>(
&'call self,
params: &'call DocListsRestartAtBoundParams,
) -> impl std::future::Future<Output = Result<DocListsRestartAtResult>> + Send + 'call {
self.restart_at_with_options(params, InvokeOptions::default())
}
#[doc = "Restart numbering at the target list item with a specific value. If the item is mid-sequence, it is separated first."]
pub async fn restart_at_with_options(
&self,
params: &DocListsRestartAtBoundParams,
options: InvokeOptions,
) -> Result<DocListsRestartAtResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.restartAt", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.restartAt".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Split a list sequence at the target item, creating a new sequence from that point forward."]
pub fn separate<'call>(
&'call self,
params: &'call DocListsSeparateBoundParams,
) -> impl std::future::Future<Output = Result<DocListsSeparateResult>> + Send + 'call {
self.separate_with_options(params, InvokeOptions::default())
}
#[doc = "Split a list sequence at the target item, creating a new sequence from that point forward."]
pub async fn separate_with_options(
&self,
params: &DocListsSeparateBoundParams,
options: InvokeOptions,
) -> Result<DocListsSeparateResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.separate", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.separate".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the absolute nesting level (0..8) of a list item."]
pub fn set_level<'call>(
&'call self,
params: &'call DocListsSetLevelBoundParams,
) -> impl std::future::Future<Output = Result<DocListsSetLevelResult>> + Send + 'call {
self.set_level_with_options(params, InvokeOptions::default())
}
#[doc = "Set the absolute nesting level (0..8) of a list item."]
pub async fn set_level_with_options(
&self,
params: &DocListsSetLevelBoundParams,
options: InvokeOptions,
) -> Result<DocListsSetLevelResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.setLevel", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.setLevel".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the marker alignment (left, center, right) for a specific list level."]
pub fn set_level_alignment<'call>(
&'call self,
params: &'call DocListsSetLevelAlignmentBoundParams,
) -> impl std::future::Future<Output = Result<DocListsSetLevelAlignmentResult>> + Send + 'call
{
self.set_level_alignment_with_options(params, InvokeOptions::default())
}
#[doc = "Set the marker alignment (left, center, right) for a specific list level."]
pub async fn set_level_alignment_with_options(
&self,
params: &DocListsSetLevelAlignmentBoundParams,
options: InvokeOptions,
) -> Result<DocListsSetLevelAlignmentResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.setLevelAlignment", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.setLevelAlignment".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the bullet marker text for a specific list level."]
pub fn set_level_bullet<'call>(
&'call self,
params: &'call DocListsSetLevelBulletBoundParams,
) -> impl std::future::Future<Output = Result<DocListsSetLevelBulletResult>> + Send + 'call
{
self.set_level_bullet_with_options(params, InvokeOptions::default())
}
#[doc = "Set the bullet marker text for a specific list level."]
pub async fn set_level_bullet_with_options(
&self,
params: &DocListsSetLevelBulletBoundParams,
options: InvokeOptions,
) -> Result<DocListsSetLevelBulletResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.setLevelBullet", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.setLevelBullet".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the paragraph indentation values (left, hanging, firstLine) for a specific list level."]
pub fn set_level_indents<'call>(
&'call self,
params: &'call DocListsSetLevelIndentsBoundParams,
) -> impl std::future::Future<Output = Result<DocListsSetLevelIndentsResult>> + Send + 'call
{
self.set_level_indents_with_options(params, InvokeOptions::default())
}
#[doc = "Set the paragraph indentation values (left, hanging, firstLine) for a specific list level."]
pub async fn set_level_indents_with_options(
&self,
params: &DocListsSetLevelIndentsBoundParams,
options: InvokeOptions,
) -> Result<DocListsSetLevelIndentsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.setLevelIndents", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.setLevelIndents".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the layout properties (alignment, indentation, trailing character, tab stop) for a specific list level. Accepts partial updates: omitted fields are left unchanged. Sequence-local: preserves other sequences and levels. V2 returns CAPABILITY_UNAVAILABLE when existing numbering cannot be preserved."]
pub fn set_level_layout<'call>(
&'call self,
params: &'call DocListsSetLevelLayoutBoundParams,
) -> impl std::future::Future<Output = Result<DocListsSetLevelLayoutResult>> + Send + 'call
{
self.set_level_layout_with_options(params, InvokeOptions::default())
}
#[doc = "Set the layout properties (alignment, indentation, trailing character, tab stop) for a specific list level. Accepts partial updates: omitted fields are left unchanged. Sequence-local: preserves other sequences and levels. V2 returns CAPABILITY_UNAVAILABLE when existing numbering cannot be preserved."]
pub async fn set_level_layout_with_options(
&self,
params: &DocListsSetLevelLayoutBoundParams,
options: InvokeOptions,
) -> Result<DocListsSetLevelLayoutResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.setLevelLayout", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.setLevelLayout".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the font family used for the marker character at a specific list level."]
pub fn set_level_marker_font<'call>(
&'call self,
params: &'call DocListsSetLevelMarkerFontBoundParams,
) -> impl std::future::Future<Output = Result<DocListsSetLevelMarkerFontResult>> + Send + 'call
{
self.set_level_marker_font_with_options(params, InvokeOptions::default())
}
#[doc = "Set the font family used for the marker character at a specific list level."]
pub async fn set_level_marker_font_with_options(
&self,
params: &DocListsSetLevelMarkerFontBoundParams,
options: InvokeOptions,
) -> Result<DocListsSetLevelMarkerFontResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.setLevelMarkerFont", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.setLevelMarkerFont".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Advanced alias for lists.setLevelNumberStyle/setLevelText/setLevelStart. Set format, pattern, start, and legal numbering in one call (abstract-scoped, no clone-on-write)."]
pub fn set_level_numbering<'call>(
&'call self,
params: &'call DocListsSetLevelNumberingBoundParams,
) -> impl std::future::Future<Output = Result<DocListsSetLevelNumberingResult>> + Send + 'call
{
self.set_level_numbering_with_options(params, InvokeOptions::default())
}
#[doc = "Advanced alias for lists.setLevelNumberStyle/setLevelText/setLevelStart. Set format, pattern, start, and legal numbering in one call (abstract-scoped, no clone-on-write)."]
pub async fn set_level_numbering_with_options(
&self,
params: &DocListsSetLevelNumberingBoundParams,
options: InvokeOptions,
) -> Result<DocListsSetLevelNumberingResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.setLevelNumbering", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.setLevelNumbering".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the numbering style (e.g. decimal, lowerLetter, upperRoman) for a specific list level. Rejects \"bullet\": use setLevelBullet instead. Sequence-local: preserves other sequences and levels. V2 returns CAPABILITY_UNAVAILABLE for numberInDash and inherited, mixed-counter, or nested-restart continuations whose numbering cannot be preserved."]
pub fn set_level_number_style<'call>(
&'call self,
params: &'call DocListsSetLevelNumberStyleBoundParams,
) -> impl std::future::Future<Output = Result<DocListsSetLevelNumberStyleResult>> + Send + 'call
{
self.set_level_number_style_with_options(params, InvokeOptions::default())
}
#[doc = "Set the numbering style (e.g. decimal, lowerLetter, upperRoman) for a specific list level. Rejects \"bullet\": use setLevelBullet instead. Sequence-local: preserves other sequences and levels. V2 returns CAPABILITY_UNAVAILABLE for numberInDash and inherited, mixed-counter, or nested-restart continuations whose numbering cannot be preserved."]
pub async fn set_level_number_style_with_options(
&self,
params: &DocListsSetLevelNumberStyleBoundParams,
options: InvokeOptions,
) -> Result<DocListsSetLevelNumberStyleResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.setLevelNumberStyle", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.setLevelNumberStyle".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set a picture bullet for a specific list level by its OOXML lvlPicBulletId."]
pub fn set_level_picture_bullet<'call>(
&'call self,
params: &'call DocListsSetLevelPictureBulletBoundParams,
) -> impl std::future::Future<Output = Result<DocListsSetLevelPictureBulletResult>> + Send + 'call
{
self.set_level_picture_bullet_with_options(params, InvokeOptions::default())
}
#[doc = "Set a picture bullet for a specific list level by its OOXML lvlPicBulletId."]
pub async fn set_level_picture_bullet_with_options(
&self,
params: &DocListsSetLevelPictureBulletBoundParams,
options: InvokeOptions,
) -> Result<DocListsSetLevelPictureBulletResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.setLevelPictureBullet", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.setLevelPictureBullet".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the restart behavior for a specific list level."]
pub fn set_level_restart<'call>(
&'call self,
params: &'call DocListsSetLevelRestartBoundParams,
) -> impl std::future::Future<Output = Result<DocListsSetLevelRestartResult>> + Send + 'call
{
self.set_level_restart_with_options(params, InvokeOptions::default())
}
#[doc = "Set the restart behavior for a specific list level."]
pub async fn set_level_restart_with_options(
&self,
params: &DocListsSetLevelRestartBoundParams,
options: InvokeOptions,
) -> Result<DocListsSetLevelRestartResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.setLevelRestart", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.setLevelRestart".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the start value for a specific list level. Rejects bullet levels and non-positive values. Sequence-local: preserves other sequences and levels. V2 returns CAPABILITY_UNAVAILABLE when existing numbering cannot be preserved."]
pub fn set_level_start<'call>(
&'call self,
params: &'call DocListsSetLevelStartBoundParams,
) -> impl std::future::Future<Output = Result<DocListsSetLevelStartResult>> + Send + 'call {
self.set_level_start_with_options(params, InvokeOptions::default())
}
#[doc = "Set the start value for a specific list level. Rejects bullet levels and non-positive values. Sequence-local: preserves other sequences and levels. V2 returns CAPABILITY_UNAVAILABLE when existing numbering cannot be preserved."]
pub async fn set_level_start_with_options(
&self,
params: &DocListsSetLevelStartBoundParams,
options: InvokeOptions,
) -> Result<DocListsSetLevelStartResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.setLevelStart", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.setLevelStart".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the level text pattern (e.g. \"%1.\", \"(%1)\") for a specific list level. Uses OOXML level-placeholder syntax. Sequence-local: preserves other sequences and levels. V2 returns CAPABILITY_UNAVAILABLE when existing numbering cannot be preserved."]
pub fn set_level_text<'call>(
&'call self,
params: &'call DocListsSetLevelTextBoundParams,
) -> impl std::future::Future<Output = Result<DocListsSetLevelTextResult>> + Send + 'call {
self.set_level_text_with_options(params, InvokeOptions::default())
}
#[doc = "Set the level text pattern (e.g. \"%1.\", \"(%1)\") for a specific list level. Uses OOXML level-placeholder syntax. Sequence-local: preserves other sequences and levels. V2 returns CAPABILITY_UNAVAILABLE when existing numbering cannot be preserved."]
pub async fn set_level_text_with_options(
&self,
params: &DocListsSetLevelTextBoundParams,
options: InvokeOptions,
) -> Result<DocListsSetLevelTextResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.setLevelText", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.setLevelText".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the trailing character (tab, space, nothing) after the marker for a specific list level."]
pub fn set_level_trailing_character<'call>(
&'call self,
params: &'call DocListsSetLevelTrailingCharacterBoundParams,
) -> impl std::future::Future<Output = Result<DocListsSetLevelTrailingCharacterResult>> + Send + 'call
{
self.set_level_trailing_character_with_options(params, InvokeOptions::default())
}
#[doc = "Set the trailing character (tab, space, nothing) after the marker for a specific list level."]
pub async fn set_level_trailing_character_with_options(
&self,
params: &DocListsSetLevelTrailingCharacterBoundParams,
options: InvokeOptions,
) -> Result<DocListsSetLevelTrailingCharacterResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.setLevelTrailingCharacter", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.setLevelTrailingCharacter".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Convert a list to ordered or bullet and merge adjacent compatible sequences to preserve continuous numbering."]
pub fn set_type<'call>(
&'call self,
params: &'call DocListsSetTypeBoundParams,
) -> impl std::future::Future<Output = Result<DocListsSetTypeResult>> + Send + 'call {
self.set_type_with_options(params, InvokeOptions::default())
}
#[doc = "Convert a list to ordered or bullet and merge adjacent compatible sequences to preserve continuous numbering."]
pub async fn set_type_with_options(
&self,
params: &DocListsSetTypeBoundParams,
options: InvokeOptions,
) -> Result<DocListsSetTypeResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.setType", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.setType".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set an explicit numbering value at the target item. Mid-sequence targets are atomically separated first."]
pub fn set_value<'call>(
&'call self,
params: &'call DocListsSetValueBoundParams,
) -> impl std::future::Future<Output = Result<DocListsSetValueResult>> + Send + 'call {
self.set_value_with_options(params, InvokeOptions::default())
}
#[doc = "Set an explicit numbering value at the target item. Mid-sequence targets are atomically separated first."]
pub async fn set_value_with_options(
&self,
params: &DocListsSetValueBoundParams,
options: InvokeOptions,
) -> Result<DocListsSetValueResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.setValue", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.setValue".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Compound: split a list sequence at the target item into two independent sequences. Runs lists.separate then (by default) lists.setValue(1) so the new half starts numbering fresh at 1. Pass restartNumbering:false for raw separate semantics (new half continues the previous count)."]
pub fn split<'call>(
&'call self,
params: &'call DocListsSplitBoundParams,
) -> impl std::future::Future<Output = Result<DocListsSplitResult>> + Send + 'call {
self.split_with_options(params, InvokeOptions::default())
}
#[doc = "Compound: split a list sequence at the target item into two independent sequences. Runs lists.separate then (by default) lists.setValue(1) so the new half starts numbering fresh at 1. Pass restartNumbering:false for raw separate semantics (new half continues the previous count)."]
pub async fn split_with_options(
&self,
params: &DocListsSplitBoundParams,
options: InvokeOptions,
) -> Result<DocListsSplitResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.lists.split", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.lists.split".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiMetadata<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiMetadata<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Anchor a JSON metadata payload to a span of text. Wraps the target range in a hidden inline content control whose w:tag carries a stable id, and stores the payload in a namespaced Custom XML Data Storage Part. v1 supports text-range anchors only."]
pub fn attach<'call>(
&'call self,
params: &'call DocMetadataAttachBoundParams,
) -> impl std::future::Future<Output = Result<DocMetadataAttachResult>> + Send + 'call {
self.attach_with_options(params, InvokeOptions::default())
}
#[doc = "Anchor a JSON metadata payload to a span of text. Wraps the target range in a hidden inline content control whose w:tag carries a stable id, and stores the payload in a namespaced Custom XML Data Storage Part. v1 supports text-range anchors only."]
pub async fn attach_with_options(
&self,
params: &DocMetadataAttachBoundParams,
options: InvokeOptions,
) -> Result<DocMetadataAttachResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.metadata.attach", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.metadata.attach".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Get a single anchored-metadata entry by id, including its JSON payload."]
pub fn get<'call>(
&'call self,
params: &'call DocMetadataGetBoundParams,
) -> impl std::future::Future<Output = Result<DocMetadataGetResult>> + Send + 'call {
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Get a single anchored-metadata entry by id, including its JSON payload."]
pub async fn get_with_options(
&self,
params: &DocMetadataGetBoundParams,
options: InvokeOptions,
) -> Result<DocMetadataGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.metadata.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.metadata.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List anchored-metadata entries in the document, optionally filtered by consumer namespace and/or a `within` selection (returns only entries whose anchor overlaps `within`)."]
pub fn list<'call>(
&'call self,
params: &'call DocMetadataListBoundParams,
) -> impl std::future::Future<Output = Result<DocMetadataListResult>> + Send + 'call {
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List anchored-metadata entries in the document, optionally filtered by consumer namespace and/or a `within` selection (returns only entries whose anchor overlaps `within`)."]
pub async fn list_with_options(
&self,
params: &DocMetadataListBoundParams,
options: InvokeOptions,
) -> Result<DocMetadataListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.metadata.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.metadata.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove an anchored-metadata entry. Strips the anchor content-control wrapper (its content stays in the document) and deletes the payload entry from the Storage Part. In v1 these writes are sequenced, not transactional: the adapter resolves the target up-front so missing-target failures land before any state change, but a crash strictly between the two writes can leave a dangling payload. When the backing part has no remaining entries, the part itself is removed."]
pub fn remove<'call>(
&'call self,
params: &'call DocMetadataRemoveBoundParams,
) -> impl std::future::Future<Output = Result<DocMetadataRemoveResult>> + Send + 'call {
self.remove_with_options(params, InvokeOptions::default())
}
#[doc = "Remove an anchored-metadata entry. Strips the anchor content-control wrapper (its content stays in the document) and deletes the payload entry from the Storage Part. In v1 these writes are sequenced, not transactional: the adapter resolves the target up-front so missing-target failures land before any state change, but a crash strictly between the two writes can leave a dangling payload. When the backing part has no remaining entries, the part itself is removed."]
pub async fn remove_with_options(
&self,
params: &DocMetadataRemoveBoundParams,
options: InvokeOptions,
) -> Result<DocMetadataRemoveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.metadata.remove", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.metadata.remove".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Find where an anchored-metadata entry is anchored in the document. Returns the SelectionTarget covering the anchor content."]
pub fn resolve<'call>(
&'call self,
params: &'call DocMetadataResolveBoundParams,
) -> impl std::future::Future<Output = Result<DocMetadataResolveResult>> + Send + 'call {
self.resolve_with_options(params, InvokeOptions::default())
}
#[doc = "Find where an anchored-metadata entry is anchored in the document. Returns the SelectionTarget covering the anchor content."]
pub async fn resolve_with_options(
&self,
params: &DocMetadataResolveBoundParams,
options: InvokeOptions,
) -> Result<DocMetadataResolveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.metadata.resolve", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.metadata.resolve".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Replace the JSON payload of an existing anchored-metadata entry. Replace semantics; no merge. The anchor is left untouched."]
pub fn update<'call>(
&'call self,
params: &'call DocMetadataUpdateBoundParams,
) -> impl std::future::Future<Output = Result<DocMetadataUpdateResult>> + Send + 'call {
self.update_with_options(params, InvokeOptions::default())
}
#[doc = "Replace the JSON payload of an existing anchored-metadata entry. Replace semantics; no merge. The anchor is left untouched."]
pub async fn update_with_options(
&self,
params: &DocMetadataUpdateBoundParams,
options: InvokeOptions,
) -> Result<DocMetadataUpdateResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.metadata.update", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.metadata.update".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiMutations<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiMutations<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Execute a mutation plan atomically against the document."]
pub fn apply<'call>(
&'call self,
params: &'call DocMutationsApplyBoundParams,
) -> impl std::future::Future<Output = Result<DocMutationsApplyResult>> + Send + 'call {
self.apply_with_options(params, InvokeOptions::default())
}
#[doc = "Execute a mutation plan atomically against the document."]
pub async fn apply_with_options(
&self,
params: &DocMutationsApplyBoundParams,
options: InvokeOptions,
) -> Result<DocMutationsApplyResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.mutations.apply", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.mutations.apply".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Apply temporary text and review operations without changing undo history."]
pub fn begin_temporary<'call>(
&'call self,
params: &'call DocMutationsBeginTemporaryBoundParams,
) -> impl std::future::Future<Output = Result<DocMutationsBeginTemporaryResult>> + Send + 'call
{
self.begin_temporary_with_options(params, InvokeOptions::default())
}
#[doc = "Apply temporary text and review operations without changing undo history."]
pub async fn begin_temporary_with_options(
&self,
params: &DocMutationsBeginTemporaryBoundParams,
options: InvokeOptions,
) -> Result<DocMutationsBeginTemporaryResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.mutations.beginTemporary", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.mutations.beginTemporary".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Commit the visible temporary preview as one undo entry, optionally applying final operations atomically."]
pub fn commit_temporary<'call>(
&'call self,
params: &'call DocMutationsCommitTemporaryBoundParams,
) -> impl std::future::Future<Output = Result<DocMutationsCommitTemporaryResult>> + Send + 'call
{
self.commit_temporary_with_options(params, InvokeOptions::default())
}
#[doc = "Commit the visible temporary preview as one undo entry, optionally applying final operations atomically."]
pub async fn commit_temporary_with_options(
&self,
params: &DocMutationsCommitTemporaryBoundParams,
options: InvokeOptions,
) -> Result<DocMutationsCommitTemporaryResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.mutations.commitTemporary", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.mutations.commitTemporary".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Dry-run a mutation plan, returning resolved targets without applying changes."]
pub fn preview<'call>(
&'call self,
params: &'call DocMutationsPreviewBoundParams,
) -> impl std::future::Future<Output = Result<DocMutationsPreviewResult>> + Send + 'call {
self.preview_with_options(params, InvokeOptions::default())
}
#[doc = "Dry-run a mutation plan, returning resolved targets without applying changes."]
pub async fn preview_with_options(
&self,
params: &DocMutationsPreviewBoundParams,
options: InvokeOptions,
) -> Result<DocMutationsPreviewResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.mutations.preview", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.mutations.preview".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Replace an active temporary preview against its original document state."]
pub fn replace_temporary<'call>(
&'call self,
params: &'call DocMutationsReplaceTemporaryBoundParams,
) -> impl std::future::Future<Output = Result<DocMutationsReplaceTemporaryResult>> + Send + 'call
{
self.replace_temporary_with_options(params, InvokeOptions::default())
}
#[doc = "Replace an active temporary preview against its original document state."]
pub async fn replace_temporary_with_options(
&self,
params: &DocMutationsReplaceTemporaryBoundParams,
options: InvokeOptions,
) -> Result<DocMutationsReplaceTemporaryResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.mutations.replaceTemporary", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.mutations.replaceTemporary".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Restore the original document and release a temporary preview."]
pub fn rollback_temporary<'call>(
&'call self,
params: &'call DocMutationsRollbackTemporaryBoundParams,
) -> impl std::future::Future<Output = Result<DocMutationsRollbackTemporaryResult>> + Send + 'call
{
self.rollback_temporary_with_options(params, InvokeOptions::default())
}
#[doc = "Restore the original document and release a temporary preview."]
pub async fn rollback_temporary_with_options(
&self,
params: &DocMutationsRollbackTemporaryBoundParams,
options: InvokeOptions,
) -> Result<DocMutationsRollbackTemporaryResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.mutations.rollbackTemporary", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.mutations.rollbackTemporary".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiPermissionRanges<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiPermissionRanges<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Create a permission range exception region in the document. Inserts matched permStart/permEnd markers at the target."]
pub fn create<'call>(
&'call self,
params: &'call DocPermissionRangesCreateBoundParams,
) -> impl std::future::Future<Output = Result<DocPermissionRangesCreateResult>> + Send + 'call
{
self.create_with_options(params, InvokeOptions::default())
}
#[doc = "Create a permission range exception region in the document. Inserts matched permStart/permEnd markers at the target."]
pub async fn create_with_options(
&self,
params: &DocPermissionRangesCreateBoundParams,
options: InvokeOptions,
) -> Result<DocPermissionRangesCreateResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.permissionRanges.create", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.permissionRanges.create".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Get detailed information about a specific permission range by ID."]
pub fn get<'call>(
&'call self,
params: &'call DocPermissionRangesGetBoundParams,
) -> impl std::future::Future<Output = Result<DocPermissionRangesGetResult>> + Send + 'call
{
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Get detailed information about a specific permission range by ID."]
pub async fn get_with_options(
&self,
params: &DocPermissionRangesGetBoundParams,
options: InvokeOptions,
) -> Result<DocPermissionRangesGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.permissionRanges.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.permissionRanges.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List all permission ranges in the document. Returns only complete paired ranges (both start and end markers present)."]
pub fn list<'call>(
&'call self,
params: &'call DocPermissionRangesListBoundParams,
) -> impl std::future::Future<Output = Result<DocPermissionRangesListResult>> + Send + 'call
{
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List all permission ranges in the document. Returns only complete paired ranges (both start and end markers present)."]
pub async fn list_with_options(
&self,
params: &DocPermissionRangesListBoundParams,
options: InvokeOptions,
) -> Result<DocPermissionRangesListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.permissionRanges.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.permissionRanges.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove a permission range by ID. Removes whichever markers exist for the given ID (start, end, or both)."]
pub fn remove<'call>(
&'call self,
params: &'call DocPermissionRangesRemoveBoundParams,
) -> impl std::future::Future<Output = Result<DocPermissionRangesRemoveResult>> + Send + 'call
{
self.remove_with_options(params, InvokeOptions::default())
}
#[doc = "Remove a permission range by ID. Removes whichever markers exist for the given ID (start, end, or both)."]
pub async fn remove_with_options(
&self,
params: &DocPermissionRangesRemoveBoundParams,
options: InvokeOptions,
) -> Result<DocPermissionRangesRemoveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.permissionRanges.remove", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.permissionRanges.remove".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Change which principal is allowed to edit a permission range. Updates the principal fields on the start marker."]
pub fn update_principal<'call>(
&'call self,
params: &'call DocPermissionRangesUpdatePrincipalBoundParams,
) -> impl std::future::Future<Output = Result<DocPermissionRangesUpdatePrincipalResult>> + Send + 'call
{
self.update_principal_with_options(params, InvokeOptions::default())
}
#[doc = "Change which principal is allowed to edit a permission range. Updates the principal fields on the start marker."]
pub async fn update_principal_with_options(
&self,
params: &DocPermissionRangesUpdatePrincipalBoundParams,
options: InvokeOptions,
) -> Result<DocPermissionRangesUpdatePrincipalResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.permissionRanges.updatePrincipal", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.permissionRanges.updatePrincipal".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiPlan<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiPlan<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Execute a compiled batch of plan-safe operation entries with per-entry transactions, capture resolution between entries, and keep-prefix-and-continue failure semantics. Hosts may support atomic: true for all-or-nothing single-commit execution with operation restrictions."]
pub fn execute<'call>(
&'call self,
params: &'call DocPlanExecuteBoundParams,
) -> impl std::future::Future<Output = Result<DocPlanExecuteResult>> + Send + 'call {
self.execute_with_options(params, InvokeOptions::default())
}
#[doc = "Execute a compiled batch of plan-safe operation entries with per-entry transactions, capture resolution between entries, and keep-prefix-and-continue failure semantics. Hosts may support atomic: true for all-or-nothing single-commit execution with operation restrictions."]
pub async fn execute_with_options(
&self,
params: &DocPlanExecuteBoundParams,
options: InvokeOptions,
) -> Result<DocPlanExecuteResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.plan.execute", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.plan.execute".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiPreset<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiPreset<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Dispatch an LLM tool call through the named preset's dispatcher against the active session's live document. Used by cross-language SDKs (e.g. Python) to proxy preset behavior over the CLI."]
pub fn dispatch<'call>(
&'call self,
params: &'call DocPresetDispatchBoundParams,
) -> impl std::future::Future<Output = Result<DocPresetDispatchResult>> + Send + 'call {
self.dispatch_with_options(params, InvokeOptions::default())
}
#[doc = "Dispatch an LLM tool call through the named preset's dispatcher against the active session's live document. Used by cross-language SDKs (e.g. Python) to proxy preset behavior over the CLI."]
pub async fn dispatch_with_options(
&self,
params: &DocPresetDispatchBoundParams,
options: InvokeOptions,
) -> Result<DocPresetDispatchResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.preset.dispatch", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.preset.dispatch".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Return the full tool catalog for an LLM-tools preset (defaults to the registered default preset)."]
pub fn get_catalog<'call>(
&'call self,
params: &'call DocPresetGetCatalogBoundParams,
) -> impl std::future::Future<Output = Result<DocPresetGetCatalogResult>> + Send + 'call {
self.get_catalog_with_options(params, InvokeOptions::default())
}
#[doc = "Return the full tool catalog for an LLM-tools preset (defaults to the registered default preset)."]
pub async fn get_catalog_with_options(
&self,
params: &DocPresetGetCatalogBoundParams,
options: InvokeOptions,
) -> Result<DocPresetGetCatalogResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.preset.getCatalog", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.preset.getCatalog".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Return the MCP-flavored system prompt for an LLM-tools preset."]
pub fn get_mcp_prompt<'call>(
&'call self,
params: &'call DocPresetGetMcpPromptBoundParams,
) -> impl std::future::Future<Output = Result<DocPresetGetMcpPromptResult>> + Send + 'call {
self.get_mcp_prompt_with_options(params, InvokeOptions::default())
}
#[doc = "Return the MCP-flavored system prompt for an LLM-tools preset."]
pub async fn get_mcp_prompt_with_options(
&self,
params: &DocPresetGetMcpPromptBoundParams,
options: InvokeOptions,
) -> Result<DocPresetGetMcpPromptResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.preset.getMcpPrompt", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.preset.getMcpPrompt".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Return the SDK-style system prompt for an LLM-tools preset."]
pub fn get_system_prompt<'call>(
&'call self,
params: &'call DocPresetGetSystemPromptBoundParams,
) -> impl std::future::Future<Output = Result<DocPresetGetSystemPromptResult>> + Send + 'call
{
self.get_system_prompt_with_options(params, InvokeOptions::default())
}
#[doc = "Return the SDK-style system prompt for an LLM-tools preset."]
pub async fn get_system_prompt_with_options(
&self,
params: &DocPresetGetSystemPromptBoundParams,
options: InvokeOptions,
) -> Result<DocPresetGetSystemPromptResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.preset.getSystemPrompt", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.preset.getSystemPrompt".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Return the provider-shaped tool array (openai|anthropic|vercel|generic) for an LLM-tools preset, plus the active cache strategy."]
pub fn get_tools<'call>(
&'call self,
params: &'call DocPresetGetToolsBoundParams,
) -> impl std::future::Future<Output = Result<DocPresetGetToolsResult>> + Send + 'call {
self.get_tools_with_options(params, InvokeOptions::default())
}
#[doc = "Return the provider-shaped tool array (openai|anthropic|vercel|generic) for an LLM-tools preset, plus the active cache strategy."]
pub async fn get_tools_with_options(
&self,
params: &DocPresetGetToolsBoundParams,
options: InvokeOptions,
) -> Result<DocPresetGetToolsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.preset.getTools", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.preset.getTools".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List the LLM-tools preset ids registered in the Node SDK preset registry, plus the default preset id."]
pub fn list<'call>(
&'call self,
params: &'call DocPresetListBoundParams,
) -> impl std::future::Future<Output = Result<DocPresetListResult>> + Send + 'call {
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List the LLM-tools preset ids registered in the Node SDK preset registry, plus the default preset id."]
pub async fn list_with_options(
&self,
params: &DocPresetListBoundParams,
options: InvokeOptions,
) -> Result<DocPresetListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.preset.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.preset.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiProtection<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiProtection<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Disable document-level editing restriction by setting enforcement to off. Preserves the protection element and its metadata for round-trip fidelity."]
pub fn clear_editing_restriction<'call>(
&'call self,
params: &'call DocProtectionClearEditingRestrictionBoundParams,
) -> impl std::future::Future<Output = Result<DocProtectionClearEditingRestrictionResult>>
+ Send
+ 'call {
self.clear_editing_restriction_with_options(params, InvokeOptions::default())
}
#[doc = "Disable document-level editing restriction by setting enforcement to off. Preserves the protection element and its metadata for round-trip fidelity."]
pub async fn clear_editing_restriction_with_options(
&self,
params: &DocProtectionClearEditingRestrictionBoundParams,
options: InvokeOptions,
) -> Result<DocProtectionClearEditingRestrictionResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.protection.clearEditingRestriction", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.protection.clearEditingRestriction".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Read the current document protection state including editing restrictions, write protection, and read-only recommendation."]
pub fn get<'call>(
&'call self,
params: &'call DocProtectionGetBoundParams,
) -> impl std::future::Future<Output = Result<DocProtectionGetResult>> + Send + 'call {
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Read the current document protection state including editing restrictions, write protection, and read-only recommendation."]
pub async fn get_with_options(
&self,
params: &DocProtectionGetBoundParams,
options: InvokeOptions,
) -> Result<DocProtectionGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.protection.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.protection.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Author a Word readOnly, comments, trackedChanges, or forms restriction. Inspect runtimeEnforced in the returned state: V2 currently enforces readOnly; the other modes are saved for Word and are not enforced in SuperDoc."]
pub fn set_editing_restriction<'call>(
&'call self,
params: &'call DocProtectionSetEditingRestrictionBoundParams,
) -> impl std::future::Future<Output = Result<DocProtectionSetEditingRestrictionResult>> + Send + 'call
{
self.set_editing_restriction_with_options(params, InvokeOptions::default())
}
#[doc = "Author a Word readOnly, comments, trackedChanges, or forms restriction. Inspect runtimeEnforced in the returned state: V2 currently enforces readOnly; the other modes are saved for Word and are not enforced in SuperDoc."]
pub async fn set_editing_restriction_with_options(
&self,
params: &DocProtectionSetEditingRestrictionBoundParams,
options: InvokeOptions,
) -> Result<DocProtectionSetEditingRestrictionResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.protection.setEditingRestriction", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.protection.setEditingRestriction".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiQuery<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiQuery<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Deterministic selector-based search returning mutation-grade addresses and text ranges. Use this to discover targets before any mutation."]
pub fn match_<'call>(
&'call self,
params: &'call DocQueryMatchBoundParams,
) -> impl std::future::Future<Output = Result<DocQueryMatchResult>> + Send + 'call {
self.match_with_options(params, InvokeOptions::default())
}
#[doc = "Deterministic selector-based search returning mutation-grade addresses and text ranges. Use this to discover targets before any mutation."]
pub async fn match_with_options(
&self,
params: &DocQueryMatchBoundParams,
options: InvokeOptions,
) -> Result<DocQueryMatchResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.query.match", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.query.match".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiRanges<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiRanges<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Resolve two explicit anchors into a contiguous document range. Returns a transparent SelectionTarget, handle metadata, and preview metadata. handle.ref is nullable and present only when the resolved range is mutation-ready; callers must check handle.ref !== null and/or coversFullTarget before using it for mutations. Stateless and deterministic."]
pub fn resolve<'call>(
&'call self,
params: &'call DocRangesResolveBoundParams,
) -> impl std::future::Future<Output = Result<DocRangesResolveResult>> + Send + 'call {
self.resolve_with_options(params, InvokeOptions::default())
}
#[doc = "Resolve two explicit anchors into a contiguous document range. Returns a transparent SelectionTarget, handle metadata, and preview metadata. handle.ref is nullable and present only when the resolved range is mutation-ready; callers must check handle.ref !== null and/or coversFullTarget before using it for mutations. Stateless and deterministic."]
pub async fn resolve_with_options(
&self,
params: &DocRangesResolveBoundParams,
options: InvokeOptions,
) -> Result<DocRangesResolveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.ranges.resolve", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.ranges.resolve".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiSections<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiSections<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Clear a section header/footer reference for a specific variant."]
pub fn clear_header_footer_ref<'call>(
&'call self,
params: &'call DocSectionsClearHeaderFooterRefBoundParams,
) -> impl std::future::Future<Output = Result<DocSectionsClearHeaderFooterRefResult>> + Send + 'call
{
self.clear_header_footer_ref_with_options(params, InvokeOptions::default())
}
#[doc = "Clear a section header/footer reference for a specific variant."]
pub async fn clear_header_footer_ref_with_options(
&self,
params: &DocSectionsClearHeaderFooterRefBoundParams,
options: InvokeOptions,
) -> Result<DocSectionsClearHeaderFooterRefResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.sections.clearHeaderFooterRef", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.sections.clearHeaderFooterRef".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Clear page border configuration for a section."]
pub fn clear_page_borders<'call>(
&'call self,
params: &'call DocSectionsClearPageBordersBoundParams,
) -> impl std::future::Future<Output = Result<DocSectionsClearPageBordersResult>> + Send + 'call
{
self.clear_page_borders_with_options(params, InvokeOptions::default())
}
#[doc = "Clear page border configuration for a section."]
pub async fn clear_page_borders_with_options(
&self,
params: &DocSectionsClearPageBordersBoundParams,
options: InvokeOptions,
) -> Result<DocSectionsClearPageBordersResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.sections.clearPageBorders", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.sections.clearPageBorders".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Retrieve full section information by section address."]
pub fn get<'call>(
&'call self,
params: &'call DocSectionsGetBoundParams,
) -> impl std::future::Future<Output = Result<DocSectionsGetResult>> + Send + 'call {
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Retrieve full section information by section address."]
pub async fn get_with_options(
&self,
params: &DocSectionsGetBoundParams,
options: InvokeOptions,
) -> Result<DocSectionsGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.sections.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.sections.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List sections in deterministic order with section-target handles."]
pub fn list<'call>(
&'call self,
params: &'call DocSectionsListBoundParams,
) -> impl std::future::Future<Output = Result<DocSectionsListResult>> + Send + 'call {
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List sections in deterministic order with section-target handles."]
pub async fn list_with_options(
&self,
params: &DocSectionsListBoundParams,
options: InvokeOptions,
) -> Result<DocSectionsListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.sections.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.sections.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the section break type."]
pub fn set_break_type<'call>(
&'call self,
params: &'call DocSectionsSetBreakTypeBoundParams,
) -> impl std::future::Future<Output = Result<DocSectionsSetBreakTypeResult>> + Send + 'call
{
self.set_break_type_with_options(params, InvokeOptions::default())
}
#[doc = "Set the section break type."]
pub async fn set_break_type_with_options(
&self,
params: &DocSectionsSetBreakTypeBoundParams,
options: InvokeOptions,
) -> Result<DocSectionsSetBreakTypeResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.sections.setBreakType", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.sections.setBreakType".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set column configuration for a section."]
pub fn set_columns<'call>(
&'call self,
params: &'call DocSectionsSetColumnsBoundParams,
) -> impl std::future::Future<Output = Result<DocSectionsSetColumnsResult>> + Send + 'call {
self.set_columns_with_options(params, InvokeOptions::default())
}
#[doc = "Set column configuration for a section."]
pub async fn set_columns_with_options(
&self,
params: &DocSectionsSetColumnsBoundParams,
options: InvokeOptions,
) -> Result<DocSectionsSetColumnsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.sections.setColumns", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.sections.setColumns".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set header/footer margin distances for a section."]
pub fn set_header_footer_margins<'call>(
&'call self,
params: &'call DocSectionsSetHeaderFooterMarginsBoundParams,
) -> impl std::future::Future<Output = Result<DocSectionsSetHeaderFooterMarginsResult>> + Send + 'call
{
self.set_header_footer_margins_with_options(params, InvokeOptions::default())
}
#[doc = "Set header/footer margin distances for a section."]
pub async fn set_header_footer_margins_with_options(
&self,
params: &DocSectionsSetHeaderFooterMarginsBoundParams,
options: InvokeOptions,
) -> Result<DocSectionsSetHeaderFooterMarginsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.sections.setHeaderFooterMargins", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.sections.setHeaderFooterMargins".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or replace a section header/footer reference for a variant."]
pub fn set_header_footer_ref<'call>(
&'call self,
params: &'call DocSectionsSetHeaderFooterRefBoundParams,
) -> impl std::future::Future<Output = Result<DocSectionsSetHeaderFooterRefResult>> + Send + 'call
{
self.set_header_footer_ref_with_options(params, InvokeOptions::default())
}
#[doc = "Set or replace a section header/footer reference for a variant."]
pub async fn set_header_footer_ref_with_options(
&self,
params: &DocSectionsSetHeaderFooterRefBoundParams,
options: InvokeOptions,
) -> Result<DocSectionsSetHeaderFooterRefResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.sections.setHeaderFooterRef", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.sections.setHeaderFooterRef".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Enable or configure line numbering for a section."]
pub fn set_line_numbering<'call>(
&'call self,
params: &'call DocSectionsSetLineNumberingBoundParams,
) -> impl std::future::Future<Output = Result<DocSectionsSetLineNumberingResult>> + Send + 'call
{
self.set_line_numbering_with_options(params, InvokeOptions::default())
}
#[doc = "Enable or configure line numbering for a section."]
pub async fn set_line_numbering_with_options(
&self,
params: &DocSectionsSetLineNumberingBoundParams,
options: InvokeOptions,
) -> Result<DocSectionsSetLineNumberingResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.sections.setLineNumbering", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.sections.setLineNumbering".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set or clear link-to-previous behavior for a header/footer variant."]
pub fn set_link_to_previous<'call>(
&'call self,
params: &'call DocSectionsSetLinkToPreviousBoundParams,
) -> impl std::future::Future<Output = Result<DocSectionsSetLinkToPreviousResult>> + Send + 'call
{
self.set_link_to_previous_with_options(params, InvokeOptions::default())
}
#[doc = "Set or clear link-to-previous behavior for a header/footer variant."]
pub async fn set_link_to_previous_with_options(
&self,
params: &DocSectionsSetLinkToPreviousBoundParams,
options: InvokeOptions,
) -> Result<DocSectionsSetLinkToPreviousResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.sections.setLinkToPrevious", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.sections.setLinkToPrevious".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Enable or disable odd/even header-footer mode in document settings."]
pub fn set_odd_even_headers_footers<'call>(
&'call self,
params: &'call DocSectionsSetOddEvenHeadersFootersBoundParams,
) -> impl std::future::Future<Output = Result<DocSectionsSetOddEvenHeadersFootersResult>>
+ Send
+ 'call {
self.set_odd_even_headers_footers_with_options(params, InvokeOptions::default())
}
#[doc = "Enable or disable odd/even header-footer mode in document settings."]
pub async fn set_odd_even_headers_footers_with_options(
&self,
params: &DocSectionsSetOddEvenHeadersFootersBoundParams,
options: InvokeOptions,
) -> Result<DocSectionsSetOddEvenHeadersFootersResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.sections.setOddEvenHeadersFooters", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.sections.setOddEvenHeadersFooters".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set page border configuration for a section."]
pub fn set_page_borders<'call>(
&'call self,
params: &'call DocSectionsSetPageBordersBoundParams,
) -> impl std::future::Future<Output = Result<DocSectionsSetPageBordersResult>> + Send + 'call
{
self.set_page_borders_with_options(params, InvokeOptions::default())
}
#[doc = "Set page border configuration for a section."]
pub async fn set_page_borders_with_options(
&self,
params: &DocSectionsSetPageBordersBoundParams,
options: InvokeOptions,
) -> Result<DocSectionsSetPageBordersResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.sections.setPageBorders", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.sections.setPageBorders".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set page-edge margins for a section."]
pub fn set_page_margins<'call>(
&'call self,
params: &'call DocSectionsSetPageMarginsBoundParams,
) -> impl std::future::Future<Output = Result<DocSectionsSetPageMarginsResult>> + Send + 'call
{
self.set_page_margins_with_options(params, InvokeOptions::default())
}
#[doc = "Set page-edge margins for a section."]
pub async fn set_page_margins_with_options(
&self,
params: &DocSectionsSetPageMarginsBoundParams,
options: InvokeOptions,
) -> Result<DocSectionsSetPageMarginsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.sections.setPageMargins", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.sections.setPageMargins".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set page numbering format/start and chapter numbering settings for a section."]
pub fn set_page_numbering<'call>(
&'call self,
params: &'call DocSectionsSetPageNumberingBoundParams,
) -> impl std::future::Future<Output = Result<DocSectionsSetPageNumberingResult>> + Send + 'call
{
self.set_page_numbering_with_options(params, InvokeOptions::default())
}
#[doc = "Set page numbering format/start and chapter numbering settings for a section."]
pub async fn set_page_numbering_with_options(
&self,
params: &DocSectionsSetPageNumberingBoundParams,
options: InvokeOptions,
) -> Result<DocSectionsSetPageNumberingResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.sections.setPageNumbering", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.sections.setPageNumbering".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set page size/orientation properties for a section."]
pub fn set_page_setup<'call>(
&'call self,
params: &'call DocSectionsSetPageSetupBoundParams,
) -> impl std::future::Future<Output = Result<DocSectionsSetPageSetupResult>> + Send + 'call
{
self.set_page_setup_with_options(params, InvokeOptions::default())
}
#[doc = "Set page size/orientation properties for a section."]
pub async fn set_page_setup_with_options(
&self,
params: &DocSectionsSetPageSetupBoundParams,
options: InvokeOptions,
) -> Result<DocSectionsSetPageSetupResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.sections.setPageSetup", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.sections.setPageSetup".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set section text flow direction (LTR/RTL)."]
pub fn set_section_direction<'call>(
&'call self,
params: &'call DocSectionsSetSectionDirectionBoundParams,
) -> impl std::future::Future<Output = Result<DocSectionsSetSectionDirectionResult>> + Send + 'call
{
self.set_section_direction_with_options(params, InvokeOptions::default())
}
#[doc = "Set section text flow direction (LTR/RTL)."]
pub async fn set_section_direction_with_options(
&self,
params: &DocSectionsSetSectionDirectionBoundParams,
options: InvokeOptions,
) -> Result<DocSectionsSetSectionDirectionResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.sections.setSectionDirection", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.sections.setSectionDirection".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Enable or disable title-page behavior for a section."]
pub fn set_title_page<'call>(
&'call self,
params: &'call DocSectionsSetTitlePageBoundParams,
) -> impl std::future::Future<Output = Result<DocSectionsSetTitlePageResult>> + Send + 'call
{
self.set_title_page_with_options(params, InvokeOptions::default())
}
#[doc = "Enable or disable title-page behavior for a section."]
pub async fn set_title_page_with_options(
&self,
params: &DocSectionsSetTitlePageBoundParams,
options: InvokeOptions,
) -> Result<DocSectionsSetTitlePageResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.sections.setTitlePage", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.sections.setTitlePage".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set vertical page alignment for a section."]
pub fn set_vertical_align<'call>(
&'call self,
params: &'call DocSectionsSetVerticalAlignBoundParams,
) -> impl std::future::Future<Output = Result<DocSectionsSetVerticalAlignResult>> + Send + 'call
{
self.set_vertical_align_with_options(params, InvokeOptions::default())
}
#[doc = "Set vertical page alignment for a section."]
pub async fn set_vertical_align_with_options(
&self,
params: &DocSectionsSetVerticalAlignBoundParams,
options: InvokeOptions,
) -> Result<DocSectionsSetVerticalAlignResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.sections.setVerticalAlign", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.sections.setVerticalAlign".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiSelection<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiSelection<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Read the editor's current selection as a portable SelectionInfo with text targets or V2 browser table/cell metadata. Primitive for building custom comments UIs, floating toolbars, and other selection-driven components without reaching into ProseMirror internals."]
pub fn current<'call>(
&'call self,
params: &'call DocSelectionCurrentBoundParams,
) -> impl std::future::Future<Output = Result<DocSelectionCurrentResult>> + Send + 'call {
self.current_with_options(params, InvokeOptions::default())
}
#[doc = "Read the editor's current selection as a portable SelectionInfo with text targets or V2 browser table/cell metadata. Primitive for building custom comments UIs, floating toolbars, and other selection-driven components without reaching into ProseMirror internals."]
pub async fn current_with_options(
&self,
params: &DocSelectionCurrentBoundParams,
options: InvokeOptions,
) -> Result<DocSelectionCurrentResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.selection.current", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.selection.current".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Capture a nonempty current or addressed selection as portable OOXML with native dependencies. Optional retain:true keeps an exact same-session restoration handle for one complete standalone body paragraph; release it when unused. Unsupported retained contexts and collaboration reject."]
pub fn extract_ooxml<'call>(
&'call self,
params: &'call DocSelectionExtractOoxmlBoundParams,
) -> impl std::future::Future<Output = Result<DocSelectionExtractOoxmlResult>> + Send + 'call
{
self.extract_ooxml_with_options(params, InvokeOptions::default())
}
#[doc = "Capture a nonempty current or addressed selection as portable OOXML with native dependencies. Optional retain:true keeps an exact same-session restoration handle for one complete standalone body paragraph; release it when unused. Unsupported retained contexts and collaboration reject."]
pub async fn extract_ooxml_with_options(
&self,
params: &DocSelectionExtractOoxmlBoundParams,
options: InvokeOptions,
) -> Result<DocSelectionExtractOoxmlResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.selection.extractOoxml", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.selection.extractOoxml".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Release a retained exact-selection snapshot without changing document content or Undo history."]
pub fn release_snapshot<'call>(
&'call self,
params: &'call DocSelectionReleaseSnapshotBoundParams,
) -> impl std::future::Future<Output = Result<DocSelectionReleaseSnapshotResult>> + Send + 'call
{
self.release_snapshot_with_options(params, InvokeOptions::default())
}
#[doc = "Release a retained exact-selection snapshot without changing document content or Undo history."]
pub async fn release_snapshot_with_options(
&self,
params: &DocSelectionReleaseSnapshotBoundParams,
options: InvokeOptions,
) -> Result<DocSelectionReleaseSnapshotResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.selection.releaseSnapshot", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.selection.releaseSnapshot".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiStyles<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiStyles<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
pub fn paragraph(&self) -> DocApiStylesParagraph<'a, I> {
DocApiStylesParagraph::new(self.invoker)
}
#[doc = "Apply style changes to the active Style Definitions part. Targets docDefaults run and paragraph channels, or the run properties of an existing named paragraph style (scope \"style\"), with set-style patch semantics. Redefining a named style updates every paragraph that references it; its linked character style receives the same patch, null removes a property so the style inherits it again, and an object value replaces that property whole."]
pub fn apply<'call>(
&'call self,
params: &'call DocStylesApplyBoundParams,
) -> impl std::future::Future<Output = Result<DocStylesApplyResult>> + Send + 'call {
self.apply_with_options(params, InvokeOptions::default())
}
#[doc = "Apply style changes to the active Style Definitions part. Targets docDefaults run and paragraph channels, or the run properties of an existing named paragraph style (scope \"style\"), with set-style patch semantics. Redefining a named style updates every paragraph that references it; its linked character style receives the same patch, null removes a property so the style inherits it again, and an object value replaces that property whole."]
pub async fn apply_with_options(
&self,
params: &DocStylesApplyBoundParams,
options: InvokeOptions,
) -> Result<DocStylesApplyResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.styles.apply", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.styles.apply".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Define or redefine a named paragraph or character style in the Style Definitions part. Replaces the definition rather than merging into it, and decides conflicts on both styleId and name, because Word keys its Styles gallery on the name. Linked style pairs and table/numbering styles are out of scope."]
pub fn create<'call>(
&'call self,
params: &'call DocStylesCreateBoundParams,
) -> impl std::future::Future<Output = Result<DocStylesCreateResult>> + Send + 'call {
self.create_with_options(params, InvokeOptions::default())
}
#[doc = "Define or redefine a named paragraph or character style in the Style Definitions part. Replaces the definition rather than merging into it, and decides conflicts on both styleId and name, because Word keys its Styles gallery on the name. Linked style pairs and table/numbering styles are out of scope."]
pub async fn create_with_options(
&self,
params: &DocStylesCreateBoundParams,
options: InvokeOptions,
) -> Result<DocStylesCreateResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.styles.create", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.styles.create".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List the available styles as a normalized catalogue with stable IDs, display names, type, visibility, priority, provenance, and source diagnostics. Supports view (quickGallery/recommended/currentDocument/all/inUse), type filtering, hidden/latent inclusion, usage rollups, and UI-safe preview tokens. Distinct from DocumentInfo.styles, which is a usage summary."]
pub fn get_catalog<'call>(
&'call self,
params: &'call DocStylesGetCatalogBoundParams,
) -> impl std::future::Future<Output = Result<DocStylesGetCatalogResult>> + Send + 'call {
self.get_catalog_with_options(params, InvokeOptions::default())
}
#[doc = "List the available styles as a normalized catalogue with stable IDs, display names, type, visibility, priority, provenance, and source diagnostics. Supports view (quickGallery/recommended/currentDocument/all/inUse), type filtering, hidden/latent inclusion, usage rollups, and UI-safe preview tokens. Distinct from DocumentInfo.styles, which is a usage summary."]
pub async fn get_catalog_with_options(
&self,
params: &DocStylesGetCatalogBoundParams,
options: InvokeOptions,
) -> Result<DocStylesGetCatalogResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.styles.getCatalog", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.styles.getCatalog".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Read the document theme: its 12 theme colors, major and minor fonts, and the color mapping from settings.xml. A missing or malformed theme part returns the default Office theme labeled source 'fallback', with part status and diagnostics. Same theme as doc.get().theme, without the rest of the document."]
pub fn get_theme<'call>(
&'call self,
params: &'call DocStylesGetThemeBoundParams,
) -> impl std::future::Future<Output = Result<DocStylesGetThemeResult>> + Send + 'call {
self.get_theme_with_options(params, InvokeOptions::default())
}
#[doc = "Read the document theme: its 12 theme colors, major and minor fonts, and the color mapping from settings.xml. A missing or malformed theme part returns the default Office theme labeled source 'fallback', with part status and diagnostics. Same theme as doc.get().theme, without the rest of the document."]
pub async fn get_theme_with_options(
&self,
params: &DocStylesGetThemeBoundParams,
options: InvokeOptions,
) -> Result<DocStylesGetThemeResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.styles.getTheme", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.styles.getTheme".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiStylesParagraph<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiStylesParagraph<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Remove the paragraph style reference from a paragraph-like block."]
pub fn clear_style<'call>(
&'call self,
params: &'call DocStylesParagraphClearStyleBoundParams,
) -> impl std::future::Future<Output = Result<DocStylesParagraphClearStyleResult>> + Send + 'call
{
self.clear_style_with_options(params, InvokeOptions::default())
}
#[doc = "Remove the paragraph style reference from a paragraph-like block."]
pub async fn clear_style_with_options(
&self,
params: &DocStylesParagraphClearStyleBoundParams,
options: InvokeOptions,
) -> Result<DocStylesParagraphClearStyleResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.styles.paragraph.clearStyle", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.styles.paragraph.clearStyle".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Apply a paragraph style (w:pStyle) to a paragraph-like block, clearing direct run formatting while preserving character-style references."]
pub fn set_style<'call>(
&'call self,
params: &'call DocStylesParagraphSetStyleBoundParams,
) -> impl std::future::Future<Output = Result<DocStylesParagraphSetStyleResult>> + Send + 'call
{
self.set_style_with_options(params, InvokeOptions::default())
}
#[doc = "Apply a paragraph style (w:pStyle) to a paragraph-like block, clearing direct run formatting while preserving character-style references."]
pub async fn set_style_with_options(
&self,
params: &DocStylesParagraphSetStyleBoundParams,
options: InvokeOptions,
) -> Result<DocStylesParagraphSetStyleResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.styles.paragraph.setStyle", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.styles.paragraph.setStyle".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Apply a paragraph style (w:pStyle) to a paragraph-like block without clearing direct run formatting."]
pub fn set_style_ref<'call>(
&'call self,
params: &'call DocStylesParagraphSetStyleRefBoundParams,
) -> impl std::future::Future<Output = Result<DocStylesParagraphSetStyleRefResult>> + Send + 'call
{
self.set_style_ref_with_options(params, InvokeOptions::default())
}
#[doc = "Apply a paragraph style (w:pStyle) to a paragraph-like block without clearing direct run formatting."]
pub async fn set_style_ref_with_options(
&self,
params: &DocStylesParagraphSetStyleRefBoundParams,
options: InvokeOptions,
) -> Result<DocStylesParagraphSetStyleRefResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.styles.paragraph.setStyleRef", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.styles.paragraph.setStyleRef".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiTables<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiTables<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Apply a border preset (e.g. all borders, outside only) to a table."]
pub fn apply_border_preset<'call>(
&'call self,
params: &'call DocTablesApplyBorderPresetBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesApplyBorderPresetResult>> + Send + 'call
{
self.apply_border_preset_with_options(params, InvokeOptions::default())
}
#[doc = "Apply a border preset (e.g. all borders, outside only) to a table."]
pub async fn apply_border_preset_with_options(
&self,
params: &DocTablesApplyBorderPresetBoundParams,
options: InvokeOptions,
) -> Result<DocTablesApplyBorderPresetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.applyBorderPreset", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.applyBorderPreset".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Apply a named visual preset to a table. Presets: \"grid\" (1pt black borders all around), \"minimal\" (no outer borders, hairline grey row separators + thicker bottom), \"striped\" (banded rows on, 0.5pt grey borders), \"accent\" (filled header row + thick accent top/bottom; defaults to dark blue, override with `accentColor`). Composes set_borders + set_style_options + header-row shading in one call. Available via the document API and `superdoc_mutations` (intentionally NOT exposed as a top-level action on `superdoc_table`. Agents should compose explicit set_borders / set_shading / set_style_options calls so they always pick concrete colors that match the document context)."]
pub fn apply_preset<'call>(
&'call self,
params: &'call DocTablesApplyPresetBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesApplyPresetResult>> + Send + 'call {
self.apply_preset_with_options(params, InvokeOptions::default())
}
#[doc = "Apply a named visual preset to a table. Presets: \"grid\" (1pt black borders all around), \"minimal\" (no outer borders, hairline grey row separators + thicker bottom), \"striped\" (banded rows on, 0.5pt grey borders), \"accent\" (filled header row + thick accent top/bottom; defaults to dark blue, override with `accentColor`). Composes set_borders + set_style_options + header-row shading in one call. Available via the document API and `superdoc_mutations` (intentionally NOT exposed as a top-level action on `superdoc_table`. Agents should compose explicit set_borders / set_shading / set_style_options calls so they always pick concrete colors that match the document context)."]
pub async fn apply_preset_with_options(
&self,
params: &DocTablesApplyPresetBoundParams,
options: InvokeOptions,
) -> Result<DocTablesApplyPresetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.applyPreset", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.applyPreset".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Toggle conditional-format flags (header row, banded rows/columns, first/last column, last row) on a table. Pass `styleOptions` with the flags you want to set or clear (omitted flags stay unchanged). For \"format the first row as a header\" use `styleOptions: { headerRow: true }`. Optional `styleId` applies a named table style. Leave it unset unless you have a styleId from `superdoc_get_content` (no need to invent one)."]
pub fn apply_style<'call>(
&'call self,
params: &'call DocTablesApplyStyleBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesApplyStyleResult>> + Send + 'call {
self.apply_style_with_options(params, InvokeOptions::default())
}
#[doc = "Toggle conditional-format flags (header row, banded rows/columns, first/last column, last row) on a table. Pass `styleOptions` with the flags you want to set or clear (omitted flags stay unchanged). For \"format the first row as a header\" use `styleOptions: { headerRow: true }`. Optional `styleId` applies a named table style. Leave it unset unless you have a styleId from `superdoc_get_content` (no need to invent one)."]
pub async fn apply_style_with_options(
&self,
params: &DocTablesApplyStyleBoundParams,
options: InvokeOptions,
) -> Result<DocTablesApplyStyleResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.applyStyle", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.applyStyle".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove border formatting from a table or cell range."]
pub fn clear_border<'call>(
&'call self,
params: &'call DocTablesClearBorderBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesClearBorderResult>> + Send + 'call {
self.clear_border_with_options(params, InvokeOptions::default())
}
#[doc = "Remove border formatting from a table or cell range."]
pub async fn clear_border_with_options(
&self,
params: &DocTablesClearBorderBoundParams,
options: InvokeOptions,
) -> Result<DocTablesClearBorderResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.clearBorder", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.clearBorder".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove custom cell spacing from the target table."]
pub fn clear_cell_spacing<'call>(
&'call self,
params: &'call DocTablesClearCellSpacingBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesClearCellSpacingResult>> + Send + 'call
{
self.clear_cell_spacing_with_options(params, InvokeOptions::default())
}
#[doc = "Remove custom cell spacing from the target table."]
pub async fn clear_cell_spacing_with_options(
&self,
params: &DocTablesClearCellSpacingBoundParams,
options: InvokeOptions,
) -> Result<DocTablesClearCellSpacingResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.clearCellSpacing", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.clearCellSpacing".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Clear the contents of the target table or cell range."]
pub fn clear_contents<'call>(
&'call self,
params: &'call DocTablesClearContentsBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesClearContentsResult>> + Send + 'call
{
self.clear_contents_with_options(params, InvokeOptions::default())
}
#[doc = "Clear the contents of the target table or cell range."]
pub async fn clear_contents_with_options(
&self,
params: &DocTablesClearContentsBoundParams,
options: InvokeOptions,
) -> Result<DocTablesClearContentsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.clearContents", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.clearContents".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove the document-level default table style setting."]
pub fn clear_default_style<'call>(
&'call self,
params: &'call DocTablesClearDefaultStyleBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesClearDefaultStyleResult>> + Send + 'call
{
self.clear_default_style_with_options(params, InvokeOptions::default())
}
#[doc = "Remove the document-level default table style setting."]
pub async fn clear_default_style_with_options(
&self,
params: &DocTablesClearDefaultStyleBoundParams,
options: InvokeOptions,
) -> Result<DocTablesClearDefaultStyleResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.clearDefaultStyle", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.clearDefaultStyle".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove shading from a table or cell range."]
pub fn clear_shading<'call>(
&'call self,
params: &'call DocTablesClearShadingBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesClearShadingResult>> + Send + 'call {
self.clear_shading_with_options(params, InvokeOptions::default())
}
#[doc = "Remove shading from a table or cell range."]
pub async fn clear_shading_with_options(
&self,
params: &DocTablesClearShadingBoundParams,
options: InvokeOptions,
) -> Result<DocTablesClearShadingResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.clearShading", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.clearShading".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove the applied table style, reverting to defaults."]
pub fn clear_style<'call>(
&'call self,
params: &'call DocTablesClearStyleBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesClearStyleResult>> + Send + 'call {
self.clear_style_with_options(params, InvokeOptions::default())
}
#[doc = "Remove the applied table style, reverting to defaults."]
pub async fn clear_style_with_options(
&self,
params: &DocTablesClearStyleBoundParams,
options: InvokeOptions,
) -> Result<DocTablesClearStyleResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.clearStyle", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.clearStyle".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Convert a text range into a table."]
pub fn convert_from_text<'call>(
&'call self,
params: &'call DocTablesConvertFromTextBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesConvertFromTextResult>> + Send + 'call
{
self.convert_from_text_with_options(params, InvokeOptions::default())
}
#[doc = "Convert a text range into a table."]
pub async fn convert_from_text_with_options(
&self,
params: &DocTablesConvertFromTextBoundParams,
options: InvokeOptions,
) -> Result<DocTablesConvertFromTextResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.convertFromText", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.convertFromText".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Convert a table back to plain text."]
pub fn convert_to_text<'call>(
&'call self,
params: &'call DocTablesConvertToTextBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesConvertToTextResult>> + Send + 'call
{
self.convert_to_text_with_options(params, InvokeOptions::default())
}
#[doc = "Convert a table back to plain text."]
pub async fn convert_to_text_with_options(
&self,
params: &DocTablesConvertToTextBoundParams,
options: InvokeOptions,
) -> Result<DocTablesConvertToTextResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.convertToText", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.convertToText".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Delete the target table from the document."]
pub fn delete<'call>(
&'call self,
params: &'call DocTablesDeleteBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesDeleteResult>> + Send + 'call {
self.delete_with_options(params, InvokeOptions::default())
}
#[doc = "Delete the target table from the document."]
pub async fn delete_with_options(
&self,
params: &DocTablesDeleteBoundParams,
options: InvokeOptions,
) -> Result<DocTablesDeleteResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.delete", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.delete".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Delete a cell from a table row."]
pub fn delete_cell<'call>(
&'call self,
params: &'call DocTablesDeleteCellBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesDeleteCellResult>> + Send + 'call {
self.delete_cell_with_options(params, InvokeOptions::default())
}
#[doc = "Delete a cell from a table row."]
pub async fn delete_cell_with_options(
&self,
params: &DocTablesDeleteCellBoundParams,
options: InvokeOptions,
) -> Result<DocTablesDeleteCellResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.deleteCell", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.deleteCell".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Delete a column from the target table."]
pub fn delete_column<'call>(
&'call self,
params: &'call DocTablesDeleteColumnBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesDeleteColumnResult>> + Send + 'call {
self.delete_column_with_options(params, InvokeOptions::default())
}
#[doc = "Delete a column from the target table."]
pub async fn delete_column_with_options(
&self,
params: &DocTablesDeleteColumnBoundParams,
options: InvokeOptions,
) -> Result<DocTablesDeleteColumnResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.deleteColumn", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.deleteColumn".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Delete a row from the target table."]
pub fn delete_row<'call>(
&'call self,
params: &'call DocTablesDeleteRowBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesDeleteRowResult>> + Send + 'call {
self.delete_row_with_options(params, InvokeOptions::default())
}
#[doc = "Delete a row from the target table."]
pub async fn delete_row_with_options(
&self,
params: &DocTablesDeleteRowBoundParams,
options: InvokeOptions,
) -> Result<DocTablesDeleteRowResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.deleteRow", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.deleteRow".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Distribute column widths evenly across the target table."]
pub fn distribute_columns<'call>(
&'call self,
params: &'call DocTablesDistributeColumnsBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesDistributeColumnsResult>> + Send + 'call
{
self.distribute_columns_with_options(params, InvokeOptions::default())
}
#[doc = "Distribute column widths evenly across the target table."]
pub async fn distribute_columns_with_options(
&self,
params: &DocTablesDistributeColumnsBoundParams,
options: InvokeOptions,
) -> Result<DocTablesDistributeColumnsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.distributeColumns", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.distributeColumns".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Distribute row heights evenly across the target table."]
pub fn distribute_rows<'call>(
&'call self,
params: &'call DocTablesDistributeRowsBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesDistributeRowsResult>> + Send + 'call
{
self.distribute_rows_with_options(params, InvokeOptions::default())
}
#[doc = "Distribute row heights evenly across the target table."]
pub async fn distribute_rows_with_options(
&self,
params: &DocTablesDistributeRowsBoundParams,
options: InvokeOptions,
) -> Result<DocTablesDistributeRowsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.distributeRows", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.distributeRows".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Retrieve table structure and dimensions by locator."]
pub fn get<'call>(
&'call self,
params: &'call DocTablesGetBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesGetResult>> + Send + 'call {
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Retrieve table structure and dimensions by locator."]
pub async fn get_with_options(
&self,
params: &DocTablesGetBoundParams,
options: InvokeOptions,
) -> Result<DocTablesGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Retrieve cell information for a table, optionally filtered by row or column."]
pub fn get_cells<'call>(
&'call self,
params: &'call DocTablesGetCellsBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesGetCellsResult>> + Send + 'call {
self.get_cells_with_options(params, InvokeOptions::default())
}
#[doc = "Retrieve cell information for a table, optionally filtered by row or column."]
pub async fn get_cells_with_options(
&self,
params: &DocTablesGetCellsBoundParams,
options: InvokeOptions,
) -> Result<DocTablesGetCellsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.getCells", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.getCells".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Retrieve layout and style properties of a table."]
pub fn get_properties<'call>(
&'call self,
params: &'call DocTablesGetPropertiesBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesGetPropertiesResult>> + Send + 'call
{
self.get_properties_with_options(params, InvokeOptions::default())
}
#[doc = "Retrieve layout and style properties of a table."]
pub async fn get_properties_with_options(
&self,
params: &DocTablesGetPropertiesBoundParams,
options: InvokeOptions,
) -> Result<DocTablesGetPropertiesResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.getProperties", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.getProperties".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List all table styles and the document-level default table style setting."]
pub fn get_styles<'call>(
&'call self,
params: &'call DocTablesGetStylesBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesGetStylesResult>> + Send + 'call {
self.get_styles_with_options(params, InvokeOptions::default())
}
#[doc = "List all table styles and the document-level default table style setting."]
pub async fn get_styles_with_options(
&self,
params: &DocTablesGetStylesBoundParams,
options: InvokeOptions,
) -> Result<DocTablesGetStylesResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.getStyles", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.getStyles".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert a new cell into a table row."]
pub fn insert_cell<'call>(
&'call self,
params: &'call DocTablesInsertCellBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesInsertCellResult>> + Send + 'call {
self.insert_cell_with_options(params, InvokeOptions::default())
}
#[doc = "Insert a new cell into a table row."]
pub async fn insert_cell_with_options(
&self,
params: &DocTablesInsertCellBoundParams,
options: InvokeOptions,
) -> Result<DocTablesInsertCellResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.insertCell", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.insertCell".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert a new column into the target table. The new column is cloned from an adjacent column, so it inherits the existing cell shading, borders, alignment, and width. No follow-up styling call is needed unless the new column should look different from the rest of the table."]
pub fn insert_column<'call>(
&'call self,
params: &'call DocTablesInsertColumnBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesInsertColumnResult>> + Send + 'call {
self.insert_column_with_options(params, InvokeOptions::default())
}
#[doc = "Insert a new column into the target table. The new column is cloned from an adjacent column, so it inherits the existing cell shading, borders, alignment, and width. No follow-up styling call is needed unless the new column should look different from the rest of the table."]
pub async fn insert_column_with_options(
&self,
params: &DocTablesInsertColumnBoundParams,
options: InvokeOptions,
) -> Result<DocTablesInsertColumnResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.insertColumn", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.insertColumn".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert a new row into the target table. The new row is cloned from an adjacent row, so it inherits the existing cell shading, borders, alignment, and padding. No follow-up styling call is needed unless the new row should look different from the rest of the table."]
pub fn insert_row<'call>(
&'call self,
params: &'call DocTablesInsertRowBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesInsertRowResult>> + Send + 'call {
self.insert_row_with_options(params, InvokeOptions::default())
}
#[doc = "Insert a new row into the target table. The new row is cloned from an adjacent row, so it inherits the existing cell shading, borders, alignment, and padding. No follow-up styling call is needed unless the new row should look different from the rest of the table."]
pub async fn insert_row_with_options(
&self,
params: &DocTablesInsertRowBoundParams,
options: InvokeOptions,
) -> Result<DocTablesInsertRowResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.insertRow", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.insertRow".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Merge a range of table cells into one."]
pub fn merge_cells<'call>(
&'call self,
params: &'call DocTablesMergeCellsBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesMergeCellsResult>> + Send + 'call {
self.merge_cells_with_options(params, InvokeOptions::default())
}
#[doc = "Merge a range of table cells into one."]
pub async fn merge_cells_with_options(
&self,
params: &DocTablesMergeCellsBoundParams,
options: InvokeOptions,
) -> Result<DocTablesMergeCellsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.mergeCells", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.mergeCells".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Move a table to a new position in the document."]
pub fn move_<'call>(
&'call self,
params: &'call DocTablesMoveBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesMoveResult>> + Send + 'call {
self.move_with_options(params, InvokeOptions::default())
}
#[doc = "Move a table to a new position in the document."]
pub async fn move_with_options(
&self,
params: &DocTablesMoveBoundParams,
options: InvokeOptions,
) -> Result<DocTablesMoveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.move", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.move".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Move a column to a new position within the same table. Direct mode only; tables with vertical merges, nested tables, or irregular column coverage are rejected, and tracked (suggesting) mode is not supported yet."]
pub fn move_column<'call>(
&'call self,
params: &'call DocTablesMoveColumnBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesMoveColumnResult>> + Send + 'call {
self.move_column_with_options(params, InvokeOptions::default())
}
#[doc = "Move a column to a new position within the same table. Direct mode only; tables with vertical merges, nested tables, or irregular column coverage are rejected, and tracked (suggesting) mode is not supported yet."]
pub async fn move_column_with_options(
&self,
params: &DocTablesMoveColumnBoundParams,
options: InvokeOptions,
) -> Result<DocTablesMoveColumnResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.moveColumn", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.moveColumn".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Move a row to a new position within the same table."]
pub fn move_row<'call>(
&'call self,
params: &'call DocTablesMoveRowBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesMoveRowResult>> + Send + 'call {
self.move_row_with_options(params, InvokeOptions::default())
}
#[doc = "Move a row to a new position within the same table."]
pub async fn move_row_with_options(
&self,
params: &DocTablesMoveRowBoundParams,
options: InvokeOptions,
) -> Result<DocTablesMoveRowResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.moveRow", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.moveRow".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the alternative text description for a table."]
pub fn set_alt_text<'call>(
&'call self,
params: &'call DocTablesSetAltTextBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesSetAltTextResult>> + Send + 'call {
self.set_alt_text_with_options(params, InvokeOptions::default())
}
#[doc = "Set the alternative text description for a table."]
pub async fn set_alt_text_with_options(
&self,
params: &DocTablesSetAltTextBoundParams,
options: InvokeOptions,
) -> Result<DocTablesSetAltTextResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.setAltText", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.setAltText".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set border properties on a table or cell range."]
pub fn set_border<'call>(
&'call self,
params: &'call DocTablesSetBorderBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesSetBorderResult>> + Send + 'call {
self.set_border_with_options(params, InvokeOptions::default())
}
#[doc = "Set border properties on a table or cell range."]
pub async fn set_border_with_options(
&self,
params: &DocTablesSetBorderBoundParams,
options: InvokeOptions,
) -> Result<DocTablesSetBorderResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.setBorder", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.setBorder".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set borders on a table using a target set or per-edge patch."]
pub fn set_borders<'call>(
&'call self,
params: &'call DocTablesSetBordersBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesSetBordersResult>> + Send + 'call {
self.set_borders_with_options(params, InvokeOptions::default())
}
#[doc = "Set borders on a table using a target set or per-edge patch."]
pub async fn set_borders_with_options(
&self,
params: &DocTablesSetBordersBoundParams,
options: InvokeOptions,
) -> Result<DocTablesSetBordersResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.setBorders", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.setBorders".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set padding on a specific table cell or cell range."]
pub fn set_cell_padding<'call>(
&'call self,
params: &'call DocTablesSetCellPaddingBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesSetCellPaddingResult>> + Send + 'call
{
self.set_cell_padding_with_options(params, InvokeOptions::default())
}
#[doc = "Set padding on a specific table cell or cell range."]
pub async fn set_cell_padding_with_options(
&self,
params: &DocTablesSetCellPaddingBoundParams,
options: InvokeOptions,
) -> Result<DocTablesSetCellPaddingResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.setCellPadding", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.setCellPadding".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set non-text properties on a single table cell: vertical alignment, text wrapping, fit-text, or preferred width. Requires a cell-level target (a tableCell block address with kind, nodeType, nodeId). Does NOT accept a table target with rowIndex/columnIndex. To set the text content of a cell, use action \"set_cell_text\" instead."]
pub fn set_cell_properties<'call>(
&'call self,
params: &'call DocTablesSetCellPropertiesBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesSetCellPropertiesResult>> + Send + 'call
{
self.set_cell_properties_with_options(params, InvokeOptions::default())
}
#[doc = "Set non-text properties on a single table cell: vertical alignment, text wrapping, fit-text, or preferred width. Requires a cell-level target (a tableCell block address with kind, nodeType, nodeId). Does NOT accept a table target with rowIndex/columnIndex. To set the text content of a cell, use action \"set_cell_text\" instead."]
pub async fn set_cell_properties_with_options(
&self,
params: &DocTablesSetCellPropertiesBoundParams,
options: InvokeOptions,
) -> Result<DocTablesSetCellPropertiesResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.setCellProperties", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.setCellProperties".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the cell spacing for the target table."]
pub fn set_cell_spacing<'call>(
&'call self,
params: &'call DocTablesSetCellSpacingBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesSetCellSpacingResult>> + Send + 'call
{
self.set_cell_spacing_with_options(params, InvokeOptions::default())
}
#[doc = "Set the cell spacing for the target table."]
pub async fn set_cell_spacing_with_options(
&self,
params: &DocTablesSetCellSpacingBoundParams,
options: InvokeOptions,
) -> Result<DocTablesSetCellSpacingResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.setCellSpacing", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.setCellSpacing".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Replace the text content of a single table cell with plain text (one paragraph). Accepts either a direct cell locator (a tableCell block address with kind, nodeType, nodeId) OR a table target with rowIndex + columnIndex. Cell properties (vertical alignment, shading, borders, colspan/rowspan) are preserved. Use this for filling cells with values, replacing cell text, or populating empty tables. Much simpler than walking paragraphs and runs through superdoc_edit."]
pub fn set_cell_text<'call>(
&'call self,
params: &'call DocTablesSetCellTextBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesSetCellTextResult>> + Send + 'call {
self.set_cell_text_with_options(params, InvokeOptions::default())
}
#[doc = "Replace the text content of a single table cell with plain text (one paragraph). Accepts either a direct cell locator (a tableCell block address with kind, nodeType, nodeId) OR a table target with rowIndex + columnIndex. Cell properties (vertical alignment, shading, borders, colspan/rowspan) are preserved. Use this for filling cells with values, replacing cell text, or populating empty tables. Much simpler than walking paragraphs and runs through superdoc_edit."]
pub async fn set_cell_text_with_options(
&self,
params: &DocTablesSetCellTextBoundParams,
options: InvokeOptions,
) -> Result<DocTablesSetCellTextResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.setCellText", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.setCellText".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the width of a table column."]
pub fn set_column_width<'call>(
&'call self,
params: &'call DocTablesSetColumnWidthBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesSetColumnWidthResult>> + Send + 'call
{
self.set_column_width_with_options(params, InvokeOptions::default())
}
#[doc = "Set the width of a table column."]
pub async fn set_column_width_with_options(
&self,
params: &DocTablesSetColumnWidthBoundParams,
options: InvokeOptions,
) -> Result<DocTablesSetColumnWidthResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.setColumnWidth", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.setColumnWidth".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the document-level default table style (w:defaultTableStyle in settings.xml)."]
pub fn set_default_style<'call>(
&'call self,
params: &'call DocTablesSetDefaultStyleBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesSetDefaultStyleResult>> + Send + 'call
{
self.set_default_style_with_options(params, InvokeOptions::default())
}
#[doc = "Set the document-level default table style (w:defaultTableStyle in settings.xml)."]
pub async fn set_default_style_with_options(
&self,
params: &DocTablesSetDefaultStyleBoundParams,
options: InvokeOptions,
) -> Result<DocTablesSetDefaultStyleResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.setDefaultStyle", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.setDefaultStyle".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the layout mode of the target table."]
pub fn set_layout<'call>(
&'call self,
params: &'call DocTablesSetLayoutBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesSetLayoutResult>> + Send + 'call {
self.set_layout_with_options(params, InvokeOptions::default())
}
#[doc = "Set the layout mode of the target table."]
pub async fn set_layout_with_options(
&self,
params: &DocTablesSetLayoutBoundParams,
options: InvokeOptions,
) -> Result<DocTablesSetLayoutResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.setLayout", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.setLayout".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the height of a table row."]
pub fn set_row_height<'call>(
&'call self,
params: &'call DocTablesSetRowHeightBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesSetRowHeightResult>> + Send + 'call {
self.set_row_height_with_options(params, InvokeOptions::default())
}
#[doc = "Set the height of a table row."]
pub async fn set_row_height_with_options(
&self,
params: &DocTablesSetRowHeightBoundParams,
options: InvokeOptions,
) -> Result<DocTablesSetRowHeightResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.setRowHeight", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.setRowHeight".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set options on a table row such as header repeat or page break."]
pub fn set_row_options<'call>(
&'call self,
params: &'call DocTablesSetRowOptionsBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesSetRowOptionsResult>> + Send + 'call
{
self.set_row_options_with_options(params, InvokeOptions::default())
}
#[doc = "Set options on a table row such as header repeat or page break."]
pub async fn set_row_options_with_options(
&self,
params: &DocTablesSetRowOptionsBoundParams,
options: InvokeOptions,
) -> Result<DocTablesSetRowOptionsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.setRowOptions", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.setRowOptions".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the background shading color on a table or cell range."]
pub fn set_shading<'call>(
&'call self,
params: &'call DocTablesSetShadingBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesSetShadingResult>> + Send + 'call {
self.set_shading_with_options(params, InvokeOptions::default())
}
#[doc = "Set the background shading color on a table or cell range."]
pub async fn set_shading_with_options(
&self,
params: &DocTablesSetShadingBoundParams,
options: InvokeOptions,
) -> Result<DocTablesSetShadingResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.setShading", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.setShading".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Apply a named table style to the target table, or clear the style when styleId is omitted."]
pub fn set_style<'call>(
&'call self,
params: &'call DocTablesSetStyleBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesSetStyleResult>> + Send + 'call {
self.set_style_with_options(params, InvokeOptions::default())
}
#[doc = "Apply a named table style to the target table, or clear the style when styleId is omitted."]
pub async fn set_style_with_options(
&self,
params: &DocTablesSetStyleBoundParams,
options: InvokeOptions,
) -> Result<DocTablesSetStyleResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.setStyle", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.setStyle".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Toggle a conditional style option such as banded rows or first column."]
pub fn set_style_option<'call>(
&'call self,
params: &'call DocTablesSetStyleOptionBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesSetStyleOptionResult>> + Send + 'call
{
self.set_style_option_with_options(params, InvokeOptions::default())
}
#[doc = "Toggle a conditional style option such as banded rows or first column."]
pub async fn set_style_option_with_options(
&self,
params: &DocTablesSetStyleOptionBoundParams,
options: InvokeOptions,
) -> Result<DocTablesSetStyleOptionResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.setStyleOption", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.setStyleOption".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set table-level default cell margins and/or cell spacing."]
pub fn set_table_options<'call>(
&'call self,
params: &'call DocTablesSetTableOptionsBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesSetTableOptionsResult>> + Send + 'call
{
self.set_table_options_with_options(params, InvokeOptions::default())
}
#[doc = "Set table-level default cell margins and/or cell spacing."]
pub async fn set_table_options_with_options(
&self,
params: &DocTablesSetTableOptionsBoundParams,
options: InvokeOptions,
) -> Result<DocTablesSetTableOptionsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.setTableOptions", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.setTableOptions".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set default cell padding for the entire table."]
pub fn set_table_padding<'call>(
&'call self,
params: &'call DocTablesSetTablePaddingBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesSetTablePaddingResult>> + Send + 'call
{
self.set_table_padding_with_options(params, InvokeOptions::default())
}
#[doc = "Set default cell padding for the entire table."]
pub async fn set_table_padding_with_options(
&self,
params: &DocTablesSetTablePaddingBoundParams,
options: InvokeOptions,
) -> Result<DocTablesSetTablePaddingResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.setTablePadding", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.setTablePadding".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Sort table rows by a column value."]
pub fn sort<'call>(
&'call self,
params: &'call DocTablesSortBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesSortResult>> + Send + 'call {
self.sort_with_options(params, InvokeOptions::default())
}
#[doc = "Sort table rows by a column value."]
pub async fn sort_with_options(
&self,
params: &DocTablesSortBoundParams,
options: InvokeOptions,
) -> Result<DocTablesSortResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.sort", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.sort".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Split a table into two tables at the target row."]
pub fn split<'call>(
&'call self,
params: &'call DocTablesSplitBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesSplitResult>> + Send + 'call {
self.split_with_options(params, InvokeOptions::default())
}
#[doc = "Split a table into two tables at the target row."]
pub async fn split_with_options(
&self,
params: &DocTablesSplitBoundParams,
options: InvokeOptions,
) -> Result<DocTablesSplitResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.split", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.split".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Split a table cell into multiple cells."]
pub fn split_cell<'call>(
&'call self,
params: &'call DocTablesSplitCellBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesSplitCellResult>> + Send + 'call {
self.split_cell_with_options(params, InvokeOptions::default())
}
#[doc = "Split a table cell into multiple cells."]
pub async fn split_cell_with_options(
&self,
params: &DocTablesSplitCellBoundParams,
options: InvokeOptions,
) -> Result<DocTablesSplitCellResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.splitCell", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.splitCell".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Unmerge a previously merged table cell."]
pub fn unmerge_cells<'call>(
&'call self,
params: &'call DocTablesUnmergeCellsBoundParams,
) -> impl std::future::Future<Output = Result<DocTablesUnmergeCellsResult>> + Send + 'call {
self.unmerge_cells_with_options(params, InvokeOptions::default())
}
#[doc = "Unmerge a previously merged table cell."]
pub async fn unmerge_cells_with_options(
&self,
params: &DocTablesUnmergeCellsBoundParams,
options: InvokeOptions,
) -> Result<DocTablesUnmergeCellsResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.tables.unmergeCells", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.tables.unmergeCells".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiTemplates<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiTemplates<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Apply detected DOCX template/substrate (styles, numbering, settings, theme, font table, web settings, headers/footers, section defaults) from a source package onto the current document, preserving body content. Scopes are auto-detected from source package evidence."]
pub fn apply<'call>(
&'call self,
params: &'call DocTemplatesApplyBoundParams,
) -> impl std::future::Future<Output = Result<DocTemplatesApplyResult>> + Send + 'call {
self.apply_with_options(params, InvokeOptions::default())
}
#[doc = "Apply detected DOCX template/substrate (styles, numbering, settings, theme, font table, web settings, headers/footers, section defaults) from a source package onto the current document, preserving body content. Scopes are auto-detected from source package evidence."]
pub async fn apply_with_options(
&self,
params: &DocTemplatesApplyBoundParams,
options: InvokeOptions,
) -> Result<DocTemplatesApplyResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.templates.apply", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.templates.apply".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiToc<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiToc<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Update the configuration switches of a table of contents."]
pub fn configure<'call>(
&'call self,
params: &'call DocTocConfigureBoundParams,
) -> impl std::future::Future<Output = Result<DocTocConfigureResult>> + Send + 'call {
self.configure_with_options(params, InvokeOptions::default())
}
#[doc = "Update the configuration switches of a table of contents."]
pub async fn configure_with_options(
&self,
params: &DocTocConfigureBoundParams,
options: InvokeOptions,
) -> Result<DocTocConfigureResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.toc.configure", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.toc.configure".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Update the properties of a TC (table of contents entry) field."]
pub fn edit_entry<'call>(
&'call self,
params: &'call DocTocEditEntryBoundParams,
) -> impl std::future::Future<Output = Result<DocTocEditEntryResult>> + Send + 'call {
self.edit_entry_with_options(params, InvokeOptions::default())
}
#[doc = "Update the properties of a TC (table of contents entry) field."]
pub async fn edit_entry_with_options(
&self,
params: &DocTocEditEntryBoundParams,
options: InvokeOptions,
) -> Result<DocTocEditEntryResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.toc.editEntry", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.toc.editEntry".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Retrieve details of a specific table of contents."]
pub fn get<'call>(
&'call self,
params: &'call DocTocGetBoundParams,
) -> impl std::future::Future<Output = Result<DocTocGetResult>> + Send + 'call {
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Retrieve details of a specific table of contents."]
pub async fn get_with_options(
&self,
params: &DocTocGetBoundParams,
options: InvokeOptions,
) -> Result<DocTocGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self.invoker.invoke("doc.toc.get", params, options).await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.toc.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Retrieve details of a specific TC (table of contents entry) field."]
pub fn get_entry<'call>(
&'call self,
params: &'call DocTocGetEntryBoundParams,
) -> impl std::future::Future<Output = Result<DocTocGetEntryResult>> + Send + 'call {
self.get_entry_with_options(params, InvokeOptions::default())
}
#[doc = "Retrieve details of a specific TC (table of contents entry) field."]
pub async fn get_entry_with_options(
&self,
params: &DocTocGetEntryBoundParams,
options: InvokeOptions,
) -> Result<DocTocGetEntryResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.toc.getEntry", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.toc.getEntry".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List all tables of contents in the document."]
pub fn list<'call>(
&'call self,
params: &'call DocTocListBoundParams,
) -> impl std::future::Future<Output = Result<DocTocListResult>> + Send + 'call {
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List all tables of contents in the document."]
pub async fn list_with_options(
&self,
params: &DocTocListBoundParams,
options: InvokeOptions,
) -> Result<DocTocListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self.invoker.invoke("doc.toc.list", params, options).await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.toc.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List all TC (table of contents entry) fields in the document body."]
pub fn list_entries<'call>(
&'call self,
params: &'call DocTocListEntriesBoundParams,
) -> impl std::future::Future<Output = Result<DocTocListEntriesResult>> + Send + 'call {
self.list_entries_with_options(params, InvokeOptions::default())
}
#[doc = "List all TC (table of contents entry) fields in the document body."]
pub async fn list_entries_with_options(
&self,
params: &DocTocListEntriesBoundParams,
options: InvokeOptions,
) -> Result<DocTocListEntriesResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.toc.listEntries", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.toc.listEntries".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert a TC (table of contents entry) field at the target paragraph."]
pub fn mark_entry<'call>(
&'call self,
params: &'call DocTocMarkEntryBoundParams,
) -> impl std::future::Future<Output = Result<DocTocMarkEntryResult>> + Send + 'call {
self.mark_entry_with_options(params, InvokeOptions::default())
}
#[doc = "Insert a TC (table of contents entry) field at the target paragraph."]
pub async fn mark_entry_with_options(
&self,
params: &DocTocMarkEntryBoundParams,
options: InvokeOptions,
) -> Result<DocTocMarkEntryResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.toc.markEntry", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.toc.markEntry".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove a table of contents from the document."]
pub fn remove<'call>(
&'call self,
params: &'call DocTocRemoveBoundParams,
) -> impl std::future::Future<Output = Result<DocTocRemoveResult>> + Send + 'call {
self.remove_with_options(params, InvokeOptions::default())
}
#[doc = "Remove a table of contents from the document."]
pub async fn remove_with_options(
&self,
params: &DocTocRemoveBoundParams,
options: InvokeOptions,
) -> Result<DocTocRemoveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.toc.remove", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.toc.remove".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove a TC (table of contents entry) field from the document."]
pub fn unmark_entry<'call>(
&'call self,
params: &'call DocTocUnmarkEntryBoundParams,
) -> impl std::future::Future<Output = Result<DocTocUnmarkEntryResult>> + Send + 'call {
self.unmark_entry_with_options(params, InvokeOptions::default())
}
#[doc = "Remove a TC (table of contents entry) field from the document."]
pub async fn unmark_entry_with_options(
&self,
params: &DocTocUnmarkEntryBoundParams,
options: InvokeOptions,
) -> Result<DocTocUnmarkEntryResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.toc.unmarkEntry", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.toc.unmarkEntry".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Rebuild or refresh the materialized content of a table of contents."]
pub fn update<'call>(
&'call self,
params: &'call DocTocUpdateBoundParams,
) -> impl std::future::Future<Output = Result<DocTocUpdateResult>> + Send + 'call {
self.update_with_options(params, InvokeOptions::default())
}
#[doc = "Rebuild or refresh the materialized content of a table of contents."]
pub async fn update_with_options(
&self,
params: &DocTocUpdateBoundParams,
options: InvokeOptions,
) -> Result<DocTocUpdateResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.toc.update", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.toc.update".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiTrackChanges<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiTrackChanges<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Accept or reject tracked changes by logical id, by several logical ids atomically, by selected text range, by logical anchor range ({ anchor, relativeStart, relativeEnd }), or every active change in the document. Range targets may include overlap / side selectors and may partially resolve a change, splitting surviving content into new fragments with stable ids. Legacy `{ id, range: { kind: \"partial\", ... } }` targets are promoted only when the active adapter supports `decide()`; legacy fallback adapters fail closed with `INVALID_INPUT`. `input.expectedRevision` is accepted as a compatibility alias for mutation options."]
pub fn decide<'call>(
&'call self,
params: &'call DocTrackChangesDecideBoundParams,
) -> impl std::future::Future<Output = Result<DocTrackChangesDecideResult>> + Send + 'call {
self.decide_with_options(params, InvokeOptions::default())
}
#[doc = "Accept or reject tracked changes by logical id, by several logical ids atomically, by selected text range, by logical anchor range ({ anchor, relativeStart, relativeEnd }), or every active change in the document. Range targets may include overlap / side selectors and may partially resolve a change, splitting surviving content into new fragments with stable ids. Legacy `{ id, range: { kind: \"partial\", ... } }` targets are promoted only when the active adapter supports `decide()`; legacy fallback adapters fail closed with `INVALID_INPUT`. `input.expectedRevision` is accepted as a compatibility alias for mutation options."]
pub async fn decide_with_options(
&self,
params: &DocTrackChangesDecideBoundParams,
options: InvokeOptions,
) -> Result<DocTrackChangesDecideResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.trackChanges.decide", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.trackChanges.decide".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Retrieve a single tracked change by SuperDoc logical id."]
pub fn get<'call>(
&'call self,
params: &'call DocTrackChangesGetBoundParams,
) -> impl std::future::Future<Output = Result<DocTrackChangesGetResult>> + Send + 'call {
self.get_with_options(params, InvokeOptions::default())
}
#[doc = "Retrieve a single tracked change by SuperDoc logical id."]
pub async fn get_with_options(
&self,
params: &DocTrackChangesGetBoundParams,
options: InvokeOptions,
) -> Result<DocTrackChangesGetResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.trackChanges.get", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.trackChanges.get".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List tracked changes in the document. Body-only by default; pass `in: <StoryLocator>` or `in: \"all\"` to widen scope."]
pub fn list<'call>(
&'call self,
params: &'call DocTrackChangesListBoundParams,
) -> impl std::future::Future<Output = Result<DocTrackChangesListResult>> + Send + 'call {
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List tracked changes in the document. Body-only by default; pass `in: <StoryLocator>` or `in: \"all\"` to widen scope."]
pub async fn list_with_options(
&self,
params: &DocTrackChangesListBoundParams,
options: InvokeOptions,
) -> Result<DocTrackChangesListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.trackChanges.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.trackChanges.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
}
pub struct DocApiWatermarks<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> DocApiWatermarks<'a, I> {
pub fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Atomically insert, replace, or remove selected watermarks in explicit scopes while preserving surrounding headers."]
pub fn apply<'call>(
&'call self,
params: &'call DocWatermarksApplyBoundParams,
) -> impl std::future::Future<Output = Result<DocWatermarksApplyResult>> + Send + 'call {
self.apply_with_options(params, InvokeOptions::default())
}
#[doc = "Atomically insert, replace, or remove selected watermarks in explicit scopes while preserving surrounding headers."]
pub async fn apply_with_options(
&self,
params: &DocWatermarksApplyBoundParams,
options: InvokeOptions,
) -> Result<DocWatermarksApplyResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.watermarks.apply", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.watermarks.apply".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Insert a Word-compatible text or picture watermark into a header scope."]
pub fn insert<'call>(
&'call self,
params: &'call DocWatermarksInsertBoundParams,
) -> impl std::future::Future<Output = Result<DocWatermarksInsertResult>> + Send + 'call {
self.insert_with_options(params, InvokeOptions::default())
}
#[doc = "Insert a Word-compatible text or picture watermark into a header scope."]
pub async fn insert_with_options(
&self,
params: &DocWatermarksInsertBoundParams,
options: InvokeOptions,
) -> Result<DocWatermarksInsertResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.watermarks.insert", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.watermarks.insert".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List Word-compatible text and picture watermarks and their effective header scopes."]
pub fn list<'call>(
&'call self,
params: &'call DocWatermarksListBoundParams,
) -> impl std::future::Future<Output = Result<DocWatermarksListResult>> + Send + 'call {
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List Word-compatible text and picture watermarks and their effective header scopes."]
pub async fn list_with_options(
&self,
params: &DocWatermarksListBoundParams,
options: InvokeOptions,
) -> Result<DocWatermarksListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.watermarks.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.watermarks.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Remove a watermark without removing unrelated header content."]
pub fn remove<'call>(
&'call self,
params: &'call DocWatermarksRemoveBoundParams,
) -> impl std::future::Future<Output = Result<DocWatermarksRemoveResult>> + Send + 'call {
self.remove_with_options(params, InvokeOptions::default())
}
#[doc = "Remove a watermark without removing unrelated header content."]
pub async fn remove_with_options(
&self,
params: &DocWatermarksRemoveBoundParams,
options: InvokeOptions,
) -> Result<DocWatermarksRemoveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.watermarks.remove", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.watermarks.remove".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Replace an existing watermark while retaining its stable identity and owner scope."]
pub fn replace<'call>(
&'call self,
params: &'call DocWatermarksReplaceBoundParams,
) -> impl std::future::Future<Output = Result<DocWatermarksReplaceResult>> + Send + 'call {
self.replace_with_options(params, InvokeOptions::default())
}
#[doc = "Replace an existing watermark while retaining its stable identity and owner scope."]
pub async fn replace_with_options(
&self,
params: &DocWatermarksReplaceBoundParams,
options: InvokeOptions,
) -> Result<DocWatermarksReplaceResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.watermarks.replace", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.watermarks.replace".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub(crate) struct ClientApi<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> ClientApi<'a, I> {
pub(crate) fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "List all available CLI operations and contract metadata."]
pub(crate) fn describe<'call>(
&'call self,
params: &'call DocDescribeParams,
) -> impl std::future::Future<Output = Result<DocDescribeResult>> + Send + 'call {
self.describe_with_options(params, InvokeOptions::default())
}
#[doc = "List all available CLI operations and contract metadata."]
pub(crate) async fn describe_with_options(
&self,
params: &DocDescribeParams,
options: InvokeOptions,
) -> Result<DocDescribeResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self.invoker.invoke("doc.describe", params, options).await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.describe".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Show detailed metadata for a single CLI operation."]
pub(crate) fn describe_command<'call>(
&'call self,
params: &'call DocDescribeCommandParams,
) -> impl std::future::Future<Output = Result<DocDescribeCommandResult>> + Send + 'call {
self.describe_command_with_options(params, InvokeOptions::default())
}
#[doc = "Show detailed metadata for a single CLI operation."]
pub(crate) async fn describe_command_with_options(
&self,
params: &DocDescribeCommandParams,
options: InvokeOptions,
) -> Result<DocDescribeCommandResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.describeCommand", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.describeCommand".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Open a document and create a persistent v2 editing session. Content override atomically initializes a blank document or replaces a template body. V2 single-socket collaboration supports y-websocket, Hocuspocus, and Liveblocks."]
pub(crate) fn open<'call>(
&'call self,
params: &'call DocOpenParams,
) -> impl std::future::Future<Output = Result<DocOpenResult>> + Send + 'call {
self.open_with_options(params, InvokeOptions::default())
}
#[doc = "Open a document and create a persistent v2 editing session. Content override atomically initializes a blank document or replaces a template body. V2 single-socket collaboration supports y-websocket, Hocuspocus, and Liveblocks."]
pub(crate) async fn open_with_options(
&self,
params: &DocOpenParams,
options: InvokeOptions,
) -> Result<DocOpenResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self.invoker.invoke("doc.open", params, options).await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.open".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
pub(crate) struct InternalApi<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> InternalApi<'a, I> {
pub(crate) fn new(invoker: &'a I) -> Self {
Self { invoker }
}
pub(crate) fn session(&self) -> InternalApiSession<'a, I> {
InternalApiSession::new(self.invoker)
}
#[doc = "Find CLI operations from a natural-language intent. Returns an adaptive relevant set capped at ten results and expands the leading operation input shape."]
pub(crate) fn discover<'call>(
&'call self,
params: &'call DocDiscoverParams,
) -> impl std::future::Future<Output = Result<DocDiscoverResult>> + Send + 'call {
self.discover_with_options(params, InvokeOptions::default())
}
#[doc = "Find CLI operations from a natural-language intent. Returns an adaptive relevant set capped at ten results and expands the leading operation input shape."]
pub(crate) async fn discover_with_options(
&self,
params: &DocDiscoverParams,
options: InvokeOptions,
) -> Result<DocDiscoverResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self.invoker.invoke("doc.discover", params, options).await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.discover".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Show the current session status and document metadata."]
pub(crate) fn status<'call>(
&'call self,
params: &'call DocStatusParams,
) -> impl std::future::Future<Output = Result<DocStatusResult>> + Send + 'call {
self.status_with_options(params, InvokeOptions::default())
}
#[doc = "Show the current session status and document metadata."]
pub(crate) async fn status_with_options(
&self,
params: &DocStatusParams,
options: InvokeOptions,
) -> Result<DocStatusResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self.invoker.invoke("doc.status", params, options).await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.status".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
}
pub(crate) struct InternalApiSession<'a, I: Invoker> {
invoker: &'a I,
}
impl<'a, I: Invoker> InternalApiSession<'a, I> {
pub(crate) fn new(invoker: &'a I) -> Self {
Self { invoker }
}
#[doc = "Close a specific editing session by ID."]
pub(crate) fn close<'call>(
&'call self,
params: &'call DocSessionCloseParams,
) -> impl std::future::Future<Output = Result<DocSessionCloseResult>> + Send + 'call {
self.close_with_options(params, InvokeOptions::default())
}
#[doc = "Close a specific editing session by ID."]
pub(crate) async fn close_with_options(
&self,
params: &DocSessionCloseParams,
options: InvokeOptions,
) -> Result<DocSessionCloseResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.session.close", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.session.close".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "List all active editing sessions."]
pub(crate) fn list<'call>(
&'call self,
params: &'call DocSessionListParams,
) -> impl std::future::Future<Output = Result<DocSessionListResult>> + Send + 'call {
self.list_with_options(params, InvokeOptions::default())
}
#[doc = "List all active editing sessions."]
pub(crate) async fn list_with_options(
&self,
params: &DocSessionListParams,
options: InvokeOptions,
) -> Result<DocSessionListResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.session.list", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.session.list".into());
error.outcome_unknown = false;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Persist the current session state."]
pub(crate) fn save<'call>(
&'call self,
params: &'call DocSessionSaveParams,
) -> impl std::future::Future<Output = Result<DocSessionSaveResult>> + Send + 'call {
self.save_with_options(params, InvokeOptions::default())
}
#[doc = "Persist the current session state."]
pub(crate) async fn save_with_options(
&self,
params: &DocSessionSaveParams,
options: InvokeOptions,
) -> Result<DocSessionSaveResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.session.save", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.session.save".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
#[doc = "Set the default session for subsequent commands."]
pub(crate) fn set_default<'call>(
&'call self,
params: &'call DocSessionSetDefaultParams,
) -> impl std::future::Future<Output = Result<DocSessionSetDefaultResult>> + Send + 'call {
self.set_default_with_options(params, InvokeOptions::default())
}
#[doc = "Set the default session for subsequent commands."]
pub(crate) async fn set_default_with_options(
&self,
params: &DocSessionSetDefaultParams,
options: InvokeOptions,
) -> Result<DocSessionSetDefaultResult> {
let params = serde_json::to_value(params)
.map_err(|error| Error::new("INVALID_ARGUMENT", error.to_string()))?;
let result = self
.invoker
.invoke("doc.session.setDefault", params, options)
.await?;
serde_json::from_value(result).map_err(|decode| {
let mut error = Error::decode(decode);
error.operation_id = Some("doc.session.setDefault".into());
error.outcome_unknown = true;
self.invoker.handle_decode_error(error)
})
}
}
#[cfg(any(test, feature = "conformance"))]
pub(crate) async fn exercise_callables<I: Invoker>(invoker: &I) {
{
let params:DocAuthoritiesConfigureBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"tableOfAuthorities\",\"nodeId\":\"\"},\"patch\":{}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).authorities().configure(¶ms).await;
}
{
let params:DocAuthoritiesEntriesGetBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"inline\",\"nodeType\":\"authorityEntry\",\"anchor\":{\"start\":{\"blockId\":\"\",\"offset\":0},\"end\":{\"blockId\":\"\",\"offset\":0}}}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.authorities()
.entries()
.get(¶ms)
.await;
}
{
let params:DocAuthoritiesEntriesInsertBoundParams=serde_json::from_str("{\"at\":{\"kind\":\"text\",\"segments\":[]},\"entry\":{\"longCitation\":\"\",\"category\":\"\"}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.authorities()
.entries()
.insert(¶ms)
.await;
}
{
let params: DocAuthoritiesEntriesListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.authorities()
.entries()
.list(¶ms)
.await;
}
{
let params:DocAuthoritiesEntriesRemoveBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"inline\",\"nodeType\":\"authorityEntry\",\"anchor\":{\"start\":{\"blockId\":\"\",\"offset\":0},\"end\":{\"blockId\":\"\",\"offset\":0}}}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.authorities()
.entries()
.remove(¶ms)
.await;
}
{
let params:DocAuthoritiesEntriesUpdateBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"inline\",\"nodeType\":\"authorityEntry\",\"anchor\":{\"start\":{\"blockId\":\"\",\"offset\":0},\"end\":{\"blockId\":\"\",\"offset\":0}}},\"patch\":{}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.authorities()
.entries()
.update(¶ms)
.await;
}
{
let params: DocAuthoritiesGetBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"tableOfAuthorities\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).authorities().get(¶ms).await;
}
{
let params: DocAuthoritiesInsertBoundParams =
serde_json::from_str("{\"at\":{\"kind\":\"documentStart\"}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).authorities().insert(¶ms).await;
}
{
let params: DocAuthoritiesListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).authorities().list(¶ms).await;
}
{
let params: DocAuthoritiesRebuildBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"tableOfAuthorities\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).authorities().rebuild(¶ms).await;
}
{
let params: DocAuthoritiesRemoveBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"tableOfAuthorities\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).authorities().remove(¶ms).await;
}
{
let params: DocBlocksDeleteBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).blocks().delete(¶ms).await;
}
{
let params: DocBlocksDeleteRangeBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).blocks().delete_range(¶ms).await;
}
{
let params: DocBlocksFindTextBoundParams =
serde_json::from_str("{\"text\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).blocks().find_text(¶ms).await;
}
{
let params: DocBlocksListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).blocks().list(¶ms).await;
}
{
let params:DocBlocksMergeBoundParams=serde_json::from_str("{\"first\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"\"},\"second\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"\"}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).blocks().merge(¶ms).await;
}
{
let params:DocBlocksMoveBoundParams=serde_json::from_str("{\"source\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"\"},\"destination\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"\"},\"placement\":\"before\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).blocks().move_(¶ms).await;
}
{
let params:DocBlocksSplitBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"\"},\"offset\":0}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).blocks().split(¶ms).await;
}
{
let params: DocBookmarksGetBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"entity\",\"entityType\":\"bookmark\",\"name\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).bookmarks().get(¶ms).await;
}
{
let params: DocBookmarksInsertBoundParams =
serde_json::from_str("{\"name\":\"\",\"at\":{\"kind\":\"text\",\"segments\":[]}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).bookmarks().insert(¶ms).await;
}
{
let params: DocBookmarksListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).bookmarks().list(¶ms).await;
}
{
let params: DocBookmarksRemoveBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"entity\",\"entityType\":\"bookmark\",\"name\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).bookmarks().remove(¶ms).await;
}
{
let params:DocBookmarksRenameBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"entity\",\"entityType\":\"bookmark\",\"name\":\"\"},\"newName\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).bookmarks().rename(¶ms).await;
}
{
let params: DocCapabilitiesCheckBoundParams =
serde_json::from_str("{\"operation\":\"insert\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).capabilities().check(¶ms).await;
}
{
let params: DocCapabilitiesGetBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).capabilities().get(¶ms).await;
}
{
let params: DocCapabilitiesResolveBoundParams =
serde_json::from_str("{\"operationId\":\"get\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).capabilities().resolve(¶ms).await;
}
{
let params: DocCaptionsConfigureBoundParams = serde_json::from_str("{\"label\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).captions().configure(¶ms).await;
}
{
let params: DocCaptionsGetBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).captions().get(¶ms).await;
}
{
let params:DocCaptionsInsertBoundParams=serde_json::from_str("{\"adjacentTo\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"\"},\"position\":\"above\",\"label\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).captions().insert(¶ms).await;
}
{
let params: DocCaptionsListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).captions().list(¶ms).await;
}
{
let params: DocCaptionsRemoveBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).captions().remove(¶ms).await;
}
{
let params:DocCaptionsUpdateBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"\"},\"patch\":{}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).captions().update(¶ms).await;
}
{
let params:DocCitationsBibliographyConfigureBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"bibliography\",\"nodeId\":\"\"},\"style\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.citations()
.bibliography()
.configure(¶ms)
.await;
}
{
let params: DocCitationsBibliographyGetBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"bibliography\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.citations()
.bibliography()
.get(¶ms)
.await;
}
{
let params: DocCitationsBibliographyInsertBoundParams =
serde_json::from_str("{\"at\":{\"kind\":\"documentStart\"}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.citations()
.bibliography()
.insert(¶ms)
.await;
}
{
let params: DocCitationsBibliographyRebuildBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"bibliography\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.citations()
.bibliography()
.rebuild(¶ms)
.await;
}
{
let params: DocCitationsBibliographyRemoveBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"bibliography\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.citations()
.bibliography()
.remove(¶ms)
.await;
}
{
let params:DocCitationsGetBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"inline\",\"nodeType\":\"citation\",\"anchor\":{\"start\":{\"blockId\":\"\",\"offset\":0},\"end\":{\"blockId\":\"\",\"offset\":0}}}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).citations().get(¶ms).await;
}
{
let params: DocCitationsInsertBoundParams =
serde_json::from_str("{\"at\":{\"kind\":\"text\",\"segments\":[]},\"sourceIds\":[]}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).citations().insert(¶ms).await;
}
{
let params: DocCitationsListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).citations().list(¶ms).await;
}
{
let params:DocCitationsRemoveBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"inline\",\"nodeType\":\"citation\",\"anchor\":{\"start\":{\"blockId\":\"\",\"offset\":0},\"end\":{\"blockId\":\"\",\"offset\":0}}}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).citations().remove(¶ms).await;
}
{
let params:DocCitationsSourcesGetBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"entity\",\"entityType\":\"citationSource\",\"sourceId\":\"\"}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.citations()
.sources()
.get(¶ms)
.await;
}
{
let params: DocCitationsSourcesInsertBoundParams =
serde_json::from_str("{\"type\":\"book\",\"fields\":{}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.citations()
.sources()
.insert(¶ms)
.await;
}
{
let params: DocCitationsSourcesListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.citations()
.sources()
.list(¶ms)
.await;
}
{
let params:DocCitationsSourcesRemoveBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"entity\",\"entityType\":\"citationSource\",\"sourceId\":\"\"}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.citations()
.sources()
.remove(¶ms)
.await;
}
{
let params:DocCitationsSourcesUpdateBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"entity\",\"entityType\":\"citationSource\",\"sourceId\":\"\"},\"patch\":{}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.citations()
.sources()
.update(¶ms)
.await;
}
{
let params:DocCitationsUpdateBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"inline\",\"nodeType\":\"citation\",\"anchor\":{\"start\":{\"blockId\":\"\",\"offset\":0},\"end\":{\"blockId\":\"\",\"offset\":0}}},\"patch\":{}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).citations().update(¶ms).await;
}
{
let params: DocClearContentBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).clear_content(¶ms).await;
}
{
let params: DocClipboardInsertBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).clipboard().insert(¶ms).await;
}
{
let params: DocClipboardParseBoundParams =
serde_json::from_str("{\"items\":[]}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).clipboard().parse(¶ms).await;
}
{
let params: DocClipboardSerializeSelectionBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.clipboard()
.serialize_selection(¶ms)
.await;
}
{
let params: DocCloseBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).close(¶ms).await;
}
{
let params: DocCommentsCreateBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).comments().create(¶ms).await;
}
{
let params: DocCommentsDeleteBoundParams =
serde_json::from_str("{\"id\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).comments().delete(¶ms).await;
}
{
let params: DocCommentsGetBoundParams =
serde_json::from_str("{\"id\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).comments().get(¶ms).await;
}
{
let params: DocCommentsListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).comments().list(¶ms).await;
}
{
let params: DocCommentsPatchBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).comments().patch(¶ms).await;
}
{
let params:DocContentControlsAppendContentBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"content\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.append_content(¶ms)
.await;
}
{
let params: DocContentControlsCheckboxGetStateBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.checkbox()
.get_state(¶ms)
.await;
}
{
let params:DocContentControlsCheckboxSetStateBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"checked\":false}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.checkbox()
.set_state(¶ms)
.await;
}
{
let params:DocContentControlsCheckboxSetSymbolPairBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"checkedSymbol\":{},\"uncheckedSymbol\":{}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.checkbox()
.set_symbol_pair(¶ms)
.await;
}
{
let params: DocContentControlsCheckboxToggleBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.checkbox()
.toggle(¶ms)
.await;
}
{
let params: DocContentControlsChoiceListGetItemsBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.choice_list()
.get_items(¶ms)
.await;
}
{
let params: DocContentControlsChoiceListSetItemsBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"items\":[]}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.choice_list()
.set_items(¶ms)
.await;
}
{
let params: DocContentControlsChoiceListSetSelectedBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"value\":\"\"}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.choice_list()
.set_selected(¶ms)
.await;
}
{
let params: DocContentControlsClearBindingBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.clear_binding(¶ms)
.await;
}
{
let params: DocContentControlsClearContentBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.clear_content(¶ms)
.await;
}
{
let params:DocContentControlsCopyBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"destination\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).content_controls().copy(¶ms).await;
}
{
let params: DocContentControlsDateClearValueBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.date()
.clear_value(¶ms)
.await;
}
{
let params:DocContentControlsDateSetCalendarBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"calendar\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.date()
.set_calendar(¶ms)
.await;
}
{
let params:DocContentControlsDateSetDisplayFormatBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"format\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.date()
.set_display_format(¶ms)
.await;
}
{
let params:DocContentControlsDateSetDisplayLocaleBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"locale\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.date()
.set_display_locale(¶ms)
.await;
}
{
let params:DocContentControlsDateSetStorageFormatBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"format\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.date()
.set_storage_format(¶ms)
.await;
}
{
let params: DocContentControlsDateSetValueBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"value\":\"\"}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.date()
.set_value(¶ms)
.await;
}
{
let params: DocContentControlsDeleteBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.delete(¶ms)
.await;
}
{
let params: DocContentControlsGetBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).content_controls().get(¶ms).await;
}
{
let params: DocContentControlsGetBindingBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.get_binding(¶ms)
.await;
}
{
let params: DocContentControlsGetContentBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.get_content(¶ms)
.await;
}
{
let params: DocContentControlsGetParentBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.get_parent(¶ms)
.await;
}
{
let params: DocContentControlsGetRawPropertiesBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.get_raw_properties(¶ms)
.await;
}
{
let params: DocContentControlsGroupUngroupBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.group()
.ungroup(¶ms)
.await;
}
{
let params: DocContentControlsGroupWrapBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.group()
.wrap(¶ms)
.await;
}
{
let params:DocContentControlsInsertAfterBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"content\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.insert_after(¶ms)
.await;
}
{
let params:DocContentControlsInsertBeforeBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"content\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.insert_before(¶ms)
.await;
}
{
let params: DocContentControlsListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).content_controls().list(¶ms).await;
}
{
let params: DocContentControlsListChildrenBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.list_children(¶ms)
.await;
}
{
let params: DocContentControlsListInRangeBoundParams =
serde_json::from_str("{\"startBlockId\":\"\",\"endBlockId\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.list_in_range(¶ms)
.await;
}
{
let params:DocContentControlsMoveBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"destination\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).content_controls().move_(¶ms).await;
}
{
let params: DocContentControlsNormalizeTagPayloadBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.normalize_tag_payload(¶ms)
.await;
}
{
let params: DocContentControlsNormalizeWordCompatibilityBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.normalize_word_compatibility(¶ms)
.await;
}
{
let params: DocContentControlsPatchBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).content_controls().patch(¶ms).await;
}
{
let params: DocContentControlsPatchRawPropertiesBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"patches\":[]}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.patch_raw_properties(¶ms)
.await;
}
{
let params:DocContentControlsPrependContentBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"content\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.prepend_content(¶ms)
.await;
}
{
let params: DocContentControlsRepeatingSectionCloneItemBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"index\":0}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.repeating_section()
.clone_item(¶ms)
.await;
}
{
let params: DocContentControlsRepeatingSectionDeleteItemBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"index\":0}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.repeating_section()
.delete_item(¶ms)
.await;
}
{
let params:DocContentControlsRepeatingSectionInsertItemAfterBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"index\":0}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.repeating_section()
.insert_item_after(¶ms)
.await;
}
{
let params:DocContentControlsRepeatingSectionInsertItemBeforeBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"index\":0}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.repeating_section()
.insert_item_before(¶ms)
.await;
}
{
let params: DocContentControlsRepeatingSectionListItemsBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.repeating_section()
.list_items(¶ms)
.await;
}
{
let params:DocContentControlsRepeatingSectionSetAllowInsertDeleteBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"allow\":false}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.repeating_section()
.set_allow_insert_delete(¶ms)
.await;
}
{
let params:DocContentControlsReplaceContentBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"content\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.replace_content(¶ms)
.await;
}
{
let params: DocContentControlsSelectByTagBoundParams =
serde_json::from_str("{\"tag\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.select_by_tag(¶ms)
.await;
}
{
let params: DocContentControlsSelectByTitleBoundParams =
serde_json::from_str("{\"title\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.select_by_title(¶ms)
.await;
}
{
let params:DocContentControlsSetBindingBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"storeItemId\":\"\",\"xpath\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.set_binding(¶ms)
.await;
}
{
let params:DocContentControlsSetLockModeBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"lockMode\":\"unlocked\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.set_lock_mode(¶ms)
.await;
}
{
let params:DocContentControlsSetTypeBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"controlType\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.set_type(¶ms)
.await;
}
{
let params: DocContentControlsTextClearValueBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.text()
.clear_value(¶ms)
.await;
}
{
let params:DocContentControlsTextSetMultilineBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"multiline\":false}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.text()
.set_multiline(¶ms)
.await;
}
{
let params: DocContentControlsTextSetValueBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"},\"value\":\"\"}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.text()
.set_value(¶ms)
.await;
}
{
let params: DocContentControlsUnwrapBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.unwrap(¶ms)
.await;
}
{
let params: DocContentControlsValidateWordCompatibilityBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.content_controls()
.validate_word_compatibility(¶ms)
.await;
}
{
let params:DocContentControlsWrapBoundParams=serde_json::from_str("{\"kind\":\"block\",\"target\":{\"kind\":\"block\",\"nodeType\":\"sdt\",\"nodeId\":\"\"}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).content_controls().wrap(¶ms).await;
}
{
let params: DocCreateContentControlBoundParams =
serde_json::from_str("{\"kind\":\"block\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).create().content_control(¶ms).await;
}
{
let params: DocCreateHeadingBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).create().heading(¶ms).await;
}
{
let params: DocCreateImageBoundParams =
serde_json::from_str("{\"src\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).create().image(¶ms).await;
}
{
let params: DocCreateParagraphBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).create().paragraph(¶ms).await;
}
{
let params: DocCreateSectionBreakBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).create().section_break(¶ms).await;
}
{
let params: DocCreateTableBoundParams = serde_json::from_str("{\"rows\":0,\"columns\":0}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).create().table(¶ms).await;
}
{
let params: DocCreateTableOfContentsBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.create()
.table_of_contents(¶ms)
.await;
}
{
let params:DocCrossRefsGetBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"inline\",\"nodeType\":\"crossRef\",\"anchor\":{\"start\":{\"blockId\":\"\",\"offset\":0},\"end\":{\"blockId\":\"\",\"offset\":0}}}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).cross_refs().get(¶ms).await;
}
{
let params:DocCrossRefsInsertBoundParams=serde_json::from_str("{\"at\":{\"kind\":\"text\",\"segments\":[]},\"target\":{\"kind\":\"bookmark\",\"name\":\"\"},\"display\":\"content\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).cross_refs().insert(¶ms).await;
}
{
let params: DocCrossRefsListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).cross_refs().list(¶ms).await;
}
{
let params:DocCrossRefsRebuildBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"inline\",\"nodeType\":\"crossRef\",\"anchor\":{\"start\":{\"blockId\":\"\",\"offset\":0},\"end\":{\"blockId\":\"\",\"offset\":0}}}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).cross_refs().rebuild(¶ms).await;
}
{
let params:DocCrossRefsRemoveBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"inline\",\"nodeType\":\"crossRef\",\"anchor\":{\"start\":{\"blockId\":\"\",\"offset\":0},\"end\":{\"blockId\":\"\",\"offset\":0}}}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).cross_refs().remove(¶ms).await;
}
{
let params: DocCustomXmlPartsCreateBoundParams = serde_json::from_str("{\"content\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.custom_xml()
.parts()
.create(¶ms)
.await;
}
{
let params: DocCustomXmlPartsGetBoundParams =
serde_json::from_str("{\"target\":{\"id\":\"\"}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).custom_xml().parts().get(¶ms).await;
}
{
let params: DocCustomXmlPartsListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.custom_xml()
.parts()
.list(¶ms)
.await;
}
{
let params: DocCustomXmlPartsPatchBoundParams =
serde_json::from_str("{\"target\":{\"id\":\"\"}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.custom_xml()
.parts()
.patch(¶ms)
.await;
}
{
let params: DocCustomXmlPartsRemoveBoundParams =
serde_json::from_str("{\"target\":{\"id\":\"\"}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.custom_xml()
.parts()
.remove(¶ms)
.await;
}
{
let params: DocDeleteBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).delete(¶ms).await;
}
{
let params: DocDescribeParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = ClientApi::new(invoker).describe(¶ms).await;
}
{
let params: DocDescribeCommandParams = serde_json::from_str("{\"operationId\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = ClientApi::new(invoker).describe_command(¶ms).await;
}
{
let params:DocDiffApplyBoundParams=serde_json::from_str("{\"diff\":{\"version\":\"sd-diff-payload/v1\",\"engine\":\"superdoc-v2\",\"baseFingerprint\":\"\",\"targetFingerprint\":\"\",\"coverage\":{\"body\":true,\"comments\":false,\"styles\":false,\"numbering\":false,\"headerFooters\":false},\"summary\":{\"hasChanges\":false,\"changedComponents\":[],\"body\":{\"hasChanges\":false},\"comments\":{\"hasChanges\":false},\"styles\":{\"hasChanges\":false},\"numbering\":{\"hasChanges\":false},\"headerFooters\":{\"hasChanges\":false},\"parts\":{\"hasChanges\":false}},\"payload\":{}}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).diff().apply(¶ms).await;
}
{
let params: DocDiffCaptureBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).diff().capture(¶ms).await;
}
{
let params:DocDiffCompareBoundParams=serde_json::from_str("{\"targetSnapshot\":{\"version\":\"sd-diff-snapshot/v1\",\"engine\":\"superdoc-v2\",\"fingerprint\":\"\",\"coverage\":{\"body\":true,\"comments\":false,\"styles\":false,\"numbering\":false,\"headerFooters\":false},\"payload\":{}}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).diff().compare(¶ms).await;
}
{
let params: DocDiscoverParams = serde_json::from_str("{\"query\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = InternalApi::new(invoker).discover(¶ms).await;
}
{
let params: DocExecuteCodeBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).execute_code(¶ms).await;
}
{
let params: DocExportToDocxBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).export().to_docx(¶ms).await;
}
{
let params: DocExtractBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).extract(¶ms).await;
}
{
let params: DocFieldsGetBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"field\",\"blockId\":\"\",\"occurrenceIndex\":0}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).fields().get(¶ms).await;
}
{
let params: DocFieldsInsertBoundParams = serde_json::from_str(
"{\"mode\":\"raw\",\"at\":{\"kind\":\"text\",\"segments\":[]},\"instruction\":\"\"}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).fields().insert(¶ms).await;
}
{
let params: DocFieldsListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).fields().list(¶ms).await;
}
{
let params: DocFieldsRebuildBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"field\",\"blockId\":\"\",\"occurrenceIndex\":0}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).fields().rebuild(¶ms).await;
}
{
let params:DocFieldsRemoveBoundParams=serde_json::from_str("{\"mode\":\"raw\",\"target\":{\"kind\":\"field\",\"blockId\":\"\",\"occurrenceIndex\":0}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).fields().remove(¶ms).await;
}
{
let params: DocFindBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).find(¶ms).await;
}
{
let params: DocFootnotesConfigureBoundParams =
serde_json::from_str("{\"type\":\"footnote\",\"scope\":{\"kind\":\"document\"}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).footnotes().configure(¶ms).await;
}
{
let params: DocFootnotesGetBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"entity\",\"entityType\":\"footnote\",\"noteId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).footnotes().get(¶ms).await;
}
{
let params: DocFootnotesInsertBoundParams = serde_json::from_str("{\"type\":\"footnote\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).footnotes().insert(¶ms).await;
}
{
let params: DocFootnotesListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).footnotes().list(¶ms).await;
}
{
let params: DocFootnotesRemoveBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"entity\",\"entityType\":\"footnote\",\"noteId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).footnotes().remove(¶ms).await;
}
{
let params:DocFootnotesUpdateBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"entity\",\"entityType\":\"footnote\",\"noteId\":\"\"},\"patch\":{\"content\":\"\"}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).footnotes().update(¶ms).await;
}
{
let params: DocFormatApplyBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().apply(¶ms).await;
}
{
let params: DocFormatBCsBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().b_cs(¶ms).await;
}
{
let params: DocFormatBoldBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().bold(¶ms).await;
}
{
let params: DocFormatBorderBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().border(¶ms).await;
}
{
let params: DocFormatCapsBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().caps(¶ms).await;
}
{
let params: DocFormatCharScaleBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().char_scale(¶ms).await;
}
{
let params: DocFormatColorBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().color(¶ms).await;
}
{
let params: DocFormatContextualAlternatesBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.format()
.contextual_alternates(¶ms)
.await;
}
{
let params: DocFormatCsBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().cs(¶ms).await;
}
{
let params: DocFormatDstrikeBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().dstrike(¶ms).await;
}
{
let params: DocFormatEastAsianLayoutBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.format()
.east_asian_layout(¶ms)
.await;
}
{
let params: DocFormatEmBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().em(¶ms).await;
}
{
let params: DocFormatEmbossBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().emboss(¶ms).await;
}
{
let params: DocFormatFitTextBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().fit_text(¶ms).await;
}
{
let params: DocFormatFontFamilyBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().font_family(¶ms).await;
}
{
let params: DocFormatFontSizeBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().font_size(¶ms).await;
}
{
let params: DocFormatFontSizeCsBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().font_size_cs(¶ms).await;
}
{
let params: DocFormatHighlightBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().highlight(¶ms).await;
}
{
let params: DocFormatICsBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().i_cs(¶ms).await;
}
{
let params: DocFormatImprintBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().imprint(¶ms).await;
}
{
let params: DocFormatItalicBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().italic(¶ms).await;
}
{
let params: DocFormatKerningBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().kerning(¶ms).await;
}
{
let params: DocFormatLangBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().lang(¶ms).await;
}
{
let params: DocFormatLetterSpacingBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().letter_spacing(¶ms).await;
}
{
let params: DocFormatLigaturesBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().ligatures(¶ms).await;
}
{
let params: DocFormatNumFormBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().num_form(¶ms).await;
}
{
let params: DocFormatNumSpacingBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().num_spacing(¶ms).await;
}
{
let params: DocFormatOMathBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().o_math(¶ms).await;
}
{
let params: DocFormatOutlineBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().outline(¶ms).await;
}
{
let params: DocFormatParagraphClearAlignmentBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.format()
.paragraph()
.clear_alignment(¶ms)
.await;
}
{
let params: DocFormatParagraphClearAllTabStopsBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.format()
.paragraph()
.clear_all_tab_stops(¶ms)
.await;
}
{
let params: DocFormatParagraphClearBorderBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.format()
.paragraph()
.clear_border(¶ms)
.await;
}
{
let params: DocFormatParagraphClearDirectionBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.format()
.paragraph()
.clear_direction(¶ms)
.await;
}
{
let params: DocFormatParagraphClearIndentationBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.format()
.paragraph()
.clear_indentation(¶ms)
.await;
}
{
let params: DocFormatParagraphClearShadingBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.format()
.paragraph()
.clear_shading(¶ms)
.await;
}
{
let params: DocFormatParagraphClearSpacingBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.format()
.paragraph()
.clear_spacing(¶ms)
.await;
}
{
let params: DocFormatParagraphClearTabStopBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.format()
.paragraph()
.clear_tab_stop(¶ms)
.await;
}
{
let params: DocFormatParagraphResetDirectFormattingBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.format()
.paragraph()
.reset_direct_formatting(¶ms)
.await;
}
{
let params: DocFormatParagraphSetAlignmentBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.format()
.paragraph()
.set_alignment(¶ms)
.await;
}
{
let params: DocFormatParagraphSetBorderBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.format()
.paragraph()
.set_border(¶ms)
.await;
}
{
let params: DocFormatParagraphSetDirectionBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.format()
.paragraph()
.set_direction(¶ms)
.await;
}
{
let params: DocFormatParagraphSetFlowOptionsBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.format()
.paragraph()
.set_flow_options(¶ms)
.await;
}
{
let params: DocFormatParagraphSetIndentationBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.format()
.paragraph()
.set_indentation(¶ms)
.await;
}
{
let params: DocFormatParagraphSetKeepOptionsBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.format()
.paragraph()
.set_keep_options(¶ms)
.await;
}
{
let params: DocFormatParagraphSetMarkRunPropsBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.format()
.paragraph()
.set_mark_run_props(¶ms)
.await;
}
{
let params: DocFormatParagraphSetNumberingBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.format()
.paragraph()
.set_numbering(¶ms)
.await;
}
{
let params: DocFormatParagraphSetOutlineLevelBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.format()
.paragraph()
.set_outline_level(¶ms)
.await;
}
{
let params: DocFormatParagraphSetShadingBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.format()
.paragraph()
.set_shading(¶ms)
.await;
}
{
let params: DocFormatParagraphSetSpacingBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.format()
.paragraph()
.set_spacing(¶ms)
.await;
}
{
let params: DocFormatParagraphSetTabStopBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.format()
.paragraph()
.set_tab_stop(¶ms)
.await;
}
{
let params: DocFormatPositionBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().position(¶ms).await;
}
{
let params: DocFormatReadSelectionBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().read_selection(¶ms).await;
}
{
let params: DocFormatRFontsBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().r_fonts(¶ms).await;
}
{
let params: DocFormatRStyleBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().r_style(¶ms).await;
}
{
let params: DocFormatRtlBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().rtl(¶ms).await;
}
{
let params: DocFormatShadingBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().shading(¶ms).await;
}
{
let params: DocFormatShadowBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().shadow(¶ms).await;
}
{
let params: DocFormatSmallCapsBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().small_caps(¶ms).await;
}
{
let params: DocFormatSnapToGridBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().snap_to_grid(¶ms).await;
}
{
let params: DocFormatSpecVanishBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().spec_vanish(¶ms).await;
}
{
let params: DocFormatStrikeBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().strike(¶ms).await;
}
{
let params: DocFormatStylisticSetsBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().stylistic_sets(¶ms).await;
}
{
let params: DocFormatUnderlineBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().underline(¶ms).await;
}
{
let params: DocFormatVanishBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().vanish(¶ms).await;
}
{
let params: DocFormatVertAlignBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().vert_align(¶ms).await;
}
{
let params: DocFormatWebHiddenBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format().web_hidden(¶ms).await;
}
{
let params: DocFormatRangeBoundParams = serde_json::from_str("{\"properties\":{}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).format_range(¶ms).await;
}
{
let params: DocGetBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).get(¶ms).await;
}
{
let params: DocGetHtmlBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).get_html(¶ms).await;
}
{
let params: DocGetMarkdownBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).get_markdown(¶ms).await;
}
{
let params: DocGetNodeBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).get_node(¶ms).await;
}
{
let params: DocGetNodeByIdBoundParams =
serde_json::from_str("{\"id\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).get_node_by_id(¶ms).await;
}
{
let params: DocGetTextBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).get_text(¶ms).await;
}
{
let params:DocHeaderFootersGetBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"headerFooterSlot\",\"section\":{\"kind\":\"section\",\"sectionId\":\"\"},\"headerFooterKind\":\"header\",\"variant\":\"default\"}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).header_footers().get(¶ms).await;
}
{
let params: DocHeaderFootersListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).header_footers().list(¶ms).await;
}
{
let params: DocHeaderFootersPageNumbersGetBoundParams =
serde_json::from_str("{\"section\":{\"kind\":\"section\",\"sectionId\":\"\"}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.header_footers()
.page_numbers()
.get(¶ms)
.await;
}
{
let params: DocHeaderFootersPageNumbersInsertBoundParams = serde_json::from_str(
"{\"section\":{\"kind\":\"section\",\"sectionId\":\"\"},\"kind\":\"header\"}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.header_footers()
.page_numbers()
.insert(¶ms)
.await;
}
{
let params: DocHeaderFootersPageNumbersRemoveBoundParams =
serde_json::from_str("{\"section\":{\"kind\":\"section\",\"sectionId\":\"\"}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.header_footers()
.page_numbers()
.remove(¶ms)
.await;
}
{
let params: DocHeaderFootersPageNumbersSetBoundParams = serde_json::from_str(
"{\"section\":{\"kind\":\"section\",\"sectionId\":\"\"},\"kind\":\"header\"}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.header_footers()
.page_numbers()
.set(¶ms)
.await;
}
{
let params: DocHeaderFootersPartsCreateBoundParams =
serde_json::from_str("{\"kind\":\"header\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.header_footers()
.parts()
.create(¶ms)
.await;
}
{
let params: DocHeaderFootersPartsDeleteBoundParams =
serde_json::from_str("{\"target\":{\"kind\":\"headerFooterPart\",\"refId\":\"\"}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.header_footers()
.parts()
.delete(¶ms)
.await;
}
{
let params: DocHeaderFootersPartsListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.header_footers()
.parts()
.list(¶ms)
.await;
}
{
let params:DocHeaderFootersRefsClearBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"headerFooterSlot\",\"section\":{\"kind\":\"section\",\"sectionId\":\"\"},\"headerFooterKind\":\"header\",\"variant\":\"default\"}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.header_footers()
.refs()
.clear(¶ms)
.await;
}
{
let params:DocHeaderFootersRefsSetBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"headerFooterSlot\",\"section\":{\"kind\":\"section\",\"sectionId\":\"\"},\"headerFooterKind\":\"header\",\"variant\":\"default\"},\"refId\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.header_footers()
.refs()
.set(¶ms)
.await;
}
{
let params:DocHeaderFootersRefsSetLinkedToPreviousBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"headerFooterSlot\",\"section\":{\"kind\":\"section\",\"sectionId\":\"\"},\"headerFooterKind\":\"header\",\"variant\":\"default\"},\"linked\":false}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.header_footers()
.refs()
.set_linked_to_previous(¶ms)
.await;
}
{
let params:DocHeaderFootersResolveBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"headerFooterSlot\",\"section\":{\"kind\":\"section\",\"sectionId\":\"\"},\"headerFooterKind\":\"header\",\"variant\":\"default\"}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).header_footers().resolve(¶ms).await;
}
{
let params: DocHistoryGetBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).history().get(¶ms).await;
}
{
let params: DocHistoryRedoBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).history().redo(¶ms).await;
}
{
let params: DocHistoryUndoBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).history().undo(¶ms).await;
}
{
let params: DocHtmlToFragmentBoundParams =
serde_json::from_str("{\"html\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).html_to_fragment(¶ms).await;
}
{
let params:DocHyperlinksGetBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"inline\",\"nodeType\":\"hyperlink\",\"anchor\":{\"start\":{\"blockId\":\"\",\"offset\":0},\"end\":{\"blockId\":\"\",\"offset\":0}}}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).hyperlinks().get(¶ms).await;
}
{
let params: DocHyperlinksInsertBoundParams =
serde_json::from_str("{\"text\":\"\",\"link\":{\"destination\":{}}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).hyperlinks().insert(¶ms).await;
}
{
let params: DocHyperlinksListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).hyperlinks().list(¶ms).await;
}
{
let params:DocHyperlinksPatchBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"inline\",\"nodeType\":\"hyperlink\",\"anchor\":{\"start\":{\"blockId\":\"\",\"offset\":0},\"end\":{\"blockId\":\"\",\"offset\":0}}},\"patch\":{}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).hyperlinks().patch(¶ms).await;
}
{
let params:DocHyperlinksRemoveBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"inline\",\"nodeType\":\"hyperlink\",\"anchor\":{\"start\":{\"blockId\":\"\",\"offset\":0},\"end\":{\"blockId\":\"\",\"offset\":0}}}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).hyperlinks().remove(¶ms).await;
}
{
let params:DocHyperlinksWrapBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"text\",\"blockId\":\"\",\"range\":{\"start\":0,\"end\":0}},\"link\":{\"destination\":{}}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).hyperlinks().wrap(¶ms).await;
}
{
let params: DocImagesConvertToFloatingBoundParams =
serde_json::from_str("{\"imageId\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.images()
.convert_to_floating(¶ms)
.await;
}
{
let params: DocImagesConvertToInlineBoundParams =
serde_json::from_str("{\"imageId\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.images()
.convert_to_inline(¶ms)
.await;
}
{
let params: DocImagesCropBoundParams =
serde_json::from_str("{\"imageId\":\"\",\"crop\":{}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).images().crop(¶ms).await;
}
{
let params: DocImagesDeleteBoundParams = serde_json::from_str("{\"imageId\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).images().delete(¶ms).await;
}
{
let params: DocImagesFlipBoundParams = serde_json::from_str("{\"imageId\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).images().flip(¶ms).await;
}
{
let params: DocImagesGetBoundParams = serde_json::from_str("{\"imageId\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).images().get(¶ms).await;
}
{
let params: DocImagesInsertCaptionBoundParams =
serde_json::from_str("{\"imageId\":\"\",\"text\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).images().insert_caption(¶ms).await;
}
{
let params: DocImagesListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).images().list(¶ms).await;
}
{
let params: DocImagesMoveBoundParams =
serde_json::from_str("{\"imageId\":\"\",\"to\":{\"kind\":\"documentStart\"}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).images().move_(¶ms).await;
}
{
let params: DocImagesRemoveCaptionBoundParams = serde_json::from_str("{\"imageId\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).images().remove_caption(¶ms).await;
}
{
let params: DocImagesReplaceSourceBoundParams =
serde_json::from_str("{\"imageId\":\"\",\"src\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).images().replace_source(¶ms).await;
}
{
let params: DocImagesResetCropBoundParams = serde_json::from_str("{\"imageId\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).images().reset_crop(¶ms).await;
}
{
let params: DocImagesRotateBoundParams =
serde_json::from_str("{\"imageId\":\"\",\"angle\":0}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).images().rotate(¶ms).await;
}
{
let params: DocImagesScaleBoundParams =
serde_json::from_str("{\"imageId\":\"\",\"factor\":0}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).images().scale(¶ms).await;
}
{
let params: DocImagesSetAltTextBoundParams =
serde_json::from_str("{\"imageId\":\"\",\"description\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).images().set_alt_text(¶ms).await;
}
{
let params: DocImagesSetAnchorOptionsBoundParams =
serde_json::from_str("{\"imageId\":\"\",\"options\":{}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.images()
.set_anchor_options(¶ms)
.await;
}
{
let params: DocImagesSetDecorativeBoundParams =
serde_json::from_str("{\"imageId\":\"\",\"decorative\":false}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).images().set_decorative(¶ms).await;
}
{
let params: DocImagesSetHyperlinkBoundParams =
serde_json::from_str("{\"imageId\":\"\",\"url\":null}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).images().set_hyperlink(¶ms).await;
}
{
let params: DocImagesSetLockAspectRatioBoundParams =
serde_json::from_str("{\"imageId\":\"\",\"locked\":false}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.images()
.set_lock_aspect_ratio(¶ms)
.await;
}
{
let params: DocImagesSetNameBoundParams =
serde_json::from_str("{\"imageId\":\"\",\"name\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).images().set_name(¶ms).await;
}
{
let params: DocImagesSetPositionBoundParams =
serde_json::from_str("{\"imageId\":\"\",\"position\":{}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).images().set_position(¶ms).await;
}
{
let params: DocImagesSetSizeBoundParams =
serde_json::from_str("{\"imageId\":\"\",\"size\":{\"width\":0,\"height\":0}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).images().set_size(¶ms).await;
}
{
let params: DocImagesSetWrapDistancesBoundParams =
serde_json::from_str("{\"imageId\":\"\",\"distances\":{}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.images()
.set_wrap_distances(¶ms)
.await;
}
{
let params: DocImagesSetWrapSideBoundParams =
serde_json::from_str("{\"imageId\":\"\",\"side\":\"bothSides\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).images().set_wrap_side(¶ms).await;
}
{
let params: DocImagesSetWrapTypeBoundParams =
serde_json::from_str("{\"imageId\":\"\",\"type\":\"None\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).images().set_wrap_type(¶ms).await;
}
{
let params: DocImagesSetZOrderBoundParams =
serde_json::from_str("{\"imageId\":\"\",\"zOrder\":{\"relativeHeight\":0}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).images().set_z_order(¶ms).await;
}
{
let params: DocImagesUpdateCaptionBoundParams =
serde_json::from_str("{\"imageId\":\"\",\"text\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).images().update_caption(¶ms).await;
}
{
let params: DocIndexConfigureBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"index\",\"nodeId\":\"\"},\"patch\":{}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).index().configure(¶ms).await;
}
{
let params:DocIndexEntriesGetBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"inline\",\"nodeType\":\"indexEntry\",\"anchor\":{\"start\":{\"blockId\":\"\",\"offset\":0},\"end\":{\"blockId\":\"\",\"offset\":0}}}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).index().entries().get(¶ms).await;
}
{
let params: DocIndexEntriesInsertBoundParams = serde_json::from_str(
"{\"at\":{\"kind\":\"text\",\"segments\":[]},\"entry\":{\"text\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).index().entries().insert(¶ms).await;
}
{
let params: DocIndexEntriesListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).index().entries().list(¶ms).await;
}
{
let params:DocIndexEntriesRemoveBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"inline\",\"nodeType\":\"indexEntry\",\"anchor\":{\"start\":{\"blockId\":\"\",\"offset\":0},\"end\":{\"blockId\":\"\",\"offset\":0}}}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).index().entries().remove(¶ms).await;
}
{
let params:DocIndexEntriesUpdateBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"inline\",\"nodeType\":\"indexEntry\",\"anchor\":{\"start\":{\"blockId\":\"\",\"offset\":0},\"end\":{\"blockId\":\"\",\"offset\":0}}},\"patch\":{}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).index().entries().update(¶ms).await;
}
{
let params: DocIndexGetBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"index\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).index().get(¶ms).await;
}
{
let params: DocIndexInsertBoundParams =
serde_json::from_str("{\"at\":{\"kind\":\"documentStart\"}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).index().insert(¶ms).await;
}
{
let params: DocIndexListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).index().list(¶ms).await;
}
{
let params: DocIndexRebuildBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"index\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).index().rebuild(¶ms).await;
}
{
let params: DocIndexRemoveBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"index\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).index().remove(¶ms).await;
}
{
let params: DocInfoBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).info(¶ms).await;
}
{
let params: DocInsertBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).insert(¶ms).await;
}
{
let params: DocInsertLineBreakBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).insert_line_break(¶ms).await;
}
{
let params: DocInsertTabBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).insert_tab(¶ms).await;
}
{
let params:DocListsApplyBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"\"},\"seed\":\"bullet\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().apply(¶ms).await;
}
{
let params: DocListsApplyPresetBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().apply_preset(¶ms).await;
}
{
let params:DocListsApplyStyleBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"\"},\"style\":{\"version\":1,\"levels\":[]}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().apply_style(¶ms).await;
}
{
let params: DocListsApplyTemplateBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().apply_template(¶ms).await;
}
{
let params: DocListsAttachBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().attach(¶ms).await;
}
{
let params: DocListsCanContinuePreviousBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.lists()
.can_continue_previous(¶ms)
.await;
}
{
let params: DocListsCanJoinBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().can_join(¶ms).await;
}
{
let params: DocListsCaptureTemplateBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().capture_template(¶ms).await;
}
{
let params: DocListsClearLevelOverridesBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.lists()
.clear_level_overrides(¶ms)
.await;
}
{
let params: DocListsContinueBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().continue_(¶ms).await;
}
{
let params: DocListsContinuePreviousBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.lists()
.continue_previous(¶ms)
.await;
}
{
let params: DocListsConvertToTextBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().convert_to_text(¶ms).await;
}
{
let params: DocListsCreateBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().create(¶ms).await;
}
{
let params: DocListsDeleteBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().delete(¶ms).await;
}
{
let params: DocListsDetachBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().detach(¶ms).await;
}
{
let params: DocListsGetBoundParams = serde_json::from_str(
"{\"address\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().get(¶ms).await;
}
{
let params: DocListsGetStateBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().get_state(¶ms).await;
}
{
let params: DocListsGetStyleBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().get_style(¶ms).await;
}
{
let params: DocListsIndentBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().indent(¶ms).await;
}
{
let params: DocListsInsertBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().insert(¶ms).await;
}
{
let params: DocListsJoinBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().join(¶ms).await;
}
{
let params: DocListsListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().list(¶ms).await;
}
{
let params:DocListsMergeBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"\"},\"direction\":\"withPrevious\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().merge(¶ms).await;
}
{
let params: DocListsOutdentBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().outdent(¶ms).await;
}
{
let params: DocListsRemoveBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().remove(¶ms).await;
}
{
let params: DocListsRestartBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().restart(¶ms).await;
}
{
let params:DocListsRestartAtBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"\"},\"startAt\":0}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().restart_at(¶ms).await;
}
{
let params: DocListsSeparateBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().separate(¶ms).await;
}
{
let params: DocListsSetLevelBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().set_level(¶ms).await;
}
{
let params: DocListsSetLevelAlignmentBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.lists()
.set_level_alignment(¶ms)
.await;
}
{
let params: DocListsSetLevelBulletBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().set_level_bullet(¶ms).await;
}
{
let params: DocListsSetLevelIndentsBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.lists()
.set_level_indents(¶ms)
.await;
}
{
let params:DocListsSetLevelLayoutBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"\"},\"level\":0,\"layout\":{}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().set_level_layout(¶ms).await;
}
{
let params: DocListsSetLevelMarkerFontBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.lists()
.set_level_marker_font(¶ms)
.await;
}
{
let params: DocListsSetLevelNumberingBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.lists()
.set_level_numbering(¶ms)
.await;
}
{
let params:DocListsSetLevelNumberStyleBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"\"},\"level\":0,\"numberStyle\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.lists()
.set_level_number_style(¶ms)
.await;
}
{
let params: DocListsSetLevelPictureBulletBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.lists()
.set_level_picture_bullet(¶ms)
.await;
}
{
let params: DocListsSetLevelRestartBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.lists()
.set_level_restart(¶ms)
.await;
}
{
let params:DocListsSetLevelStartBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"\"},\"level\":0,\"startAt\":0}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().set_level_start(¶ms).await;
}
{
let params:DocListsSetLevelTextBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"\"},\"level\":0,\"text\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().set_level_text(¶ms).await;
}
{
let params: DocListsSetLevelTrailingCharacterBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.lists()
.set_level_trailing_character(¶ms)
.await;
}
{
let params:DocListsSetTypeBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"\"},\"kind\":\"ordered\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().set_type(¶ms).await;
}
{
let params: DocListsSetValueBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().set_value(¶ms).await;
}
{
let params: DocListsSplitBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"listItem\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).lists().split(¶ms).await;
}
{
let params: DocMarkdownToFragmentBoundParams = serde_json::from_str("{\"markdown\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).markdown_to_fragment(¶ms).await;
}
{
let params:DocMetadataAttachBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"selection\",\"start\":{\"kind\":\"text\",\"blockId\":\"\",\"offset\":0},\"end\":{\"kind\":\"text\",\"blockId\":\"\",\"offset\":0}},\"namespace\":\"\",\"payload\":null}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).metadata().attach(¶ms).await;
}
{
let params: DocMetadataGetBoundParams =
serde_json::from_str("{\"id\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).metadata().get(¶ms).await;
}
{
let params: DocMetadataListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).metadata().list(¶ms).await;
}
{
let params: DocMetadataRemoveBoundParams =
serde_json::from_str("{\"id\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).metadata().remove(¶ms).await;
}
{
let params: DocMetadataResolveBoundParams =
serde_json::from_str("{\"id\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).metadata().resolve(¶ms).await;
}
{
let params: DocMetadataUpdateBoundParams =
serde_json::from_str("{\"id\":\"\",\"payload\":null}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).metadata().update(¶ms).await;
}
{
let params: DocMutationsApplyBoundParams =
serde_json::from_str("{\"atomic\":false,\"steps\":[]}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).mutations().apply(¶ms).await;
}
{
let params: DocMutationsBeginTemporaryBoundParams =
serde_json::from_str("{\"tag\":\"\",\"operations\":[]}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.mutations()
.begin_temporary(¶ms)
.await;
}
{
let params: DocMutationsCommitTemporaryBoundParams =
serde_json::from_str("{\"previewId\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.mutations()
.commit_temporary(¶ms)
.await;
}
{
let params: DocMutationsPreviewBoundParams =
serde_json::from_str("{\"atomic\":false,\"changeMode\":\"direct\",\"steps\":[]}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).mutations().preview(¶ms).await;
}
{
let params: DocMutationsReplaceTemporaryBoundParams =
serde_json::from_str("{\"tag\":\"\",\"operations\":[],\"previewId\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.mutations()
.replace_temporary(¶ms)
.await;
}
{
let params: DocMutationsRollbackTemporaryBoundParams =
serde_json::from_str("{\"previewId\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.mutations()
.rollback_temporary(¶ms)
.await;
}
{
let params: DocOpenParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = ClientApi::new(invoker).open(¶ms).await;
}
{
let params:DocPermissionRangesCreateBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"selection\",\"start\":{\"kind\":\"text\",\"blockId\":\"\",\"offset\":0},\"end\":{\"kind\":\"text\",\"blockId\":\"\",\"offset\":0}},\"principal\":{\"kind\":\"everyone\"}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.permission_ranges()
.create(¶ms)
.await;
}
{
let params: DocPermissionRangesGetBoundParams =
serde_json::from_str("{\"id\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).permission_ranges().get(¶ms).await;
}
{
let params: DocPermissionRangesListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).permission_ranges().list(¶ms).await;
}
{
let params: DocPermissionRangesRemoveBoundParams =
serde_json::from_str("{\"id\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.permission_ranges()
.remove(¶ms)
.await;
}
{
let params: DocPermissionRangesUpdatePrincipalBoundParams =
serde_json::from_str("{\"id\":\"\",\"principal\":{\"kind\":\"everyone\"}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.permission_ranges()
.update_principal(¶ms)
.await;
}
{
let params: DocPlanExecuteBoundParams = serde_json::from_str("{\"entries\":[]}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).plan().execute(¶ms).await;
}
{
let params: DocPresetDispatchBoundParams = serde_json::from_str("{\"toolName\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).preset().dispatch(¶ms).await;
}
{
let params: DocPresetGetCatalogBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).preset().get_catalog(¶ms).await;
}
{
let params: DocPresetGetMcpPromptBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).preset().get_mcp_prompt(¶ms).await;
}
{
let params: DocPresetGetSystemPromptBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.preset()
.get_system_prompt(¶ms)
.await;
}
{
let params: DocPresetGetToolsBoundParams =
serde_json::from_str("{\"provider\":\"openai\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).preset().get_tools(¶ms).await;
}
{
let params: DocPresetListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).preset().list(¶ms).await;
}
{
let params: DocProjectHtmlBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).project_html(¶ms).await;
}
{
let params: DocProjectMarkdownBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).project_markdown(¶ms).await;
}
{
let params: DocProtectionClearEditingRestrictionBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.protection()
.clear_editing_restriction(¶ms)
.await;
}
{
let params: DocProtectionGetBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).protection().get(¶ms).await;
}
{
let params: DocProtectionSetEditingRestrictionBoundParams =
serde_json::from_str("{\"mode\":\"readOnly\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.protection()
.set_editing_restriction(¶ms)
.await;
}
{
let params: DocQueryMatchBoundParams =
serde_json::from_str("{\"select\":{\"type\":\"text\",\"pattern\":\"\"}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).query().match_(¶ms).await;
}
{
let params:DocRangesResolveBoundParams=serde_json::from_str("{\"start\":{\"kind\":\"document\",\"edge\":\"start\"},\"end\":{\"kind\":\"document\",\"edge\":\"start\"}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).ranges().resolve(¶ms).await;
}
{
let params: DocReplaceBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).replace(¶ms).await;
}
{
let params: DocSaveBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).save(¶ms).await;
}
{
let params:DocSectionsClearHeaderFooterRefBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"section\",\"sectionId\":\"\"},\"kind\":\"header\",\"variant\":\"default\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.sections()
.clear_header_footer_ref(¶ms)
.await;
}
{
let params: DocSectionsClearPageBordersBoundParams =
serde_json::from_str("{\"target\":{\"kind\":\"section\",\"sectionId\":\"\"}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.sections()
.clear_page_borders(¶ms)
.await;
}
{
let params: DocSectionsGetBoundParams =
serde_json::from_str("{\"address\":{\"kind\":\"section\",\"sectionId\":\"\"}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).sections().get(¶ms).await;
}
{
let params: DocSectionsListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).sections().list(¶ms).await;
}
{
let params: DocSectionsSetBreakTypeBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"section\",\"sectionId\":\"\"},\"breakType\":\"continuous\"}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.sections()
.set_break_type(¶ms)
.await;
}
{
let params: DocSectionsSetColumnsBoundParams =
serde_json::from_str("{\"target\":{\"kind\":\"section\",\"sectionId\":\"\"}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).sections().set_columns(¶ms).await;
}
{
let params: DocSectionsSetHeaderFooterMarginsBoundParams =
serde_json::from_str("{\"target\":{\"kind\":\"section\",\"sectionId\":\"\"}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.sections()
.set_header_footer_margins(¶ms)
.await;
}
{
let params:DocSectionsSetHeaderFooterRefBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"section\",\"sectionId\":\"\"},\"kind\":\"header\",\"variant\":\"default\",\"refId\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.sections()
.set_header_footer_ref(¶ms)
.await;
}
{
let params: DocSectionsSetLineNumberingBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"section\",\"sectionId\":\"\"},\"enabled\":false}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.sections()
.set_line_numbering(¶ms)
.await;
}
{
let params:DocSectionsSetLinkToPreviousBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"section\",\"sectionId\":\"\"},\"kind\":\"header\",\"variant\":\"default\",\"linked\":false}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.sections()
.set_link_to_previous(¶ms)
.await;
}
{
let params: DocSectionsSetOddEvenHeadersFootersBoundParams =
serde_json::from_str("{\"enabled\":false}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.sections()
.set_odd_even_headers_footers(¶ms)
.await;
}
{
let params: DocSectionsSetPageBordersBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"section\",\"sectionId\":\"\"},\"borders\":null}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.sections()
.set_page_borders(¶ms)
.await;
}
{
let params: DocSectionsSetPageMarginsBoundParams =
serde_json::from_str("{\"target\":{\"kind\":\"section\",\"sectionId\":\"\"}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.sections()
.set_page_margins(¶ms)
.await;
}
{
let params: DocSectionsSetPageNumberingBoundParams =
serde_json::from_str("{\"target\":{\"kind\":\"section\",\"sectionId\":\"\"}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.sections()
.set_page_numbering(¶ms)
.await;
}
{
let params: DocSectionsSetPageSetupBoundParams =
serde_json::from_str("{\"target\":{\"kind\":\"section\",\"sectionId\":\"\"}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.sections()
.set_page_setup(¶ms)
.await;
}
{
let params: DocSectionsSetSectionDirectionBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"section\",\"sectionId\":\"\"},\"direction\":\"ltr\"}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.sections()
.set_section_direction(¶ms)
.await;
}
{
let params: DocSectionsSetTitlePageBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"section\",\"sectionId\":\"\"},\"enabled\":false}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.sections()
.set_title_page(¶ms)
.await;
}
{
let params: DocSectionsSetVerticalAlignBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"section\",\"sectionId\":\"\"},\"value\":\"top\"}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.sections()
.set_vertical_align(¶ms)
.await;
}
{
let params: DocSelectionCurrentBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).selection().current(¶ms).await;
}
{
let params: DocSelectionExtractOoxmlBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.selection()
.extract_ooxml(¶ms)
.await;
}
{
let params: DocSelectionReleaseSnapshotBoundParams =
serde_json::from_str("{\"snapshotId\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.selection()
.release_snapshot(¶ms)
.await;
}
{
let params: DocSessionCloseParams = serde_json::from_str("{\"sessionId\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = InternalApi::new(invoker).session().close(¶ms).await;
}
{
let params: DocSessionListParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = InternalApi::new(invoker).session().list(¶ms).await;
}
{
let params: DocSessionSaveParams = serde_json::from_str("{\"sessionId\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = InternalApi::new(invoker).session().save(¶ms).await;
}
{
let params: DocSessionSetDefaultParams = serde_json::from_str("{\"sessionId\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = InternalApi::new(invoker)
.session()
.set_default(¶ms)
.await;
}
{
let params: DocStatusParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = InternalApi::new(invoker).status(¶ms).await;
}
{
let params: DocStylesApplyBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).styles().apply(¶ms).await;
}
{
let params: DocStylesCreateBoundParams =
serde_json::from_str("{\"id\":\"\",\"name\":\"\",\"type\":\"paragraph\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).styles().create(¶ms).await;
}
{
let params: DocStylesGetCatalogBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).styles().get_catalog(¶ms).await;
}
{
let params: DocStylesGetThemeBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).styles().get_theme(¶ms).await;
}
{
let params: DocStylesParagraphClearStyleBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.styles()
.paragraph()
.clear_style(¶ms)
.await;
}
{
let params: DocStylesParagraphSetStyleBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.styles()
.paragraph()
.set_style(¶ms)
.await;
}
{
let params:DocStylesParagraphSetStyleRefBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"paragraph\",\"nodeId\":\"\"},\"styleId\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.styles()
.paragraph()
.set_style_ref(¶ms)
.await;
}
{
let params: DocTablesApplyBorderPresetBoundParams =
serde_json::from_str("{\"preset\":\"box\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.tables()
.apply_border_preset(¶ms)
.await;
}
{
let params: DocTablesApplyPresetBoundParams = serde_json::from_str("{\"preset\":\"grid\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().apply_preset(¶ms).await;
}
{
let params: DocTablesApplyStyleBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().apply_style(¶ms).await;
}
{
let params: DocTablesClearBorderBoundParams = serde_json::from_str("{\"edge\":\"top\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().clear_border(¶ms).await;
}
{
let params: DocTablesClearCellSpacingBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.tables()
.clear_cell_spacing(¶ms)
.await;
}
{
let params: DocTablesClearContentsBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().clear_contents(¶ms).await;
}
{
let params: DocTablesClearDefaultStyleBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.tables()
.clear_default_style(¶ms)
.await;
}
{
let params: DocTablesClearShadingBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().clear_shading(¶ms).await;
}
{
let params: DocTablesClearStyleBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().clear_style(¶ms).await;
}
{
let params: DocTablesConvertFromTextBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.tables()
.convert_from_text(¶ms)
.await;
}
{
let params: DocTablesConvertToTextBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().convert_to_text(¶ms).await;
}
{
let params: DocTablesDeleteBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().delete(¶ms).await;
}
{
let params: DocTablesDeleteCellBoundParams =
serde_json::from_str("{\"mode\":\"shiftLeft\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().delete_cell(¶ms).await;
}
{
let params: DocTablesDeleteColumnBoundParams = serde_json::from_str("{\"columnIndex\":0}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().delete_column(¶ms).await;
}
{
let params: DocTablesDeleteRowBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().delete_row(¶ms).await;
}
{
let params: DocTablesDistributeColumnsBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.tables()
.distribute_columns(¶ms)
.await;
}
{
let params: DocTablesDistributeRowsBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().distribute_rows(¶ms).await;
}
{
let params: DocTablesGetBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().get(¶ms).await;
}
{
let params: DocTablesGetCellsBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().get_cells(¶ms).await;
}
{
let params: DocTablesGetPropertiesBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().get_properties(¶ms).await;
}
{
let params: DocTablesGetStylesBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().get_styles(¶ms).await;
}
{
let params: DocTablesInsertCellBoundParams =
serde_json::from_str("{\"mode\":\"shiftRight\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().insert_cell(¶ms).await;
}
{
let params: DocTablesInsertColumnBoundParams =
serde_json::from_str("{\"position\":\"left\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().insert_column(¶ms).await;
}
{
let params: DocTablesInsertRowBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().insert_row(¶ms).await;
}
{
let params:DocTablesMergeCellsBoundParams=serde_json::from_str("{\"start\":{\"rowIndex\":0,\"columnIndex\":0},\"end\":{\"rowIndex\":0,\"columnIndex\":0}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().merge_cells(¶ms).await;
}
{
let params: DocTablesMoveBoundParams =
serde_json::from_str("{\"destination\":{\"kind\":\"documentStart\"}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().move_(¶ms).await;
}
{
let params: DocTablesMoveColumnBoundParams =
serde_json::from_str("{\"columnIndex\":0,\"destination\":{\"kind\":\"first\"}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().move_column(¶ms).await;
}
{
let params: DocTablesMoveRowBoundParams =
serde_json::from_str("{\"destination\":{\"kind\":\"first\"}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().move_row(¶ms).await;
}
{
let params: DocTablesSetAltTextBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().set_alt_text(¶ms).await;
}
{
let params: DocTablesSetBorderBoundParams = serde_json::from_str(
"{\"edge\":\"top\",\"lineStyle\":\"\",\"lineWeightPt\":0,\"color\":\"\"}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().set_border(¶ms).await;
}
{
let params: DocTablesSetBordersBoundParams = serde_json::from_str("{\"mode\":\"applyTo\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().set_borders(¶ms).await;
}
{
let params: DocTablesSetCellPaddingBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.tables()
.set_cell_padding(¶ms)
.await;
}
{
let params: DocTablesSetCellPropertiesBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.tables()
.set_cell_properties(¶ms)
.await;
}
{
let params: DocTablesSetCellSpacingBoundParams = serde_json::from_str("{\"spacingPt\":0}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.tables()
.set_cell_spacing(¶ms)
.await;
}
{
let params: DocTablesSetCellTextBoundParams =
serde_json::from_str("{\"text\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().set_cell_text(¶ms).await;
}
{
let params: DocTablesSetColumnWidthBoundParams =
serde_json::from_str("{\"columnIndex\":0,\"widthPt\":0}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.tables()
.set_column_width(¶ms)
.await;
}
{
let params: DocTablesSetDefaultStyleBoundParams =
serde_json::from_str("{\"styleId\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.tables()
.set_default_style(¶ms)
.await;
}
{
let params: DocTablesSetLayoutBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().set_layout(¶ms).await;
}
{
let params: DocTablesSetRowHeightBoundParams = serde_json::from_str("{\"heightPt\":0}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().set_row_height(¶ms).await;
}
{
let params: DocTablesSetRowOptionsBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().set_row_options(¶ms).await;
}
{
let params: DocTablesSetShadingBoundParams = serde_json::from_str("{\"color\":\"\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().set_shading(¶ms).await;
}
{
let params: DocTablesSetStyleBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().set_style(¶ms).await;
}
{
let params: DocTablesSetStyleOptionBoundParams =
serde_json::from_str("{\"flag\":\"headerRow\",\"enabled\":false}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.tables()
.set_style_option(¶ms)
.await;
}
{
let params: DocTablesSetTableOptionsBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.tables()
.set_table_options(¶ms)
.await;
}
{
let params: DocTablesSetTablePaddingBoundParams =
serde_json::from_str("{\"topPt\":0,\"rightPt\":0,\"bottomPt\":0,\"leftPt\":0}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker)
.tables()
.set_table_padding(¶ms)
.await;
}
{
let params: DocTablesSortBoundParams =
serde_json::from_str("{\"keys\":[]}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().sort(¶ms).await;
}
{
let params: DocTablesSplitBoundParams = serde_json::from_str("{\"rowIndex\":0}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().split(¶ms).await;
}
{
let params: DocTablesSplitCellBoundParams =
serde_json::from_str("{\"rows\":0,\"columns\":0}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().split_cell(¶ms).await;
}
{
let params: DocTablesUnmergeCellsBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).tables().unmerge_cells(¶ms).await;
}
{
let params: DocTemplatesApplyBoundParams =
serde_json::from_str("{\"source\":{\"kind\":\"path\",\"path\":\"\"}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).templates().apply(¶ms).await;
}
{
let params:DocTocConfigureBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"block\",\"nodeType\":\"tableOfContents\",\"nodeId\":\"\"},\"patch\":{}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).toc().configure(¶ms).await;
}
{
let params:DocTocEditEntryBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"inline\",\"nodeType\":\"tableOfContentsEntry\",\"nodeId\":\"\"},\"patch\":{}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).toc().edit_entry(¶ms).await;
}
{
let params: DocTocGetBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"tableOfContents\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).toc().get(¶ms).await;
}
{
let params:DocTocGetEntryBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"inline\",\"nodeType\":\"tableOfContentsEntry\",\"nodeId\":\"\"}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).toc().get_entry(¶ms).await;
}
{
let params: DocTocListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).toc().list(¶ms).await;
}
{
let params: DocTocListEntriesBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).toc().list_entries(¶ms).await;
}
{
let params:DocTocMarkEntryBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"inline-insert\",\"anchor\":{\"nodeType\":\"paragraph\",\"nodeId\":\"\"}},\"text\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).toc().mark_entry(¶ms).await;
}
{
let params: DocTocRemoveBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"tableOfContents\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).toc().remove(¶ms).await;
}
{
let params:DocTocUnmarkEntryBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"inline\",\"nodeType\":\"tableOfContentsEntry\",\"nodeId\":\"\"}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).toc().unmark_entry(¶ms).await;
}
{
let params: DocTocUpdateBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"block\",\"nodeType\":\"tableOfContents\",\"nodeId\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).toc().update(¶ms).await;
}
{
let params: DocTrackChangesDecideBoundParams = serde_json::from_str(
"{\"decision\":\"accept\",\"target\":{\"kind\":\"id\",\"id\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).track_changes().decide(¶ms).await;
}
{
let params: DocTrackChangesGetBoundParams =
serde_json::from_str("{\"id\":\"\"}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).track_changes().get(¶ms).await;
}
{
let params: DocTrackChangesListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).track_changes().list(¶ms).await;
}
{
let params: DocWatermarksApplyBoundParams =
serde_json::from_str("{\"target\":{\"kind\":\"document\"},\"action\":\"insert\"}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).watermarks().apply(¶ms).await;
}
{
let params: DocWatermarksInsertBoundParams = serde_json::from_str(
"{\"target\":{\"kind\":\"document\"},\"watermark\":{\"kind\":\"text\",\"text\":\"\"}}",
)
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).watermarks().insert(¶ms).await;
}
{
let params: DocWatermarksListBoundParams =
serde_json::from_str("{}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).watermarks().list(¶ms).await;
}
{
let params: DocWatermarksRemoveBoundParams =
serde_json::from_str("{\"target\":{\"kind\":\"watermark\",\"watermarkId\":\"\"}}")
.expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).watermarks().remove(¶ms).await;
}
{
let params:DocWatermarksReplaceBoundParams=serde_json::from_str("{\"target\":{\"kind\":\"watermark\",\"watermarkId\":\"\"},\"watermark\":{\"kind\":\"text\",\"text\":\"\"}}").expect("generated inhabited parameter fixture");
let _ = DocApi::new(invoker).watermarks().replace(¶ms).await;
}
}