opencode_codes/protocol_generated/
samples.rs1use serde_json::{json, Value};
4
5pub fn endpoint_samples() -> Vec<(&'static str, Value)> {
8 vec![
9 ("SessionCreateParams", json!({})),
10 ("PromptAsyncParams", json!({"parts": []})),
11 ("PermissionReplyParams", json!({"response": "once"})),
12 (
13 "Session",
14 json!({"id": "x", "slug": "x", "projectID": "x", "directory": "x", "title": "x", "version": "x", "time": {"created": 0, "updated": 0}}),
15 ),
16 (
17 "MessageWithParts",
18 json!({"info": {"id": "x", "sessionID": "x", "role": "user", "time": {"created": 0.0}, "agent": "x", "model": {"providerID": "x", "modelID": "x"}}, "parts": []}),
19 ),
20 (
21 "Event",
22 json!({"id": "x", "type": "models-dev.refreshed", "properties": {}}),
23 ),
24 ]
25}