Merge commit '01af298c' into codex/cache-view-procedure-hotpaths
# Conflicts: # server-rs/crates/spacetime-client/src/mapper.rs # server-rs/crates/spacetime-client/src/module_bindings/big_fish_work_summary_snapshot_type.rs # server-rs/crates/spacetime-module/src/square_hole/types.rs
This commit is contained in:
+2
-1
@@ -17,6 +17,7 @@
|
||||
"admin-web:preview": "npm --prefix apps/admin-web run preview --",
|
||||
"spacetime:generate": "node scripts/generate-spacetime-bindings.mjs",
|
||||
"check:api-server-env": "node scripts/check-api-server-env.mjs",
|
||||
"check:spacetime-runtime-access": "node scripts/check-spacetime-runtime-access.mjs",
|
||||
"deploy:rust:remote": "node scripts/run-bash-script.mjs scripts/deploy-rust-remote.sh",
|
||||
"build:production-release": "node scripts/run-bash-script.mjs scripts/build-production-release.sh",
|
||||
"build:rust:ubuntu": "node scripts/run-bash-script.mjs scripts/deploy-rust-remote.sh",
|
||||
@@ -31,7 +32,7 @@
|
||||
"check:visual-novel-vn11": "node scripts/check-visual-novel-vn11-negative-scan.mjs",
|
||||
"check:visual-novel-vn12": "node scripts/check-visual-novel-vn12-acceptance.mjs",
|
||||
"check:wechat-miniprogram-auth": "node scripts/check-wechat-miniprogram-auth-smoke.mjs",
|
||||
"check:server-rs-ddd": "npm run check:spacetime-schema && node scripts/check-server-rs-ddd-boundaries.mjs",
|
||||
"check:server-rs-ddd": "npm run check:spacetime-schema && npm run check:spacetime-runtime-access && node scripts/check-server-rs-ddd-boundaries.mjs",
|
||||
"lint:eslint": "eslint . --ext .ts,.tsx,.js,.mjs,.cjs --max-warnings 0",
|
||||
"lint:guardrails": "npm run lint:eslint",
|
||||
"typecheck": "tsc -p tsconfig.typecheck-guardrails.json --noEmit",
|
||||
|
||||
@@ -0,0 +1,221 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
|
||||
const repoRoot = process.cwd();
|
||||
|
||||
function readUtf8(relativePath) {
|
||||
const absolute = path.join(repoRoot, relativePath);
|
||||
if (!fs.existsSync(absolute)) {
|
||||
failures.push(`${relativePath}: 文件不存在,无法执行 SpacetimeDB runtime access 检查`);
|
||||
return null;
|
||||
}
|
||||
return fs.readFileSync(absolute, 'utf8');
|
||||
}
|
||||
|
||||
const forbiddenSnippets = [
|
||||
{
|
||||
file: 'server-rs/crates/spacetime-module/src/puzzle.rs',
|
||||
snippet: '.puzzle_work_profile()\n .iter()\n .filter(|row| row.owner_user_id == input.owner_user_id)',
|
||||
reason: 'puzzle_work_profile 已有 by_puzzle_work_owner_user_id 索引',
|
||||
},
|
||||
{
|
||||
file: 'server-rs/crates/spacetime-module/src/puzzle.rs',
|
||||
snippet: '.puzzle_work_profile()\n .iter()\n .filter(|row| row.publication_status == PuzzlePublicationStatus::Published)',
|
||||
reason: 'puzzle_work_profile 已有 by_puzzle_work_publication_status 索引',
|
||||
},
|
||||
{
|
||||
file: 'server-rs/crates/spacetime-module/src/puzzle.rs',
|
||||
snippet: '.puzzle_leaderboard_entry()\n .iter()\n .filter(|row| row.profile_id == profile_id && row.grid_size == grid_size)',
|
||||
reason: 'puzzle_leaderboard_entry 已有 by_puzzle_leaderboard_profile_grid 索引',
|
||||
},
|
||||
{
|
||||
file: 'server-rs/crates/spacetime-module/src/match3d/mod.rs',
|
||||
snippet: '.match3d_work_profile()\n .iter()\n .filter(|row| {',
|
||||
reason: 'match3d_work_profile 已有 owner/status 索引,列表不应整表过滤',
|
||||
},
|
||||
{
|
||||
file: 'server-rs/crates/spacetime-module/src/visual_novel.rs',
|
||||
snippet: '.visual_novel_work_profile()\n .iter()\n .filter(|row| {',
|
||||
reason: 'visual_novel_work_profile 已有 owner/status 索引,列表不应整表过滤',
|
||||
},
|
||||
{
|
||||
file: 'server-rs/crates/spacetime-module/src/asset_metadata/objects.rs',
|
||||
snippet: '.asset_object()\n .iter()\n .find(|row| row.bucket == input.bucket && row.object_key == input.object_key)',
|
||||
reason: 'asset_object 已有 by_bucket_object_key 索引',
|
||||
},
|
||||
{
|
||||
file: 'server-rs/crates/spacetime-module/src/asset_metadata/objects.rs',
|
||||
snippet: '.asset_object()\n .iter()\n .filter(|row| row.asset_kind == asset_kind)',
|
||||
reason: 'asset_object 已有 asset_kind 索引',
|
||||
},
|
||||
{
|
||||
file: 'server-rs/crates/spacetime-module/src/ai/stages.rs',
|
||||
snippet: '.ai_task_stage()\n .iter()\n .filter(|row| row.task_id == task_id)',
|
||||
reason: 'ai_task_stage 已有 by_ai_task_stage_task_id 索引',
|
||||
},
|
||||
{
|
||||
file: 'server-rs/crates/spacetime-module/src/ai/stages.rs',
|
||||
snippet: '.ai_text_chunk()\n .iter()\n .filter(|row| row.task_id == task_id && row.stage_kind == stage_kind)',
|
||||
reason: 'ai_text_chunk 已有 by_ai_text_chunk_task_id / by_ai_text_chunk_task_stage_sequence 索引',
|
||||
},
|
||||
{
|
||||
file: 'server-rs/crates/spacetime-module/src/ai/snapshots.rs',
|
||||
snippet: '.ai_task_stage()\n .iter()\n .filter(|stage| stage.task_id == row.task_id)',
|
||||
reason: 'ai_task_stage 快照组装应使用 by_ai_task_stage_task_id 索引',
|
||||
},
|
||||
{
|
||||
file: 'server-rs/crates/spacetime-module/src/ai/snapshots.rs',
|
||||
snippet: '.ai_result_reference()\n .iter()\n .filter(|reference| reference.task_id == row.task_id)',
|
||||
reason: 'ai_result_reference 快照组装应使用 by_ai_result_reference_task_id 索引',
|
||||
},
|
||||
{
|
||||
file: 'server-rs/crates/spacetime-module/src/runtime/profile.rs',
|
||||
snippet: '.profile_save_archive()\n .iter()\n .filter(|row| row.user_id == validated_input.user_id)',
|
||||
reason: 'profile_save_archive 已有 by_profile_save_archive_user_id 索引',
|
||||
},
|
||||
{
|
||||
file: 'server-rs/crates/spacetime-module/src/runtime/profile.rs',
|
||||
snippet: '.profile_played_world()\n .iter()\n .filter(|row| row.user_id == validated_input.user_id)',
|
||||
reason: 'profile_played_world 已有 by_profile_played_world_user_id 索引',
|
||||
},
|
||||
{
|
||||
file: 'server-rs/crates/spacetime-module/src/runtime/profile.rs',
|
||||
snippet: '.profile_wallet_ledger()\n .iter()\n .filter(|row| row.user_id == validated_input.user_id)',
|
||||
reason: 'profile_wallet_ledger 已有 by_profile_wallet_ledger_user_id 索引',
|
||||
},
|
||||
{
|
||||
file: 'server-rs/crates/spacetime-module/src/runtime/profile.rs',
|
||||
snippet: '.profile_referral_relation()\n .iter()\n .filter(|row| row.inviter_user_id == user_id)',
|
||||
reason: 'profile_referral_relation 已有 by_profile_referral_inviter_user_id 索引',
|
||||
},
|
||||
{
|
||||
file: 'server-rs/crates/spacetime-module/src/runtime/profile.rs',
|
||||
snippet: '.profile_recharge_order()\n .iter()\n .filter(|row| row.user_id == user_id)',
|
||||
reason: 'profile_recharge_order 已有 by_profile_recharge_order_user_id 索引',
|
||||
},
|
||||
{
|
||||
file: 'server-rs/crates/spacetime-module/src/runtime/profile.rs',
|
||||
snippet: '.tracking_daily_stat()\n .iter()\n .filter(|row| {',
|
||||
reason: 'tracking_daily_stat 已有 by_tracking_daily_stat_scope_day / event_day 索引,analytics 查询不应整表过滤',
|
||||
},
|
||||
{
|
||||
file: 'server-rs/crates/spacetime-module/src/custom_world/mod.rs',
|
||||
snippet: '.custom_world_profile()\n .iter()\n .find(|row| {',
|
||||
reason: 'custom_world_profile owner 维度已有 by_custom_world_profile_owner_user_id 索引',
|
||||
},
|
||||
{
|
||||
file: 'server-rs/crates/spacetime-module/src/custom_world/mod.rs',
|
||||
snippet: '.custom_world_profile()\n .iter()\n .filter(|profile| {',
|
||||
reason: 'custom_world_profile Published 同步已有 by_custom_world_profile_publication_status 索引',
|
||||
},
|
||||
];
|
||||
|
||||
const procedureResultFiles = [
|
||||
'server-rs/crates/module-puzzle/src/application.rs',
|
||||
'server-rs/crates/module-big-fish/src/domain.rs',
|
||||
'server-rs/crates/spacetime-module/src/match3d/types.rs',
|
||||
'server-rs/crates/spacetime-module/src/square_hole/types.rs',
|
||||
'server-rs/crates/spacetime-module/src/visual_novel.rs',
|
||||
'server-rs/crates/spacetime-module/src/bark_battle/types.rs',
|
||||
];
|
||||
|
||||
const mapperCompatibilityFiles = [
|
||||
'server-rs/crates/spacetime-client/src/mapper.rs',
|
||||
'server-rs/crates/spacetime-client/src/lib.rs',
|
||||
];
|
||||
|
||||
const bigFishRuntimeFiles = [
|
||||
'server-rs/crates/module-big-fish/src/commands.rs',
|
||||
'server-rs/crates/spacetime-module/src/big_fish/runtime.rs',
|
||||
'server-rs/crates/spacetime-module/src/big_fish/session.rs',
|
||||
];
|
||||
|
||||
const legacyMapperPatterns = [
|
||||
{
|
||||
pattern: /\b[A-Za-z0-9_]*JsonRecord\b/u,
|
||||
reason: 'spacetime-client mapper 不应保留旧 ProcedureResult JSON 兼容 Record',
|
||||
},
|
||||
{
|
||||
pattern: /\bCompatibleBigFish[A-Za-z0-9_]*\b/u,
|
||||
reason: 'spacetime-client mapper 不应保留 BigFish 旧 JSON 兼容结构',
|
||||
},
|
||||
{
|
||||
pattern: /\bmap_[A-Za-z0-9_]*_json\b/u,
|
||||
reason: 'spacetime-client mapper 不应再通过 map_*_json 反序列化 procedure payload',
|
||||
},
|
||||
{
|
||||
pattern: /serde_json::from_str::<[A-Za-z0-9_:]*JsonRecord/u,
|
||||
reason: 'spacetime-client mapper 不应把 procedure result 再反序列化为 JsonRecord',
|
||||
},
|
||||
{
|
||||
pattern: /\b(?:items|run|work|session|event|feedback)_json:\s*Some\(/u,
|
||||
reason: 'mapper 测试与兼容路径不应再构造旧 procedure JSON 字符串字段',
|
||||
},
|
||||
];
|
||||
|
||||
const typedProcedurePayloadFieldPattern =
|
||||
/\b(?:row|session|work|item|items|run|event|feedback)_json:\s*Option<String>/gu;
|
||||
|
||||
const failures = [];
|
||||
|
||||
for (const rule of forbiddenSnippets) {
|
||||
const content = readUtf8(rule.file);
|
||||
if (content === null) {
|
||||
continue;
|
||||
}
|
||||
if (content.includes(rule.snippet)) {
|
||||
failures.push(`${rule.file}: ${rule.reason}`);
|
||||
}
|
||||
}
|
||||
|
||||
for (const file of procedureResultFiles) {
|
||||
const content = readUtf8(file);
|
||||
if (content === null) {
|
||||
continue;
|
||||
}
|
||||
const resultBlocks = content.match(/pub struct [A-Za-z0-9_]*ProcedureResult\s*\{[\s\S]*?\n\}/g) ?? [];
|
||||
for (const block of resultBlocks) {
|
||||
const jsonFields = block.match(typedProcedurePayloadFieldPattern);
|
||||
if (jsonFields?.length) {
|
||||
const name = block.match(/pub struct ([A-Za-z0-9_]+)/)?.[1] ?? 'ProcedureResult';
|
||||
failures.push(`${file}: ${name} 仍通过 ${jsonFields.join(', ')} 跨层返回 JSON 字符串`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (const file of mapperCompatibilityFiles) {
|
||||
const content = readUtf8(file);
|
||||
if (content === null) {
|
||||
continue;
|
||||
}
|
||||
for (const rule of legacyMapperPatterns) {
|
||||
if (rule.pattern.test(content)) {
|
||||
failures.push(`${file}: ${rule.reason}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (const file of bigFishRuntimeFiles) {
|
||||
const content = readUtf8(file);
|
||||
if (content === null) {
|
||||
continue;
|
||||
}
|
||||
const resultBlocks = content.match(/pub struct [A-Za-z0-9_]*ProcedureResult\s*\{[\s\S]*?\n\}/g) ?? [];
|
||||
for (const block of resultBlocks) {
|
||||
const jsonFields = block.match(typedProcedurePayloadFieldPattern);
|
||||
if (jsonFields?.length) {
|
||||
const name = block.match(/pub struct ([A-Za-z0-9_]+)/)?.[1] ?? 'ProcedureResult';
|
||||
failures.push(`${file}: ${name} 仍通过 ${jsonFields.join(', ')} 跨层返回 JSON 字符串`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (failures.length > 0) {
|
||||
console.error('SpacetimeDB runtime access 检查失败:');
|
||||
for (const failure of failures) {
|
||||
console.error(`- ${failure}`);
|
||||
}
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log('SpacetimeDB runtime access 检查通过。');
|
||||
@@ -0,0 +1 @@
|
||||
//! 中文注释:汪汪声浪领域应用服务预留落位,当前规则仍集中在 domain/scoring。
|
||||
@@ -0,0 +1 @@
|
||||
//! 中文注释:汪汪声浪命令归一化预留落位,当前无独立命令构造。
|
||||
@@ -0,0 +1 @@
|
||||
//! 中文注释:汪汪声浪领域错误预留落位,当前复用调用方错误文本。
|
||||
@@ -0,0 +1 @@
|
||||
//! 中文注释:汪汪声浪领域事件预留落位,当前不导出独立事件类型。
|
||||
@@ -1,4 +1,8 @@
|
||||
mod application;
|
||||
mod commands;
|
||||
pub mod domain;
|
||||
mod errors;
|
||||
mod events;
|
||||
pub mod scoring;
|
||||
|
||||
pub use domain::*;
|
||||
|
||||
@@ -68,7 +68,7 @@ pub struct BigFishWorkRemixInput {
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct BigFishWorksProcedureResult {
|
||||
pub ok: bool,
|
||||
pub items_json: Option<String>,
|
||||
pub items: Vec<BigFishWorkSummarySnapshot>,
|
||||
pub error_message: Option<String>,
|
||||
}
|
||||
|
||||
@@ -188,9 +188,9 @@ pub struct BigFishInputSubmitInput {
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "spacetime-types", derive(SpacetimeType))]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct BigFishRunProcedureResult {
|
||||
pub ok: bool,
|
||||
pub run_json: Option<String>,
|
||||
pub run: Option<BigFishRuntimeSnapshot>,
|
||||
pub error_message: Option<String>,
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
//! 中文注释:创意 Agent 领域事件预留落位,当前流程不导出独立事件类型。
|
||||
@@ -2,6 +2,7 @@ mod application;
|
||||
mod commands;
|
||||
mod domain;
|
||||
mod errors;
|
||||
mod events;
|
||||
|
||||
pub use application::*;
|
||||
pub use commands::*;
|
||||
|
||||
@@ -16,7 +16,7 @@ use crate::{domain::*, errors::PuzzleFieldError};
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct PuzzleAgentSessionProcedureResult {
|
||||
pub ok: bool,
|
||||
pub session_json: Option<String>,
|
||||
pub session: Option<PuzzleAgentSessionSnapshot>,
|
||||
pub error_message: Option<String>,
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ pub struct PuzzleAgentSessionProcedureResult {
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct PuzzleWorksProcedureResult {
|
||||
pub ok: bool,
|
||||
pub items_json: Option<String>,
|
||||
pub items: Vec<PuzzleWorkProfile>,
|
||||
pub error_message: Option<String>,
|
||||
}
|
||||
|
||||
@@ -32,15 +32,15 @@ pub struct PuzzleWorksProcedureResult {
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct PuzzleWorkProcedureResult {
|
||||
pub ok: bool,
|
||||
pub item_json: Option<String>,
|
||||
pub item: Option<PuzzleWorkProfile>,
|
||||
pub error_message: Option<String>,
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "spacetime-types", derive(SpacetimeType))]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct PuzzleRunProcedureResult {
|
||||
pub ok: bool,
|
||||
pub run_json: Option<String>,
|
||||
pub run: Option<PuzzleRunSnapshot>,
|
||||
pub error_message: Option<String>,
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
//! 中文注释:视觉小说命令归一化预留落位,当前命令校验仍由 application 承接。
|
||||
@@ -0,0 +1 @@
|
||||
//! 中文注释:视觉小说领域事件预留落位,当前不导出独立事件类型。
|
||||
@@ -1,6 +1,8 @@
|
||||
mod application;
|
||||
mod commands;
|
||||
mod domain;
|
||||
mod errors;
|
||||
mod events;
|
||||
|
||||
pub use application::*;
|
||||
pub use domain::*;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+25
@@ -0,0 +1,25 @@
|
||||
// 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 BarkBattleDraftConfigSnapshot {
|
||||
pub draft_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub work_id: String,
|
||||
pub config_version: u64,
|
||||
pub ruleset_version: String,
|
||||
pub difficulty_preset: String,
|
||||
pub leaderboard_enabled: bool,
|
||||
pub config_json: String,
|
||||
pub editor_state_json: String,
|
||||
pub created_at_micros: i64,
|
||||
pub updated_at_micros: i64,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for BarkBattleDraftConfigSnapshot {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
+7
-1
@@ -4,11 +4,17 @@
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
use super::bark_battle_draft_config_snapshot_type::BarkBattleDraftConfigSnapshot;
|
||||
use super::bark_battle_run_snapshot_type::BarkBattleRunSnapshot;
|
||||
use super::bark_battle_runtime_config_snapshot_type::BarkBattleRuntimeConfigSnapshot;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct BarkBattleProcedureResult {
|
||||
pub ok: bool,
|
||||
pub row_json: Option<String>,
|
||||
pub draft_config: Option<BarkBattleDraftConfigSnapshot>,
|
||||
pub runtime_config: Option<BarkBattleRuntimeConfigSnapshot>,
|
||||
pub run: Option<BarkBattleRunSnapshot>,
|
||||
pub error_message: Option<String>,
|
||||
}
|
||||
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
// 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 BarkBattleRunSnapshot {
|
||||
pub run_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub work_id: String,
|
||||
pub config_version: u64,
|
||||
pub ruleset_version: String,
|
||||
pub difficulty_preset: String,
|
||||
pub leaderboard_enabled: bool,
|
||||
pub status: String,
|
||||
pub client_started_at_micros: i64,
|
||||
pub server_started_at_micros: i64,
|
||||
pub client_finished_at_micros: Option<i64>,
|
||||
pub server_finished_at_micros: Option<i64>,
|
||||
pub metrics_json: String,
|
||||
pub server_result: Option<String>,
|
||||
pub validation_status: String,
|
||||
pub anti_cheat_flags_json: String,
|
||||
pub leaderboard_score: Option<u64>,
|
||||
pub score_id: Option<String>,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for BarkBattleRunSnapshot {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
// 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 BarkBattleRuntimeConfigSnapshot {
|
||||
pub work_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub source_draft_id: Option<String>,
|
||||
pub config_version: u64,
|
||||
pub ruleset_version: String,
|
||||
pub difficulty_preset: String,
|
||||
pub leaderboard_enabled: bool,
|
||||
pub config_json: String,
|
||||
pub published_snapshot_json: String,
|
||||
pub published_at_micros: i64,
|
||||
pub updated_at_micros: i64,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for BarkBattleRuntimeConfigSnapshot {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
+3
-1
@@ -4,11 +4,13 @@
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
use super::big_fish_runtime_snapshot_type::BigFishRuntimeSnapshot;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct BigFishRunProcedureResult {
|
||||
pub ok: bool,
|
||||
pub run_json: Option<String>,
|
||||
pub run: Option<BigFishRuntimeSnapshot>,
|
||||
pub error_message: Option<String>,
|
||||
}
|
||||
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
// 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::big_fish_vector_2_type::BigFishVector2;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct BigFishRuntimeEntitySnapshot {
|
||||
pub entity_id: String,
|
||||
pub level: u32,
|
||||
pub position: BigFishVector2,
|
||||
pub radius: f32,
|
||||
pub offscreen_seconds: f32,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for BigFishRuntimeEntitySnapshot {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
// 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::big_fish_run_status_type::BigFishRunStatus;
|
||||
use super::big_fish_runtime_entity_snapshot_type::BigFishRuntimeEntitySnapshot;
|
||||
use super::big_fish_vector_2_type::BigFishVector2;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct BigFishRuntimeSnapshot {
|
||||
pub run_id: String,
|
||||
pub session_id: String,
|
||||
pub status: BigFishRunStatus,
|
||||
pub tick: u64,
|
||||
pub player_level: u32,
|
||||
pub win_level: u32,
|
||||
pub leader_entity_id: Option<String>,
|
||||
pub owned_entities: Vec<BigFishRuntimeEntitySnapshot>,
|
||||
pub wild_entities: Vec<BigFishRuntimeEntitySnapshot>,
|
||||
pub camera_center: BigFishVector2,
|
||||
pub last_input: BigFishVector2,
|
||||
pub event_log: Vec<String>,
|
||||
pub updated_at_micros: i64,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for BigFishRuntimeSnapshot {
|
||||
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 BigFishVector2 {
|
||||
pub x: f32,
|
||||
pub y: f32,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for BigFishVector2 {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
+3
-1
@@ -4,11 +4,13 @@
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
use super::big_fish_work_summary_snapshot_type::BigFishWorkSummarySnapshot;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct BigFishWorksProcedureResult {
|
||||
pub ok: bool,
|
||||
pub items_json: Option<String>,
|
||||
pub items: Vec<BigFishWorkSummarySnapshot>,
|
||||
pub error_message: Option<String>,
|
||||
}
|
||||
|
||||
|
||||
+20
@@ -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 Match3DAgentMessageSnapshot {
|
||||
pub message_id: String,
|
||||
pub session_id: String,
|
||||
pub role: String,
|
||||
pub kind: String,
|
||||
pub text: String,
|
||||
pub created_at_micros: i64,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for Match3DAgentMessageSnapshot {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user