omni_dev/drive/docs.rs
1//! Google Docs API (v1) integration — reading the *structural model* of a
2//! Google Doc, which the Drive API structurally cannot expose (issue #1615,
3//! [ADR-0071](../../docs/adrs/adr-0071.md) §9).
4//!
5//! Drive treats a Doc as an opaque native document: `files.export` renders it
6//! to a foreign format and a media `files.update` replaces the whole document
7//! by re-importing one. Neither has any notion of a paragraph, a table cell
8//! or an index — which is why [ADR-0071](../../docs/adrs/adr-0071.md) §9 has
9//! `drive edit` refuse Google-native documents outright, and why
10//! `drive read --content` can only hand back a one-way markdown rendering
11//! with no path back to the document model.
12//!
13//! That model is the whole point of this module. Every Docs mutation is
14//! addressed by `{tabId, segmentId, index}`, so an export — however faithful
15//! its prose — cannot tell you *where* to edit. `drive read --content` stays
16//! the prose channel; `drive docs read` is the model channel.
17//!
18//! Lives under `src/drive/` rather than a top-level `src/docs/` for the same
19//! two reasons [`crate::drive::sheets`] does, one of them load-bearing: it
20//! shares the account store, `DriveCredentials`, token refresh and the
21//! `drive` commit scope; and `FilesApi`'s mutating methods are
22//! `pub(in crate::drive)` — the visibility fence that makes "no gate bypass"
23//! true by construction rather than by convention. A sibling top-level module
24//! could not call them without widening that fence.
25
26pub mod anchor;
27pub mod api;
28pub mod client;
29pub mod create;
30pub mod named_range;
31pub mod read;
32pub mod structure;
33pub mod style;
34pub mod table;
35pub mod target;
36pub mod types;
37pub mod write;
38pub mod write_types;