1
This commit is contained in:
@@ -60,6 +60,13 @@ pub use mapper::{
|
||||
SquareHoleRunRecord, SquareHoleRunRestartRecordInput, SquareHoleRunStartRecordInput,
|
||||
SquareHoleRunStopRecordInput, SquareHoleRunTimeUpRecordInput, SquareHoleShapeOptionRecord,
|
||||
SquareHoleShapeSnapshotRecord, SquareHoleWorkProfileRecord, SquareHoleWorkUpdateRecordInput,
|
||||
VisualNovelAgentMessageFinalizeRecordInput, VisualNovelAgentMessageRecord,
|
||||
VisualNovelAgentMessageSubmitRecordInput, VisualNovelAgentSessionCreateRecordInput,
|
||||
VisualNovelAgentSessionRecord, VisualNovelHistoryEntryRecord,
|
||||
VisualNovelHistoryEntryRecordInput, VisualNovelRunRecord, VisualNovelRunSnapshotRecordInput,
|
||||
VisualNovelRunStartRecordInput, VisualNovelRuntimeEventRecord,
|
||||
VisualNovelRuntimeEventRecordInput, VisualNovelWorkCompileRecordInput,
|
||||
VisualNovelWorkProfileRecord, VisualNovelWorkUpdateRecordInput,
|
||||
};
|
||||
|
||||
pub mod ai;
|
||||
@@ -76,6 +83,7 @@ pub mod runtime;
|
||||
pub mod square_hole;
|
||||
pub mod story;
|
||||
pub mod story_runtime;
|
||||
pub mod visual_novel;
|
||||
|
||||
use std::{
|
||||
error::Error,
|
||||
|
||||
@@ -1672,6 +1672,118 @@ pub(crate) fn map_square_hole_drop_shape_procedure_result(
|
||||
})
|
||||
}
|
||||
|
||||
pub(crate) fn map_visual_novel_agent_session_procedure_result(
|
||||
result: VisualNovelAgentSessionProcedureResult,
|
||||
) -> Result<VisualNovelAgentSessionRecord, SpacetimeClientError> {
|
||||
if !result.ok {
|
||||
return Err(SpacetimeClientError::procedure_failed(result.error_message));
|
||||
}
|
||||
|
||||
let session_json = result
|
||||
.session_json
|
||||
.ok_or_else(|| SpacetimeClientError::missing_snapshot("visual novel agent session 快照"))?;
|
||||
let session =
|
||||
serde_json::from_str::<VisualNovelAgentSessionJsonRecord>(&session_json).map_err(
|
||||
|error| {
|
||||
SpacetimeClientError::Runtime(format!(
|
||||
"visual novel session_json 非法: {error}"
|
||||
))
|
||||
},
|
||||
)?;
|
||||
|
||||
Ok(map_visual_novel_agent_session_snapshot(session))
|
||||
}
|
||||
|
||||
pub(crate) fn map_visual_novel_work_procedure_result(
|
||||
result: VisualNovelWorkProcedureResult,
|
||||
) -> Result<VisualNovelWorkProfileRecord, SpacetimeClientError> {
|
||||
if !result.ok {
|
||||
return Err(SpacetimeClientError::procedure_failed(result.error_message));
|
||||
}
|
||||
|
||||
let work_json = result
|
||||
.work_json
|
||||
.ok_or_else(|| SpacetimeClientError::missing_snapshot("visual novel work 快照"))?;
|
||||
let work = serde_json::from_str::<VisualNovelWorkJsonRecord>(&work_json).map_err(|error| {
|
||||
SpacetimeClientError::Runtime(format!("visual novel work_json 非法: {error}"))
|
||||
})?;
|
||||
|
||||
Ok(map_visual_novel_work_snapshot(work))
|
||||
}
|
||||
|
||||
pub(crate) fn map_visual_novel_works_procedure_result(
|
||||
result: VisualNovelWorksProcedureResult,
|
||||
) -> Result<Vec<VisualNovelWorkProfileRecord>, SpacetimeClientError> {
|
||||
if !result.ok {
|
||||
return Err(SpacetimeClientError::procedure_failed(result.error_message));
|
||||
}
|
||||
|
||||
let items_json = result
|
||||
.items_json
|
||||
.ok_or_else(|| SpacetimeClientError::missing_snapshot("visual novel works 快照"))?;
|
||||
let items = serde_json::from_str::<Vec<VisualNovelWorkJsonRecord>>(&items_json).map_err(
|
||||
|error| {
|
||||
SpacetimeClientError::Runtime(format!("visual novel works items_json 非法: {error}"))
|
||||
},
|
||||
)?;
|
||||
|
||||
Ok(items.into_iter().map(map_visual_novel_work_snapshot).collect())
|
||||
}
|
||||
|
||||
pub(crate) fn map_visual_novel_run_procedure_result(
|
||||
result: VisualNovelRunProcedureResult,
|
||||
) -> Result<VisualNovelRunRecord, SpacetimeClientError> {
|
||||
if !result.ok {
|
||||
return Err(SpacetimeClientError::procedure_failed(result.error_message));
|
||||
}
|
||||
|
||||
let run_json = result
|
||||
.run_json
|
||||
.ok_or_else(|| SpacetimeClientError::missing_snapshot("visual novel run 快照"))?;
|
||||
let run = serde_json::from_str::<VisualNovelRunJsonRecord>(&run_json).map_err(|error| {
|
||||
SpacetimeClientError::Runtime(format!("visual novel run_json 非法: {error}"))
|
||||
})?;
|
||||
|
||||
Ok(map_visual_novel_run_snapshot(run))
|
||||
}
|
||||
|
||||
pub(crate) fn map_visual_novel_history_procedure_result(
|
||||
result: VisualNovelHistoryProcedureResult,
|
||||
) -> Result<Vec<VisualNovelHistoryEntryRecord>, SpacetimeClientError> {
|
||||
if !result.ok {
|
||||
return Err(SpacetimeClientError::procedure_failed(result.error_message));
|
||||
}
|
||||
|
||||
let items_json = result
|
||||
.items_json
|
||||
.ok_or_else(|| SpacetimeClientError::missing_snapshot("visual novel history 快照"))?;
|
||||
let items = serde_json::from_str::<Vec<VisualNovelHistoryEntryJsonRecord>>(&items_json)
|
||||
.map_err(|error| {
|
||||
SpacetimeClientError::Runtime(format!("visual novel history items_json 非法: {error}"))
|
||||
})?;
|
||||
|
||||
Ok(items.into_iter().map(map_visual_novel_history_entry).collect())
|
||||
}
|
||||
|
||||
pub(crate) fn map_visual_novel_runtime_event_procedure_result(
|
||||
result: VisualNovelRuntimeEventProcedureResult,
|
||||
) -> Result<VisualNovelRuntimeEventRecord, SpacetimeClientError> {
|
||||
if !result.ok {
|
||||
return Err(SpacetimeClientError::procedure_failed(result.error_message));
|
||||
}
|
||||
|
||||
let event_json = result
|
||||
.event_json
|
||||
.ok_or_else(|| SpacetimeClientError::missing_snapshot("visual novel runtime event 快照"))?;
|
||||
let event = serde_json::from_str::<VisualNovelRuntimeEventJsonRecord>(&event_json).map_err(
|
||||
|error| {
|
||||
SpacetimeClientError::Runtime(format!("visual novel event_json 非法: {error}"))
|
||||
},
|
||||
)?;
|
||||
|
||||
Ok(map_visual_novel_runtime_event(event))
|
||||
}
|
||||
|
||||
pub(crate) fn map_story_session_procedure_result(
|
||||
result: StorySessionProcedureResult,
|
||||
) -> Result<StorySessionResultRecord, SpacetimeClientError> {
|
||||
@@ -2667,6 +2779,7 @@ pub(crate) fn map_puzzle_draft_level(snapshot: DomainPuzzleDraftLevel) -> Puzzle
|
||||
level_id: snapshot.level_id,
|
||||
level_name: snapshot.level_name,
|
||||
picture_description: snapshot.picture_description,
|
||||
picture_reference: snapshot.picture_reference,
|
||||
candidates: snapshot
|
||||
.candidates
|
||||
.into_iter()
|
||||
@@ -3175,6 +3288,127 @@ fn build_square_hole_anchor_item(
|
||||
}
|
||||
}
|
||||
|
||||
fn map_visual_novel_agent_session_snapshot(
|
||||
snapshot: VisualNovelAgentSessionJsonRecord,
|
||||
) -> VisualNovelAgentSessionRecord {
|
||||
VisualNovelAgentSessionRecord {
|
||||
session_id: snapshot.session_id,
|
||||
owner_user_id: snapshot.owner_user_id,
|
||||
source_mode: snapshot.source_mode,
|
||||
status: snapshot.status,
|
||||
seed_text: snapshot.seed_text,
|
||||
source_asset_ids: snapshot.source_asset_ids,
|
||||
current_turn: snapshot.current_turn,
|
||||
progress_percent: snapshot.progress_percent,
|
||||
messages: snapshot
|
||||
.messages
|
||||
.into_iter()
|
||||
.map(map_visual_novel_agent_message)
|
||||
.collect(),
|
||||
draft: snapshot.draft,
|
||||
pending_action: snapshot.pending_action,
|
||||
last_assistant_reply: snapshot.last_assistant_reply,
|
||||
published_profile_id: snapshot.published_profile_id,
|
||||
created_at: format_timestamp_micros(snapshot.created_at_micros),
|
||||
updated_at: format_timestamp_micros(snapshot.updated_at_micros),
|
||||
}
|
||||
}
|
||||
|
||||
fn map_visual_novel_agent_message(
|
||||
snapshot: VisualNovelAgentMessageJsonRecord,
|
||||
) -> VisualNovelAgentMessageRecord {
|
||||
VisualNovelAgentMessageRecord {
|
||||
message_id: snapshot.message_id,
|
||||
session_id: snapshot.session_id,
|
||||
role: snapshot.role,
|
||||
kind: snapshot.kind,
|
||||
text: snapshot.text,
|
||||
created_at: format_timestamp_micros(snapshot.created_at_micros),
|
||||
}
|
||||
}
|
||||
|
||||
fn map_visual_novel_work_snapshot(
|
||||
snapshot: VisualNovelWorkJsonRecord,
|
||||
) -> VisualNovelWorkProfileRecord {
|
||||
VisualNovelWorkProfileRecord {
|
||||
work_id: snapshot.work_id,
|
||||
profile_id: snapshot.profile_id,
|
||||
owner_user_id: snapshot.owner_user_id,
|
||||
source_session_id: snapshot.source_session_id,
|
||||
author_display_name: snapshot.author_display_name,
|
||||
work_title: snapshot.work_title,
|
||||
work_description: snapshot.work_description,
|
||||
tags: snapshot.tags,
|
||||
cover_image_src: snapshot.cover_image_src,
|
||||
source_asset_ids: snapshot.source_asset_ids,
|
||||
draft: snapshot.draft,
|
||||
publication_status: snapshot.publication_status,
|
||||
publish_ready: snapshot.publish_ready,
|
||||
play_count: snapshot.play_count,
|
||||
created_at: format_timestamp_micros(snapshot.created_at_micros),
|
||||
updated_at: format_timestamp_micros(snapshot.updated_at_micros),
|
||||
published_at: snapshot.published_at_micros.map(format_timestamp_micros),
|
||||
}
|
||||
}
|
||||
|
||||
fn map_visual_novel_run_snapshot(snapshot: VisualNovelRunJsonRecord) -> VisualNovelRunRecord {
|
||||
VisualNovelRunRecord {
|
||||
run_id: snapshot.run_id,
|
||||
owner_user_id: snapshot.owner_user_id,
|
||||
profile_id: snapshot.profile_id,
|
||||
mode: snapshot.mode,
|
||||
status: snapshot.status,
|
||||
current_scene_id: snapshot.current_scene_id,
|
||||
current_phase_id: snapshot.current_phase_id,
|
||||
visible_character_ids: snapshot.visible_character_ids,
|
||||
flags: snapshot.flags,
|
||||
metrics: snapshot.metrics,
|
||||
history: snapshot
|
||||
.history
|
||||
.into_iter()
|
||||
.map(map_visual_novel_history_entry)
|
||||
.collect(),
|
||||
available_choices: snapshot.available_choices,
|
||||
text_mode_enabled: snapshot.text_mode_enabled,
|
||||
created_at: format_timestamp_micros(snapshot.created_at_micros),
|
||||
updated_at: format_timestamp_micros(snapshot.updated_at_micros),
|
||||
}
|
||||
}
|
||||
|
||||
fn map_visual_novel_history_entry(
|
||||
snapshot: VisualNovelHistoryEntryJsonRecord,
|
||||
) -> VisualNovelHistoryEntryRecord {
|
||||
VisualNovelHistoryEntryRecord {
|
||||
entry_id: snapshot.entry_id,
|
||||
run_id: snapshot.run_id,
|
||||
owner_user_id: snapshot.owner_user_id,
|
||||
profile_id: snapshot.profile_id,
|
||||
turn_index: snapshot.turn_index,
|
||||
source: snapshot.source,
|
||||
action_text: snapshot.action_text,
|
||||
steps: snapshot.steps,
|
||||
snapshot_before_hash: snapshot.snapshot_before_hash,
|
||||
snapshot_after_hash: snapshot.snapshot_after_hash,
|
||||
created_at: format_timestamp_micros(snapshot.created_at_micros),
|
||||
}
|
||||
}
|
||||
|
||||
fn map_visual_novel_runtime_event(
|
||||
snapshot: VisualNovelRuntimeEventJsonRecord,
|
||||
) -> VisualNovelRuntimeEventRecord {
|
||||
VisualNovelRuntimeEventRecord {
|
||||
event_id: snapshot.event_id,
|
||||
run_id: snapshot.run_id,
|
||||
owner_user_id: snapshot.owner_user_id,
|
||||
profile_id: snapshot.profile_id,
|
||||
event_kind: snapshot.event_kind,
|
||||
client_event_id: snapshot.client_event_id,
|
||||
history_entry_id: snapshot.history_entry_id,
|
||||
payload: snapshot.payload,
|
||||
occurred_at: format_timestamp_micros(snapshot.occurred_at_micros),
|
||||
}
|
||||
}
|
||||
|
||||
fn normalize_match3d_stage(value: &str) -> &str {
|
||||
match value {
|
||||
"Collecting" | "collecting" | "collecting_config" => "collecting_config",
|
||||
@@ -6105,6 +6339,323 @@ pub struct SquareHoleRunTimeUpRecordInput {
|
||||
pub finished_at_ms: i64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct VisualNovelAgentSessionCreateRecordInput {
|
||||
pub session_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub source_mode: String,
|
||||
pub seed_text: String,
|
||||
pub source_asset_ids_json: String,
|
||||
pub welcome_message_id: String,
|
||||
pub welcome_message_text: String,
|
||||
pub draft_json: Option<String>,
|
||||
pub created_at_micros: i64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct VisualNovelAgentMessageSubmitRecordInput {
|
||||
pub session_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub user_message_id: String,
|
||||
pub user_message_text: String,
|
||||
pub submitted_at_micros: i64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct VisualNovelAgentMessageFinalizeRecordInput {
|
||||
pub session_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub assistant_message_id: Option<String>,
|
||||
pub assistant_reply_text: Option<String>,
|
||||
pub draft_json: Option<String>,
|
||||
pub pending_action_json: Option<String>,
|
||||
pub status: String,
|
||||
pub progress_percent: u32,
|
||||
pub updated_at_micros: i64,
|
||||
pub error_message: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct VisualNovelWorkCompileRecordInput {
|
||||
pub session_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub profile_id: String,
|
||||
pub work_id: Option<String>,
|
||||
pub author_display_name: String,
|
||||
pub work_title: Option<String>,
|
||||
pub work_description: Option<String>,
|
||||
pub tags_json: Option<String>,
|
||||
pub cover_image_src: Option<String>,
|
||||
pub compiled_at_micros: i64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct VisualNovelWorkUpdateRecordInput {
|
||||
pub profile_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub work_title: String,
|
||||
pub work_description: String,
|
||||
pub tags_json: String,
|
||||
pub cover_image_src: Option<String>,
|
||||
pub source_asset_ids_json: String,
|
||||
pub draft_json: String,
|
||||
pub publish_ready: bool,
|
||||
pub updated_at_micros: i64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct VisualNovelRunStartRecordInput {
|
||||
pub run_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub profile_id: String,
|
||||
pub mode: String,
|
||||
pub snapshot_json: Option<String>,
|
||||
pub started_at_micros: i64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct VisualNovelRunSnapshotRecordInput {
|
||||
pub run_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub status: String,
|
||||
pub current_scene_id: Option<String>,
|
||||
pub current_phase_id: Option<String>,
|
||||
pub visible_character_ids_json: String,
|
||||
pub flags_json: String,
|
||||
pub metrics_json: String,
|
||||
pub available_choices_json: String,
|
||||
pub text_mode_enabled: bool,
|
||||
pub snapshot_json: Option<String>,
|
||||
pub updated_at_micros: i64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct VisualNovelHistoryEntryRecordInput {
|
||||
pub entry_id: String,
|
||||
pub run_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub turn_index: u32,
|
||||
pub source: String,
|
||||
pub action_text: Option<String>,
|
||||
pub steps_json: String,
|
||||
pub snapshot_before_hash: Option<String>,
|
||||
pub snapshot_after_hash: Option<String>,
|
||||
pub created_at_micros: i64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct VisualNovelRuntimeEventRecordInput {
|
||||
pub event_id: String,
|
||||
pub run_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub profile_id: Option<String>,
|
||||
pub event_kind: String,
|
||||
pub client_event_id: Option<String>,
|
||||
pub history_entry_id: Option<String>,
|
||||
pub payload_json: String,
|
||||
pub occurred_at_micros: i64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub struct VisualNovelAgentMessageRecord {
|
||||
pub message_id: String,
|
||||
pub session_id: String,
|
||||
pub role: String,
|
||||
pub kind: String,
|
||||
pub text: String,
|
||||
pub created_at: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub struct VisualNovelAgentSessionRecord {
|
||||
pub session_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub source_mode: String,
|
||||
pub status: String,
|
||||
pub seed_text: String,
|
||||
pub source_asset_ids: Vec<String>,
|
||||
pub current_turn: u32,
|
||||
pub progress_percent: u32,
|
||||
pub messages: Vec<VisualNovelAgentMessageRecord>,
|
||||
pub draft: Option<serde_json::Value>,
|
||||
pub pending_action: Option<serde_json::Value>,
|
||||
pub last_assistant_reply: Option<String>,
|
||||
pub published_profile_id: Option<String>,
|
||||
pub created_at: String,
|
||||
pub updated_at: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub struct VisualNovelWorkProfileRecord {
|
||||
pub work_id: String,
|
||||
pub profile_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub source_session_id: Option<String>,
|
||||
pub author_display_name: String,
|
||||
pub work_title: String,
|
||||
pub work_description: String,
|
||||
pub tags: Vec<String>,
|
||||
pub cover_image_src: Option<String>,
|
||||
pub source_asset_ids: Vec<String>,
|
||||
pub draft: serde_json::Value,
|
||||
pub publication_status: String,
|
||||
pub publish_ready: bool,
|
||||
pub play_count: u32,
|
||||
pub created_at: String,
|
||||
pub updated_at: String,
|
||||
pub published_at: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub struct VisualNovelHistoryEntryRecord {
|
||||
pub entry_id: String,
|
||||
pub run_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub profile_id: String,
|
||||
pub turn_index: u32,
|
||||
pub source: String,
|
||||
pub action_text: Option<String>,
|
||||
pub steps: serde_json::Value,
|
||||
pub snapshot_before_hash: Option<String>,
|
||||
pub snapshot_after_hash: Option<String>,
|
||||
pub created_at: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub struct VisualNovelRunRecord {
|
||||
pub run_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub profile_id: String,
|
||||
pub mode: String,
|
||||
pub status: String,
|
||||
pub current_scene_id: Option<String>,
|
||||
pub current_phase_id: Option<String>,
|
||||
pub visible_character_ids: Vec<String>,
|
||||
pub flags: serde_json::Value,
|
||||
pub metrics: serde_json::Value,
|
||||
pub history: Vec<VisualNovelHistoryEntryRecord>,
|
||||
pub available_choices: serde_json::Value,
|
||||
pub text_mode_enabled: bool,
|
||||
pub created_at: String,
|
||||
pub updated_at: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub struct VisualNovelRuntimeEventRecord {
|
||||
pub event_id: String,
|
||||
pub run_id: Option<String>,
|
||||
pub owner_user_id: String,
|
||||
pub profile_id: Option<String>,
|
||||
pub event_kind: String,
|
||||
pub client_event_id: Option<String>,
|
||||
pub history_entry_id: Option<String>,
|
||||
pub payload: serde_json::Value,
|
||||
pub occurred_at: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, serde::Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct VisualNovelAgentMessageJsonRecord {
|
||||
message_id: String,
|
||||
session_id: String,
|
||||
role: String,
|
||||
kind: String,
|
||||
text: String,
|
||||
created_at_micros: i64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, serde::Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct VisualNovelAgentSessionJsonRecord {
|
||||
session_id: String,
|
||||
owner_user_id: String,
|
||||
source_mode: String,
|
||||
status: String,
|
||||
seed_text: String,
|
||||
source_asset_ids: Vec<String>,
|
||||
current_turn: u32,
|
||||
progress_percent: u32,
|
||||
messages: Vec<VisualNovelAgentMessageJsonRecord>,
|
||||
draft: Option<serde_json::Value>,
|
||||
pending_action: Option<serde_json::Value>,
|
||||
last_assistant_reply: Option<String>,
|
||||
published_profile_id: Option<String>,
|
||||
created_at_micros: i64,
|
||||
updated_at_micros: i64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, serde::Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct VisualNovelWorkJsonRecord {
|
||||
work_id: String,
|
||||
profile_id: String,
|
||||
owner_user_id: String,
|
||||
source_session_id: Option<String>,
|
||||
author_display_name: String,
|
||||
work_title: String,
|
||||
work_description: String,
|
||||
tags: Vec<String>,
|
||||
cover_image_src: Option<String>,
|
||||
source_asset_ids: Vec<String>,
|
||||
draft: serde_json::Value,
|
||||
publication_status: String,
|
||||
publish_ready: bool,
|
||||
play_count: u32,
|
||||
created_at_micros: i64,
|
||||
updated_at_micros: i64,
|
||||
published_at_micros: Option<i64>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, serde::Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct VisualNovelHistoryEntryJsonRecord {
|
||||
entry_id: String,
|
||||
run_id: String,
|
||||
owner_user_id: String,
|
||||
profile_id: String,
|
||||
turn_index: u32,
|
||||
source: String,
|
||||
action_text: Option<String>,
|
||||
steps: serde_json::Value,
|
||||
snapshot_before_hash: Option<String>,
|
||||
snapshot_after_hash: Option<String>,
|
||||
created_at_micros: i64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, serde::Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct VisualNovelRunJsonRecord {
|
||||
run_id: String,
|
||||
owner_user_id: String,
|
||||
profile_id: String,
|
||||
mode: String,
|
||||
status: String,
|
||||
current_scene_id: Option<String>,
|
||||
current_phase_id: Option<String>,
|
||||
visible_character_ids: Vec<String>,
|
||||
flags: serde_json::Value,
|
||||
metrics: serde_json::Value,
|
||||
history: Vec<VisualNovelHistoryEntryJsonRecord>,
|
||||
available_choices: serde_json::Value,
|
||||
text_mode_enabled: bool,
|
||||
created_at_micros: i64,
|
||||
updated_at_micros: i64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, serde::Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct VisualNovelRuntimeEventJsonRecord {
|
||||
event_id: String,
|
||||
run_id: Option<String>,
|
||||
owner_user_id: String,
|
||||
profile_id: Option<String>,
|
||||
event_kind: String,
|
||||
client_event_id: Option<String>,
|
||||
history_entry_id: Option<String>,
|
||||
payload: serde_json::Value,
|
||||
occurred_at_micros: i64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct SquareHoleAnchorItemRecord {
|
||||
pub key: String,
|
||||
@@ -6552,6 +7103,7 @@ pub struct PuzzleDraftLevelRecord {
|
||||
pub level_id: String,
|
||||
pub level_name: String,
|
||||
pub picture_description: String,
|
||||
pub picture_reference: Option<String>,
|
||||
pub candidates: Vec<PuzzleGeneratedImageCandidateRecord>,
|
||||
pub selected_candidate_id: Option<String>,
|
||||
pub cover_image_src: Option<String>,
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
use super::visual_novel_history_procedure_result_type::VisualNovelHistoryProcedureResult;
|
||||
use super::visual_novel_runtime_history_append_input_type::VisualNovelRuntimeHistoryAppendInput;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
struct AppendVisualNovelRuntimeHistoryEntryArgs {
|
||||
pub input: VisualNovelRuntimeHistoryAppendInput,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for AppendVisualNovelRuntimeHistoryEntryArgs {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the procedure `append_visual_novel_runtime_history_entry`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteProcedures`].
|
||||
pub trait append_visual_novel_runtime_history_entry {
|
||||
fn append_visual_novel_runtime_history_entry(
|
||||
&self,
|
||||
input: VisualNovelRuntimeHistoryAppendInput,
|
||||
) {
|
||||
self.append_visual_novel_runtime_history_entry_then(input, |_, _| {});
|
||||
}
|
||||
|
||||
fn append_visual_novel_runtime_history_entry_then(
|
||||
&self,
|
||||
input: VisualNovelRuntimeHistoryAppendInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelHistoryProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
);
|
||||
}
|
||||
|
||||
impl append_visual_novel_runtime_history_entry for super::RemoteProcedures {
|
||||
fn append_visual_novel_runtime_history_entry_then(
|
||||
&self,
|
||||
input: VisualNovelRuntimeHistoryAppendInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelHistoryProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
) {
|
||||
self.imp
|
||||
.invoke_procedure_with_callback::<_, VisualNovelHistoryProcedureResult>(
|
||||
"append_visual_novel_runtime_history_entry",
|
||||
AppendVisualNovelRuntimeHistoryEntryArgs { input },
|
||||
__callback,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
use super::visual_novel_agent_session_procedure_result_type::VisualNovelAgentSessionProcedureResult;
|
||||
use super::visual_novel_work_compile_input_type::VisualNovelWorkCompileInput;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
struct CompileVisualNovelWorkProfileArgs {
|
||||
pub input: VisualNovelWorkCompileInput,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for CompileVisualNovelWorkProfileArgs {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the procedure `compile_visual_novel_work_profile`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteProcedures`].
|
||||
pub trait compile_visual_novel_work_profile {
|
||||
fn compile_visual_novel_work_profile(&self, input: VisualNovelWorkCompileInput) {
|
||||
self.compile_visual_novel_work_profile_then(input, |_, _| {});
|
||||
}
|
||||
|
||||
fn compile_visual_novel_work_profile_then(
|
||||
&self,
|
||||
input: VisualNovelWorkCompileInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelAgentSessionProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
);
|
||||
}
|
||||
|
||||
impl compile_visual_novel_work_profile for super::RemoteProcedures {
|
||||
fn compile_visual_novel_work_profile_then(
|
||||
&self,
|
||||
input: VisualNovelWorkCompileInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelAgentSessionProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
) {
|
||||
self.imp
|
||||
.invoke_procedure_with_callback::<_, VisualNovelAgentSessionProcedureResult>(
|
||||
"compile_visual_novel_work_profile",
|
||||
CompileVisualNovelWorkProfileArgs { input },
|
||||
__callback,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
use super::visual_novel_agent_session_create_input_type::VisualNovelAgentSessionCreateInput;
|
||||
use super::visual_novel_agent_session_procedure_result_type::VisualNovelAgentSessionProcedureResult;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
struct CreateVisualNovelAgentSessionArgs {
|
||||
pub input: VisualNovelAgentSessionCreateInput,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for CreateVisualNovelAgentSessionArgs {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the procedure `create_visual_novel_agent_session`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteProcedures`].
|
||||
pub trait create_visual_novel_agent_session {
|
||||
fn create_visual_novel_agent_session(&self, input: VisualNovelAgentSessionCreateInput) {
|
||||
self.create_visual_novel_agent_session_then(input, |_, _| {});
|
||||
}
|
||||
|
||||
fn create_visual_novel_agent_session_then(
|
||||
&self,
|
||||
input: VisualNovelAgentSessionCreateInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelAgentSessionProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
);
|
||||
}
|
||||
|
||||
impl create_visual_novel_agent_session for super::RemoteProcedures {
|
||||
fn create_visual_novel_agent_session_then(
|
||||
&self,
|
||||
input: VisualNovelAgentSessionCreateInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelAgentSessionProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
) {
|
||||
self.imp
|
||||
.invoke_procedure_with_callback::<_, VisualNovelAgentSessionProcedureResult>(
|
||||
"create_visual_novel_agent_session",
|
||||
CreateVisualNovelAgentSessionArgs { input },
|
||||
__callback,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
use super::visual_novel_work_delete_input_type::VisualNovelWorkDeleteInput;
|
||||
use super::visual_novel_works_procedure_result_type::VisualNovelWorksProcedureResult;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
struct DeleteVisualNovelWorkArgs {
|
||||
pub input: VisualNovelWorkDeleteInput,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for DeleteVisualNovelWorkArgs {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the procedure `delete_visual_novel_work`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteProcedures`].
|
||||
pub trait delete_visual_novel_work {
|
||||
fn delete_visual_novel_work(&self, input: VisualNovelWorkDeleteInput) {
|
||||
self.delete_visual_novel_work_then(input, |_, _| {});
|
||||
}
|
||||
|
||||
fn delete_visual_novel_work_then(
|
||||
&self,
|
||||
input: VisualNovelWorkDeleteInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelWorksProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
);
|
||||
}
|
||||
|
||||
impl delete_visual_novel_work for super::RemoteProcedures {
|
||||
fn delete_visual_novel_work_then(
|
||||
&self,
|
||||
input: VisualNovelWorkDeleteInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelWorksProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
) {
|
||||
self.imp
|
||||
.invoke_procedure_with_callback::<_, VisualNovelWorksProcedureResult>(
|
||||
"delete_visual_novel_work",
|
||||
DeleteVisualNovelWorkArgs { input },
|
||||
__callback,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
use super::visual_novel_agent_message_finalize_input_type::VisualNovelAgentMessageFinalizeInput;
|
||||
use super::visual_novel_agent_session_procedure_result_type::VisualNovelAgentSessionProcedureResult;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
struct FinalizeVisualNovelAgentMessageTurnArgs {
|
||||
pub input: VisualNovelAgentMessageFinalizeInput,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for FinalizeVisualNovelAgentMessageTurnArgs {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the procedure `finalize_visual_novel_agent_message_turn`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteProcedures`].
|
||||
pub trait finalize_visual_novel_agent_message_turn {
|
||||
fn finalize_visual_novel_agent_message_turn(
|
||||
&self,
|
||||
input: VisualNovelAgentMessageFinalizeInput,
|
||||
) {
|
||||
self.finalize_visual_novel_agent_message_turn_then(input, |_, _| {});
|
||||
}
|
||||
|
||||
fn finalize_visual_novel_agent_message_turn_then(
|
||||
&self,
|
||||
input: VisualNovelAgentMessageFinalizeInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelAgentSessionProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
);
|
||||
}
|
||||
|
||||
impl finalize_visual_novel_agent_message_turn for super::RemoteProcedures {
|
||||
fn finalize_visual_novel_agent_message_turn_then(
|
||||
&self,
|
||||
input: VisualNovelAgentMessageFinalizeInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelAgentSessionProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
) {
|
||||
self.imp
|
||||
.invoke_procedure_with_callback::<_, VisualNovelAgentSessionProcedureResult>(
|
||||
"finalize_visual_novel_agent_message_turn",
|
||||
FinalizeVisualNovelAgentMessageTurnArgs { input },
|
||||
__callback,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
use super::visual_novel_agent_session_get_input_type::VisualNovelAgentSessionGetInput;
|
||||
use super::visual_novel_agent_session_procedure_result_type::VisualNovelAgentSessionProcedureResult;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
struct GetVisualNovelAgentSessionArgs {
|
||||
pub input: VisualNovelAgentSessionGetInput,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for GetVisualNovelAgentSessionArgs {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the procedure `get_visual_novel_agent_session`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteProcedures`].
|
||||
pub trait get_visual_novel_agent_session {
|
||||
fn get_visual_novel_agent_session(&self, input: VisualNovelAgentSessionGetInput) {
|
||||
self.get_visual_novel_agent_session_then(input, |_, _| {});
|
||||
}
|
||||
|
||||
fn get_visual_novel_agent_session_then(
|
||||
&self,
|
||||
input: VisualNovelAgentSessionGetInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelAgentSessionProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
);
|
||||
}
|
||||
|
||||
impl get_visual_novel_agent_session for super::RemoteProcedures {
|
||||
fn get_visual_novel_agent_session_then(
|
||||
&self,
|
||||
input: VisualNovelAgentSessionGetInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelAgentSessionProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
) {
|
||||
self.imp
|
||||
.invoke_procedure_with_callback::<_, VisualNovelAgentSessionProcedureResult>(
|
||||
"get_visual_novel_agent_session",
|
||||
GetVisualNovelAgentSessionArgs { input },
|
||||
__callback,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
use super::visual_novel_run_get_input_type::VisualNovelRunGetInput;
|
||||
use super::visual_novel_run_procedure_result_type::VisualNovelRunProcedureResult;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
struct GetVisualNovelRunArgs {
|
||||
pub input: VisualNovelRunGetInput,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for GetVisualNovelRunArgs {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the procedure `get_visual_novel_run`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteProcedures`].
|
||||
pub trait get_visual_novel_run {
|
||||
fn get_visual_novel_run(&self, input: VisualNovelRunGetInput) {
|
||||
self.get_visual_novel_run_then(input, |_, _| {});
|
||||
}
|
||||
|
||||
fn get_visual_novel_run_then(
|
||||
&self,
|
||||
input: VisualNovelRunGetInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelRunProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
);
|
||||
}
|
||||
|
||||
impl get_visual_novel_run for super::RemoteProcedures {
|
||||
fn get_visual_novel_run_then(
|
||||
&self,
|
||||
input: VisualNovelRunGetInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelRunProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
) {
|
||||
self.imp
|
||||
.invoke_procedure_with_callback::<_, VisualNovelRunProcedureResult>(
|
||||
"get_visual_novel_run",
|
||||
GetVisualNovelRunArgs { input },
|
||||
__callback,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
use super::visual_novel_work_get_input_type::VisualNovelWorkGetInput;
|
||||
use super::visual_novel_work_procedure_result_type::VisualNovelWorkProcedureResult;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
struct GetVisualNovelWorkDetailArgs {
|
||||
pub input: VisualNovelWorkGetInput,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for GetVisualNovelWorkDetailArgs {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the procedure `get_visual_novel_work_detail`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteProcedures`].
|
||||
pub trait get_visual_novel_work_detail {
|
||||
fn get_visual_novel_work_detail(&self, input: VisualNovelWorkGetInput) {
|
||||
self.get_visual_novel_work_detail_then(input, |_, _| {});
|
||||
}
|
||||
|
||||
fn get_visual_novel_work_detail_then(
|
||||
&self,
|
||||
input: VisualNovelWorkGetInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelWorkProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
);
|
||||
}
|
||||
|
||||
impl get_visual_novel_work_detail for super::RemoteProcedures {
|
||||
fn get_visual_novel_work_detail_then(
|
||||
&self,
|
||||
input: VisualNovelWorkGetInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelWorkProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
) {
|
||||
self.imp
|
||||
.invoke_procedure_with_callback::<_, VisualNovelWorkProcedureResult>(
|
||||
"get_visual_novel_work_detail",
|
||||
GetVisualNovelWorkDetailArgs { input },
|
||||
__callback,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
use super::visual_novel_history_procedure_result_type::VisualNovelHistoryProcedureResult;
|
||||
use super::visual_novel_runtime_history_list_input_type::VisualNovelRuntimeHistoryListInput;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
struct ListVisualNovelRuntimeHistoryArgs {
|
||||
pub input: VisualNovelRuntimeHistoryListInput,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for ListVisualNovelRuntimeHistoryArgs {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the procedure `list_visual_novel_runtime_history`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteProcedures`].
|
||||
pub trait list_visual_novel_runtime_history {
|
||||
fn list_visual_novel_runtime_history(&self, input: VisualNovelRuntimeHistoryListInput) {
|
||||
self.list_visual_novel_runtime_history_then(input, |_, _| {});
|
||||
}
|
||||
|
||||
fn list_visual_novel_runtime_history_then(
|
||||
&self,
|
||||
input: VisualNovelRuntimeHistoryListInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelHistoryProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
);
|
||||
}
|
||||
|
||||
impl list_visual_novel_runtime_history for super::RemoteProcedures {
|
||||
fn list_visual_novel_runtime_history_then(
|
||||
&self,
|
||||
input: VisualNovelRuntimeHistoryListInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelHistoryProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
) {
|
||||
self.imp
|
||||
.invoke_procedure_with_callback::<_, VisualNovelHistoryProcedureResult>(
|
||||
"list_visual_novel_runtime_history",
|
||||
ListVisualNovelRuntimeHistoryArgs { input },
|
||||
__callback,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
use super::visual_novel_works_list_input_type::VisualNovelWorksListInput;
|
||||
use super::visual_novel_works_procedure_result_type::VisualNovelWorksProcedureResult;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
struct ListVisualNovelWorksArgs {
|
||||
pub input: VisualNovelWorksListInput,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for ListVisualNovelWorksArgs {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the procedure `list_visual_novel_works`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteProcedures`].
|
||||
pub trait list_visual_novel_works {
|
||||
fn list_visual_novel_works(&self, input: VisualNovelWorksListInput) {
|
||||
self.list_visual_novel_works_then(input, |_, _| {});
|
||||
}
|
||||
|
||||
fn list_visual_novel_works_then(
|
||||
&self,
|
||||
input: VisualNovelWorksListInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelWorksProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
);
|
||||
}
|
||||
|
||||
impl list_visual_novel_works for super::RemoteProcedures {
|
||||
fn list_visual_novel_works_then(
|
||||
&self,
|
||||
input: VisualNovelWorksListInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelWorksProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
) {
|
||||
self.imp
|
||||
.invoke_procedure_with_callback::<_, VisualNovelWorksProcedureResult>(
|
||||
"list_visual_novel_works",
|
||||
ListVisualNovelWorksArgs { input },
|
||||
__callback,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
// This was generated using spacetimedb cli version 2.1.0 (commit 10a4779b1338eff3708493d87496b51842a7c412).
|
||||
// This was generated using spacetimedb cli version 2.1.0 (commit 6981f48b4bc1a71c8dd9bdfe5a2c343f6370243d).
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
@@ -57,6 +57,7 @@ pub mod analytics_granularity_type;
|
||||
pub mod analytics_metric_query_input_type;
|
||||
pub mod analytics_metric_query_procedure_result_type;
|
||||
pub mod append_ai_text_chunk_and_return_procedure;
|
||||
pub mod append_visual_novel_runtime_history_entry_procedure;
|
||||
pub mod apply_chapter_progression_ledger_entry_and_return_procedure;
|
||||
pub mod apply_chapter_progression_ledger_entry_reducer;
|
||||
pub mod apply_inventory_mutation_reducer;
|
||||
@@ -167,6 +168,7 @@ pub mod compile_custom_world_published_profile_procedure;
|
||||
pub mod compile_match_3_d_draft_procedure;
|
||||
pub mod compile_puzzle_agent_draft_procedure;
|
||||
pub mod compile_square_hole_draft_procedure;
|
||||
pub mod compile_visual_novel_work_profile_procedure;
|
||||
pub mod complete_ai_stage_and_return_procedure;
|
||||
pub mod complete_ai_task_and_return_procedure;
|
||||
pub mod confirm_asset_object_and_return_procedure;
|
||||
@@ -185,6 +187,7 @@ pub mod create_match_3_d_agent_session_procedure;
|
||||
pub mod create_profile_recharge_order_and_return_procedure;
|
||||
pub mod create_puzzle_agent_session_procedure;
|
||||
pub mod create_square_hole_agent_session_procedure;
|
||||
pub mod create_visual_novel_agent_session_procedure;
|
||||
pub mod custom_world_agent_action_execute_input_type;
|
||||
pub mod custom_world_agent_action_execute_result_type;
|
||||
pub mod custom_world_agent_card_detail_get_input_type;
|
||||
@@ -268,6 +271,7 @@ pub mod delete_match_3_d_work_procedure;
|
||||
pub mod delete_puzzle_work_procedure;
|
||||
pub mod delete_runtime_snapshot_and_return_procedure;
|
||||
pub mod delete_square_hole_work_procedure;
|
||||
pub mod delete_visual_novel_work_procedure;
|
||||
pub mod drag_puzzle_piece_or_group_procedure;
|
||||
pub mod drop_square_hole_shape_procedure;
|
||||
pub mod ensure_analytics_date_dimension_for_date_reducer;
|
||||
@@ -281,6 +285,7 @@ pub mod finalize_custom_world_agent_message_turn_procedure;
|
||||
pub mod finalize_match_3_d_agent_message_turn_procedure;
|
||||
pub mod finalize_puzzle_agent_message_turn_procedure;
|
||||
pub mod finalize_square_hole_agent_message_turn_procedure;
|
||||
pub mod finalize_visual_novel_agent_message_turn_procedure;
|
||||
pub mod finish_match_3_d_time_up_procedure;
|
||||
pub mod finish_square_hole_time_up_procedure;
|
||||
pub mod generate_big_fish_asset_procedure;
|
||||
@@ -315,6 +320,9 @@ pub mod get_square_hole_agent_session_procedure;
|
||||
pub mod get_square_hole_run_procedure;
|
||||
pub mod get_square_hole_work_detail_procedure;
|
||||
pub mod get_story_session_state_procedure;
|
||||
pub mod get_visual_novel_agent_session_procedure;
|
||||
pub mod get_visual_novel_run_procedure;
|
||||
pub mod get_visual_novel_work_detail_procedure;
|
||||
pub mod grant_inventory_item_input_type;
|
||||
pub mod grant_new_user_registration_wallet_reward_procedure;
|
||||
pub mod grant_player_progression_experience_and_return_procedure;
|
||||
@@ -346,6 +354,8 @@ pub mod list_profile_wallet_ledger_procedure;
|
||||
pub mod list_puzzle_gallery_procedure;
|
||||
pub mod list_puzzle_works_procedure;
|
||||
pub mod list_square_hole_works_procedure;
|
||||
pub mod list_visual_novel_runtime_history_procedure;
|
||||
pub mod list_visual_novel_works_procedure;
|
||||
pub mod match_3_d_agent_message_finalize_input_type;
|
||||
pub mod match_3_d_agent_message_row_type;
|
||||
pub mod match_3_d_agent_message_submit_input_type;
|
||||
@@ -434,6 +444,7 @@ pub mod publish_custom_world_world_procedure;
|
||||
pub mod publish_match_3_d_work_procedure;
|
||||
pub mod publish_puzzle_work_procedure;
|
||||
pub mod publish_square_hole_work_procedure;
|
||||
pub mod publish_visual_novel_work_procedure;
|
||||
pub mod put_database_migration_import_chunk_procedure;
|
||||
pub mod puzzle_agent_message_finalize_input_type;
|
||||
pub mod puzzle_agent_message_kind_type;
|
||||
@@ -515,6 +526,7 @@ pub mod record_big_fish_play_procedure;
|
||||
pub mod record_custom_world_profile_like_procedure;
|
||||
pub mod record_custom_world_profile_play_procedure;
|
||||
pub mod record_puzzle_work_like_procedure;
|
||||
pub mod record_visual_novel_runtime_event_procedure;
|
||||
pub mod redeem_profile_referral_invite_code_procedure;
|
||||
pub mod redeem_profile_reward_code_procedure;
|
||||
pub mod refresh_session_table;
|
||||
@@ -682,6 +694,7 @@ pub mod start_big_fish_run_procedure;
|
||||
pub mod start_match_3_d_run_procedure;
|
||||
pub mod start_puzzle_run_procedure;
|
||||
pub mod start_square_hole_run_procedure;
|
||||
pub mod start_visual_novel_run_procedure;
|
||||
pub mod stop_match_3_d_run_procedure;
|
||||
pub mod stop_square_hole_run_procedure;
|
||||
pub mod story_continue_input_type;
|
||||
@@ -704,6 +717,7 @@ pub mod submit_match_3_d_agent_message_procedure;
|
||||
pub mod submit_puzzle_agent_message_procedure;
|
||||
pub mod submit_puzzle_leaderboard_entry_procedure;
|
||||
pub mod submit_square_hole_agent_message_procedure;
|
||||
pub mod submit_visual_novel_agent_message_procedure;
|
||||
pub mod swap_puzzle_pieces_procedure;
|
||||
pub mod tracking_daily_stat_table;
|
||||
pub mod tracking_daily_stat_type;
|
||||
@@ -723,6 +737,7 @@ pub mod update_match_3_d_work_procedure;
|
||||
pub mod update_puzzle_run_pause_procedure;
|
||||
pub mod update_puzzle_work_procedure;
|
||||
pub mod update_square_hole_work_procedure;
|
||||
pub mod update_visual_novel_work_procedure;
|
||||
pub mod upsert_auth_store_snapshot_procedure;
|
||||
pub mod upsert_chapter_progression_and_return_procedure;
|
||||
pub mod upsert_chapter_progression_reducer;
|
||||
@@ -734,11 +749,46 @@ pub mod upsert_npc_state_reducer;
|
||||
pub mod upsert_platform_browse_history_and_return_procedure;
|
||||
pub mod upsert_runtime_setting_and_return_procedure;
|
||||
pub mod upsert_runtime_snapshot_and_return_procedure;
|
||||
pub mod upsert_visual_novel_run_snapshot_procedure;
|
||||
pub mod use_puzzle_runtime_prop_procedure;
|
||||
pub mod user_account_table;
|
||||
pub mod user_account_type;
|
||||
pub mod user_browse_history_table;
|
||||
pub mod user_browse_history_type;
|
||||
pub mod visual_novel_agent_message_finalize_input_type;
|
||||
pub mod visual_novel_agent_message_row_type;
|
||||
pub mod visual_novel_agent_message_submit_input_type;
|
||||
pub mod visual_novel_agent_message_table;
|
||||
pub mod visual_novel_agent_session_create_input_type;
|
||||
pub mod visual_novel_agent_session_get_input_type;
|
||||
pub mod visual_novel_agent_session_procedure_result_type;
|
||||
pub mod visual_novel_agent_session_row_type;
|
||||
pub mod visual_novel_agent_session_table;
|
||||
pub mod visual_novel_history_procedure_result_type;
|
||||
pub mod visual_novel_run_get_input_type;
|
||||
pub mod visual_novel_run_procedure_result_type;
|
||||
pub mod visual_novel_run_snapshot_upsert_input_type;
|
||||
pub mod visual_novel_run_start_input_type;
|
||||
pub mod visual_novel_runtime_event_procedure_result_type;
|
||||
pub mod visual_novel_runtime_event_record_input_type;
|
||||
pub mod visual_novel_runtime_event_table;
|
||||
pub mod visual_novel_runtime_event_type;
|
||||
pub mod visual_novel_runtime_history_append_input_type;
|
||||
pub mod visual_novel_runtime_history_entry_row_type;
|
||||
pub mod visual_novel_runtime_history_entry_table;
|
||||
pub mod visual_novel_runtime_history_list_input_type;
|
||||
pub mod visual_novel_runtime_run_row_type;
|
||||
pub mod visual_novel_runtime_run_table;
|
||||
pub mod visual_novel_work_compile_input_type;
|
||||
pub mod visual_novel_work_delete_input_type;
|
||||
pub mod visual_novel_work_get_input_type;
|
||||
pub mod visual_novel_work_procedure_result_type;
|
||||
pub mod visual_novel_work_profile_row_type;
|
||||
pub mod visual_novel_work_profile_table;
|
||||
pub mod visual_novel_work_publish_input_type;
|
||||
pub mod visual_novel_work_update_input_type;
|
||||
pub mod visual_novel_works_list_input_type;
|
||||
pub mod visual_novel_works_procedure_result_type;
|
||||
|
||||
pub use accept_quest_reducer::accept_quest;
|
||||
pub use acknowledge_quest_completion_reducer::acknowledge_quest_completion;
|
||||
@@ -791,6 +841,7 @@ pub use analytics_granularity_type::AnalyticsGranularity;
|
||||
pub use analytics_metric_query_input_type::AnalyticsMetricQueryInput;
|
||||
pub use analytics_metric_query_procedure_result_type::AnalyticsMetricQueryProcedureResult;
|
||||
pub use append_ai_text_chunk_and_return_procedure::append_ai_text_chunk_and_return;
|
||||
pub use append_visual_novel_runtime_history_entry_procedure::append_visual_novel_runtime_history_entry;
|
||||
pub use apply_chapter_progression_ledger_entry_and_return_procedure::apply_chapter_progression_ledger_entry_and_return;
|
||||
pub use apply_chapter_progression_ledger_entry_reducer::apply_chapter_progression_ledger_entry;
|
||||
pub use apply_inventory_mutation_reducer::apply_inventory_mutation;
|
||||
@@ -901,6 +952,7 @@ pub use compile_custom_world_published_profile_procedure::compile_custom_world_p
|
||||
pub use compile_match_3_d_draft_procedure::compile_match_3_d_draft;
|
||||
pub use compile_puzzle_agent_draft_procedure::compile_puzzle_agent_draft;
|
||||
pub use compile_square_hole_draft_procedure::compile_square_hole_draft;
|
||||
pub use compile_visual_novel_work_profile_procedure::compile_visual_novel_work_profile;
|
||||
pub use complete_ai_stage_and_return_procedure::complete_ai_stage_and_return;
|
||||
pub use complete_ai_task_and_return_procedure::complete_ai_task_and_return;
|
||||
pub use confirm_asset_object_and_return_procedure::confirm_asset_object_and_return;
|
||||
@@ -919,6 +971,7 @@ pub use create_match_3_d_agent_session_procedure::create_match_3_d_agent_session
|
||||
pub use create_profile_recharge_order_and_return_procedure::create_profile_recharge_order_and_return;
|
||||
pub use create_puzzle_agent_session_procedure::create_puzzle_agent_session;
|
||||
pub use create_square_hole_agent_session_procedure::create_square_hole_agent_session;
|
||||
pub use create_visual_novel_agent_session_procedure::create_visual_novel_agent_session;
|
||||
pub use custom_world_agent_action_execute_input_type::CustomWorldAgentActionExecuteInput;
|
||||
pub use custom_world_agent_action_execute_result_type::CustomWorldAgentActionExecuteResult;
|
||||
pub use custom_world_agent_card_detail_get_input_type::CustomWorldAgentCardDetailGetInput;
|
||||
@@ -1002,6 +1055,7 @@ pub use delete_match_3_d_work_procedure::delete_match_3_d_work;
|
||||
pub use delete_puzzle_work_procedure::delete_puzzle_work;
|
||||
pub use delete_runtime_snapshot_and_return_procedure::delete_runtime_snapshot_and_return;
|
||||
pub use delete_square_hole_work_procedure::delete_square_hole_work;
|
||||
pub use delete_visual_novel_work_procedure::delete_visual_novel_work;
|
||||
pub use drag_puzzle_piece_or_group_procedure::drag_puzzle_piece_or_group;
|
||||
pub use drop_square_hole_shape_procedure::drop_square_hole_shape;
|
||||
pub use ensure_analytics_date_dimension_for_date_reducer::ensure_analytics_date_dimension_for_date;
|
||||
@@ -1015,6 +1069,7 @@ pub use finalize_custom_world_agent_message_turn_procedure::finalize_custom_worl
|
||||
pub use finalize_match_3_d_agent_message_turn_procedure::finalize_match_3_d_agent_message_turn;
|
||||
pub use finalize_puzzle_agent_message_turn_procedure::finalize_puzzle_agent_message_turn;
|
||||
pub use finalize_square_hole_agent_message_turn_procedure::finalize_square_hole_agent_message_turn;
|
||||
pub use finalize_visual_novel_agent_message_turn_procedure::finalize_visual_novel_agent_message_turn;
|
||||
pub use finish_match_3_d_time_up_procedure::finish_match_3_d_time_up;
|
||||
pub use finish_square_hole_time_up_procedure::finish_square_hole_time_up;
|
||||
pub use generate_big_fish_asset_procedure::generate_big_fish_asset;
|
||||
@@ -1049,6 +1104,9 @@ pub use get_square_hole_agent_session_procedure::get_square_hole_agent_session;
|
||||
pub use get_square_hole_run_procedure::get_square_hole_run;
|
||||
pub use get_square_hole_work_detail_procedure::get_square_hole_work_detail;
|
||||
pub use get_story_session_state_procedure::get_story_session_state;
|
||||
pub use get_visual_novel_agent_session_procedure::get_visual_novel_agent_session;
|
||||
pub use get_visual_novel_run_procedure::get_visual_novel_run;
|
||||
pub use get_visual_novel_work_detail_procedure::get_visual_novel_work_detail;
|
||||
pub use grant_inventory_item_input_type::GrantInventoryItemInput;
|
||||
pub use grant_new_user_registration_wallet_reward_procedure::grant_new_user_registration_wallet_reward;
|
||||
pub use grant_player_progression_experience_and_return_procedure::grant_player_progression_experience_and_return;
|
||||
@@ -1080,6 +1138,8 @@ pub use list_profile_wallet_ledger_procedure::list_profile_wallet_ledger;
|
||||
pub use list_puzzle_gallery_procedure::list_puzzle_gallery;
|
||||
pub use list_puzzle_works_procedure::list_puzzle_works;
|
||||
pub use list_square_hole_works_procedure::list_square_hole_works;
|
||||
pub use list_visual_novel_runtime_history_procedure::list_visual_novel_runtime_history;
|
||||
pub use list_visual_novel_works_procedure::list_visual_novel_works;
|
||||
pub use match_3_d_agent_message_finalize_input_type::Match3DAgentMessageFinalizeInput;
|
||||
pub use match_3_d_agent_message_row_type::Match3DAgentMessageRow;
|
||||
pub use match_3_d_agent_message_submit_input_type::Match3DAgentMessageSubmitInput;
|
||||
@@ -1168,6 +1228,7 @@ pub use publish_custom_world_world_procedure::publish_custom_world_world;
|
||||
pub use publish_match_3_d_work_procedure::publish_match_3_d_work;
|
||||
pub use publish_puzzle_work_procedure::publish_puzzle_work;
|
||||
pub use publish_square_hole_work_procedure::publish_square_hole_work;
|
||||
pub use publish_visual_novel_work_procedure::publish_visual_novel_work;
|
||||
pub use put_database_migration_import_chunk_procedure::put_database_migration_import_chunk;
|
||||
pub use puzzle_agent_message_finalize_input_type::PuzzleAgentMessageFinalizeInput;
|
||||
pub use puzzle_agent_message_kind_type::PuzzleAgentMessageKind;
|
||||
@@ -1249,6 +1310,7 @@ pub use record_big_fish_play_procedure::record_big_fish_play;
|
||||
pub use record_custom_world_profile_like_procedure::record_custom_world_profile_like;
|
||||
pub use record_custom_world_profile_play_procedure::record_custom_world_profile_play;
|
||||
pub use record_puzzle_work_like_procedure::record_puzzle_work_like;
|
||||
pub use record_visual_novel_runtime_event_procedure::record_visual_novel_runtime_event;
|
||||
pub use redeem_profile_referral_invite_code_procedure::redeem_profile_referral_invite_code;
|
||||
pub use redeem_profile_reward_code_procedure::redeem_profile_reward_code;
|
||||
pub use refresh_session_table::*;
|
||||
@@ -1416,6 +1478,7 @@ pub use start_big_fish_run_procedure::start_big_fish_run;
|
||||
pub use start_match_3_d_run_procedure::start_match_3_d_run;
|
||||
pub use start_puzzle_run_procedure::start_puzzle_run;
|
||||
pub use start_square_hole_run_procedure::start_square_hole_run;
|
||||
pub use start_visual_novel_run_procedure::start_visual_novel_run;
|
||||
pub use stop_match_3_d_run_procedure::stop_match_3_d_run;
|
||||
pub use stop_square_hole_run_procedure::stop_square_hole_run;
|
||||
pub use story_continue_input_type::StoryContinueInput;
|
||||
@@ -1438,6 +1501,7 @@ pub use submit_match_3_d_agent_message_procedure::submit_match_3_d_agent_message
|
||||
pub use submit_puzzle_agent_message_procedure::submit_puzzle_agent_message;
|
||||
pub use submit_puzzle_leaderboard_entry_procedure::submit_puzzle_leaderboard_entry;
|
||||
pub use submit_square_hole_agent_message_procedure::submit_square_hole_agent_message;
|
||||
pub use submit_visual_novel_agent_message_procedure::submit_visual_novel_agent_message;
|
||||
pub use swap_puzzle_pieces_procedure::swap_puzzle_pieces;
|
||||
pub use tracking_daily_stat_table::*;
|
||||
pub use tracking_daily_stat_type::TrackingDailyStat;
|
||||
@@ -1457,6 +1521,7 @@ pub use update_match_3_d_work_procedure::update_match_3_d_work;
|
||||
pub use update_puzzle_run_pause_procedure::update_puzzle_run_pause;
|
||||
pub use update_puzzle_work_procedure::update_puzzle_work;
|
||||
pub use update_square_hole_work_procedure::update_square_hole_work;
|
||||
pub use update_visual_novel_work_procedure::update_visual_novel_work;
|
||||
pub use upsert_auth_store_snapshot_procedure::upsert_auth_store_snapshot;
|
||||
pub use upsert_chapter_progression_and_return_procedure::upsert_chapter_progression_and_return;
|
||||
pub use upsert_chapter_progression_reducer::upsert_chapter_progression;
|
||||
@@ -1468,11 +1533,46 @@ pub use upsert_npc_state_reducer::upsert_npc_state;
|
||||
pub use upsert_platform_browse_history_and_return_procedure::upsert_platform_browse_history_and_return;
|
||||
pub use upsert_runtime_setting_and_return_procedure::upsert_runtime_setting_and_return;
|
||||
pub use upsert_runtime_snapshot_and_return_procedure::upsert_runtime_snapshot_and_return;
|
||||
pub use upsert_visual_novel_run_snapshot_procedure::upsert_visual_novel_run_snapshot;
|
||||
pub use use_puzzle_runtime_prop_procedure::use_puzzle_runtime_prop;
|
||||
pub use user_account_table::*;
|
||||
pub use user_account_type::UserAccount;
|
||||
pub use user_browse_history_table::*;
|
||||
pub use user_browse_history_type::UserBrowseHistory;
|
||||
pub use visual_novel_agent_message_finalize_input_type::VisualNovelAgentMessageFinalizeInput;
|
||||
pub use visual_novel_agent_message_row_type::VisualNovelAgentMessageRow;
|
||||
pub use visual_novel_agent_message_submit_input_type::VisualNovelAgentMessageSubmitInput;
|
||||
pub use visual_novel_agent_message_table::*;
|
||||
pub use visual_novel_agent_session_create_input_type::VisualNovelAgentSessionCreateInput;
|
||||
pub use visual_novel_agent_session_get_input_type::VisualNovelAgentSessionGetInput;
|
||||
pub use visual_novel_agent_session_procedure_result_type::VisualNovelAgentSessionProcedureResult;
|
||||
pub use visual_novel_agent_session_row_type::VisualNovelAgentSessionRow;
|
||||
pub use visual_novel_agent_session_table::*;
|
||||
pub use visual_novel_history_procedure_result_type::VisualNovelHistoryProcedureResult;
|
||||
pub use visual_novel_run_get_input_type::VisualNovelRunGetInput;
|
||||
pub use visual_novel_run_procedure_result_type::VisualNovelRunProcedureResult;
|
||||
pub use visual_novel_run_snapshot_upsert_input_type::VisualNovelRunSnapshotUpsertInput;
|
||||
pub use visual_novel_run_start_input_type::VisualNovelRunStartInput;
|
||||
pub use visual_novel_runtime_event_procedure_result_type::VisualNovelRuntimeEventProcedureResult;
|
||||
pub use visual_novel_runtime_event_record_input_type::VisualNovelRuntimeEventRecordInput;
|
||||
pub use visual_novel_runtime_event_table::*;
|
||||
pub use visual_novel_runtime_event_type::VisualNovelRuntimeEvent;
|
||||
pub use visual_novel_runtime_history_append_input_type::VisualNovelRuntimeHistoryAppendInput;
|
||||
pub use visual_novel_runtime_history_entry_row_type::VisualNovelRuntimeHistoryEntryRow;
|
||||
pub use visual_novel_runtime_history_entry_table::*;
|
||||
pub use visual_novel_runtime_history_list_input_type::VisualNovelRuntimeHistoryListInput;
|
||||
pub use visual_novel_runtime_run_row_type::VisualNovelRuntimeRunRow;
|
||||
pub use visual_novel_runtime_run_table::*;
|
||||
pub use visual_novel_work_compile_input_type::VisualNovelWorkCompileInput;
|
||||
pub use visual_novel_work_delete_input_type::VisualNovelWorkDeleteInput;
|
||||
pub use visual_novel_work_get_input_type::VisualNovelWorkGetInput;
|
||||
pub use visual_novel_work_procedure_result_type::VisualNovelWorkProcedureResult;
|
||||
pub use visual_novel_work_profile_row_type::VisualNovelWorkProfileRow;
|
||||
pub use visual_novel_work_profile_table::*;
|
||||
pub use visual_novel_work_publish_input_type::VisualNovelWorkPublishInput;
|
||||
pub use visual_novel_work_update_input_type::VisualNovelWorkUpdateInput;
|
||||
pub use visual_novel_works_list_input_type::VisualNovelWorksListInput;
|
||||
pub use visual_novel_works_procedure_result_type::VisualNovelWorksProcedureResult;
|
||||
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
|
||||
@@ -1817,6 +1917,12 @@ pub struct DbUpdate {
|
||||
treasure_record: __sdk::TableUpdate<TreasureRecord>,
|
||||
user_account: __sdk::TableUpdate<UserAccount>,
|
||||
user_browse_history: __sdk::TableUpdate<UserBrowseHistory>,
|
||||
visual_novel_agent_message: __sdk::TableUpdate<VisualNovelAgentMessageRow>,
|
||||
visual_novel_agent_session: __sdk::TableUpdate<VisualNovelAgentSessionRow>,
|
||||
visual_novel_runtime_event: __sdk::TableUpdate<VisualNovelRuntimeEvent>,
|
||||
visual_novel_runtime_history_entry: __sdk::TableUpdate<VisualNovelRuntimeHistoryEntryRow>,
|
||||
visual_novel_runtime_run: __sdk::TableUpdate<VisualNovelRuntimeRunRow>,
|
||||
visual_novel_work_profile: __sdk::TableUpdate<VisualNovelWorkProfileRow>,
|
||||
}
|
||||
|
||||
impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate {
|
||||
@@ -2040,6 +2146,26 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate {
|
||||
"user_browse_history" => db_update
|
||||
.user_browse_history
|
||||
.append(user_browse_history_table::parse_table_update(table_update)?),
|
||||
"visual_novel_agent_message" => db_update.visual_novel_agent_message.append(
|
||||
visual_novel_agent_message_table::parse_table_update(table_update)?,
|
||||
),
|
||||
"visual_novel_agent_session" => db_update.visual_novel_agent_session.append(
|
||||
visual_novel_agent_session_table::parse_table_update(table_update)?,
|
||||
),
|
||||
"visual_novel_runtime_event" => db_update.visual_novel_runtime_event.append(
|
||||
visual_novel_runtime_event_table::parse_table_update(table_update)?,
|
||||
),
|
||||
"visual_novel_runtime_history_entry" => {
|
||||
db_update.visual_novel_runtime_history_entry.append(
|
||||
visual_novel_runtime_history_entry_table::parse_table_update(table_update)?,
|
||||
)
|
||||
}
|
||||
"visual_novel_runtime_run" => db_update.visual_novel_runtime_run.append(
|
||||
visual_novel_runtime_run_table::parse_table_update(table_update)?,
|
||||
),
|
||||
"visual_novel_work_profile" => db_update.visual_novel_work_profile.append(
|
||||
visual_novel_work_profile_table::parse_table_update(table_update)?,
|
||||
),
|
||||
|
||||
unknown => {
|
||||
return Err(__sdk::InternalError::unknown_name(
|
||||
@@ -2415,6 +2541,37 @@ impl __sdk::DbUpdate for DbUpdate {
|
||||
&self.user_browse_history,
|
||||
)
|
||||
.with_updates_by_pk(|row| &row.browse_history_id);
|
||||
diff.visual_novel_agent_message = cache
|
||||
.apply_diff_to_table::<VisualNovelAgentMessageRow>(
|
||||
"visual_novel_agent_message",
|
||||
&self.visual_novel_agent_message,
|
||||
)
|
||||
.with_updates_by_pk(|row| &row.message_id);
|
||||
diff.visual_novel_agent_session = cache
|
||||
.apply_diff_to_table::<VisualNovelAgentSessionRow>(
|
||||
"visual_novel_agent_session",
|
||||
&self.visual_novel_agent_session,
|
||||
)
|
||||
.with_updates_by_pk(|row| &row.session_id);
|
||||
diff.visual_novel_runtime_event = self.visual_novel_runtime_event.into_event_diff();
|
||||
diff.visual_novel_runtime_history_entry = cache
|
||||
.apply_diff_to_table::<VisualNovelRuntimeHistoryEntryRow>(
|
||||
"visual_novel_runtime_history_entry",
|
||||
&self.visual_novel_runtime_history_entry,
|
||||
)
|
||||
.with_updates_by_pk(|row| &row.entry_id);
|
||||
diff.visual_novel_runtime_run = cache
|
||||
.apply_diff_to_table::<VisualNovelRuntimeRunRow>(
|
||||
"visual_novel_runtime_run",
|
||||
&self.visual_novel_runtime_run,
|
||||
)
|
||||
.with_updates_by_pk(|row| &row.run_id);
|
||||
diff.visual_novel_work_profile = cache
|
||||
.apply_diff_to_table::<VisualNovelWorkProfileRow>(
|
||||
"visual_novel_work_profile",
|
||||
&self.visual_novel_work_profile,
|
||||
)
|
||||
.with_updates_by_pk(|row| &row.profile_id);
|
||||
|
||||
diff
|
||||
}
|
||||
@@ -2635,6 +2792,24 @@ impl __sdk::DbUpdate for DbUpdate {
|
||||
"user_browse_history" => db_update
|
||||
.user_browse_history
|
||||
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
|
||||
"visual_novel_agent_message" => db_update
|
||||
.visual_novel_agent_message
|
||||
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
|
||||
"visual_novel_agent_session" => db_update
|
||||
.visual_novel_agent_session
|
||||
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
|
||||
"visual_novel_runtime_event" => db_update
|
||||
.visual_novel_runtime_event
|
||||
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
|
||||
"visual_novel_runtime_history_entry" => db_update
|
||||
.visual_novel_runtime_history_entry
|
||||
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
|
||||
"visual_novel_runtime_run" => db_update
|
||||
.visual_novel_runtime_run
|
||||
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
|
||||
"visual_novel_work_profile" => db_update
|
||||
.visual_novel_work_profile
|
||||
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
|
||||
unknown => {
|
||||
return Err(
|
||||
__sdk::InternalError::unknown_name("table", unknown, "QueryRows").into(),
|
||||
@@ -2861,6 +3036,24 @@ impl __sdk::DbUpdate for DbUpdate {
|
||||
"user_browse_history" => db_update
|
||||
.user_browse_history
|
||||
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
|
||||
"visual_novel_agent_message" => db_update
|
||||
.visual_novel_agent_message
|
||||
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
|
||||
"visual_novel_agent_session" => db_update
|
||||
.visual_novel_agent_session
|
||||
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
|
||||
"visual_novel_runtime_event" => db_update
|
||||
.visual_novel_runtime_event
|
||||
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
|
||||
"visual_novel_runtime_history_entry" => db_update
|
||||
.visual_novel_runtime_history_entry
|
||||
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
|
||||
"visual_novel_runtime_run" => db_update
|
||||
.visual_novel_runtime_run
|
||||
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
|
||||
"visual_novel_work_profile" => db_update
|
||||
.visual_novel_work_profile
|
||||
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
|
||||
unknown => {
|
||||
return Err(
|
||||
__sdk::InternalError::unknown_name("table", unknown, "QueryRows").into(),
|
||||
@@ -2947,6 +3140,13 @@ pub struct AppliedDiff<'r> {
|
||||
treasure_record: __sdk::TableAppliedDiff<'r, TreasureRecord>,
|
||||
user_account: __sdk::TableAppliedDiff<'r, UserAccount>,
|
||||
user_browse_history: __sdk::TableAppliedDiff<'r, UserBrowseHistory>,
|
||||
visual_novel_agent_message: __sdk::TableAppliedDiff<'r, VisualNovelAgentMessageRow>,
|
||||
visual_novel_agent_session: __sdk::TableAppliedDiff<'r, VisualNovelAgentSessionRow>,
|
||||
visual_novel_runtime_event: __sdk::TableAppliedDiff<'r, VisualNovelRuntimeEvent>,
|
||||
visual_novel_runtime_history_entry:
|
||||
__sdk::TableAppliedDiff<'r, VisualNovelRuntimeHistoryEntryRow>,
|
||||
visual_novel_runtime_run: __sdk::TableAppliedDiff<'r, VisualNovelRuntimeRunRow>,
|
||||
visual_novel_work_profile: __sdk::TableAppliedDiff<'r, VisualNovelWorkProfileRow>,
|
||||
__unused: std::marker::PhantomData<&'r ()>,
|
||||
}
|
||||
|
||||
@@ -3295,6 +3495,36 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> {
|
||||
&self.user_browse_history,
|
||||
event,
|
||||
);
|
||||
callbacks.invoke_table_row_callbacks::<VisualNovelAgentMessageRow>(
|
||||
"visual_novel_agent_message",
|
||||
&self.visual_novel_agent_message,
|
||||
event,
|
||||
);
|
||||
callbacks.invoke_table_row_callbacks::<VisualNovelAgentSessionRow>(
|
||||
"visual_novel_agent_session",
|
||||
&self.visual_novel_agent_session,
|
||||
event,
|
||||
);
|
||||
callbacks.invoke_table_row_callbacks::<VisualNovelRuntimeEvent>(
|
||||
"visual_novel_runtime_event",
|
||||
&self.visual_novel_runtime_event,
|
||||
event,
|
||||
);
|
||||
callbacks.invoke_table_row_callbacks::<VisualNovelRuntimeHistoryEntryRow>(
|
||||
"visual_novel_runtime_history_entry",
|
||||
&self.visual_novel_runtime_history_entry,
|
||||
event,
|
||||
);
|
||||
callbacks.invoke_table_row_callbacks::<VisualNovelRuntimeRunRow>(
|
||||
"visual_novel_runtime_run",
|
||||
&self.visual_novel_runtime_run,
|
||||
event,
|
||||
);
|
||||
callbacks.invoke_table_row_callbacks::<VisualNovelWorkProfileRow>(
|
||||
"visual_novel_work_profile",
|
||||
&self.visual_novel_work_profile,
|
||||
event,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4026,6 +4256,12 @@ impl __sdk::SpacetimeModule for RemoteModule {
|
||||
treasure_record_table::register_table(client_cache);
|
||||
user_account_table::register_table(client_cache);
|
||||
user_browse_history_table::register_table(client_cache);
|
||||
visual_novel_agent_message_table::register_table(client_cache);
|
||||
visual_novel_agent_session_table::register_table(client_cache);
|
||||
visual_novel_runtime_event_table::register_table(client_cache);
|
||||
visual_novel_runtime_history_entry_table::register_table(client_cache);
|
||||
visual_novel_runtime_run_table::register_table(client_cache);
|
||||
visual_novel_work_profile_table::register_table(client_cache);
|
||||
}
|
||||
const ALL_TABLE_NAMES: &'static [&'static str] = &[
|
||||
"ai_result_reference",
|
||||
@@ -4099,5 +4335,11 @@ impl __sdk::SpacetimeModule for RemoteModule {
|
||||
"treasure_record",
|
||||
"user_account",
|
||||
"user_browse_history",
|
||||
"visual_novel_agent_message",
|
||||
"visual_novel_agent_session",
|
||||
"visual_novel_runtime_event",
|
||||
"visual_novel_runtime_history_entry",
|
||||
"visual_novel_runtime_run",
|
||||
"visual_novel_work_profile",
|
||||
];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
use super::visual_novel_work_procedure_result_type::VisualNovelWorkProcedureResult;
|
||||
use super::visual_novel_work_publish_input_type::VisualNovelWorkPublishInput;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
struct PublishVisualNovelWorkArgs {
|
||||
pub input: VisualNovelWorkPublishInput,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for PublishVisualNovelWorkArgs {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the procedure `publish_visual_novel_work`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteProcedures`].
|
||||
pub trait publish_visual_novel_work {
|
||||
fn publish_visual_novel_work(&self, input: VisualNovelWorkPublishInput) {
|
||||
self.publish_visual_novel_work_then(input, |_, _| {});
|
||||
}
|
||||
|
||||
fn publish_visual_novel_work_then(
|
||||
&self,
|
||||
input: VisualNovelWorkPublishInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelWorkProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
);
|
||||
}
|
||||
|
||||
impl publish_visual_novel_work for super::RemoteProcedures {
|
||||
fn publish_visual_novel_work_then(
|
||||
&self,
|
||||
input: VisualNovelWorkPublishInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelWorkProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
) {
|
||||
self.imp
|
||||
.invoke_procedure_with_callback::<_, VisualNovelWorkProcedureResult>(
|
||||
"publish_visual_novel_work",
|
||||
PublishVisualNovelWorkArgs { input },
|
||||
__callback,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
use super::visual_novel_runtime_event_procedure_result_type::VisualNovelRuntimeEventProcedureResult;
|
||||
use super::visual_novel_runtime_event_record_input_type::VisualNovelRuntimeEventRecordInput;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
struct RecordVisualNovelRuntimeEventArgs {
|
||||
pub input: VisualNovelRuntimeEventRecordInput,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for RecordVisualNovelRuntimeEventArgs {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the procedure `record_visual_novel_runtime_event`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteProcedures`].
|
||||
pub trait record_visual_novel_runtime_event {
|
||||
fn record_visual_novel_runtime_event(&self, input: VisualNovelRuntimeEventRecordInput) {
|
||||
self.record_visual_novel_runtime_event_then(input, |_, _| {});
|
||||
}
|
||||
|
||||
fn record_visual_novel_runtime_event_then(
|
||||
&self,
|
||||
input: VisualNovelRuntimeEventRecordInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelRuntimeEventProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
);
|
||||
}
|
||||
|
||||
impl record_visual_novel_runtime_event for super::RemoteProcedures {
|
||||
fn record_visual_novel_runtime_event_then(
|
||||
&self,
|
||||
input: VisualNovelRuntimeEventRecordInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelRuntimeEventProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
) {
|
||||
self.imp
|
||||
.invoke_procedure_with_callback::<_, VisualNovelRuntimeEventProcedureResult>(
|
||||
"record_visual_novel_runtime_event",
|
||||
RecordVisualNovelRuntimeEventArgs { input },
|
||||
__callback,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
use super::visual_novel_run_procedure_result_type::VisualNovelRunProcedureResult;
|
||||
use super::visual_novel_run_start_input_type::VisualNovelRunStartInput;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
struct StartVisualNovelRunArgs {
|
||||
pub input: VisualNovelRunStartInput,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for StartVisualNovelRunArgs {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the procedure `start_visual_novel_run`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteProcedures`].
|
||||
pub trait start_visual_novel_run {
|
||||
fn start_visual_novel_run(&self, input: VisualNovelRunStartInput) {
|
||||
self.start_visual_novel_run_then(input, |_, _| {});
|
||||
}
|
||||
|
||||
fn start_visual_novel_run_then(
|
||||
&self,
|
||||
input: VisualNovelRunStartInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelRunProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
);
|
||||
}
|
||||
|
||||
impl start_visual_novel_run for super::RemoteProcedures {
|
||||
fn start_visual_novel_run_then(
|
||||
&self,
|
||||
input: VisualNovelRunStartInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelRunProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
) {
|
||||
self.imp
|
||||
.invoke_procedure_with_callback::<_, VisualNovelRunProcedureResult>(
|
||||
"start_visual_novel_run",
|
||||
StartVisualNovelRunArgs { input },
|
||||
__callback,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
use super::visual_novel_agent_message_submit_input_type::VisualNovelAgentMessageSubmitInput;
|
||||
use super::visual_novel_agent_session_procedure_result_type::VisualNovelAgentSessionProcedureResult;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
struct SubmitVisualNovelAgentMessageArgs {
|
||||
pub input: VisualNovelAgentMessageSubmitInput,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for SubmitVisualNovelAgentMessageArgs {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the procedure `submit_visual_novel_agent_message`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteProcedures`].
|
||||
pub trait submit_visual_novel_agent_message {
|
||||
fn submit_visual_novel_agent_message(&self, input: VisualNovelAgentMessageSubmitInput) {
|
||||
self.submit_visual_novel_agent_message_then(input, |_, _| {});
|
||||
}
|
||||
|
||||
fn submit_visual_novel_agent_message_then(
|
||||
&self,
|
||||
input: VisualNovelAgentMessageSubmitInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelAgentSessionProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
);
|
||||
}
|
||||
|
||||
impl submit_visual_novel_agent_message for super::RemoteProcedures {
|
||||
fn submit_visual_novel_agent_message_then(
|
||||
&self,
|
||||
input: VisualNovelAgentMessageSubmitInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelAgentSessionProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
) {
|
||||
self.imp
|
||||
.invoke_procedure_with_callback::<_, VisualNovelAgentSessionProcedureResult>(
|
||||
"submit_visual_novel_agent_message",
|
||||
SubmitVisualNovelAgentMessageArgs { input },
|
||||
__callback,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
use super::visual_novel_work_procedure_result_type::VisualNovelWorkProcedureResult;
|
||||
use super::visual_novel_work_update_input_type::VisualNovelWorkUpdateInput;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
struct UpdateVisualNovelWorkArgs {
|
||||
pub input: VisualNovelWorkUpdateInput,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for UpdateVisualNovelWorkArgs {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the procedure `update_visual_novel_work`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteProcedures`].
|
||||
pub trait update_visual_novel_work {
|
||||
fn update_visual_novel_work(&self, input: VisualNovelWorkUpdateInput) {
|
||||
self.update_visual_novel_work_then(input, |_, _| {});
|
||||
}
|
||||
|
||||
fn update_visual_novel_work_then(
|
||||
&self,
|
||||
input: VisualNovelWorkUpdateInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelWorkProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
);
|
||||
}
|
||||
|
||||
impl update_visual_novel_work for super::RemoteProcedures {
|
||||
fn update_visual_novel_work_then(
|
||||
&self,
|
||||
input: VisualNovelWorkUpdateInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelWorkProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
) {
|
||||
self.imp
|
||||
.invoke_procedure_with_callback::<_, VisualNovelWorkProcedureResult>(
|
||||
"update_visual_novel_work",
|
||||
UpdateVisualNovelWorkArgs { input },
|
||||
__callback,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
use super::visual_novel_run_procedure_result_type::VisualNovelRunProcedureResult;
|
||||
use super::visual_novel_run_snapshot_upsert_input_type::VisualNovelRunSnapshotUpsertInput;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
struct UpsertVisualNovelRunSnapshotArgs {
|
||||
pub input: VisualNovelRunSnapshotUpsertInput,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for UpsertVisualNovelRunSnapshotArgs {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the procedure `upsert_visual_novel_run_snapshot`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteProcedures`].
|
||||
pub trait upsert_visual_novel_run_snapshot {
|
||||
fn upsert_visual_novel_run_snapshot(&self, input: VisualNovelRunSnapshotUpsertInput) {
|
||||
self.upsert_visual_novel_run_snapshot_then(input, |_, _| {});
|
||||
}
|
||||
|
||||
fn upsert_visual_novel_run_snapshot_then(
|
||||
&self,
|
||||
input: VisualNovelRunSnapshotUpsertInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelRunProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
);
|
||||
}
|
||||
|
||||
impl upsert_visual_novel_run_snapshot for super::RemoteProcedures {
|
||||
fn upsert_visual_novel_run_snapshot_then(
|
||||
&self,
|
||||
input: VisualNovelRunSnapshotUpsertInput,
|
||||
|
||||
__callback: impl FnOnce(
|
||||
&super::ProcedureEventContext,
|
||||
Result<VisualNovelRunProcedureResult, __sdk::InternalError>,
|
||||
) + Send
|
||||
+ 'static,
|
||||
) {
|
||||
self.imp
|
||||
.invoke_procedure_with_callback::<_, VisualNovelRunProcedureResult>(
|
||||
"upsert_visual_novel_run_snapshot",
|
||||
UpsertVisualNovelRunSnapshotArgs { input },
|
||||
__callback,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelAgentMessageFinalizeInput {
|
||||
pub session_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub assistant_message_id: Option<String>,
|
||||
pub assistant_reply_text: Option<String>,
|
||||
pub draft_json: Option<String>,
|
||||
pub pending_action_json: Option<String>,
|
||||
pub status: String,
|
||||
pub progress_percent: u32,
|
||||
pub updated_at_micros: i64,
|
||||
pub error_message: Option<String>,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelAgentMessageFinalizeInput {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelAgentMessageRow {
|
||||
pub message_id: String,
|
||||
pub session_id: String,
|
||||
pub role: String,
|
||||
pub kind: String,
|
||||
pub text: String,
|
||||
pub created_at: __sdk::Timestamp,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelAgentMessageRow {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
/// Column accessor struct for the table `VisualNovelAgentMessageRow`.
|
||||
///
|
||||
/// Provides typed access to columns for query building.
|
||||
pub struct VisualNovelAgentMessageRowCols {
|
||||
pub message_id: __sdk::__query_builder::Col<VisualNovelAgentMessageRow, String>,
|
||||
pub session_id: __sdk::__query_builder::Col<VisualNovelAgentMessageRow, String>,
|
||||
pub role: __sdk::__query_builder::Col<VisualNovelAgentMessageRow, String>,
|
||||
pub kind: __sdk::__query_builder::Col<VisualNovelAgentMessageRow, String>,
|
||||
pub text: __sdk::__query_builder::Col<VisualNovelAgentMessageRow, String>,
|
||||
pub created_at: __sdk::__query_builder::Col<VisualNovelAgentMessageRow, __sdk::Timestamp>,
|
||||
}
|
||||
|
||||
impl __sdk::__query_builder::HasCols for VisualNovelAgentMessageRow {
|
||||
type Cols = VisualNovelAgentMessageRowCols;
|
||||
fn cols(table_name: &'static str) -> Self::Cols {
|
||||
VisualNovelAgentMessageRowCols {
|
||||
message_id: __sdk::__query_builder::Col::new(table_name, "message_id"),
|
||||
session_id: __sdk::__query_builder::Col::new(table_name, "session_id"),
|
||||
role: __sdk::__query_builder::Col::new(table_name, "role"),
|
||||
kind: __sdk::__query_builder::Col::new(table_name, "kind"),
|
||||
text: __sdk::__query_builder::Col::new(table_name, "text"),
|
||||
created_at: __sdk::__query_builder::Col::new(table_name, "created_at"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Indexed column accessor struct for the table `VisualNovelAgentMessageRow`.
|
||||
///
|
||||
/// Provides typed access to indexed columns for query building.
|
||||
pub struct VisualNovelAgentMessageRowIxCols {
|
||||
pub message_id: __sdk::__query_builder::IxCol<VisualNovelAgentMessageRow, String>,
|
||||
pub session_id: __sdk::__query_builder::IxCol<VisualNovelAgentMessageRow, String>,
|
||||
}
|
||||
|
||||
impl __sdk::__query_builder::HasIxCols for VisualNovelAgentMessageRow {
|
||||
type IxCols = VisualNovelAgentMessageRowIxCols;
|
||||
fn ix_cols(table_name: &'static str) -> Self::IxCols {
|
||||
VisualNovelAgentMessageRowIxCols {
|
||||
message_id: __sdk::__query_builder::IxCol::new(table_name, "message_id"),
|
||||
session_id: __sdk::__query_builder::IxCol::new(table_name, "session_id"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl __sdk::__query_builder::CanBeLookupTable for VisualNovelAgentMessageRow {}
|
||||
@@ -0,0 +1,19 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelAgentMessageSubmitInput {
|
||||
pub session_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub user_message_id: String,
|
||||
pub user_message_text: String,
|
||||
pub submitted_at_micros: i64,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelAgentMessageSubmitInput {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use super::visual_novel_agent_message_row_type::VisualNovelAgentMessageRow;
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
/// Table handle for the table `visual_novel_agent_message`.
|
||||
///
|
||||
/// Obtain a handle from the [`VisualNovelAgentMessageTableAccess::visual_novel_agent_message`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.visual_novel_agent_message()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.visual_novel_agent_message().on_insert(...)`.
|
||||
pub struct VisualNovelAgentMessageTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<VisualNovelAgentMessageRow>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `visual_novel_agent_message`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait VisualNovelAgentMessageTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`VisualNovelAgentMessageTableHandle`], which mediates access to the table `visual_novel_agent_message`.
|
||||
fn visual_novel_agent_message(&self) -> VisualNovelAgentMessageTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl VisualNovelAgentMessageTableAccess for super::RemoteTables {
|
||||
fn visual_novel_agent_message(&self) -> VisualNovelAgentMessageTableHandle<'_> {
|
||||
VisualNovelAgentMessageTableHandle {
|
||||
imp: self
|
||||
.imp
|
||||
.get_table::<VisualNovelAgentMessageRow>("visual_novel_agent_message"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct VisualNovelAgentMessageInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct VisualNovelAgentMessageDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for VisualNovelAgentMessageTableHandle<'ctx> {
|
||||
type Row = VisualNovelAgentMessageRow;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 {
|
||||
self.imp.count()
|
||||
}
|
||||
fn iter(&self) -> impl Iterator<Item = VisualNovelAgentMessageRow> + '_ {
|
||||
self.imp.iter()
|
||||
}
|
||||
|
||||
type InsertCallbackId = VisualNovelAgentMessageInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> VisualNovelAgentMessageInsertCallbackId {
|
||||
VisualNovelAgentMessageInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: VisualNovelAgentMessageInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = VisualNovelAgentMessageDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> VisualNovelAgentMessageDeleteCallbackId {
|
||||
VisualNovelAgentMessageDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: VisualNovelAgentMessageDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct VisualNovelAgentMessageUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for VisualNovelAgentMessageTableHandle<'ctx> {
|
||||
type UpdateCallbackId = VisualNovelAgentMessageUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> VisualNovelAgentMessageUpdateCallbackId {
|
||||
VisualNovelAgentMessageUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: VisualNovelAgentMessageUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `message_id` unique index on the table `visual_novel_agent_message`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`VisualNovelAgentMessageMessageIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.visual_novel_agent_message().message_id().find(...)`.
|
||||
pub struct VisualNovelAgentMessageMessageIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<VisualNovelAgentMessageRow, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> VisualNovelAgentMessageTableHandle<'ctx> {
|
||||
/// Get a handle on the `message_id` unique index on the table `visual_novel_agent_message`.
|
||||
pub fn message_id(&self) -> VisualNovelAgentMessageMessageIdUnique<'ctx> {
|
||||
VisualNovelAgentMessageMessageIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("message_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> VisualNovelAgentMessageMessageIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `message_id` column value is equal to `col_val`,
|
||||
/// if such a row is present in the client cache.
|
||||
pub fn find(&self, col_val: &String) -> Option<VisualNovelAgentMessageRow> {
|
||||
self.imp.find(col_val)
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn register_table(client_cache: &mut __sdk::ClientCache<super::RemoteModule>) {
|
||||
let _table =
|
||||
client_cache.get_or_make_table::<VisualNovelAgentMessageRow>("visual_novel_agent_message");
|
||||
_table.add_unique_constraint::<String>("message_id", |row| &row.message_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<VisualNovelAgentMessageRow>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse("TableUpdate<VisualNovelAgentMessageRow>", "TableUpdate")
|
||||
.with_cause(e)
|
||||
.into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `VisualNovelAgentMessageRow`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait visual_novel_agent_messageQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `VisualNovelAgentMessageRow`.
|
||||
fn visual_novel_agent_message(
|
||||
&self,
|
||||
) -> __sdk::__query_builder::Table<VisualNovelAgentMessageRow>;
|
||||
}
|
||||
|
||||
impl visual_novel_agent_messageQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn visual_novel_agent_message(
|
||||
&self,
|
||||
) -> __sdk::__query_builder::Table<VisualNovelAgentMessageRow> {
|
||||
__sdk::__query_builder::Table::new("visual_novel_agent_message")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelAgentSessionCreateInput {
|
||||
pub session_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub source_mode: String,
|
||||
pub seed_text: String,
|
||||
pub source_asset_ids_json: String,
|
||||
pub welcome_message_id: String,
|
||||
pub welcome_message_text: String,
|
||||
pub draft_json: Option<String>,
|
||||
pub created_at_micros: i64,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelAgentSessionCreateInput {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelAgentSessionGetInput {
|
||||
pub session_id: String,
|
||||
pub owner_user_id: String,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelAgentSessionGetInput {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelAgentSessionProcedureResult {
|
||||
pub ok: bool,
|
||||
pub session_json: Option<String>,
|
||||
pub error_message: Option<String>,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelAgentSessionProcedureResult {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelAgentSessionRow {
|
||||
pub session_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub source_mode: String,
|
||||
pub status: String,
|
||||
pub seed_text: String,
|
||||
pub source_asset_ids_json: String,
|
||||
pub current_turn: u32,
|
||||
pub progress_percent: u32,
|
||||
pub draft_json: String,
|
||||
pub pending_action_json: String,
|
||||
pub last_assistant_reply: String,
|
||||
pub published_profile_id: String,
|
||||
pub created_at: __sdk::Timestamp,
|
||||
pub updated_at: __sdk::Timestamp,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelAgentSessionRow {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
/// Column accessor struct for the table `VisualNovelAgentSessionRow`.
|
||||
///
|
||||
/// Provides typed access to columns for query building.
|
||||
pub struct VisualNovelAgentSessionRowCols {
|
||||
pub session_id: __sdk::__query_builder::Col<VisualNovelAgentSessionRow, String>,
|
||||
pub owner_user_id: __sdk::__query_builder::Col<VisualNovelAgentSessionRow, String>,
|
||||
pub source_mode: __sdk::__query_builder::Col<VisualNovelAgentSessionRow, String>,
|
||||
pub status: __sdk::__query_builder::Col<VisualNovelAgentSessionRow, String>,
|
||||
pub seed_text: __sdk::__query_builder::Col<VisualNovelAgentSessionRow, String>,
|
||||
pub source_asset_ids_json: __sdk::__query_builder::Col<VisualNovelAgentSessionRow, String>,
|
||||
pub current_turn: __sdk::__query_builder::Col<VisualNovelAgentSessionRow, u32>,
|
||||
pub progress_percent: __sdk::__query_builder::Col<VisualNovelAgentSessionRow, u32>,
|
||||
pub draft_json: __sdk::__query_builder::Col<VisualNovelAgentSessionRow, String>,
|
||||
pub pending_action_json: __sdk::__query_builder::Col<VisualNovelAgentSessionRow, String>,
|
||||
pub last_assistant_reply: __sdk::__query_builder::Col<VisualNovelAgentSessionRow, String>,
|
||||
pub published_profile_id: __sdk::__query_builder::Col<VisualNovelAgentSessionRow, String>,
|
||||
pub created_at: __sdk::__query_builder::Col<VisualNovelAgentSessionRow, __sdk::Timestamp>,
|
||||
pub updated_at: __sdk::__query_builder::Col<VisualNovelAgentSessionRow, __sdk::Timestamp>,
|
||||
}
|
||||
|
||||
impl __sdk::__query_builder::HasCols for VisualNovelAgentSessionRow {
|
||||
type Cols = VisualNovelAgentSessionRowCols;
|
||||
fn cols(table_name: &'static str) -> Self::Cols {
|
||||
VisualNovelAgentSessionRowCols {
|
||||
session_id: __sdk::__query_builder::Col::new(table_name, "session_id"),
|
||||
owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"),
|
||||
source_mode: __sdk::__query_builder::Col::new(table_name, "source_mode"),
|
||||
status: __sdk::__query_builder::Col::new(table_name, "status"),
|
||||
seed_text: __sdk::__query_builder::Col::new(table_name, "seed_text"),
|
||||
source_asset_ids_json: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"source_asset_ids_json",
|
||||
),
|
||||
current_turn: __sdk::__query_builder::Col::new(table_name, "current_turn"),
|
||||
progress_percent: __sdk::__query_builder::Col::new(table_name, "progress_percent"),
|
||||
draft_json: __sdk::__query_builder::Col::new(table_name, "draft_json"),
|
||||
pending_action_json: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"pending_action_json",
|
||||
),
|
||||
last_assistant_reply: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"last_assistant_reply",
|
||||
),
|
||||
published_profile_id: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"published_profile_id",
|
||||
),
|
||||
created_at: __sdk::__query_builder::Col::new(table_name, "created_at"),
|
||||
updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Indexed column accessor struct for the table `VisualNovelAgentSessionRow`.
|
||||
///
|
||||
/// Provides typed access to indexed columns for query building.
|
||||
pub struct VisualNovelAgentSessionRowIxCols {
|
||||
pub owner_user_id: __sdk::__query_builder::IxCol<VisualNovelAgentSessionRow, String>,
|
||||
pub session_id: __sdk::__query_builder::IxCol<VisualNovelAgentSessionRow, String>,
|
||||
}
|
||||
|
||||
impl __sdk::__query_builder::HasIxCols for VisualNovelAgentSessionRow {
|
||||
type IxCols = VisualNovelAgentSessionRowIxCols;
|
||||
fn ix_cols(table_name: &'static str) -> Self::IxCols {
|
||||
VisualNovelAgentSessionRowIxCols {
|
||||
owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"),
|
||||
session_id: __sdk::__query_builder::IxCol::new(table_name, "session_id"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl __sdk::__query_builder::CanBeLookupTable for VisualNovelAgentSessionRow {}
|
||||
@@ -0,0 +1,166 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use super::visual_novel_agent_session_row_type::VisualNovelAgentSessionRow;
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
/// Table handle for the table `visual_novel_agent_session`.
|
||||
///
|
||||
/// Obtain a handle from the [`VisualNovelAgentSessionTableAccess::visual_novel_agent_session`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.visual_novel_agent_session()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.visual_novel_agent_session().on_insert(...)`.
|
||||
pub struct VisualNovelAgentSessionTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<VisualNovelAgentSessionRow>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `visual_novel_agent_session`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait VisualNovelAgentSessionTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`VisualNovelAgentSessionTableHandle`], which mediates access to the table `visual_novel_agent_session`.
|
||||
fn visual_novel_agent_session(&self) -> VisualNovelAgentSessionTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl VisualNovelAgentSessionTableAccess for super::RemoteTables {
|
||||
fn visual_novel_agent_session(&self) -> VisualNovelAgentSessionTableHandle<'_> {
|
||||
VisualNovelAgentSessionTableHandle {
|
||||
imp: self
|
||||
.imp
|
||||
.get_table::<VisualNovelAgentSessionRow>("visual_novel_agent_session"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct VisualNovelAgentSessionInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct VisualNovelAgentSessionDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for VisualNovelAgentSessionTableHandle<'ctx> {
|
||||
type Row = VisualNovelAgentSessionRow;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 {
|
||||
self.imp.count()
|
||||
}
|
||||
fn iter(&self) -> impl Iterator<Item = VisualNovelAgentSessionRow> + '_ {
|
||||
self.imp.iter()
|
||||
}
|
||||
|
||||
type InsertCallbackId = VisualNovelAgentSessionInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> VisualNovelAgentSessionInsertCallbackId {
|
||||
VisualNovelAgentSessionInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: VisualNovelAgentSessionInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = VisualNovelAgentSessionDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> VisualNovelAgentSessionDeleteCallbackId {
|
||||
VisualNovelAgentSessionDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: VisualNovelAgentSessionDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct VisualNovelAgentSessionUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for VisualNovelAgentSessionTableHandle<'ctx> {
|
||||
type UpdateCallbackId = VisualNovelAgentSessionUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> VisualNovelAgentSessionUpdateCallbackId {
|
||||
VisualNovelAgentSessionUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: VisualNovelAgentSessionUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `session_id` unique index on the table `visual_novel_agent_session`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`VisualNovelAgentSessionSessionIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.visual_novel_agent_session().session_id().find(...)`.
|
||||
pub struct VisualNovelAgentSessionSessionIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<VisualNovelAgentSessionRow, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> VisualNovelAgentSessionTableHandle<'ctx> {
|
||||
/// Get a handle on the `session_id` unique index on the table `visual_novel_agent_session`.
|
||||
pub fn session_id(&self) -> VisualNovelAgentSessionSessionIdUnique<'ctx> {
|
||||
VisualNovelAgentSessionSessionIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("session_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> VisualNovelAgentSessionSessionIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `session_id` column value is equal to `col_val`,
|
||||
/// if such a row is present in the client cache.
|
||||
pub fn find(&self, col_val: &String) -> Option<VisualNovelAgentSessionRow> {
|
||||
self.imp.find(col_val)
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn register_table(client_cache: &mut __sdk::ClientCache<super::RemoteModule>) {
|
||||
let _table =
|
||||
client_cache.get_or_make_table::<VisualNovelAgentSessionRow>("visual_novel_agent_session");
|
||||
_table.add_unique_constraint::<String>("session_id", |row| &row.session_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<VisualNovelAgentSessionRow>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse("TableUpdate<VisualNovelAgentSessionRow>", "TableUpdate")
|
||||
.with_cause(e)
|
||||
.into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `VisualNovelAgentSessionRow`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait visual_novel_agent_sessionQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `VisualNovelAgentSessionRow`.
|
||||
fn visual_novel_agent_session(
|
||||
&self,
|
||||
) -> __sdk::__query_builder::Table<VisualNovelAgentSessionRow>;
|
||||
}
|
||||
|
||||
impl visual_novel_agent_sessionQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn visual_novel_agent_session(
|
||||
&self,
|
||||
) -> __sdk::__query_builder::Table<VisualNovelAgentSessionRow> {
|
||||
__sdk::__query_builder::Table::new("visual_novel_agent_session")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelHistoryProcedureResult {
|
||||
pub ok: bool,
|
||||
pub items_json: Option<String>,
|
||||
pub error_message: Option<String>,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelHistoryProcedureResult {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelRunGetInput {
|
||||
pub run_id: String,
|
||||
pub owner_user_id: String,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelRunGetInput {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelRunProcedureResult {
|
||||
pub ok: bool,
|
||||
pub run_json: Option<String>,
|
||||
pub error_message: Option<String>,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelRunProcedureResult {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelRunSnapshotUpsertInput {
|
||||
pub run_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub status: String,
|
||||
pub current_scene_id: Option<String>,
|
||||
pub current_phase_id: Option<String>,
|
||||
pub visible_character_ids_json: String,
|
||||
pub flags_json: String,
|
||||
pub metrics_json: String,
|
||||
pub available_choices_json: String,
|
||||
pub text_mode_enabled: bool,
|
||||
pub snapshot_json: Option<String>,
|
||||
pub updated_at_micros: i64,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelRunSnapshotUpsertInput {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelRunStartInput {
|
||||
pub run_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub profile_id: String,
|
||||
pub mode: String,
|
||||
pub snapshot_json: Option<String>,
|
||||
pub started_at_micros: i64,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelRunStartInput {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelRuntimeEventProcedureResult {
|
||||
pub ok: bool,
|
||||
pub event_json: Option<String>,
|
||||
pub error_message: Option<String>,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelRuntimeEventProcedureResult {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelRuntimeEventRecordInput {
|
||||
pub event_id: String,
|
||||
pub run_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub profile_id: Option<String>,
|
||||
pub event_kind: String,
|
||||
pub client_event_id: Option<String>,
|
||||
pub history_entry_id: Option<String>,
|
||||
pub payload_json: String,
|
||||
pub occurred_at_micros: i64,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelRuntimeEventRecordInput {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use super::visual_novel_runtime_event_type::VisualNovelRuntimeEvent;
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
/// Table handle for the table `visual_novel_runtime_event`.
|
||||
///
|
||||
/// Obtain a handle from the [`VisualNovelRuntimeEventTableAccess::visual_novel_runtime_event`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.visual_novel_runtime_event()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.visual_novel_runtime_event().on_insert(...)`.
|
||||
pub struct VisualNovelRuntimeEventTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<VisualNovelRuntimeEvent>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `visual_novel_runtime_event`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait VisualNovelRuntimeEventTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`VisualNovelRuntimeEventTableHandle`], which mediates access to the table `visual_novel_runtime_event`.
|
||||
fn visual_novel_runtime_event(&self) -> VisualNovelRuntimeEventTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl VisualNovelRuntimeEventTableAccess for super::RemoteTables {
|
||||
fn visual_novel_runtime_event(&self) -> VisualNovelRuntimeEventTableHandle<'_> {
|
||||
VisualNovelRuntimeEventTableHandle {
|
||||
imp: self
|
||||
.imp
|
||||
.get_table::<VisualNovelRuntimeEvent>("visual_novel_runtime_event"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct VisualNovelRuntimeEventInsertCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::EventTable for VisualNovelRuntimeEventTableHandle<'ctx> {
|
||||
type Row = VisualNovelRuntimeEvent;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 {
|
||||
self.imp.count()
|
||||
}
|
||||
fn iter(&self) -> impl Iterator<Item = VisualNovelRuntimeEvent> + '_ {
|
||||
self.imp.iter()
|
||||
}
|
||||
|
||||
type InsertCallbackId = VisualNovelRuntimeEventInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> VisualNovelRuntimeEventInsertCallbackId {
|
||||
VisualNovelRuntimeEventInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: VisualNovelRuntimeEventInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn register_table(client_cache: &mut __sdk::ClientCache<super::RemoteModule>) {
|
||||
let _table =
|
||||
client_cache.get_or_make_table::<VisualNovelRuntimeEvent>("visual_novel_runtime_event");
|
||||
_table.add_unique_constraint::<String>("event_id", |row| &row.event_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<VisualNovelRuntimeEvent>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse("TableUpdate<VisualNovelRuntimeEvent>", "TableUpdate")
|
||||
.with_cause(e)
|
||||
.into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `VisualNovelRuntimeEvent`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait visual_novel_runtime_eventQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `VisualNovelRuntimeEvent`.
|
||||
fn visual_novel_runtime_event(&self) -> __sdk::__query_builder::Table<VisualNovelRuntimeEvent>;
|
||||
}
|
||||
|
||||
impl visual_novel_runtime_eventQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn visual_novel_runtime_event(&self) -> __sdk::__query_builder::Table<VisualNovelRuntimeEvent> {
|
||||
__sdk::__query_builder::Table::new("visual_novel_runtime_event")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelRuntimeEvent {
|
||||
pub event_id: String,
|
||||
pub run_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub profile_id: String,
|
||||
pub event_kind: String,
|
||||
pub client_event_id: String,
|
||||
pub history_entry_id: String,
|
||||
pub payload_json: String,
|
||||
pub occurred_at: __sdk::Timestamp,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelRuntimeEvent {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
/// Column accessor struct for the table `VisualNovelRuntimeEvent`.
|
||||
///
|
||||
/// Provides typed access to columns for query building.
|
||||
pub struct VisualNovelRuntimeEventCols {
|
||||
pub event_id: __sdk::__query_builder::Col<VisualNovelRuntimeEvent, String>,
|
||||
pub run_id: __sdk::__query_builder::Col<VisualNovelRuntimeEvent, String>,
|
||||
pub owner_user_id: __sdk::__query_builder::Col<VisualNovelRuntimeEvent, String>,
|
||||
pub profile_id: __sdk::__query_builder::Col<VisualNovelRuntimeEvent, String>,
|
||||
pub event_kind: __sdk::__query_builder::Col<VisualNovelRuntimeEvent, String>,
|
||||
pub client_event_id: __sdk::__query_builder::Col<VisualNovelRuntimeEvent, String>,
|
||||
pub history_entry_id: __sdk::__query_builder::Col<VisualNovelRuntimeEvent, String>,
|
||||
pub payload_json: __sdk::__query_builder::Col<VisualNovelRuntimeEvent, String>,
|
||||
pub occurred_at: __sdk::__query_builder::Col<VisualNovelRuntimeEvent, __sdk::Timestamp>,
|
||||
}
|
||||
|
||||
impl __sdk::__query_builder::HasCols for VisualNovelRuntimeEvent {
|
||||
type Cols = VisualNovelRuntimeEventCols;
|
||||
fn cols(table_name: &'static str) -> Self::Cols {
|
||||
VisualNovelRuntimeEventCols {
|
||||
event_id: __sdk::__query_builder::Col::new(table_name, "event_id"),
|
||||
run_id: __sdk::__query_builder::Col::new(table_name, "run_id"),
|
||||
owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"),
|
||||
profile_id: __sdk::__query_builder::Col::new(table_name, "profile_id"),
|
||||
event_kind: __sdk::__query_builder::Col::new(table_name, "event_kind"),
|
||||
client_event_id: __sdk::__query_builder::Col::new(table_name, "client_event_id"),
|
||||
history_entry_id: __sdk::__query_builder::Col::new(table_name, "history_entry_id"),
|
||||
payload_json: __sdk::__query_builder::Col::new(table_name, "payload_json"),
|
||||
occurred_at: __sdk::__query_builder::Col::new(table_name, "occurred_at"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Indexed column accessor struct for the table `VisualNovelRuntimeEvent`.
|
||||
///
|
||||
/// Provides typed access to indexed columns for query building.
|
||||
pub struct VisualNovelRuntimeEventIxCols {
|
||||
pub event_id: __sdk::__query_builder::IxCol<VisualNovelRuntimeEvent, String>,
|
||||
pub owner_user_id: __sdk::__query_builder::IxCol<VisualNovelRuntimeEvent, String>,
|
||||
pub run_id: __sdk::__query_builder::IxCol<VisualNovelRuntimeEvent, String>,
|
||||
}
|
||||
|
||||
impl __sdk::__query_builder::HasIxCols for VisualNovelRuntimeEvent {
|
||||
type IxCols = VisualNovelRuntimeEventIxCols;
|
||||
fn ix_cols(table_name: &'static str) -> Self::IxCols {
|
||||
VisualNovelRuntimeEventIxCols {
|
||||
event_id: __sdk::__query_builder::IxCol::new(table_name, "event_id"),
|
||||
owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"),
|
||||
run_id: __sdk::__query_builder::IxCol::new(table_name, "run_id"),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelRuntimeHistoryAppendInput {
|
||||
pub entry_id: String,
|
||||
pub run_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub turn_index: u32,
|
||||
pub source: String,
|
||||
pub action_text: Option<String>,
|
||||
pub steps_json: String,
|
||||
pub snapshot_before_hash: Option<String>,
|
||||
pub snapshot_after_hash: Option<String>,
|
||||
pub created_at_micros: i64,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelRuntimeHistoryAppendInput {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelRuntimeHistoryEntryRow {
|
||||
pub entry_id: String,
|
||||
pub run_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub profile_id: String,
|
||||
pub turn_index: u32,
|
||||
pub source: String,
|
||||
pub action_text: String,
|
||||
pub steps_json: String,
|
||||
pub snapshot_before_hash: String,
|
||||
pub snapshot_after_hash: String,
|
||||
pub created_at: __sdk::Timestamp,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelRuntimeHistoryEntryRow {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
/// Column accessor struct for the table `VisualNovelRuntimeHistoryEntryRow`.
|
||||
///
|
||||
/// Provides typed access to columns for query building.
|
||||
pub struct VisualNovelRuntimeHistoryEntryRowCols {
|
||||
pub entry_id: __sdk::__query_builder::Col<VisualNovelRuntimeHistoryEntryRow, String>,
|
||||
pub run_id: __sdk::__query_builder::Col<VisualNovelRuntimeHistoryEntryRow, String>,
|
||||
pub owner_user_id: __sdk::__query_builder::Col<VisualNovelRuntimeHistoryEntryRow, String>,
|
||||
pub profile_id: __sdk::__query_builder::Col<VisualNovelRuntimeHistoryEntryRow, String>,
|
||||
pub turn_index: __sdk::__query_builder::Col<VisualNovelRuntimeHistoryEntryRow, u32>,
|
||||
pub source: __sdk::__query_builder::Col<VisualNovelRuntimeHistoryEntryRow, String>,
|
||||
pub action_text: __sdk::__query_builder::Col<VisualNovelRuntimeHistoryEntryRow, String>,
|
||||
pub steps_json: __sdk::__query_builder::Col<VisualNovelRuntimeHistoryEntryRow, String>,
|
||||
pub snapshot_before_hash:
|
||||
__sdk::__query_builder::Col<VisualNovelRuntimeHistoryEntryRow, String>,
|
||||
pub snapshot_after_hash: __sdk::__query_builder::Col<VisualNovelRuntimeHistoryEntryRow, String>,
|
||||
pub created_at:
|
||||
__sdk::__query_builder::Col<VisualNovelRuntimeHistoryEntryRow, __sdk::Timestamp>,
|
||||
}
|
||||
|
||||
impl __sdk::__query_builder::HasCols for VisualNovelRuntimeHistoryEntryRow {
|
||||
type Cols = VisualNovelRuntimeHistoryEntryRowCols;
|
||||
fn cols(table_name: &'static str) -> Self::Cols {
|
||||
VisualNovelRuntimeHistoryEntryRowCols {
|
||||
entry_id: __sdk::__query_builder::Col::new(table_name, "entry_id"),
|
||||
run_id: __sdk::__query_builder::Col::new(table_name, "run_id"),
|
||||
owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"),
|
||||
profile_id: __sdk::__query_builder::Col::new(table_name, "profile_id"),
|
||||
turn_index: __sdk::__query_builder::Col::new(table_name, "turn_index"),
|
||||
source: __sdk::__query_builder::Col::new(table_name, "source"),
|
||||
action_text: __sdk::__query_builder::Col::new(table_name, "action_text"),
|
||||
steps_json: __sdk::__query_builder::Col::new(table_name, "steps_json"),
|
||||
snapshot_before_hash: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"snapshot_before_hash",
|
||||
),
|
||||
snapshot_after_hash: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"snapshot_after_hash",
|
||||
),
|
||||
created_at: __sdk::__query_builder::Col::new(table_name, "created_at"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Indexed column accessor struct for the table `VisualNovelRuntimeHistoryEntryRow`.
|
||||
///
|
||||
/// Provides typed access to indexed columns for query building.
|
||||
pub struct VisualNovelRuntimeHistoryEntryRowIxCols {
|
||||
pub entry_id: __sdk::__query_builder::IxCol<VisualNovelRuntimeHistoryEntryRow, String>,
|
||||
pub owner_user_id: __sdk::__query_builder::IxCol<VisualNovelRuntimeHistoryEntryRow, String>,
|
||||
pub run_id: __sdk::__query_builder::IxCol<VisualNovelRuntimeHistoryEntryRow, String>,
|
||||
}
|
||||
|
||||
impl __sdk::__query_builder::HasIxCols for VisualNovelRuntimeHistoryEntryRow {
|
||||
type IxCols = VisualNovelRuntimeHistoryEntryRowIxCols;
|
||||
fn ix_cols(table_name: &'static str) -> Self::IxCols {
|
||||
VisualNovelRuntimeHistoryEntryRowIxCols {
|
||||
entry_id: __sdk::__query_builder::IxCol::new(table_name, "entry_id"),
|
||||
owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"),
|
||||
run_id: __sdk::__query_builder::IxCol::new(table_name, "run_id"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl __sdk::__query_builder::CanBeLookupTable for VisualNovelRuntimeHistoryEntryRow {}
|
||||
@@ -0,0 +1,170 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use super::visual_novel_runtime_history_entry_row_type::VisualNovelRuntimeHistoryEntryRow;
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
/// Table handle for the table `visual_novel_runtime_history_entry`.
|
||||
///
|
||||
/// Obtain a handle from the [`VisualNovelRuntimeHistoryEntryTableAccess::visual_novel_runtime_history_entry`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.visual_novel_runtime_history_entry()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.visual_novel_runtime_history_entry().on_insert(...)`.
|
||||
pub struct VisualNovelRuntimeHistoryEntryTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<VisualNovelRuntimeHistoryEntryRow>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `visual_novel_runtime_history_entry`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait VisualNovelRuntimeHistoryEntryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`VisualNovelRuntimeHistoryEntryTableHandle`], which mediates access to the table `visual_novel_runtime_history_entry`.
|
||||
fn visual_novel_runtime_history_entry(&self) -> VisualNovelRuntimeHistoryEntryTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl VisualNovelRuntimeHistoryEntryTableAccess for super::RemoteTables {
|
||||
fn visual_novel_runtime_history_entry(&self) -> VisualNovelRuntimeHistoryEntryTableHandle<'_> {
|
||||
VisualNovelRuntimeHistoryEntryTableHandle {
|
||||
imp: self.imp.get_table::<VisualNovelRuntimeHistoryEntryRow>(
|
||||
"visual_novel_runtime_history_entry",
|
||||
),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct VisualNovelRuntimeHistoryEntryInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct VisualNovelRuntimeHistoryEntryDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for VisualNovelRuntimeHistoryEntryTableHandle<'ctx> {
|
||||
type Row = VisualNovelRuntimeHistoryEntryRow;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 {
|
||||
self.imp.count()
|
||||
}
|
||||
fn iter(&self) -> impl Iterator<Item = VisualNovelRuntimeHistoryEntryRow> + '_ {
|
||||
self.imp.iter()
|
||||
}
|
||||
|
||||
type InsertCallbackId = VisualNovelRuntimeHistoryEntryInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> VisualNovelRuntimeHistoryEntryInsertCallbackId {
|
||||
VisualNovelRuntimeHistoryEntryInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: VisualNovelRuntimeHistoryEntryInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = VisualNovelRuntimeHistoryEntryDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> VisualNovelRuntimeHistoryEntryDeleteCallbackId {
|
||||
VisualNovelRuntimeHistoryEntryDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: VisualNovelRuntimeHistoryEntryDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct VisualNovelRuntimeHistoryEntryUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for VisualNovelRuntimeHistoryEntryTableHandle<'ctx> {
|
||||
type UpdateCallbackId = VisualNovelRuntimeHistoryEntryUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> VisualNovelRuntimeHistoryEntryUpdateCallbackId {
|
||||
VisualNovelRuntimeHistoryEntryUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: VisualNovelRuntimeHistoryEntryUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `entry_id` unique index on the table `visual_novel_runtime_history_entry`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`VisualNovelRuntimeHistoryEntryEntryIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.visual_novel_runtime_history_entry().entry_id().find(...)`.
|
||||
pub struct VisualNovelRuntimeHistoryEntryEntryIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<VisualNovelRuntimeHistoryEntryRow, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> VisualNovelRuntimeHistoryEntryTableHandle<'ctx> {
|
||||
/// Get a handle on the `entry_id` unique index on the table `visual_novel_runtime_history_entry`.
|
||||
pub fn entry_id(&self) -> VisualNovelRuntimeHistoryEntryEntryIdUnique<'ctx> {
|
||||
VisualNovelRuntimeHistoryEntryEntryIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("entry_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> VisualNovelRuntimeHistoryEntryEntryIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `entry_id` column value is equal to `col_val`,
|
||||
/// if such a row is present in the client cache.
|
||||
pub fn find(&self, col_val: &String) -> Option<VisualNovelRuntimeHistoryEntryRow> {
|
||||
self.imp.find(col_val)
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn register_table(client_cache: &mut __sdk::ClientCache<super::RemoteModule>) {
|
||||
let _table = client_cache.get_or_make_table::<VisualNovelRuntimeHistoryEntryRow>(
|
||||
"visual_novel_runtime_history_entry",
|
||||
);
|
||||
_table.add_unique_constraint::<String>("entry_id", |row| &row.entry_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<VisualNovelRuntimeHistoryEntryRow>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse(
|
||||
"TableUpdate<VisualNovelRuntimeHistoryEntryRow>",
|
||||
"TableUpdate",
|
||||
)
|
||||
.with_cause(e)
|
||||
.into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `VisualNovelRuntimeHistoryEntryRow`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait visual_novel_runtime_history_entryQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `VisualNovelRuntimeHistoryEntryRow`.
|
||||
fn visual_novel_runtime_history_entry(
|
||||
&self,
|
||||
) -> __sdk::__query_builder::Table<VisualNovelRuntimeHistoryEntryRow>;
|
||||
}
|
||||
|
||||
impl visual_novel_runtime_history_entryQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn visual_novel_runtime_history_entry(
|
||||
&self,
|
||||
) -> __sdk::__query_builder::Table<VisualNovelRuntimeHistoryEntryRow> {
|
||||
__sdk::__query_builder::Table::new("visual_novel_runtime_history_entry")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelRuntimeHistoryListInput {
|
||||
pub run_id: String,
|
||||
pub owner_user_id: String,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelRuntimeHistoryListInput {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelRuntimeRunRow {
|
||||
pub run_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub profile_id: String,
|
||||
pub mode: String,
|
||||
pub status: String,
|
||||
pub current_scene_id: String,
|
||||
pub current_phase_id: String,
|
||||
pub visible_character_ids_json: String,
|
||||
pub flags_json: String,
|
||||
pub metrics_json: String,
|
||||
pub available_choices_json: String,
|
||||
pub text_mode_enabled: bool,
|
||||
pub snapshot_json: String,
|
||||
pub created_at: __sdk::Timestamp,
|
||||
pub updated_at: __sdk::Timestamp,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelRuntimeRunRow {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
/// Column accessor struct for the table `VisualNovelRuntimeRunRow`.
|
||||
///
|
||||
/// Provides typed access to columns for query building.
|
||||
pub struct VisualNovelRuntimeRunRowCols {
|
||||
pub run_id: __sdk::__query_builder::Col<VisualNovelRuntimeRunRow, String>,
|
||||
pub owner_user_id: __sdk::__query_builder::Col<VisualNovelRuntimeRunRow, String>,
|
||||
pub profile_id: __sdk::__query_builder::Col<VisualNovelRuntimeRunRow, String>,
|
||||
pub mode: __sdk::__query_builder::Col<VisualNovelRuntimeRunRow, String>,
|
||||
pub status: __sdk::__query_builder::Col<VisualNovelRuntimeRunRow, String>,
|
||||
pub current_scene_id: __sdk::__query_builder::Col<VisualNovelRuntimeRunRow, String>,
|
||||
pub current_phase_id: __sdk::__query_builder::Col<VisualNovelRuntimeRunRow, String>,
|
||||
pub visible_character_ids_json: __sdk::__query_builder::Col<VisualNovelRuntimeRunRow, String>,
|
||||
pub flags_json: __sdk::__query_builder::Col<VisualNovelRuntimeRunRow, String>,
|
||||
pub metrics_json: __sdk::__query_builder::Col<VisualNovelRuntimeRunRow, String>,
|
||||
pub available_choices_json: __sdk::__query_builder::Col<VisualNovelRuntimeRunRow, String>,
|
||||
pub text_mode_enabled: __sdk::__query_builder::Col<VisualNovelRuntimeRunRow, bool>,
|
||||
pub snapshot_json: __sdk::__query_builder::Col<VisualNovelRuntimeRunRow, String>,
|
||||
pub created_at: __sdk::__query_builder::Col<VisualNovelRuntimeRunRow, __sdk::Timestamp>,
|
||||
pub updated_at: __sdk::__query_builder::Col<VisualNovelRuntimeRunRow, __sdk::Timestamp>,
|
||||
}
|
||||
|
||||
impl __sdk::__query_builder::HasCols for VisualNovelRuntimeRunRow {
|
||||
type Cols = VisualNovelRuntimeRunRowCols;
|
||||
fn cols(table_name: &'static str) -> Self::Cols {
|
||||
VisualNovelRuntimeRunRowCols {
|
||||
run_id: __sdk::__query_builder::Col::new(table_name, "run_id"),
|
||||
owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"),
|
||||
profile_id: __sdk::__query_builder::Col::new(table_name, "profile_id"),
|
||||
mode: __sdk::__query_builder::Col::new(table_name, "mode"),
|
||||
status: __sdk::__query_builder::Col::new(table_name, "status"),
|
||||
current_scene_id: __sdk::__query_builder::Col::new(table_name, "current_scene_id"),
|
||||
current_phase_id: __sdk::__query_builder::Col::new(table_name, "current_phase_id"),
|
||||
visible_character_ids_json: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"visible_character_ids_json",
|
||||
),
|
||||
flags_json: __sdk::__query_builder::Col::new(table_name, "flags_json"),
|
||||
metrics_json: __sdk::__query_builder::Col::new(table_name, "metrics_json"),
|
||||
available_choices_json: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"available_choices_json",
|
||||
),
|
||||
text_mode_enabled: __sdk::__query_builder::Col::new(table_name, "text_mode_enabled"),
|
||||
snapshot_json: __sdk::__query_builder::Col::new(table_name, "snapshot_json"),
|
||||
created_at: __sdk::__query_builder::Col::new(table_name, "created_at"),
|
||||
updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Indexed column accessor struct for the table `VisualNovelRuntimeRunRow`.
|
||||
///
|
||||
/// Provides typed access to indexed columns for query building.
|
||||
pub struct VisualNovelRuntimeRunRowIxCols {
|
||||
pub owner_user_id: __sdk::__query_builder::IxCol<VisualNovelRuntimeRunRow, String>,
|
||||
pub profile_id: __sdk::__query_builder::IxCol<VisualNovelRuntimeRunRow, String>,
|
||||
pub run_id: __sdk::__query_builder::IxCol<VisualNovelRuntimeRunRow, String>,
|
||||
}
|
||||
|
||||
impl __sdk::__query_builder::HasIxCols for VisualNovelRuntimeRunRow {
|
||||
type IxCols = VisualNovelRuntimeRunRowIxCols;
|
||||
fn ix_cols(table_name: &'static str) -> Self::IxCols {
|
||||
VisualNovelRuntimeRunRowIxCols {
|
||||
owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"),
|
||||
profile_id: __sdk::__query_builder::IxCol::new(table_name, "profile_id"),
|
||||
run_id: __sdk::__query_builder::IxCol::new(table_name, "run_id"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl __sdk::__query_builder::CanBeLookupTable for VisualNovelRuntimeRunRow {}
|
||||
@@ -0,0 +1,162 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use super::visual_novel_runtime_run_row_type::VisualNovelRuntimeRunRow;
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
/// Table handle for the table `visual_novel_runtime_run`.
|
||||
///
|
||||
/// Obtain a handle from the [`VisualNovelRuntimeRunTableAccess::visual_novel_runtime_run`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.visual_novel_runtime_run()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.visual_novel_runtime_run().on_insert(...)`.
|
||||
pub struct VisualNovelRuntimeRunTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<VisualNovelRuntimeRunRow>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `visual_novel_runtime_run`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait VisualNovelRuntimeRunTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`VisualNovelRuntimeRunTableHandle`], which mediates access to the table `visual_novel_runtime_run`.
|
||||
fn visual_novel_runtime_run(&self) -> VisualNovelRuntimeRunTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl VisualNovelRuntimeRunTableAccess for super::RemoteTables {
|
||||
fn visual_novel_runtime_run(&self) -> VisualNovelRuntimeRunTableHandle<'_> {
|
||||
VisualNovelRuntimeRunTableHandle {
|
||||
imp: self
|
||||
.imp
|
||||
.get_table::<VisualNovelRuntimeRunRow>("visual_novel_runtime_run"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct VisualNovelRuntimeRunInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct VisualNovelRuntimeRunDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for VisualNovelRuntimeRunTableHandle<'ctx> {
|
||||
type Row = VisualNovelRuntimeRunRow;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 {
|
||||
self.imp.count()
|
||||
}
|
||||
fn iter(&self) -> impl Iterator<Item = VisualNovelRuntimeRunRow> + '_ {
|
||||
self.imp.iter()
|
||||
}
|
||||
|
||||
type InsertCallbackId = VisualNovelRuntimeRunInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> VisualNovelRuntimeRunInsertCallbackId {
|
||||
VisualNovelRuntimeRunInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: VisualNovelRuntimeRunInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = VisualNovelRuntimeRunDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> VisualNovelRuntimeRunDeleteCallbackId {
|
||||
VisualNovelRuntimeRunDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: VisualNovelRuntimeRunDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct VisualNovelRuntimeRunUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for VisualNovelRuntimeRunTableHandle<'ctx> {
|
||||
type UpdateCallbackId = VisualNovelRuntimeRunUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> VisualNovelRuntimeRunUpdateCallbackId {
|
||||
VisualNovelRuntimeRunUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: VisualNovelRuntimeRunUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `run_id` unique index on the table `visual_novel_runtime_run`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`VisualNovelRuntimeRunRunIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.visual_novel_runtime_run().run_id().find(...)`.
|
||||
pub struct VisualNovelRuntimeRunRunIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<VisualNovelRuntimeRunRow, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> VisualNovelRuntimeRunTableHandle<'ctx> {
|
||||
/// Get a handle on the `run_id` unique index on the table `visual_novel_runtime_run`.
|
||||
pub fn run_id(&self) -> VisualNovelRuntimeRunRunIdUnique<'ctx> {
|
||||
VisualNovelRuntimeRunRunIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("run_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> VisualNovelRuntimeRunRunIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `run_id` column value is equal to `col_val`,
|
||||
/// if such a row is present in the client cache.
|
||||
pub fn find(&self, col_val: &String) -> Option<VisualNovelRuntimeRunRow> {
|
||||
self.imp.find(col_val)
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn register_table(client_cache: &mut __sdk::ClientCache<super::RemoteModule>) {
|
||||
let _table =
|
||||
client_cache.get_or_make_table::<VisualNovelRuntimeRunRow>("visual_novel_runtime_run");
|
||||
_table.add_unique_constraint::<String>("run_id", |row| &row.run_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<VisualNovelRuntimeRunRow>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse("TableUpdate<VisualNovelRuntimeRunRow>", "TableUpdate")
|
||||
.with_cause(e)
|
||||
.into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `VisualNovelRuntimeRunRow`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait visual_novel_runtime_runQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `VisualNovelRuntimeRunRow`.
|
||||
fn visual_novel_runtime_run(&self) -> __sdk::__query_builder::Table<VisualNovelRuntimeRunRow>;
|
||||
}
|
||||
|
||||
impl visual_novel_runtime_runQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn visual_novel_runtime_run(&self) -> __sdk::__query_builder::Table<VisualNovelRuntimeRunRow> {
|
||||
__sdk::__query_builder::Table::new("visual_novel_runtime_run")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelWorkCompileInput {
|
||||
pub session_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub profile_id: String,
|
||||
pub work_id: Option<String>,
|
||||
pub author_display_name: String,
|
||||
pub work_title: Option<String>,
|
||||
pub work_description: Option<String>,
|
||||
pub tags_json: Option<String>,
|
||||
pub cover_image_src: Option<String>,
|
||||
pub compiled_at_micros: i64,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelWorkCompileInput {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelWorkDeleteInput {
|
||||
pub profile_id: String,
|
||||
pub owner_user_id: String,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelWorkDeleteInput {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelWorkGetInput {
|
||||
pub profile_id: String,
|
||||
pub owner_user_id: String,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelWorkGetInput {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelWorkProcedureResult {
|
||||
pub ok: bool,
|
||||
pub work_json: Option<String>,
|
||||
pub error_message: Option<String>,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelWorkProcedureResult {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelWorkProfileRow {
|
||||
pub profile_id: String,
|
||||
pub work_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub source_session_id: String,
|
||||
pub author_display_name: String,
|
||||
pub work_title: String,
|
||||
pub work_description: String,
|
||||
pub tags_json: String,
|
||||
pub cover_image_src: String,
|
||||
pub source_asset_ids_json: String,
|
||||
pub draft_json: String,
|
||||
pub publication_status: String,
|
||||
pub publish_ready: bool,
|
||||
pub play_count: u32,
|
||||
pub created_at: __sdk::Timestamp,
|
||||
pub updated_at: __sdk::Timestamp,
|
||||
pub published_at: Option<__sdk::Timestamp>,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelWorkProfileRow {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
/// Column accessor struct for the table `VisualNovelWorkProfileRow`.
|
||||
///
|
||||
/// Provides typed access to columns for query building.
|
||||
pub struct VisualNovelWorkProfileRowCols {
|
||||
pub profile_id: __sdk::__query_builder::Col<VisualNovelWorkProfileRow, String>,
|
||||
pub work_id: __sdk::__query_builder::Col<VisualNovelWorkProfileRow, String>,
|
||||
pub owner_user_id: __sdk::__query_builder::Col<VisualNovelWorkProfileRow, String>,
|
||||
pub source_session_id: __sdk::__query_builder::Col<VisualNovelWorkProfileRow, String>,
|
||||
pub author_display_name: __sdk::__query_builder::Col<VisualNovelWorkProfileRow, String>,
|
||||
pub work_title: __sdk::__query_builder::Col<VisualNovelWorkProfileRow, String>,
|
||||
pub work_description: __sdk::__query_builder::Col<VisualNovelWorkProfileRow, String>,
|
||||
pub tags_json: __sdk::__query_builder::Col<VisualNovelWorkProfileRow, String>,
|
||||
pub cover_image_src: __sdk::__query_builder::Col<VisualNovelWorkProfileRow, String>,
|
||||
pub source_asset_ids_json: __sdk::__query_builder::Col<VisualNovelWorkProfileRow, String>,
|
||||
pub draft_json: __sdk::__query_builder::Col<VisualNovelWorkProfileRow, String>,
|
||||
pub publication_status: __sdk::__query_builder::Col<VisualNovelWorkProfileRow, String>,
|
||||
pub publish_ready: __sdk::__query_builder::Col<VisualNovelWorkProfileRow, bool>,
|
||||
pub play_count: __sdk::__query_builder::Col<VisualNovelWorkProfileRow, u32>,
|
||||
pub created_at: __sdk::__query_builder::Col<VisualNovelWorkProfileRow, __sdk::Timestamp>,
|
||||
pub updated_at: __sdk::__query_builder::Col<VisualNovelWorkProfileRow, __sdk::Timestamp>,
|
||||
pub published_at:
|
||||
__sdk::__query_builder::Col<VisualNovelWorkProfileRow, Option<__sdk::Timestamp>>,
|
||||
}
|
||||
|
||||
impl __sdk::__query_builder::HasCols for VisualNovelWorkProfileRow {
|
||||
type Cols = VisualNovelWorkProfileRowCols;
|
||||
fn cols(table_name: &'static str) -> Self::Cols {
|
||||
VisualNovelWorkProfileRowCols {
|
||||
profile_id: __sdk::__query_builder::Col::new(table_name, "profile_id"),
|
||||
work_id: __sdk::__query_builder::Col::new(table_name, "work_id"),
|
||||
owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"),
|
||||
source_session_id: __sdk::__query_builder::Col::new(table_name, "source_session_id"),
|
||||
author_display_name: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"author_display_name",
|
||||
),
|
||||
work_title: __sdk::__query_builder::Col::new(table_name, "work_title"),
|
||||
work_description: __sdk::__query_builder::Col::new(table_name, "work_description"),
|
||||
tags_json: __sdk::__query_builder::Col::new(table_name, "tags_json"),
|
||||
cover_image_src: __sdk::__query_builder::Col::new(table_name, "cover_image_src"),
|
||||
source_asset_ids_json: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"source_asset_ids_json",
|
||||
),
|
||||
draft_json: __sdk::__query_builder::Col::new(table_name, "draft_json"),
|
||||
publication_status: __sdk::__query_builder::Col::new(table_name, "publication_status"),
|
||||
publish_ready: __sdk::__query_builder::Col::new(table_name, "publish_ready"),
|
||||
play_count: __sdk::__query_builder::Col::new(table_name, "play_count"),
|
||||
created_at: __sdk::__query_builder::Col::new(table_name, "created_at"),
|
||||
updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"),
|
||||
published_at: __sdk::__query_builder::Col::new(table_name, "published_at"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Indexed column accessor struct for the table `VisualNovelWorkProfileRow`.
|
||||
///
|
||||
/// Provides typed access to indexed columns for query building.
|
||||
pub struct VisualNovelWorkProfileRowIxCols {
|
||||
pub owner_user_id: __sdk::__query_builder::IxCol<VisualNovelWorkProfileRow, String>,
|
||||
pub profile_id: __sdk::__query_builder::IxCol<VisualNovelWorkProfileRow, String>,
|
||||
pub publication_status: __sdk::__query_builder::IxCol<VisualNovelWorkProfileRow, String>,
|
||||
}
|
||||
|
||||
impl __sdk::__query_builder::HasIxCols for VisualNovelWorkProfileRow {
|
||||
type IxCols = VisualNovelWorkProfileRowIxCols;
|
||||
fn ix_cols(table_name: &'static str) -> Self::IxCols {
|
||||
VisualNovelWorkProfileRowIxCols {
|
||||
owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"),
|
||||
profile_id: __sdk::__query_builder::IxCol::new(table_name, "profile_id"),
|
||||
publication_status: __sdk::__query_builder::IxCol::new(
|
||||
table_name,
|
||||
"publication_status",
|
||||
),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl __sdk::__query_builder::CanBeLookupTable for VisualNovelWorkProfileRow {}
|
||||
@@ -0,0 +1,165 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use super::visual_novel_work_profile_row_type::VisualNovelWorkProfileRow;
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
/// Table handle for the table `visual_novel_work_profile`.
|
||||
///
|
||||
/// Obtain a handle from the [`VisualNovelWorkProfileTableAccess::visual_novel_work_profile`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.visual_novel_work_profile()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.visual_novel_work_profile().on_insert(...)`.
|
||||
pub struct VisualNovelWorkProfileTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<VisualNovelWorkProfileRow>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `visual_novel_work_profile`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait VisualNovelWorkProfileTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`VisualNovelWorkProfileTableHandle`], which mediates access to the table `visual_novel_work_profile`.
|
||||
fn visual_novel_work_profile(&self) -> VisualNovelWorkProfileTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl VisualNovelWorkProfileTableAccess for super::RemoteTables {
|
||||
fn visual_novel_work_profile(&self) -> VisualNovelWorkProfileTableHandle<'_> {
|
||||
VisualNovelWorkProfileTableHandle {
|
||||
imp: self
|
||||
.imp
|
||||
.get_table::<VisualNovelWorkProfileRow>("visual_novel_work_profile"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct VisualNovelWorkProfileInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct VisualNovelWorkProfileDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for VisualNovelWorkProfileTableHandle<'ctx> {
|
||||
type Row = VisualNovelWorkProfileRow;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 {
|
||||
self.imp.count()
|
||||
}
|
||||
fn iter(&self) -> impl Iterator<Item = VisualNovelWorkProfileRow> + '_ {
|
||||
self.imp.iter()
|
||||
}
|
||||
|
||||
type InsertCallbackId = VisualNovelWorkProfileInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> VisualNovelWorkProfileInsertCallbackId {
|
||||
VisualNovelWorkProfileInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: VisualNovelWorkProfileInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = VisualNovelWorkProfileDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> VisualNovelWorkProfileDeleteCallbackId {
|
||||
VisualNovelWorkProfileDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: VisualNovelWorkProfileDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct VisualNovelWorkProfileUpdateCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::TableWithPrimaryKey for VisualNovelWorkProfileTableHandle<'ctx> {
|
||||
type UpdateCallbackId = VisualNovelWorkProfileUpdateCallbackId;
|
||||
|
||||
fn on_update(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
|
||||
) -> VisualNovelWorkProfileUpdateCallbackId {
|
||||
VisualNovelWorkProfileUpdateCallbackId(self.imp.on_update(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_update(&self, callback: VisualNovelWorkProfileUpdateCallbackId) {
|
||||
self.imp.remove_on_update(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Access to the `profile_id` unique index on the table `visual_novel_work_profile`,
|
||||
/// which allows point queries on the field of the same name
|
||||
/// via the [`VisualNovelWorkProfileProfileIdUnique::find`] method.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.visual_novel_work_profile().profile_id().find(...)`.
|
||||
pub struct VisualNovelWorkProfileProfileIdUnique<'ctx> {
|
||||
imp: __sdk::UniqueConstraintHandle<VisualNovelWorkProfileRow, String>,
|
||||
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
impl<'ctx> VisualNovelWorkProfileTableHandle<'ctx> {
|
||||
/// Get a handle on the `profile_id` unique index on the table `visual_novel_work_profile`.
|
||||
pub fn profile_id(&self) -> VisualNovelWorkProfileProfileIdUnique<'ctx> {
|
||||
VisualNovelWorkProfileProfileIdUnique {
|
||||
imp: self.imp.get_unique_constraint::<String>("profile_id"),
|
||||
phantom: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> VisualNovelWorkProfileProfileIdUnique<'ctx> {
|
||||
/// Find the subscribed row whose `profile_id` column value is equal to `col_val`,
|
||||
/// if such a row is present in the client cache.
|
||||
pub fn find(&self, col_val: &String) -> Option<VisualNovelWorkProfileRow> {
|
||||
self.imp.find(col_val)
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn register_table(client_cache: &mut __sdk::ClientCache<super::RemoteModule>) {
|
||||
let _table =
|
||||
client_cache.get_or_make_table::<VisualNovelWorkProfileRow>("visual_novel_work_profile");
|
||||
_table.add_unique_constraint::<String>("profile_id", |row| &row.profile_id);
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<VisualNovelWorkProfileRow>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse("TableUpdate<VisualNovelWorkProfileRow>", "TableUpdate")
|
||||
.with_cause(e)
|
||||
.into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `VisualNovelWorkProfileRow`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait visual_novel_work_profileQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `VisualNovelWorkProfileRow`.
|
||||
fn visual_novel_work_profile(&self)
|
||||
-> __sdk::__query_builder::Table<VisualNovelWorkProfileRow>;
|
||||
}
|
||||
|
||||
impl visual_novel_work_profileQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn visual_novel_work_profile(
|
||||
&self,
|
||||
) -> __sdk::__query_builder::Table<VisualNovelWorkProfileRow> {
|
||||
__sdk::__query_builder::Table::new("visual_novel_work_profile")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelWorkPublishInput {
|
||||
pub profile_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub published_at_micros: i64,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelWorkPublishInput {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelWorkUpdateInput {
|
||||
pub profile_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub work_title: String,
|
||||
pub work_description: String,
|
||||
pub tags_json: String,
|
||||
pub cover_image_src: Option<String>,
|
||||
pub source_asset_ids_json: String,
|
||||
pub draft_json: String,
|
||||
pub publish_ready: bool,
|
||||
pub updated_at_micros: i64,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelWorkUpdateInput {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelWorksListInput {
|
||||
pub owner_user_id: String,
|
||||
pub published_only: bool,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelWorksListInput {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelWorksProcedureResult {
|
||||
pub ok: bool,
|
||||
pub items_json: Option<String>,
|
||||
pub error_message: Option<String>,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelWorksProcedureResult {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -361,14 +361,15 @@ impl SpacetimeClient {
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.query_analytics_metric_then(procedure_input, move |_, result| {
|
||||
connection.procedures().query_analytics_metric_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_analytics_metric_query_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
);
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
466
server-rs/crates/spacetime-client/src/visual_novel.rs
Normal file
466
server-rs/crates/spacetime-client/src/visual_novel.rs
Normal file
@@ -0,0 +1,466 @@
|
||||
use super::*;
|
||||
use crate::mapper::{
|
||||
VisualNovelAgentMessageFinalizeRecordInput, VisualNovelAgentMessageSubmitRecordInput,
|
||||
VisualNovelAgentSessionCreateRecordInput, VisualNovelAgentSessionRecord,
|
||||
VisualNovelHistoryEntryRecord, VisualNovelHistoryEntryRecordInput, VisualNovelRunRecord,
|
||||
VisualNovelRunSnapshotRecordInput, VisualNovelRunStartRecordInput,
|
||||
VisualNovelRuntimeEventRecord, VisualNovelWorkCompileRecordInput, VisualNovelWorkProfileRecord,
|
||||
VisualNovelWorkUpdateRecordInput, map_visual_novel_agent_session_procedure_result,
|
||||
map_visual_novel_history_procedure_result, map_visual_novel_run_procedure_result,
|
||||
map_visual_novel_runtime_event_procedure_result, map_visual_novel_work_procedure_result,
|
||||
map_visual_novel_works_procedure_result,
|
||||
};
|
||||
|
||||
impl SpacetimeClient {
|
||||
pub async fn create_visual_novel_agent_session(
|
||||
&self,
|
||||
input: VisualNovelAgentSessionCreateRecordInput,
|
||||
) -> Result<VisualNovelAgentSessionRecord, SpacetimeClientError> {
|
||||
let procedure_input = VisualNovelAgentSessionCreateInput {
|
||||
session_id: input.session_id,
|
||||
owner_user_id: input.owner_user_id,
|
||||
source_mode: input.source_mode,
|
||||
seed_text: input.seed_text,
|
||||
source_asset_ids_json: input.source_asset_ids_json,
|
||||
welcome_message_id: input.welcome_message_id,
|
||||
welcome_message_text: input.welcome_message_text,
|
||||
draft_json: input.draft_json,
|
||||
created_at_micros: input.created_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection.procedures().create_visual_novel_agent_session_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn get_visual_novel_agent_session(
|
||||
&self,
|
||||
session_id: String,
|
||||
owner_user_id: String,
|
||||
) -> Result<VisualNovelAgentSessionRecord, SpacetimeClientError> {
|
||||
let procedure_input = VisualNovelAgentSessionGetInput {
|
||||
session_id,
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection.procedures().get_visual_novel_agent_session_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn submit_visual_novel_agent_message(
|
||||
&self,
|
||||
input: VisualNovelAgentMessageSubmitRecordInput,
|
||||
) -> Result<VisualNovelAgentSessionRecord, SpacetimeClientError> {
|
||||
let procedure_input = VisualNovelAgentMessageSubmitInput {
|
||||
session_id: input.session_id,
|
||||
owner_user_id: input.owner_user_id,
|
||||
user_message_id: input.user_message_id,
|
||||
user_message_text: input.user_message_text,
|
||||
submitted_at_micros: input.submitted_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection.procedures().submit_visual_novel_agent_message_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn finalize_visual_novel_agent_message(
|
||||
&self,
|
||||
input: VisualNovelAgentMessageFinalizeRecordInput,
|
||||
) -> Result<VisualNovelAgentSessionRecord, SpacetimeClientError> {
|
||||
let procedure_input = VisualNovelAgentMessageFinalizeInput {
|
||||
session_id: input.session_id,
|
||||
owner_user_id: input.owner_user_id,
|
||||
assistant_message_id: input.assistant_message_id,
|
||||
assistant_reply_text: input.assistant_reply_text,
|
||||
draft_json: input.draft_json,
|
||||
pending_action_json: input.pending_action_json,
|
||||
status: input.status,
|
||||
progress_percent: input.progress_percent,
|
||||
updated_at_micros: input.updated_at_micros,
|
||||
error_message: input.error_message,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.finalize_visual_novel_agent_message_turn_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn compile_visual_novel_work_profile(
|
||||
&self,
|
||||
input: VisualNovelWorkCompileRecordInput,
|
||||
) -> Result<VisualNovelAgentSessionRecord, SpacetimeClientError> {
|
||||
let procedure_input = VisualNovelWorkCompileInput {
|
||||
session_id: input.session_id,
|
||||
owner_user_id: input.owner_user_id,
|
||||
profile_id: input.profile_id,
|
||||
work_id: input.work_id,
|
||||
author_display_name: input.author_display_name,
|
||||
work_title: input.work_title,
|
||||
work_description: input.work_description,
|
||||
tags_json: input.tags_json,
|
||||
cover_image_src: input.cover_image_src,
|
||||
compiled_at_micros: input.compiled_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection.procedures().compile_visual_novel_work_profile_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn update_visual_novel_work(
|
||||
&self,
|
||||
input: VisualNovelWorkUpdateRecordInput,
|
||||
) -> Result<VisualNovelWorkProfileRecord, SpacetimeClientError> {
|
||||
let procedure_input = VisualNovelWorkUpdateInput {
|
||||
profile_id: input.profile_id,
|
||||
owner_user_id: input.owner_user_id,
|
||||
work_title: input.work_title,
|
||||
work_description: input.work_description,
|
||||
tags_json: input.tags_json,
|
||||
cover_image_src: input.cover_image_src,
|
||||
source_asset_ids_json: input.source_asset_ids_json,
|
||||
draft_json: input.draft_json,
|
||||
publish_ready: input.publish_ready,
|
||||
updated_at_micros: input.updated_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection.procedures().update_visual_novel_work_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_work_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn publish_visual_novel_work(
|
||||
&self,
|
||||
profile_id: String,
|
||||
owner_user_id: String,
|
||||
published_at_micros: i64,
|
||||
) -> Result<VisualNovelWorkProfileRecord, SpacetimeClientError> {
|
||||
let procedure_input = VisualNovelWorkPublishInput {
|
||||
profile_id,
|
||||
owner_user_id,
|
||||
published_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection.procedures().publish_visual_novel_work_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_work_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn list_visual_novel_works(
|
||||
&self,
|
||||
owner_user_id: String,
|
||||
) -> Result<Vec<VisualNovelWorkProfileRecord>, SpacetimeClientError> {
|
||||
self.list_visual_novel_works_with_input(VisualNovelWorksListInput {
|
||||
owner_user_id,
|
||||
published_only: false,
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn list_visual_novel_gallery(
|
||||
&self,
|
||||
) -> Result<Vec<VisualNovelWorkProfileRecord>, SpacetimeClientError> {
|
||||
self.list_visual_novel_works_with_input(VisualNovelWorksListInput {
|
||||
// 中文注释:公开列表只依赖 published_only,owner_user_id 用固定值满足 procedure 输入契约。
|
||||
owner_user_id: "visual-novel-public-gallery".to_string(),
|
||||
published_only: true,
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
async fn list_visual_novel_works_with_input(
|
||||
&self,
|
||||
procedure_input: VisualNovelWorksListInput,
|
||||
) -> Result<Vec<VisualNovelWorkProfileRecord>, SpacetimeClientError> {
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection.procedures().list_visual_novel_works_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_works_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn get_visual_novel_work_detail(
|
||||
&self,
|
||||
profile_id: String,
|
||||
owner_user_id: String,
|
||||
) -> Result<VisualNovelWorkProfileRecord, SpacetimeClientError> {
|
||||
let procedure_input = VisualNovelWorkGetInput {
|
||||
profile_id,
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection.procedures().get_visual_novel_work_detail_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_work_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn delete_visual_novel_work(
|
||||
&self,
|
||||
profile_id: String,
|
||||
owner_user_id: String,
|
||||
) -> Result<Vec<VisualNovelWorkProfileRecord>, SpacetimeClientError> {
|
||||
let procedure_input = VisualNovelWorkDeleteInput {
|
||||
profile_id,
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection.procedures().delete_visual_novel_work_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_works_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn start_visual_novel_run(
|
||||
&self,
|
||||
input: VisualNovelRunStartRecordInput,
|
||||
) -> Result<VisualNovelRunRecord, SpacetimeClientError> {
|
||||
let procedure_input = VisualNovelRunStartInput {
|
||||
run_id: input.run_id,
|
||||
owner_user_id: input.owner_user_id,
|
||||
profile_id: input.profile_id,
|
||||
mode: input.mode,
|
||||
snapshot_json: input.snapshot_json,
|
||||
started_at_micros: input.started_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.start_visual_novel_run_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_run_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn get_visual_novel_run(
|
||||
&self,
|
||||
run_id: String,
|
||||
owner_user_id: String,
|
||||
) -> Result<VisualNovelRunRecord, SpacetimeClientError> {
|
||||
let procedure_input = VisualNovelRunGetInput {
|
||||
run_id,
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_visual_novel_run_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_run_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn upsert_visual_novel_run_snapshot(
|
||||
&self,
|
||||
input: VisualNovelRunSnapshotRecordInput,
|
||||
) -> Result<VisualNovelRunRecord, SpacetimeClientError> {
|
||||
let procedure_input = VisualNovelRunSnapshotUpsertInput {
|
||||
run_id: input.run_id,
|
||||
owner_user_id: input.owner_user_id,
|
||||
status: input.status,
|
||||
current_scene_id: input.current_scene_id,
|
||||
current_phase_id: input.current_phase_id,
|
||||
visible_character_ids_json: input.visible_character_ids_json,
|
||||
flags_json: input.flags_json,
|
||||
metrics_json: input.metrics_json,
|
||||
available_choices_json: input.available_choices_json,
|
||||
text_mode_enabled: input.text_mode_enabled,
|
||||
snapshot_json: input.snapshot_json,
|
||||
updated_at_micros: input.updated_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection.procedures().upsert_visual_novel_run_snapshot_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_run_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn append_visual_novel_runtime_history_entry(
|
||||
&self,
|
||||
input: VisualNovelHistoryEntryRecordInput,
|
||||
) -> Result<Vec<VisualNovelHistoryEntryRecord>, SpacetimeClientError> {
|
||||
let procedure_input = VisualNovelRuntimeHistoryAppendInput {
|
||||
entry_id: input.entry_id,
|
||||
run_id: input.run_id,
|
||||
owner_user_id: input.owner_user_id,
|
||||
turn_index: input.turn_index,
|
||||
source: input.source,
|
||||
action_text: input.action_text,
|
||||
steps_json: input.steps_json,
|
||||
snapshot_before_hash: input.snapshot_before_hash,
|
||||
snapshot_after_hash: input.snapshot_after_hash,
|
||||
created_at_micros: input.created_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.append_visual_novel_runtime_history_entry_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_history_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn list_visual_novel_runtime_history(
|
||||
&self,
|
||||
run_id: String,
|
||||
owner_user_id: String,
|
||||
) -> Result<Vec<VisualNovelHistoryEntryRecord>, SpacetimeClientError> {
|
||||
let procedure_input = VisualNovelRuntimeHistoryListInput {
|
||||
run_id,
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection.procedures().list_visual_novel_runtime_history_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_history_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn record_visual_novel_runtime_event(
|
||||
&self,
|
||||
input: crate::mapper::VisualNovelRuntimeEventRecordInput,
|
||||
) -> Result<VisualNovelRuntimeEventRecord, SpacetimeClientError> {
|
||||
let procedure_input = crate::module_bindings::VisualNovelRuntimeEventRecordInput {
|
||||
event_id: input.event_id,
|
||||
run_id: input.run_id,
|
||||
owner_user_id: input.owner_user_id,
|
||||
profile_id: input.profile_id,
|
||||
event_kind: input.event_kind,
|
||||
client_event_id: input.client_event_id,
|
||||
history_entry_id: input.history_entry_id,
|
||||
payload_json: input.payload_json,
|
||||
occurred_at_micros: input.occurred_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection.procedures().record_visual_novel_runtime_event_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_runtime_event_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
.await
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user