muse_code_sdk/msp/method/media.rs
1// @generated from the MSP stable schema and protocol sources; do not edit by hand.
2
3use serde::Deserialize;
4use serde::Serialize;
5
6/// `media/upload` params: one chunk of a client-minted upload. All members
7/// required.
8#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
9#[serde(rename_all = "camelCase")]
10pub struct MediaUploadParams {
11 /// The session owning the video store.
12 pub session_id: String,
13 /// One per call. While the host runs, replaying it with the same params
14 /// returns the recorded receipt, and reusing it with different params is
15 /// refused. After a host restart, start over under a new `uploadId`.
16 pub command_id: String,
17 /// The client-minted upload id (UUIDv7), sent on every chunk.
18 pub upload_id: String,
19 /// `video/mp4` or `video/quicktime`, matching `VideoInput`.
20 pub media_type: String,
21 /// The assembled byte count; must equal the bytes the chunks deliver.
22 pub total_bytes: u64,
23 /// This chunk's 0-based position.
24 pub chunk_index: u64,
25 /// The upload's chunk total; positive.
26 pub chunk_count: u64,
27 /// This chunk's bytes; each call's frame stays in the budget.
28 pub chunk_base64: String,
29}
30
31/// `media/upload` result: echoes the client-minted id, on every chunk and
32/// replay.
33#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
34#[serde(rename_all = "camelCase")]
35#[non_exhaustive]
36pub struct MediaUploadResult {
37 /// The receipt the turn part references.
38 pub upload_id: String,
39}