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; the protocol spec replay answers the recorded receipt.
14 pub command_id: String,
15 /// The client-minted upload id (UUIDv7), sent on every chunk.
16 pub upload_id: String,
17 /// `video/mp4` or `video/quicktime`, matching `VideoInput`.
18 pub media_type: String,
19 /// The assembled byte count; must equal the bytes the chunks deliver.
20 pub total_bytes: u64,
21 /// This chunk's 0-based position.
22 pub chunk_index: u64,
23 /// The upload's chunk total; positive.
24 pub chunk_count: u64,
25 /// This chunk's bytes; each call's frame stays in the budget.
26 pub chunk_base64: String,
27}
28
29/// `media/upload` result: echoes the client-minted id, on every chunk and
30/// replay.
31#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
32#[serde(rename_all = "camelCase")]
33#[non_exhaustive]
34pub struct MediaUploadResult {
35 /// The receipt the turn part references.
36 pub upload_id: String,
37}