diff --git a/apps/admin-web/src/pages/AdminDatabaseTablesPage.tsx b/apps/admin-web/src/pages/AdminDatabaseTablesPage.tsx index 47659fd47..a032d4889 100644 --- a/apps/admin-web/src/pages/AdminDatabaseTablesPage.tsx +++ b/apps/admin-web/src/pages/AdminDatabaseTablesPage.tsx @@ -2641,48 +2641,6 @@ const databaseTableLabelMap: Record = { profile_recharge_order: '充值订单', profile_feedback_submission: '反馈提交', profile_save_archive: '存档记录', - story_session: '剧情会话', - story_event: '剧情事件', - npc_state: 'NPC 状态', - inventory_slot: '背包槽位', - battle_state: '战斗状态', - treasure_record: '宝藏记录', - quest_record: '任务记录', - quest_log: '任务日志', - player_progression: '玩家进度', - chapter_progression: '章节进度', - custom_world_profile: '自定义世界档案', - custom_world_session: '自定义世界会话', - custom_world_agent_session: '自定义世界 Agent 会话', - custom_world_agent_message: '自定义世界 Agent 消息', - custom_world_agent_operation: '自定义世界 Agent 操作', - custom_world_draft_card: '自定义世界草稿卡片', - custom_world_gallery_entry: '自定义世界画廊条目', - puzzle_agent_session: '拼图 Agent 会话', - puzzle_agent_message: '拼图 Agent 消息', - puzzle_work_profile: '拼图作品档案', - puzzle_event: '拼图事件', - puzzle_runtime_run: '拼图运行记录', - puzzle_leaderboard_entry: '拼图排行榜条目', - match3d_agent_session: '抓大鹅 Agent 会话', - match3d_agent_message: '抓大鹅 Agent 消息', - match3d_work_profile: '抓大鹅作品档案', - match3d_runtime_run: '抓大鹅运行记录', - square_hole_agent_session: '方洞挑战 Agent 会话', - square_hole_agent_message: '方洞挑战 Agent 消息', - square_hole_work_profile: '方洞挑战作品档案', - square_hole_runtime_run: '方洞挑战运行记录', - visual_novel_agent_session: '视觉小说 Agent 会话', - visual_novel_agent_message: '视觉小说 Agent 消息', - visual_novel_work_profile: '视觉小说作品档案', - visual_novel_runtime_run: '视觉小说运行记录', - visual_novel_runtime_history_entry: '视觉小说历史条目', - visual_novel_runtime_event: '视觉小说运行事件', - big_fish_creation_session: '大鱼吃小鱼创建会话', - big_fish_agent_message: '大鱼吃小鱼 Agent 消息', - big_fish_asset_slot: '大鱼吃小鱼资产槽位', - big_fish_event: '大鱼吃小鱼事件', - big_fish_runtime_run: '大鱼吃小鱼运行记录', asset_object: '资产对象', asset_entity_binding: '资产实体绑定', asset_event: '资产事件', @@ -2724,48 +2682,6 @@ const databaseTableDescriptionMap: Record = { profile_recharge_order: '充值订单表', profile_feedback_submission: '反馈提交记录表', profile_save_archive: '用户存档记录表', - story_session: '剧情会话表', - story_event: '剧情事件表', - npc_state: 'NPC 状态表', - inventory_slot: '背包槽位表', - battle_state: '战斗状态表', - treasure_record: '宝藏记录表', - quest_record: '任务记录表', - quest_log: '任务日志表', - player_progression: '玩家进度表', - chapter_progression: '章节进度表', - custom_world_profile: '自定义世界档案表', - custom_world_session: '自定义世界会话表', - custom_world_agent_session: '自定义世界 Agent 会话表', - custom_world_agent_message: '自定义世界 Agent 消息表', - custom_world_agent_operation: '自定义世界 Agent 操作表', - custom_world_draft_card: '自定义世界草稿卡片表', - custom_world_gallery_entry: '自定义世界画廊条目表', - puzzle_agent_session: '拼图 Agent 会话表', - puzzle_agent_message: '拼图 Agent 消息表', - puzzle_work_profile: '拼图作品档案表', - puzzle_event: '拼图事件表', - puzzle_runtime_run: '拼图运行记录表', - puzzle_leaderboard_entry: '拼图排行榜条目表', - match3d_agent_session: '抓大鹅 Agent 会话表', - match3d_agent_message: '抓大鹅 Agent 消息表', - match3d_work_profile: '抓大鹅作品档案表', - match3d_runtime_run: '抓大鹅运行记录表', - square_hole_agent_session: '方洞挑战 Agent 会话表', - square_hole_agent_message: '方洞挑战 Agent 消息表', - square_hole_work_profile: '方洞挑战作品档案表', - square_hole_runtime_run: '方洞挑战运行记录表', - visual_novel_agent_session: '视觉小说 Agent 会话表', - visual_novel_agent_message: '视觉小说 Agent 消息表', - visual_novel_work_profile: '视觉小说作品档案表', - visual_novel_runtime_run: '视觉小说运行记录表', - visual_novel_runtime_history_entry: '视觉小说历史条目表', - visual_novel_runtime_event: '视觉小说运行事件表', - big_fish_creation_session: '大鱼吃小鱼创建会话表', - big_fish_agent_message: '大鱼吃小鱼 Agent 消息表', - big_fish_asset_slot: '大鱼吃小鱼资产槽位表', - big_fish_event: '大鱼吃小鱼事件表', - big_fish_runtime_run: '大鱼吃小鱼运行记录表', asset_object: '资产对象表', asset_entity_binding: '资产实体绑定表', asset_event: '资产事件表', diff --git a/docs/project-memory/shared-memory/decision-log.md b/docs/project-memory/shared-memory/decision-log.md index 5b90bd7d7..0e2c608b7 100644 --- a/docs/project-memory/shared-memory/decision-log.md +++ b/docs/project-memory/shared-memory/decision-log.md @@ -797,6 +797,15 @@ Godot 编辑器操控复用既有 AGC 插件宿主、EditorAdapter、Runner 和 - 验证方式:运行评论弹层恢复竞态回归、完整 `appSurface.test.ts`,并执行类型、编码和 diff 检查。 - 关联文档:`docs/technical/【技术方案】立项策划Agent(Fast GDD)-2026-08-10.md`、`apps/ai-game-creator-shell/src/features/project-workspace/GddApprovalCard.tsx`。 +## 2026-09-22 旧创作模板历史表从 schema 与生成绑定中删除 + +- 背景:旧创作模板的 63 张历史玩法表已经完成业务代码退役;release 在 2026-09-22 apply 前仍有 26 张表、5922 行历史数据。维护窗口内先完成可恢复备份,再执行固定清单清空,继续保留 table 定义、迁移白名单、旧行兼容分支和生成绑定会让当前 schema、客户端类型和迁移合同长期停留在退役状态。 +- 决策:从 `spacetime-module` 可达源码删除旧 gameplay、自定义世界、Puzzle / Puzzle Clear、Bark Battle、Match3D、Jump Hop、Wooden Fish、Square Hole、Visual Novel 与 Big Fish 的 63 张表定义及专属类型;同步删除只服务这些表的 `clear_retired_database_tables` procedure、固定清单、migration 导入导出项和旧行归一化分支,并重新生成 `spacetime-client` bindings。`runtime_setting`、`runtime_snapshot`、`user_browse_history`、`creation_entry_config` 等现役表和通用迁移能力保持不变。 +- 门禁处理:SpacetimeDB schema guard 只对本轮 63 个已确认 accessor 的从基线删除放行,其他表删除/改名以及字段级破坏性变更仍失败;该一次性白名单在删除结果进入后续主线基线后移除。生产发布仍必须单独完成冷备份、客户端兼容性和运行态确认,禁止用 SQL `DROP TABLE`、`--delete-data=always` 或系统表写入代替受控发布。 +- 影响范围:`server-rs/crates/spacetime-module/src/{active.rs,migration.rs}`、旧表专属 module/legacy schema 文件、`server-rs/crates/spacetime-client/src/module_bindings*`、schema guard 及后端数据契约。 +- 生产数据与发布闭环:`genarrative-prod` 在维护态、API/controller/worker 已停止时,以已授权 migration operator 执行 `clear_retired_database_tables`;apply 返回 63 张表且每张 `cleared_row_count == row_count_before`,共清空 5922 行。apply 前后两次 `dry_run=true` 均为 63/63 全零,第二次在 10 分钟观察窗口结束后执行。清空前完成 files-minimal OSS 备份、latest/catalog 验真和 restore dry-run;随后将 release 从 `2.7.0` 直接切换到本地锁定并有 commit 校验的 `2.8.3 / 8e410d…` 二进制,再用 source commit `05a5ea4d8534b3f96d4d462c6cfda9b0775073df` 的 wasm 发布。发布后 schema 为 84 张表、旧表为 0、`clear_retired_database_tables` 为 0;API/controller/worker 已恢复,维护退出,`genarrative.world` 与 `www.genarrative.world` 返回 200。 +- 验证方式:`npm run spacetime:generate` 生成 766 个 binding 文件;`cargo check -p spacetime-client -p api-server`、`cargo test -p spacetime-module migration`(21 passed)、`npm run check:server-rs-ddd`、`npm run check:spacetime-schema`(84 tables)、`npm run check:spacetime-runtime-access`、schema guard 单测(9 passed)、`npm run check:encoding`、`npm run check:doc-index` 与 `git diff --check` 通过。 + ## 2026-09-02 旧玩法表采用两阶段退役清理 - 背景:旧创作模板的业务代码已退出现役编译链,但 SpacetimeDB 中的历史表仍需先完成数据清理;直接删除表定义会扩大 schema 迁移和客户端兼容风险。 diff --git a/docs/project-memory/shared-memory/pitfalls.md b/docs/project-memory/shared-memory/pitfalls.md index 7e2d98345..6abcaa0b6 100644 --- a/docs/project-memory/shared-memory/pitfalls.md +++ b/docs/project-memory/shared-memory/pitfalls.md @@ -49,6 +49,8 @@ 按上游 [#5555](https://github.com/clockworklabs/SpacetimeDB/pull/5555) 的 retention 语义,只有最近 `retain-snapshots`(默认 2)份 snapshot 与覆盖它之后的 commitlog 段是重启所需,其余历史可丢;因此备份改为 `files + full + --minimal --retain-snapshots 2`(release 实测 40G → 3.6G,热备不停服),不再做增量差异计算,也不需要 44.7G 冷备空间。 +2026-09-22 的 release 清表窗口再次验证:41.2GiB 数据目录执行 `archive` 会因根盘不足失败;尝试非 minimal 的 `files + full + --stop-service` 虽通过空间预检,但在扫描 43GiB 后于 catalog 序列化阶段报 `RangeError: Invalid string length`。生产中等数据目录继续使用可验真的 `files + full + --minimal` 备份,并在 apply 前执行 `restore-files-state --dry-run`;非 minimal files 大库备份需要先修复 catalog 序列化上限,不能把失败备份当作通过。 + ## copyArtifacts 报「Unable to find project for artifact copy」的用户触发构建差异 Copy Artifact 插件在**非 SYSTEM 认证**下按「认证用户」判权:只有当被复制 Job 的 `CopyArtifactPermissionProperty`(仓库里由 Declarative 的 `copyArtifactPermission(...)` 维护)显式列出当前消费者,或者该 Job 对认证用户开放 Item.Read 时才放行;`ACL.SYSTEM2` 的定时构建会短路通过。因此会出现「定时调度一路成功、手动发布必挂」的现象(2026-09-21 手动发布 #6/#7 与同期的用户触发探测全部命中,定时调度 #104+ 正常)。`Genarrative-Agc-Global-Version-Issue` 生产权限模式的授权名单必须同时包含 `Genarrative-Scheduled-Revision-Trigger` 与 `Genarrative-Manual-Build-And-Deploy`;改完 `copyArtifactPermission` 后要先跑一次发号 Job 把 Job property 写回 Jenkins,只改仓库文件不生效。 diff --git a/docs/【后端架构】server-rs与SpacetimeDB数据契约-2026-05-15.md b/docs/【后端架构】server-rs与SpacetimeDB数据契约-2026-05-15.md index bb19b661e..ca02639f0 100644 --- a/docs/【后端架构】server-rs与SpacetimeDB数据契约-2026-05-15.md +++ b/docs/【后端架构】server-rs与SpacetimeDB数据契约-2026-05-15.md @@ -147,7 +147,7 @@ npm run check:server-rs-ddd 拼图 `api-server` 内部拆分: - `server-rs/crates/api-server/src/modules/puzzle.rs` 只负责路由装配、鉴权层和参考图 body limit;对外继续引用同一批 handler 名称。 -- `server-rs/crates/api-server/src/state.rs` 中的 `PuzzleApiState` 是拼图 HTTP/BFF 的 Feature State,集中暴露 `SpacetimeClient`、`PuzzleGalleryCache`、OSS client、作者查询所需认证服务、拼图 LLM client 和少量 VectorEngine / Agent 配置快照。拼图 handler 只提取 `State`,不得重新改回 `State`。 +- `server-rs/crates/api-server/src/state.rs` 中的 `PuzzleApiState` 是拼图 HTTP/BFF 的 Feature State,集中暴露 `SpacetimeClient`、OSS client、作者查询所需认证服务、拼图 LLM client 和少量 VectorEngine / Agent 配置快照。拼图 handler 只提取 `State`,不得重新改回 `State`。 - `server-rs/crates/api-server/src/puzzle.rs` 只作为聚合入口,保留共享 import / 常量、内部模块声明和 handler re-export,不继续承载大段实现。 - `server-rs/crates/api-server/src/puzzle/handlers.rs` 承接 Axum handler,负责 extract、鉴权上下文、调用 SpacetimeDB facade / 编排 helper,并返回 HTTP/SSE 响应。 - `server-rs/crates/api-server/src/puzzle/draft.rs` 承接表单草稿保存、草稿编译、首关命名、UI 背景 prompt 和初始资产就绪校验。 @@ -158,7 +158,7 @@ npm run check:server-rs-ddd 拼图发布 / 待发布门槛必须同时要求首图、关卡画面、UI spritesheet 与关卡背景资产包完整;`module-puzzle::validate_publish_requirements` 与 `api-server::puzzle::tags::is_puzzle_session_snapshot_publish_ready` 使用同一资产语言,不得只凭 cover、标题、描述和标签把半成品标为 `publishReady` 或 `ready_to_publish`。 -该拆分只改变 `api-server` 文件组织,不改变 `/api/runtime/puzzle/*` route、DTO、error envelope、SpacetimeDB schema、公开 gallery cache 语义或计费语义;后续继续细分时也必须先保持行为不变,再单独讨论领域规则下沉。 +该拆分只改变 `api-server` 文件组织,不改变 `/api/runtime/puzzle/*` route、DTO、error envelope、SpacetimeDB schema 或计费语义;后续继续细分时也必须先保持行为不变,再单独讨论领域规则下沉。 `/api/runtime/puzzle/runs*` 当前接受 `RuntimePrincipal`,可同时识别登录用户 Bearer 和 runtime guest token。推荐页嵌入运行态的正式开局、交换、拖拽、下一关、暂停、道具与排行榜请求,应由前端在登录态下继续携带账号 access token;匿名游客仅在确认为未登录时走 runtime guest token。不要再把拼图 runtime 当成只认普通 Bearer 的纯账号接口。 @@ -176,7 +176,7 @@ npm run check:server-rs-ddd - `server-rs/crates/api-server/src/match3d/vector_engine_gemini.rs` 仅保留历史 VectorEngine Gemini 物品 sheet helper;当前草稿物品 spritesheet 以关卡整图为参考走 `gpt-image-2` 编辑链路,提示词、绿幕透明化和 OSS 持久化由 `item_assets.rs` / `works.rs` 约束。 - `server-rs/crates/api-server/src/match3d/runtime.rs` 保留运行态轻量归一 helper;`mappers.rs` / `tags.rs` / `tests.rs` 分别承接 DTO 映射、标签 / 通用错误 helper 和原有单测。 -该拆分只改变 `api-server` 文件组织,不改变 `/api/creation/match3d/*`、`/api/runtime/match3d/*` route、DTO、error envelope、SpacetimeDB schema、公开 gallery cache 语义、VectorEngine / OSS 副作用边界或计费语义;后续继续细分时也必须先保持行为不变,再单独讨论领域规则下沉到 `module-match3d`。 +该拆分只改变 `api-server` 文件组织,不改变 `/api/creation/match3d/*`、`/api/runtime/match3d/*` route、DTO、error envelope、SpacetimeDB schema、VectorEngine / OSS 副作用边界或计费语义;后续继续细分时也必须先保持行为不变,再单独讨论领域规则下沉到 `module-match3d`。 生成资产 Adapter 规则: @@ -198,11 +198,11 @@ npm run check:server-rs-ddd 4. 删除字段、改名、重排字段、改类型或修改字段属性前,必须先询问用户并确认迁移计划。 5. Vec 字段不要直接写无法 const 求值的 default;需要默认空集合时优先使用 `Option>` 加 `#[default(None::>)]`,业务层归一为空数组。 6. 运行态读表必须按已声明索引访问。只要 table 上存在覆盖查询前缀的 `#[index(...)]` 或主键 / unique accessor,列表、详情、快照组装和计数都先用对应 accessor `.filter(...)` / `.find(...)`,再在内存中处理索引无法覆盖的残余条件;不得用 `.iter().filter(...)` 扫整表替代现成索引。 -7. 面向公开列表的只读投影优先做成 public view / public 读模型表,并由 `api-server` 的 `spacetime-client` 长期订阅后读本地 cache。跨玩法公开作品统一主读模型是 `public_work_gallery_entry` 和 `public_work_detail_entry`;公开作品资产读取授权投影是 `public_work_asset_read_grant`;各玩法既有 `*_gallery_card_view` / `*_gallery_view` / `custom_world_gallery_entry` 保留为 source view 和兼容路径。短期不把作品列表整体交给浏览器前端直接订阅;不要让 HTTP 列表接口每次请求都调用 procedure 重新组装全量列表。需要请求时间窗口的轻量统计可订阅 `public_work_play_daily_stat` 后在 `api-server` 本地聚合,需要写入副作用的详情、点赞、游玩记录仍走玩法 procedure / reducer。前端不得直接订阅 `puzzle_work_profile`、`custom_world_profile` 等领域源表,也不得自己做 join、聚合或权限逻辑。首屏、排序、字段归一、权限降级和 HTTP fallback 由 `api-server` BFF 维持。 +7. 面向公开列表的只读投影必须先用独立 public view / read model 固化数据契约,再由 `spacetime-client` 通过明确 procedure / query 边界读取;当前连接池不维护公开作品长期订阅缓存。旧创作模板的逐玩法 gallery view、`public_work_gallery_entry` / `public_work_detail_entry` / `public_work_asset_read_grant` 及其兼容路径均已随公开作品基础设施退役,不得作为现役 read model 或 fallback 恢复。需要请求时间窗口的轻量统计可读取 `public_work_play_daily_stat`,需要写入副作用的详情、点赞、游玩记录仍走现役 procedure / reducer。前端不得直接订阅领域源表,也不得自己做 join、聚合或权限逻辑。排序、字段归一、权限降级和 HTTP fallback 由 `api-server` BFF 用当前正式契约处理。 8. 多列索引按 SpacetimeDB 绑定生成的元组参数直接传入,例如 `.filter((source_type, profile_id, played_day))`;前缀查询只传前缀元组,例如 `.filter((scope_kind, scope_id.as_str()))`。不要为了绕过类型问题退回整表遍历。 9. procedure result 必须返回 typed snapshot / typed value。`spacetime-client` mapper 不得再通过 `row_json/session_json/work_json/items_json/run_json/event_json/feedback_json: Option` 做跨层 JSON 字符串传输,也不得在 mapper 里反序列化旧 `*JsonRecord` 兼容结构。业务内部持久化字段如 `profile_payload_json`、`levels_json` 等不属于 procedure result 载荷例外,仍按各自表契约处理。 10. procedure 需要按调用者 identity 鉴权时,必须先从外层 `ProcedureContext::sender()` 捕获 caller,再把 caller 显式传入 `try_with_tx` 闭包内的事务函数。当前 workspace 锁定 SpacetimeDB `2.8.3`;鉴权边界不得依赖事务上下文的隐式 sender 语义,即使 SDK 升级也继续保持显式 caller 参数。 -11. 旧创作模板历史表采用两阶段退役:阶段一只允许 migration operator 调用固定范围的 `clear_retired_database_tables` procedure 清空 63 张旧玩法表,输入仅有 `dry_run`;`dry_run=true` 只返回逐表行数统计,`dry_run=false` 在单一事务内逐表删除全部行,任一失败整体回滚。清单必须在 `spacetime-module/src/migration.rs` 中静态维护,不接受调用方传入任意表名;`runtime_setting`、`runtime_snapshot`、`user_browse_history`、`creation_entry_config` 等现役表不属于清理范围。阶段一保留所有旧表定义、`legacy_schema/**`、migration 导入导出白名单和生成 bindings,不执行 `DROP TABLE`、`--delete-data=always` 或系统表写入。阶段二待备份、客户端兼容性和运行态确认完成后,另行评估从 module 定义与 migration 白名单移除空表,并同步 schema / bindings;当前在固定清单旁保留 TODO,不提前改动表定义。 +11. 旧创作模板的 63 张历史玩法表已从 SpacetimeDB module、migration 导入导出白名单和生成 bindings 中退役,当前 schema 不再包含 `player_progression`、`custom_world_*`、Puzzle / Puzzle Clear、Bark Battle、Match3D、Jump Hop、Wooden Fish、Square Hole、Visual Novel 与 Big Fish 的历史表。清理后不得保留 `clear_retired_database_tables` 这类只服务于空表的数据操作入口,也不得以 SQL `DROP TABLE`、`--delete-data=always` 或系统表写入替代受控 schema 发布。`runtime_setting`、`runtime_snapshot`、`user_browse_history`、`creation_entry_config` 等现役表继续保留并参与迁移。生产发布前仍必须完成数据库冷备份、客户端兼容性和运行态确认,确认后按 SpacetimeDB schema 发布门禁整体更新 module、migration 与 bindings。 12. 修改后运行: ```bash @@ -250,8 +250,6 @@ npm run check:server-rs-ddd 4. 资产操作的预扣费必须 fail-closed:钱包或 SpacetimeDB 预扣费不可达、超时或返回业务错误时,`api-server` 直接返回错误,不允许继续调用图片、音频、GLB 等外部生成 provider。 5. 需要支持 HTTP retry 的计费 ledger id 必须包含当前请求的 `request_id`;前端 `fetchWithApiAuth` 同一次业务请求的静默刷新重试复用同一个 `x-request-id`,后端不得再使用 prompt 指纹或随机 asset id 作为扣费幂等键。 6. 外部生成已预扣费但后续失败时,失败/任务状态变更事务必须在 SpacetimeDB 内按 refund ledger id 幂等写入 `profile_wallet_refund_outbox` pending 行;跨节点 worker 从库内 pending 行批量处理并在库内事务执行退款,成功后删除 outbox 行,失败按 `available_at` 和 `attempts` 重试。当前 attempt 若 consume 尚不可见,事务仍必须先写 `asset_operation_wallet_settlement` 取消 intent,阻止迟到扣费。普通 inline 资产失败也先调用同一 DB outbox procedure;只有 SpacetimeDB 完全不可达时才写 `wallet-refund-outbox` 本机 emergency spool。默认启用,配置项为 `GENARRATIVE_WALLET_REFUND_OUTBOX_ENABLED`、`GENARRATIVE_WALLET_REFUND_OUTBOX_DIR`、`GENARRATIVE_WALLET_REFUND_OUTBOX_BATCH_SIZE`、`GENARRATIVE_WALLET_REFUND_OUTBOX_FLUSH_INTERVAL_MS` 和 `GENARRATIVE_WALLET_REFUND_OUTBOX_MAX_BYTES`。本机文件按 refund ledger id 幂等落盘;成功重放后删除,坏文件隔离为 `corrupt-*`,不能替代库内 outbox。外部生成任务触发的扣费和退款必须在 `profile_wallet_ledger.metadata_json` 与两类 outbox 中保留 `externalGenerationJobId` 和 `externalGenerationClaimAttempt`,便于从退款记录追溯到具体 attempt。 -7. 拼图首图后台生成的跨实例互斥锁必须落在 SpacetimeDB `puzzle_background_compile_task` 表,claim id 由 `task_id + request_id` 构成,释放时必须校验 claim id,避免旧后台任务释放新请求抢到的租约。 - ## 用户钱包与编辑器生成扣费契约 1. `profile_wallet_config` 是账号初始泥点和每日免费泥点基础发放量的统一真相源;后台通过 `/admin/api/profile/wallet-config` 一次读写 `initialMudPoints` 和 `dailyFreePointsPerDay`。新用户账号完成注册并成功同步正式认证表后,注册赠送金额读取 `initial_mud_points`;未写入配置时默认为 `100`。每日免费基础发放量未写入时默认为 `20`。注册赠送流水原因仍使用 `new_user_registration_reward`,流水 ID 继续保持幂等,重复发放请求不得叠加余额。 @@ -419,11 +417,11 @@ Responses 的终态载荷既是工具调用的恢复源,也是正文的恢复 - 说明:对象 metadata 以 bucket / key 标识正式对象及其 owner、访问策略。确认接口的 owner 必须来自登录会话、后台管理员会话或 External API Key 绑定的认证主体,不接受请求体指定 owner;同 bucket / key 首次登记后,重复 confirm 不得改变 owner。已登记对象默认并继续保持 `private`。API 通过 `get_asset_object_by_location_and_return` / `get_asset_object_by_id_and_return` 在服务端索引上权威查询 private table;资产读取 ACL 使用 `get_asset_read_access_by_location_and_return` 在同一事务快照内同时返回位置查询、现役 `editor_showcase_asset` 精选素材派生授权和当前已启用 `editor_showcase_campaign_config` 的活动卡专用目录 exact-key 派生授权,procedure 只允许 runtime service identity 调用。旧创作模板作品授权 view 和逐玩法资产采集器已经退出 module;`spacetime-client` 不订阅全量 `asset_object`,也不把连接级 cache 当成安全判断。位置查询发现重复 bucket / key 时失败关闭,不能任选一条继续授权。普通对象只有权威位置查询返回不存在且显式使用 curated `legacyPublicPath` 时才能进入白名单兼容;历史活动卡上传缺少 metadata 时,可由“`global` 配置已启用 + `image_object_key` 精确匹配 + key 位于 `generated-character-drafts/editor/showcase-campaign/`”这一窄授权继续换签,禁用或替换活动卡后旧 key 立即失效。新上传活动卡仍必须完成 `asset_object` confirm,不能把该历史兼容当作跳过正式登记的常规路径。 - 编辑器生成结果例外不允许先单独 confirm 再分段创建业务记录:OSS `PUT / HEAD` 仍在事务外,但 `AssetObjectUpsertInput` 必须交由统一结果 procedure 在同一事务内与 resource、asset、binding、canvas、job 和 receipt 原子写入。候选省略 object 时,procedure 必须在同一事务快照中验证已登记 object 的 owner、位置和媒体身份;`HEAD` 成功不能代替正式登记。 -### SpacetimeDB view:`public_work_asset_read_grant` +### 退役记录:SpacetimeDB view `public_work_asset_read_grant` - 状态:已退役,不再注册到 `spacetime-module`,也不再生成客户端绑定。 - 历史源码:`server-rs/crates/spacetime-module/src/public_asset_access.rs`,仅供追溯,不参与现役 crate 根。 -- 现役替代:资产读取 procedure 只计算 `editor_showcase_asset` 精选素材的精确授权;历史作品表继续作为数据壳保留,但不再导出公开作品资产授权。 +- 现役替代:资产读取 procedure 只计算 `editor_showcase_asset` 精选素材的精确授权。历史作品表与对应 view 已从 module、migration 和 bindings 删除,不再保留 schema 数据壳;不得用订阅 cache 或历史源码恢复公开作品资产授权。 ### `auth_identity` @@ -446,27 +444,6 @@ Responses 的终态载荷既是工具调用的恢复源,也是正文的恢复 短期状态的并发保护:发短信前先从正式投影刷新工作集,再写入不可消费的占位验证码并通过 `sync_auth_store_projection` 的基线 CAS 占用手机号 / 场景冷却窗口;只有占用成功后才调用外部短信 provider,provider 成功后再同步真实验证码哈希。微信 OAuth state 在 `module-auth` 工作集内限制活动数量,超过上限直接拒绝创建,避免单行 JSON 投影无界增长;过期 state 仍由投影导出时清理。 -### `bark_battle_draft_config` - -- Rust 结构体:`BarkBattleDraftConfigRow` -- 源码:`server-rs/crates/spacetime-module/src/bark_battle/tables.rs` - -### `bark_battle_leaderboard_entry` - -- Rust 结构体:`BarkBattleLeaderboardEntryRow` -- 源码:`server-rs/crates/spacetime-module/src/bark_battle/tables.rs` - -### `bark_battle_personal_best_projection` - -- Rust 结构体:`BarkBattlePersonalBestProjectionRow` -- 源码:`server-rs/crates/spacetime-module/src/bark_battle/tables.rs` - -### `bark_battle_published_config` - -- Rust 结构体:`BarkBattlePublishedConfigRow` -- 源码:`server-rs/crates/spacetime-module/src/bark_battle/tables.rs` -- 字段变更:`visible` 控制是否进入公开列表 / 详情,新作品默认 `false`;旧迁移数据由 `migration.rs` 按历史公开默认补 `true`。 - ## 编辑器角色动作素材持久化契约(2026-07-28) - `asset_kind` 是资源 / 素材可选的权威语义类别,不新增或返回并列的 `media_type` / `mediaType`。普通静态图片的 `asset_kind` 为空;角色动作预览 MP4 使用 `asset_kind = video`,最终透明帧集使用 `asset_kind = character-animation`;前端据此派生具体渲染器。 @@ -513,65 +490,6 @@ Responses 的终态载荷既是工具调用的恢复源,也是正文的恢复 - 只是新增分类或 renderer 且现有媒体字段足够时,不改 schema。只有必须跨刷新、复用、审核或公开保留的数据才新增类别专属字段。 - legacy 数据必须先通过有界、可审计、带 dry-run/hash/apply 门禁的数据库迁移收口;迁移后的 api-server、mapper、主站、后台和画布只读取正式字段,不保留运行时 fallback。 -### `bark_battle_runtime_run` - -- Rust 结构体:`BarkBattleRuntimeRunRow` -- 源码:`server-rs/crates/spacetime-module/src/bark_battle/tables.rs` - -### `bark_battle_score_record` - -- Rust 结构体:`BarkBattleScoreRecordRow` -- 源码:`server-rs/crates/spacetime-module/src/bark_battle/tables.rs` - -### `bark_battle_work_stats_projection` - -- Rust 结构体:`BarkBattleWorkStatsProjectionRow` -- 源码:`server-rs/crates/spacetime-module/src/bark_battle/tables.rs` - -### `battle_state` - -- Rust 结构体:`BattleState` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/gameplay.rs` - -### `big_fish_agent_message` - -- Rust 结构体:`BigFishAgentMessage` -- 源码:`server-rs/crates/spacetime-module/src/big_fish/tables.rs` - -### `big_fish_asset_slot` - -- Rust 结构体:`BigFishAssetSlot` -- 源码:`server-rs/crates/spacetime-module/src/big_fish/tables.rs` - -### `big_fish_creation_session` - -- Rust 结构体:`BigFishCreationSession` -- 源码:`server-rs/crates/spacetime-module/src/big_fish/tables.rs` -- 索引:`by_big_fish_session_owner_user_id`、`by_big_fish_session_stage`。公开广场 view 使用 `by_big_fish_session_stage` 读取已发布会话,避免扫整表。 -- 字段变更:`visible` 控制是否进入公开列表 / 详情,新作品默认 `false`;旧迁移数据由 `migration.rs` 按历史公开默认补 `true`。 - -### `big_fish_event` - -- Rust 结构体:`BigFishEvent` -- 源码:`server-rs/crates/spacetime-module/src/big_fish/events.rs` - -### `big_fish_runtime_run` - -- Rust 结构体:`BigFishRuntimeRun` -- 源码:`server-rs/crates/spacetime-module/src/big_fish/tables.rs` - -### SpacetimeDB view:`big_fish_gallery_view` - -- Rust view:`big_fish_gallery_view` -- 返回类型:`Vec` -- 源码:`server-rs/crates/spacetime-module/src/big_fish/session.rs` -- 说明:大鱼吃小鱼公开 source 投影,只从 `Published` creation session 组装公开卡片字段;统一公开列表 / 详情主路径通过 `public_work_gallery_entry` / `public_work_detail_entry` 消费该 view 并映射成跨玩法契约。玩法旧 gallery 路径保留兼容 shape;个人作品列表、详情、点赞、游玩记录和 Remix 仍按原有 procedure / reducer 路径处理。 - -### `chapter_progression` - -- Rust 结构体:`ChapterProgression` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/gameplay.rs` - ### `creation_entry_config` - Rust 结构体:`CreationEntryConfig` @@ -594,46 +512,6 @@ Responses 的终态载荷既是工具调用的恢复源,也是正文的恢复 - 用途:通用功能灰度事实源。当前创作入口使用 `creation-entry:` 约定关联入口 ID;`api-server` 按当前可选登录用户、用户标签和稳定百分比判定后,只把过滤后的入口配置返回普通前端,不下发灰度规则或用户标签。 - 迁移兼容:新增表不改已有入口表字段;未配置 gate 或 `enabled=false` 时不限制功能,黑名单用户 ID 优先于白名单和百分比命中。 -### `custom_world_agent_message` - -- Rust 结构体:`CustomWorldAgentMessage` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/custom_world.rs` - -### `custom_world_agent_operation` - -- Rust 结构体:`CustomWorldAgentOperation` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/custom_world.rs` - -### `custom_world_agent_session` - -- Rust 结构体:`CustomWorldAgentSession` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/custom_world.rs` -- 发布约束:`publish_world` 的 action payload 不要求携带 `settingText`;`spacetime-module` 调用 `module-custom-world::resolve_custom_world_publish_setting_text(...)`,优先从当前 `draft_profile_json` 草稿真相派生正式 `setting_text`,避免旧会话 `seed_text` 为空时在最终 compile / publish 阶段触发 `custom_world.setting_text 不能为空`。 - -### `custom_world_draft_card` - -- Rust 结构体:`CustomWorldDraftCard` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/custom_world.rs` - -### `custom_world_gallery_entry` - -- Rust 结构体:`CustomWorldGalleryEntry` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/custom_world.rs` -- 作用:自定义世界公开 source 读模型。统一公开列表 / 详情主路径通过 `public_work_gallery_entry` / `public_work_detail_entry` 消费该投影并映射成跨玩法契约;`/api/runtime/custom-world-gallery` 保留旧 HTTP shape,并从统一 public cache 映射回旧 DTO。旧 procedure 只用于兼容旧库缺少 gallery 读模型行时的一次性同步兜底。 -- 字段变更:`visible` 控制是否进入公开列表 / 详情,新作品默认 `false`;旧迁移数据由 `migration.rs` 按历史公开默认补 `true`。 - -### `custom_world_profile` - -- Rust 结构体:`CustomWorldProfile` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/custom_world.rs` -- 字段变更:`visible` 控制是否进入公开列表 / 详情,新作品默认 `false`;旧迁移数据由 `migration.rs` 按历史公开默认补 `true`。 -- 兼容约束:历史公开 RPG / 自定义世界 profile 可能存在 `publication_status=Published` 但 `published_at=None`。公开详情、点赞、游玩、Remix 和 `custom_world_gallery_entry` 同步都以 `Published + deleted_at=None + visible=true` 判断作品可公开互动;展示和 gallery 同步时间在 `published_at` 缺失时回退 `updated_at`,不得仅因 `published_at` 为空返回“已发布作品不存在”。 - -### `custom_world_session` - -- Rust 结构体:`CustomWorldSession` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/custom_world.rs` - ### `database_migration_import_chunk` - Rust 结构体:`DatabaseMigrationImportChunk` @@ -863,131 +741,6 @@ Responses 的终态载荷既是工具调用的恢复源,也是正文的恢复 - 说明:模型生成运行时服务 identity 显式轮换审计表。只有已授权迁移操作员可调用 `rotate_editor_generation_runtime_service_identity_and_return`,且新 writer 不能等于当前 writer,也不能是任一已登记 migration operator。每次记录旧 writer、新 writer、迁移操作员 identity、操作人、原因和服务端时间;轮换只修改 writer,不覆盖已有模型价格。生产人工入口为 `scripts/deploy/production-runtime-writer-identity-rotate.mjs`,CLI 会核对当前登录 operator identity 并要求双录新 identity。 - 索引:自增主键 `rotation_id`。 -### `inventory_slot` - -- Rust 结构体:`InventorySlot` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/gameplay.rs` - -### `jump_hop_agent_session` - -- Rust 结构体:`JumpHopAgentSessionRow` -- 源码:`server-rs/crates/spacetime-module/src/jump_hop/tables.rs` - -### `jump_hop_event` - -- Rust 结构体:`JumpHopEventRow` -- 源码:`server-rs/crates/spacetime-module/src/jump_hop/tables.rs` - -### `jump_hop_leaderboard_entry` - -- Rust 结构体:`JumpHopLeaderboardEntryRow` -- 源码:`server-rs/crates/spacetime-module/src/jump_hop/tables.rs` -- 说明:跳一跳作品维度排行榜 read model,每个 `profile_id + player_id` 只保留 1 条最佳记录;排序口径为成功跳跃次数降序、游戏时长升序、更新时间升序,草稿试玩不作为公开排行榜语义。 -- 展示契约:`player_id` 只作为后端去重和 `viewerBest` 匹配身份键,不得直接进入 HTTP/UI 展示字段;`/api/runtime/jump-hop/works/{profile_id}/leaderboard` 必须补齐 `displayName`,已登录玩家读取账号显示名,匿名游客展示“游客玩家”,失效账号展示“失效玩家”。 - -### `jump_hop_runtime_run` - -- Rust 结构体:`JumpHopRuntimeRunRow` -- 源码:`server-rs/crates/spacetime-module/src/jump_hop/tables.rs` -- 说明:运行记录持久化 `runtime_mode`,取值为 `draft` / `published`;草稿试玩只允许作品所有者启动,不累计公开游玩次数,也不写入公开排行榜。 - -### `jump_hop_work_profile` - -- Rust 结构体:`JumpHopWorkProfileRow` -- 源码:`server-rs/crates/spacetime-module/src/jump_hop/tables.rs` -- 说明:作品投影持久化独立 `theme_text`,用于生成主题和公开卡片主题展示;历史行为空时按 `work_title` 兜底。`back_button_asset_json` 保存 image2 单独生成并去绿后的 1:1 左上角返回按钮资产快照;旧迁移数据按 `None` 兼容,运行态缺失该字段时使用同尺寸 CSS 主题按钮兜底。 - -### SpacetimeDB view:`jump_hop_gallery_card_view` - -- Rust view:`jump_hop_gallery_card_view` -- 返回类型:`Vec` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/jump_hop.rs` -- 说明:跳一跳公开列表 source 投影,只暴露 `publication_status = Published` 的作品卡片字段;统一公开列表主路径通过 `public_work_gallery_entry` 消费该 view 并映射成跨玩法契约。个人作品列表、详情、发布和运行态仍按 procedure 路径处理。 - -### SpacetimeDB view:`jump_hop_gallery_view` - -- Rust view:`jump_hop_gallery_view` -- 返回类型:`Vec` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/jump_hop.rs` -- 说明:跳一跳公开详情兼容投影,包含作品、路径和素材字段;统一公开详情主路径通过 `public_work_detail_entry` 消费该 view,只保留平台详情页展示摘要。 -- 字段变更:`visible` 控制是否进入公开列表 / 详情,新作品默认 `false`;旧迁移数据由 `migration.rs` 按历史公开默认补 `true`。 - -### `wooden_fish_agent_session` - -- Rust 结构体:`WoodenFishAgentSessionRow` -- 源码:`server-rs/crates/spacetime-module/src/wooden_fish/tables.rs` - -### `wooden_fish_event` - -- Rust 结构体:`WoodenFishEventRow` -- 源码:`server-rs/crates/spacetime-module/src/wooden_fish/tables.rs` - -### `wooden_fish_runtime_run` - -- Rust 结构体:`WoodenFishRuntimeRunRow` -- 源码:`server-rs/crates/spacetime-module/src/wooden_fish/tables.rs` - -### `wooden_fish_work_profile` - -- Rust 结构体:`WoodenFishWorkProfileRow` -- 源码:`server-rs/crates/spacetime-module/src/wooden_fish/tables.rs` -- 说明:敲木鱼作品 profile 真相,包含敲击物图案、背景环境图、主题返回按钮图、敲击音效、飘字配置、发布状态和公开计数;`background_asset_json` 保存 image2 生成的 9:16 背景环境图资产快照,`back_button_asset_json` 保存 image2 生成并去绿后的 1:1 返回按钮图资产快照,旧迁移数据按 `None` 兼容。 - -### SpacetimeDB view:`wooden_fish_gallery_card_view` - -- Rust view:`wooden_fish_gallery_card_view` -- 返回类型:`Vec` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/wooden_fish.rs` -- 说明:敲木鱼公开列表 source 投影,只暴露 `publication_status = published` 的作品卡片字段;统一公开列表主路径通过 `public_work_gallery_entry` 消费该 view 并映射成跨玩法契约。个人作品列表、详情、发布和运行态仍按 procedure 路径处理。 - -### SpacetimeDB view:`wooden_fish_gallery_view` - -- Rust view:`wooden_fish_gallery_view` -- 返回类型:`Vec` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/wooden_fish.rs` -- 说明:敲木鱼公开详情兼容投影,包含敲击物图案、背景环境图、主题返回按钮图、敲击音效和飘字配置;统一公开详情主路径通过 `public_work_detail_entry` 消费该 view,只保留平台详情页展示摘要。 -- 字段变更:`visible` 控制是否进入公开列表 / 详情,新作品默认 `false`;旧迁移数据由 `migration.rs` 按历史公开默认补 `true`。 - -### `match3d_agent_message` - -- Rust 结构体:`Match3DAgentMessageRow` -- 源码:`server-rs/crates/spacetime-module/src/match3d/tables.rs` - -### `match3d_agent_session` - -- Rust 结构体:`Match3DAgentSessionRow` -- 源码:`server-rs/crates/spacetime-module/src/match3d/tables.rs` - -### `match3d_runtime_run` - -- Rust 结构体:`Match3DRuntimeRunRow` -- 源码:`server-rs/crates/spacetime-module/src/match3d/tables.rs` - -### `match_3_d_work_profile` - -- Rust 结构体:`Match3DWorkProfileRow` -- Rust accessor:`match_3_d_work_profile` -- 源码:`server-rs/crates/spacetime-module/src/match3d/tables.rs` -- 兼容说明:dev 现有 SpacetimeDB 元数据中的真实表名 / 索引名为 `match_3_d_work_profile` 与 `match_3_d_work_profile_*_idx_btree`。module 内部 accessor 必须与该 canonical name 对齐,避免 Rust SDK 在 `index_id_from_name` 初始化二级索引时查找 `match3d_work_profile_*` 并触发 `No such index` panic。`migration.rs` 仍兼容旧迁移包中的 `match3d_work_profile` 表名补默认字段。 - -### SpacetimeDB view:`match_3_d_gallery_view` - -- Rust view:`match3d_gallery_view` -- 返回类型:`Vec` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/match3d.rs` -- 说明:抓大鹅公开 source 投影,只暴露 `publication_status = published` 的作品卡片字段;统一公开列表 / 详情主路径通过 `public_work_gallery_entry` / `public_work_detail_entry` 消费该 view 并映射成跨玩法契约。个人作品列表、详情、发布、点赞、游玩记录和 Remix 仍按原有 procedure / reducer 路径处理。 -- 字段变更:`visible` 控制是否进入公开列表 / 详情,新作品默认 `false`;旧迁移数据由 `migration.rs` 按历史公开默认补 `true`。 - -### `npc_state` - -- Rust 结构体:`NpcState` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/gameplay.rs` - -### `player_progression` - -- Rust 结构体:`PlayerProgression` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/gameplay.rs` - ### `profile_dashboard_state` - Rust 结构体:`ProfileDashboardState` @@ -1172,111 +925,13 @@ Responses 的终态载荷既是工具调用的恢复源,也是正文的恢复 - Rust 结构体:`PublicWorkPlayDailyStat` - 源码:`server-rs/crates/spacetime-module/src/runtime/profile.rs` -### `puzzle_agent_message` - -- Rust 结构体:`PuzzleAgentMessageRow` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/puzzle.rs` - -### `puzzle_agent_session` - -- Rust 结构体:`PuzzleAgentSessionRow` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/puzzle.rs` - -### `puzzle_background_compile_task` - -- Rust 结构体:`PuzzleBackgroundCompileTaskRow` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/puzzle.rs` -- 说明:拼图首图后台生成的跨 api-server 实例互斥 claim 表,只保存活动任务租约,不表达最终生成结果;`task_id` 为主键,`claim_id` 用于释放时防止误删新租约,租约超时时间为 30 分钟。 - -### `puzzle_event` - -- Rust 结构体:`PuzzleEvent` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/puzzle.rs` - -### `puzzle_leaderboard_entry` - -- Rust 结构体:`PuzzleLeaderboardEntryRow` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/puzzle.rs` - -### `puzzle_runtime_run` - -- Rust 结构体:`PuzzleRuntimeRunRow` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/puzzle.rs` - -### `puzzle_work_profile` - -- Rust 结构体:`PuzzleWorkProfileRow` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/puzzle.rs` -- 说明:拼图作品 profile 表,保存草稿 / 已发布作品的标题、作者、关卡、封面、发布状态、可见性、基础游玩数、点赞数、改造数和积分激励领取状态。 -- 字段变更:`visible` 控制是否进入公开列表 / 详情、通关后的推荐下一作品候选、公开点赞 / Remix 和正式公开 runtime;新作品默认 `false`,旧迁移数据按历史公开默认补 `true`。后台隐藏后作品可保留 `publication_status = Published`,但公开消费路径必须按 `Published + visible=true` 判断。 - -### `puzzle_clear_agent_session` - -- Rust 结构体:`PuzzleClearAgentSessionRow` -- 源码:`server-rs/crates/spacetime-module/src/puzzle_clear/tables.rs` -- 说明:拼消消创作会话表,保存轻表单草稿、生成状态、已发布 profile 关联和更新时间;只由拼消消 procedure 读写。 - -### `puzzle_clear_work_profile` - -- Rust 结构体:`PuzzleClearWorkProfileRow` -- 源码:`server-rs/crates/spacetime-module/src/puzzle_clear/tables.rs` -- 说明:拼消消作品 profile 表,保存中央底图资产、4 张素材工作表切片后合成的最终 atlas、35 个复合图案组、95 个 1x1 卡牌切片、卡背占位图、发布状态、可见性和基础 play count;公开列表 / 详情只通过 read model 消费,不让前端直接订阅源表。 -- 字段变更:`visible` 控制是否进入公开列表 / 详情,新作品默认 `false`;旧迁移数据由 `migration.rs` 按历史公开默认补 `true`。 - -### `puzzle_clear_runtime_run` - -- Rust 结构体:`PuzzleClearRuntimeRunRow` -- 源码:`server-rs/crates/spacetime-module/src/puzzle_clear/tables.rs` -- 说明:拼消消正式 runtime run 表,保存当前关卡、已消除次数、棋盘 snapshot、开始 / 完成时间和 run 状态;正式胜负、重试、完成、超时和交换结果以后端 procedure 裁决为准。 - -### `puzzle_clear_event` - -- Rust 结构体:`PuzzleClearEventRow` -- 源码:`server-rs/crates/spacetime-module/src/puzzle_clear/tables.rs` -- 说明:拼消消基础 runtime 事件表,记录 published run 的开局、关卡完成、全局完成、失败、超时和消除统计来源;首版不做排行榜。 - -### SpacetimeDB view:`puzzle_clear_gallery_view` - -- Rust view:`puzzle_clear_gallery_view` -- 返回类型:`Vec` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/puzzle_clear.rs` -- 说明:拼消消公开详情 source 投影,只暴露 `publication_status = published` 且 `visible = true` 的作品,包含 atlas、底图、图案组和卡牌切片等详情级字段;统一公开详情主路径通过 `public_work_detail_entry` 消费该 view,只保留平台详情页展示摘要。 - -### SpacetimeDB view:`puzzle_clear_gallery_card_view` - -- Rust view:`puzzle_clear_gallery_card_view` -- 返回类型:`Vec` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/puzzle_clear.rs` -- 说明:拼消消公开列表 source 投影,只暴露平台卡片需要的公开字段;统一公开列表主路径通过 `public_work_gallery_entry` 消费该 view,`/api/runtime/puzzle-clear/gallery` 保留玩法专属 HTTP shape。 - -### SpacetimeDB view:`puzzle_gallery_view` - -- Rust view:`puzzle_gallery_view` -- 返回类型:`Vec` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/puzzle.rs` -- 说明:拼图广场公开详情 source / 兼容投影,只暴露 `publication_status = Published` 且 `visible = true` 的作品,但返回完整 `PuzzleWorkProfile`,包含 levels / anchor_pack 等详情级字段;统一公开详情主路径通过 `public_work_detail_entry` 消费该 view,只保留平台详情页展示摘要。 - -### SpacetimeDB view:`puzzle_gallery_card_view` - -- Rust view:`puzzle_gallery_card_view` -- 返回类型:`Vec` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/puzzle.rs` -- 说明:拼图公开列表 source 投影,只暴露 `publication_status = Published` 且 `visible = true` 的公开字段,不携带 levels / anchor_pack 等详情级载荷;统一公开列表主路径通过 `public_work_gallery_entry` 消费该 view,`/api/runtime/puzzle/gallery` 保留旧 HTTP shape,并从统一 public cache 映射回 `PuzzleGalleryResponse`。 - -### 拼图公开列表 HTTP 窗口缓存 - -- 接口:`GET /api/runtime/puzzle/gallery` -- 响应契约:保留 `items` 字段兼容旧前端;当前 `items` 只返回前 10 个完整卡片,新增 `previewRefs` 返回后 10 个 `workId/profileId` 引用,并返回 `hasMore`、`nextCursor` 与 `totalCount`。 -- 缓存策略:`api-server` 在 `PuzzleGalleryCache` 中缓存最终 `PuzzleGalleryResponse` 的预序列化 data JSON。缓存 miss / 过期时单飞重建,避免并发请求重复排序、映射、DTO 深拷贝和 `serde_json::Value` 树构造;开启响应 envelope 时只按请求拼接轻量 meta,缓存短 TTL 刷新 `recentPlayCount7d`,后台 cleanup task 周期清理超过最大空闲窗口的旧响应。OTLP 通过 `genarrative.puzzle_gallery.cache.*`、`genarrative.spacetime.read.*`、`genarrative.http.server.response_bodies.in_flight` 和 `genarrative.http.server.request_permits.available` 区分缓存重建、SpacetimeDB 本地订阅读、响应 body 生命周期和 HTTP 背压状态。 -- 详情路径:公开详情、点赞、游玩记录和 Remix 仍按原有 procedure / reducer 路径处理;前端拿到 `previewRefs` 后如果需要展开更多内容,应优先使用后续列表窗口能力或详情 cache,不要把自动详情预取变成新的 procedure 热点。 - ### api-server 长期订阅读模型 -> 现役覆盖:`spacetime-client` 不再把旧创作入口配置、公开作品聚合表或逐玩法 gallery view 作为连接池必需订阅。`REQUIRED_CACHED_READ_MODEL_QUERIES` 当前为空,`user_account` 仅作为认证兼容所需的可选缓存。新版 `/creation` 的公开内容通过可选鉴权的 `GET /api/editor/showcase/resources` 读取编辑器精选 read model;登录态的 viewer like 投影在请求事务内读取,不进入共享长期订阅 cache,HTTP 响应固定 `private, no-store` 并按 `Authorization` 区分。旧作品、入口配置和玩法统计表只保留 schema 数据壳,不再形成订阅 cache、BFF 路由或前端契约。 +> 现役覆盖:`spacetime-client` 的连接池不订阅旧创作模板 schema、逐玩法 gallery view 或公开作品聚合缓存。`REQUIRED_CACHED_READ_MODEL_QUERIES` 当前为空,`user_account` 仅作为认证兼容所需的可选缓存。新版 `/creation` 的公开内容通过可选鉴权的 `GET /api/editor/showcase/resources` 读取编辑器精选 read model;登录态的 viewer like 投影在请求事务内读取,不进入共享长期订阅 cache,HTTP 响应固定 `private, no-store` 并按 `Authorization` 区分。旧创作模板作品、旧玩法 gallery view 及公开作品聚合缓存已从当前 schema 退役,不再形成订阅 cache、BFF 路由或前端契约。 #### 退役前历史订阅清单 -`spacetime-client` 建立每个池连接时会等待下列订阅初始同步: +以下仅记录退役前历史,不代表当前 schema 或订阅契约;`spacetime-client` 当时建立每个池连接会等待这些订阅初始同步: - `SELECT * FROM public_work_gallery_entry` - `SELECT * FROM public_work_detail_entry` @@ -1305,28 +960,16 @@ Responses 的终态载荷既是工具调用的恢复源,也是正文的恢复 private `asset_object` 不进入长期订阅;安全判断通过受限 procedure 在服务端按主键或 `(bucket, object_key)` 索引读取事务内真相,避免全表复制、订阅失败和增量同步延迟把已登记私有对象误判为 legacy 未登记对象。 -跨玩法公开作品列表 / 详情主读模型是 `public_work_gallery_entry` 与 `public_work_detail_entry`。拼图、自定义世界等旧玩法公开列表 HTTP 路由保留原响应 shape,由 BFF mapper 从统一 public cache 映射回当前 DTO;旧 `*_gallery_card_view` / `*_gallery_view` / `custom_world_gallery_entry` 继续作为 source view 和兼容缓存。各玩法的个人作品列表、详情、发布、点赞、游玩记录、Remix 和其它需要鉴权或写入副作用的路径继续走 procedure / reducer;不要为了公开列表性能把这些 owner-specific 或 mutation 语义混进 public view。 +旧创作模板的逐玩法 gallery 兼容路径已退役;当前不存在 `*_gallery_card_view` / `*_gallery_view` / `custom_world_gallery_entry` 订阅或 BFF fallback。若未来重新开放统一公开作品能力,必须先新增并冻结当时正式 read model、schema、mapper 和 HTTP 契约,不能从历史 view 或源码恢复。 -`GET /api/creation-entry/config`、入口熔断和公开作品互动熔断优先从订阅 cache 读取创作入口配置;cache 缺失时使用最近一次成功读取的内存快照,再兜底调用 `get_creation_entry_config` procedure 完成空库种子或旧库兼容。 +`GET /api/creation-entry/config`、入口熔断和公开作品互动熔断通过现役 `get_creation_entry_config` procedure 读取权威配置;不得把已退役连接池订阅 cache 当作现役实现。 入口配置快照包含 start card、类型弹窗、公告位兼容字段、入口类型列表和 `publicWorkInteractions` 作品互动矩阵;入口类型列表新增 `category_id`、`category_label`、`category_sort_order` 后,后台 upsert、`shared-contracts`、`module-runtime` 和 `spacetime-client` binding 必须同步,旧迁移 JSON 通过 `migration.rs` 默认值兼容。作品互动矩阵是全局公开作品详情能力配置,不属于单个 `creation_entry_type_config`;后台通过 `/admin/api/creation-entry/config/interactions` 保存,前端据此隐藏或拦截已接入的点赞 / Remix 入口,api-server 同时对已接入后端动作执行 `public_work_interaction_disabled` 熔断。 -RPG 创作入口的配置 ID 是 `rpg`,当前 `visible=true`、`open=true`;历史 `custom-world` 路由仍是 RPG 的工程域与运行态源类型。入口熔断把 `/api/runtime/custom-world*`、`/api/story/*` 和 `/api/runtime/chat/*` 统一映射到 `rpg`,不要新增平行 `airp` 路由或用 `airp` 接管当前文字冒险链路。 +RPG 创作入口的配置 ID 是 `rpg`,当前 `visible=true`、`open=true`。历史 `custom-world`、`story` 与 `/api/runtime/chat/*` 请求链路均未挂载,不属于当前 api-server 路由或 schema 真相;不得为这些历史源码恢复路由、领域表或用平行 `airp` 链路接管。 旧结构化创作和 RPG 的 LLM JSON 链路及其 Responses `web_search` 配置已退出 api-server 编译目标;不得为历史源码恢复 `GENARRATIVE_RPG_LLM_WEB_SEARCH_ENABLED` 或 `GENARRATIVE_CREATION_AGENT_LLM_WEB_SEARCH_ENABLED`。 -统一公开作品 BFF 的历史契约曾使用 `GET /api/public-works` 与 `GET /api/public-works/{publicWorkCode}`;当前是否挂载以 `api-server/src/app.rs` 为准,当前平台入口不再恢复旧公开作品页面。若后续重新开放公开 read model,只能订阅 `public_work_gallery_entry` / `public_work_detail_entry` 这类稳定投影,不能订阅领域源表后自行拼装列表。 - -- 字段变更:`visible` 控制是否进入公开列表 / 详情,新作品默认 `false`;旧迁移数据由 `migration.rs` 按历史公开默认补 `true`。 - -### `quest_log` - -- Rust 结构体:`QuestLog` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/gameplay.rs` - -### `quest_record` - -- Rust 结构体:`QuestRecord` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/gameplay.rs` +统一公开作品 BFF 的历史契约曾使用 `GET /api/public-works` 与 `GET /api/public-works/{publicWorkCode}`;这些旧页面与旧 read model 当前不再挂载。未来若重新开放公开 read model,必须先新增当前正式 schema 与契约,不能订阅已退役 view 或领域源表后自行拼装列表。 ### `refresh_session` @@ -1345,44 +988,6 @@ RPG 创作入口的配置 ID 是 `rpg`,当前 `visible=true`、`open=true`; - Rust 结构体:`RuntimeSnapshotRow` - 源码:`server-rs/crates/spacetime-module/src/runtime/snapshots.rs` -### `square_hole_agent_message` - -- Rust 结构体:`SquareHoleAgentMessageRow` -- 源码:`server-rs/crates/spacetime-module/src/square_hole/tables.rs` - -### `square_hole_agent_session` - -- Rust 结构体:`SquareHoleAgentSessionRow` -- 源码:`server-rs/crates/spacetime-module/src/square_hole/tables.rs` - -### `square_hole_runtime_run` - -- Rust 结构体:`SquareHoleRuntimeRunRow` -- 源码:`server-rs/crates/spacetime-module/src/square_hole/tables.rs` - -### `square_hole_work_profile` - -- Rust 结构体:`SquareHoleWorkProfileRow` -- 源码:`server-rs/crates/spacetime-module/src/square_hole/tables.rs` - -### SpacetimeDB view:`square_hole_gallery_view` - -- Rust view:`square_hole_gallery_view` -- 返回类型:`Vec` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/square_hole.rs` -- 说明:方洞挑战公开 source 投影,只暴露 `publication_status = published` 的作品卡片字段;统一公开列表 / 详情主路径通过 `public_work_gallery_entry` / `public_work_detail_entry` 消费该 view 并映射成跨玩法契约。个人作品列表、详情、发布、点赞、游玩记录和 Remix 仍按原有 procedure / reducer 路径处理。 -- 字段变更:`visible` 控制是否进入公开列表 / 详情,新作品默认 `false`;旧迁移数据由 `migration.rs` 按历史公开默认补 `true`。 - -### `story_event` - -- Rust 结构体:`StoryEvent` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/gameplay.rs` - -### `story_session` - -- Rust 结构体:`StorySession` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/gameplay.rs` - ### `tracking_daily_stat` - Rust 结构体:`TrackingDailyStat` @@ -1396,11 +1001,6 @@ RPG 创作入口的配置 ID 是 `rpg`,当前 `visible=true`、`open=true`; - 写入:关键业务埋点同步调用单条 procedure;普通 HTTP route tracking 由 `api-server` 本机 outbox 批量调用 `record_tracking_events_and_return`。outbox 到达批量阈值时先封存 active 文件并切新 active,后台 worker 异步 flush sealed 文件,HTTP 请求线程不等待 SpacetimeDB。`FLUSH_INTERVAL_MS` 只负责兜底封存长时间未满批的 active 文件,`MAX_BYTES` 只做磁盘保护阈值。`event_id` 必须稳定且全局唯一,批量重试时用唯一索引做幂等跳过。 - 外部 API 失败:`event_key = external_api_call_failure` 使用同一张表落库;它是供应商失败审计事实,不新增 SpacetimeDB 表,查询时按 `module_key = 'external-api'` 或 `scope_kind = module AND scope_id = ''` 过滤。 -### `treasure_record` - -- Rust 结构体:`TreasureRecord` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/gameplay.rs` - ### `user_account` - Rust 结构体:`UserAccount` @@ -1412,41 +1012,4 @@ RPG 创作入口的配置 ID 是 `rpg`,当前 `visible=true`、`open=true`; - Rust 结构体:`UserBrowseHistory` - 源码:`server-rs/crates/spacetime-module/src/runtime/browse_history.rs` -### `visual_novel_agent_message` - -- Rust 结构体:`VisualNovelAgentMessageRow` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/visual_novel.rs` - -### `visual_novel_agent_session` - -- Rust 结构体:`VisualNovelAgentSessionRow` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/visual_novel.rs` - -### `visual_novel_runtime_event` - -- Rust 结构体:`VisualNovelRuntimeEvent` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/visual_novel.rs` - -### `visual_novel_runtime_history_entry` - -- Rust 结构体:`VisualNovelRuntimeHistoryEntryRow` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/visual_novel.rs` - -### `visual_novel_runtime_run` - -- Rust 结构体:`VisualNovelRuntimeRunRow` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/visual_novel.rs` - -### `visual_novel_work_profile` - -- Rust 结构体:`VisualNovelWorkProfileRow` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/visual_novel.rs` - -### SpacetimeDB view:`visual_novel_gallery_view` - -- Rust view:`visual_novel_gallery_view` -- 返回类型:`Vec` -- 源码:`server-rs/crates/spacetime-module/src/legacy_schema/visual_novel.rs` -- 说明:视觉小说公开 source 投影,只暴露 `publication_status = published` 的作品卡片字段,不把完整 `draft` 暴露给公开列表订阅;统一公开列表 / 详情主路径通过 `public_work_gallery_entry` / `public_work_detail_entry` 消费该 view 并映射成跨玩法契约。个人历史、详情、运行态和发布仍按原有 procedure / reducer 路径处理。 -- 字段变更:`visible` 控制是否进入公开列表 / 详情,新作品默认 `false`;旧迁移数据由 `migration.rs` 按历史公开默认补 `true`。 > 2026-09-03 修订:认证成功后的 Router provisioning 改为异步尽力修复,不再阻塞主站登录;LLM 热路径只读取本地已完成的账号密钥,控制面不可用时请求失败关闭。provisioning secret 仅从部署侧受保护环境变量或 secret file 读取,不再内置源码常量。 diff --git a/docs/【开发运维】本地开发验证与生产运维-2026-05-15.md b/docs/【开发运维】本地开发验证与生产运维-2026-05-15.md index 3aa30b5be..76cc81a16 100644 --- a/docs/【开发运维】本地开发验证与生产运维-2026-05-15.md +++ b/docs/【开发运维】本地开发验证与生产运维-2026-05-15.md @@ -1141,20 +1141,7 @@ SELECT * FROM profile_recharge_product_config ORDER BY sort_order ASC; - 微信新用户的内部 `user_id` 改为不可复用的 `user_` 前缀 UUID 风格,避免清库后旧作品被后来的顺序号账号顶替。 - 当作品作者的 `owner_user_id` 找不到真实账号时,作品统一显示为占位作者:`失效作者`,公开陶泥号固定为 `SY-00000000`,占位账号 ID 为 `wx-openid-placeholder`。 - 该占位账号只用于作品作者域,不扩展到全站其它身份域。 -- 如需把历史孤儿作品批量回填到占位作者,使用 `scripts/rebind-orphan-work-owners.mjs` 先基于当前 auth 快照识别有效用户,再把缺失作者对应的作品表写回为占位 ID;脚本输入输出都基于 SpacetimeDB 迁移 JSON。 - -### 回填脚本用法 - -```bash -node scripts/rebind-orphan-work-owners.mjs --in --out -node scripts/rebind-orphan-work-owners.mjs --in --dry-run -node scripts/rebind-orphan-work-owners.mjs --in --out --placeholder-user-id wx-openid-placeholder -``` - -- `--in`:SpacetimeDB 导出的迁移 JSON。 -- `--out`:写回后的迁移 JSON 输出路径。 -- `--dry-run`:只统计回填行数,不写文件。 -- `--placeholder-user-id`:需要时可覆盖默认占位账号 ID。 +- 旧作品表退役后,迁移 JSON 回填工具 `scripts/rebind-orphan-work-owners.mjs` 已删除,不再提供回填脚本用法或当前操作入口;占位作者的显示与身份域语义继续保持上述规则。 ## 维护页目标文件安全边界(2026-08-05) diff --git a/scripts/check-spacetime-schema-guard.mjs b/scripts/check-spacetime-schema-guard.mjs index 176c4aec9..528ecb6a2 100644 --- a/scripts/check-spacetime-schema-guard.mjs +++ b/scripts/check-spacetime-schema-guard.mjs @@ -12,6 +12,80 @@ const tableCatalogPath = 'docs/【后端架构】server-rs与SpacetimeDB数据契约-2026-05-15.md'; const bindingsRoot = 'server-rs/crates/spacetime-client/src/module_bindings/'; const allowBreaking = process.env.SPACETIME_SCHEMA_GUARD_ALLOW_BREAKING === '1'; + +// 本次历史表退役的一次性迁移白名单。该清单只允许这些已确认表从基线消失; +// 待删除结果进入后续主线基线后必须删除本清单,其他表仍按既有破坏性变更路径失败。 +export const APPROVED_RETIRED_TABLE_DELETIONS = Object.freeze([ + 'player_progression', + 'chapter_progression', + 'npc_state', + 'story_session', + 'story_event', + 'inventory_slot', + 'battle_state', + 'treasure_record', + 'quest_record', + 'quest_log', + 'custom_world_profile', + 'custom_world_session', + 'custom_world_agent_session', + 'custom_world_agent_message', + 'custom_world_agent_operation', + 'custom_world_draft_card', + 'custom_world_gallery_entry', + 'puzzle_agent_session', + 'puzzle_background_compile_task', + 'puzzle_agent_message', + 'puzzle_work_profile', + 'puzzle_event', + 'puzzle_runtime_run', + 'puzzle_leaderboard_entry', + 'puzzle_clear_agent_session', + 'puzzle_clear_work_profile', + 'puzzle_clear_runtime_run', + 'puzzle_clear_event', + 'bark_battle_draft_config', + 'bark_battle_published_config', + 'bark_battle_runtime_run', + 'bark_battle_score_record', + 'bark_battle_leaderboard_entry', + 'bark_battle_work_stats_projection', + 'bark_battle_personal_best_projection', + 'match3d_agent_session', + 'match3d_agent_message', + 'match_3_d_work_profile', + 'match3d_runtime_run', + 'jump_hop_agent_session', + 'jump_hop_work_profile', + 'jump_hop_runtime_run', + 'jump_hop_event', + 'jump_hop_leaderboard_entry', + 'wooden_fish_agent_session', + 'wooden_fish_work_profile', + 'wooden_fish_runtime_run', + 'wooden_fish_event', + 'square_hole_agent_session', + 'square_hole_agent_message', + 'square_hole_work_profile', + 'square_hole_runtime_run', + 'visual_novel_agent_session', + 'visual_novel_agent_message', + 'visual_novel_work_profile', + 'visual_novel_runtime_run', + 'visual_novel_runtime_history_entry', + 'visual_novel_runtime_event', + 'big_fish_creation_session', + 'big_fish_agent_message', + 'big_fish_asset_slot', + 'big_fish_runtime_run', + 'big_fish_event', +]); +const approvedRetiredTableDeletions = new Set(APPROVED_RETIRED_TABLE_DELETIONS); + +export function isApprovedRetiredTableDeletion(accessor) { + return approvedRetiredTableDeletions.has(accessor); +} + function normalizePath(path) { return path.replace(/\\/gu, '/'); } @@ -639,7 +713,7 @@ function fieldDescription(field) { return `${field.name}: ${field.type}`; } -function compareTables(baseTables, currentTables) { +export function compareTables(baseTables, currentTables) { const failures = []; let schemaChanged = false; let breakingChanged = false; @@ -648,6 +722,9 @@ function compareTables(baseTables, currentTables) { const currentTable = currentTables.get(accessor); if (!currentTable) { schemaChanged = true; + if (isApprovedRetiredTableDeletion(accessor)) { + continue; + } breakingChanged = true; failures.push( `${baseTable.path}:${baseTable.line}: SpacetimeDB 表 ${accessor} 被删除或改名。表删除/改名必须先询问用户并确认迁移计划。`, diff --git a/scripts/check-spacetime-schema-guard.test.ts b/scripts/check-spacetime-schema-guard.test.ts index 5265fe9f9..5111c139d 100644 --- a/scripts/check-spacetime-schema-guard.test.ts +++ b/scripts/check-spacetime-schema-guard.test.ts @@ -1,7 +1,9 @@ import { describe, expect, it } from 'vitest'; import { + APPROVED_RETIRED_TABLE_DELETIONS, collectTablesFromSources, + compareTables, isFormalGateEnvironment, listReachableRustFiles, resolveBaseRef, @@ -36,6 +38,15 @@ function createGitResolver(entries: Record) { return (args: string[]) => entries[args.join(' ')] ?? null; } +function collectTables(accessors: string[]) { + return collectTablesFromSources( + accessors.map((accessor, index) => ({ + path: `${sourceRoot}/schema.rs`, + text: tableSource(`Table${index}`, accessor), + })), + ).tables; +} + describe('SpacetimeDB schema guard base resolution', () => { it('prefers an explicit Jenkins-provided base ref', () => { expect( @@ -125,3 +136,61 @@ describe('SpacetimeDB schema guard module reachability', () => { expect(result.failures[0]).toMatch(/table accessor example 重复定义/u); }); }); + +describe('SpacetimeDB schema guard retired table deletion allowlist', () => { + it('allows exactly the 63 approved historical tables to disappear', () => { + expect(APPROVED_RETIRED_TABLE_DELETIONS).toHaveLength(63); + expect(new Set(APPROVED_RETIRED_TABLE_DELETIONS).size).toBe(63); + + const result = compareTables( + collectTables([...APPROVED_RETIRED_TABLE_DELETIONS]), + new Map(), + ); + + expect(result.failures).toEqual([]); + expect(result.schemaChanged).toBe(true); + expect(result.breakingChanged).toBe(false); + }); + + it('still rejects deletion of a table outside the approved list', () => { + const result = compareTables( + collectTables([APPROVED_RETIRED_TABLE_DELETIONS[0], 'active_table']), + new Map(), + ); + + expect(result.failures).toHaveLength(1); + expect(result.failures[0]).toMatch(/active_table.*被删除或改名/u); + expect(result.schemaChanged).toBe(true); + expect(result.breakingChanged).toBe(true); + }); + + it('does not suppress retained-table field deletion or rename checks', () => { + const baseTables = collectTablesFromSources([ + { + path: `${sourceRoot}/ranks.rs`, + text: `#[spacetimedb::table(accessor = retained_deleted_field)]\npub struct RetainedDeletedField {\n pub id: u64,\n pub title: String,\n}\n`, + }, + { + path: `${sourceRoot}/titles.rs`, + text: `#[spacetimedb::table(accessor = retained_renamed_field)]\npub struct RetainedRenamedField {\n pub id: u64,\n pub title: String,\n}\n`, + }, + ]).tables; + const currentTables = collectTablesFromSources([ + { + path: `${sourceRoot}/ranks.rs`, + text: `#[spacetimedb::table(accessor = retained_deleted_field)]\npub struct RetainedDeletedField {\n pub id: u64,\n}\n`, + }, + { + path: `${sourceRoot}/titles.rs`, + text: `#[spacetimedb::table(accessor = retained_renamed_field)]\npub struct RetainedRenamedField {\n pub id: u64,\n pub name: String,\n}\n`, + }, + ]).tables; + + const result = compareTables(baseTables, currentTables); + + expect(result.failures).toHaveLength(2); + expect(result.failures.join('\n')).toMatch(/字段数量减少/u); + expect(result.failures.join('\n')).toMatch(/字段被删除或改名/u); + expect(result.breakingChanged).toBe(true); + }); +}); diff --git a/scripts/rebind-orphan-work-owners.mjs b/scripts/rebind-orphan-work-owners.mjs deleted file mode 100644 index a9319f54f..000000000 --- a/scripts/rebind-orphan-work-owners.mjs +++ /dev/null @@ -1,202 +0,0 @@ -#!/usr/bin/env node - -import { readFile, writeFile } from 'node:fs/promises'; -import path from 'node:path'; - -export const DEFAULT_ORPHAN_WORK_OWNER_USER_ID = 'wx-openid-placeholder'; - -export const WORK_OWNER_TABLES = [ - 'custom_world_profile', - 'custom_world_gallery_entry', - 'custom_world_session', - 'custom_world_agent_session', - 'custom_world_draft_card', - 'puzzle_agent_session', - 'puzzle_work_profile', - 'bark_battle_draft_config', - 'bark_battle_published_config', - 'match3d_agent_session', - 'match3d_work_profile', - 'jump_hop_agent_session', - 'jump_hop_work_profile', - 'wooden_fish_agent_session', - 'wooden_fish_work_profile', - 'square_hole_agent_session', - 'square_hole_work_profile', - 'visual_novel_agent_session', - 'visual_novel_work_profile', - 'big_fish_creation_session', -]; - -const ROW_KEY_FIELDS = [ - 'profile_id', - 'work_id', - 'session_id', - 'draft_id', - 'gallery_entry_id', - 'id', -]; - -if (isCliEntry()) { - runCli(process.argv.slice(2)).catch((error) => { - console.error( - `[rebind-orphan-work-owners] ${error instanceof Error ? error.message : String(error)}`, - ); - process.exit(1); - }); -} - -export function rebindOrphanWorkOwnersInMigration( - migration, - { - placeholderUserId = DEFAULT_ORPHAN_WORK_OWNER_USER_ID, - validUserIds = [], - } = {}, -) { - if (!migration || !Array.isArray(migration.tables)) { - throw new Error('迁移 JSON 必须包含 tables 数组。'); - } - - const normalizedPlaceholderUserId = placeholderUserId.trim(); - const validUserIdSet = new Set( - (Array.isArray(validUserIds) ? validUserIds : []) - .map((value) => String(value).trim()) - .filter(Boolean), - ); - validUserIdSet.add(normalizedPlaceholderUserId); - - const reboundRows = []; - for (const table of migration.tables) { - if ( - !table || - !WORK_OWNER_TABLES.includes(table.name) || - !Array.isArray(table.rows) - ) { - continue; - } - - for (const row of table.rows) { - if (!row || typeof row !== 'object') { - continue; - } - const currentOwner = - typeof row.owner_user_id === 'string' ? row.owner_user_id.trim() : ''; - if ( - currentOwner === normalizedPlaceholderUserId || - validUserIdSet.has(currentOwner) - ) { - continue; - } - - const originalOwner = - typeof row.owner_user_id === 'string' ? row.owner_user_id : ''; - row.owner_user_id = normalizedPlaceholderUserId; - reboundRows.push({ - table: table.name, - rowKey: resolveRowKey(row), - from: originalOwner, - to: normalizedPlaceholderUserId, - }); - } - } - - return { reboundRows, validUserCount: validUserIdSet.size }; -} - -function resolveRowKey(row) { - for (const field of ROW_KEY_FIELDS) { - const value = row[field]; - if (typeof value === 'string' && value.trim()) { - return value; - } - } - return ''; -} - -async function runCli(argv) { - const options = parseCliArgs(argv); - const inputPath = path.resolve(options.in); - const outputPath = path.resolve(options.out); - const migration = JSON.parse(await readFile(inputPath, 'utf8')); - const result = rebindOrphanWorkOwnersInMigration(migration, { - placeholderUserId: options.placeholderUserId, - validUserIds: collectValidUserIds(migration), - }); - - if (!options.dryRun) { - await writeFile( - outputPath, - `${JSON.stringify(migration, null, 2)}\n`, - 'utf8', - ); - } - - console.log( - `[rebind-orphan-work-owners] ${options.dryRun ? 'dry-run' : `已写入 ${outputPath}`},回填 ${result.reboundRows.length} 行`, - ); -} - -function parseCliArgs(argv) { - const options = { - in: '', - out: '', - placeholderUserId: DEFAULT_ORPHAN_WORK_OWNER_USER_ID, - dryRun: false, - }; - - for (let index = 0; index < argv.length; index += 1) { - const arg = argv[index]; - const readValue = (name) => { - const value = argv[index + 1]; - if (!value || value.startsWith('--')) { - throw new Error(`${name} 缺少参数值。`); - } - index += 1; - return value; - }; - - if (arg === '--in') { - options.in = readValue(arg); - } else if (arg === '--out') { - options.out = readValue(arg); - } else if (arg === '--placeholder-user-id') { - options.placeholderUserId = readValue(arg); - } else if (arg === '--dry-run') { - options.dryRun = true; - } else { - throw new Error(`未知参数: ${arg}`); - } - } - - if (!options.in) { - throw new Error('必须传入 --in。'); - } - if (!options.out && !options.dryRun) { - throw new Error('非 dry-run 必须传入 --out。'); - } - return options; -} - -function collectValidUserIds(migration) { - const result = new Set(); - for (const table of migration.tables ?? []) { - if (!table || !Array.isArray(table.rows)) { - continue; - } - if (table.name === 'user_account') { - for (const row of table.rows) { - if (typeof row?.user_id === 'string' && row.user_id.trim()) { - result.add(row.user_id.trim()); - } - } - } - } - return result; -} - -function isCliEntry() { - const entry = process.argv[1]; - return entry - ? import.meta.url === `file://${entry.replace(/\\/gu, '/')}` - : false; -} diff --git a/scripts/rebind-orphan-work-owners.test.ts b/scripts/rebind-orphan-work-owners.test.ts deleted file mode 100644 index 46eb48086..000000000 --- a/scripts/rebind-orphan-work-owners.test.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { describe, expect, it } from 'vitest'; - -import { rebindOrphanWorkOwnersInMigration } from './rebind-orphan-work-owners.mjs'; - -const placeholderUserId = 'wx-openid-placeholder'; - -function table(name, rows) { - return { name, rows }; -} - -describe('rebindOrphanWorkOwnersInMigration', () => { - it('把作品表里认证表不存在的 owner_user_id 回填到占位用户', () => { - const migration = { - schema_version: 1, - exported_at_micros: 1, - tables: [ - table('user_account', [ - { user_id: 'user_alive' }, - { user_id: placeholderUserId }, - ]), - table('puzzle_work_profile', [ - { profile_id: 'p1', owner_user_id: 'user_missing' }, - { profile_id: 'p2', owner_user_id: 'user_alive' }, - { profile_id: 'p3', owner_user_id: placeholderUserId }, - ]), - table('puzzle_agent_session', [ - { session_id: 'draft-1', owner_user_id: '' }, - ]), - table('tracking_event', [ - { event_id: 't1', owner_user_id: 'user_missing' }, - ]), - ], - }; - - const result = rebindOrphanWorkOwnersInMigration(migration, { - placeholderUserId, - validUserIds: ['user_alive'], - }); - - expect(result.reboundRows).toEqual([ - { - table: 'puzzle_work_profile', - rowKey: 'p1', - from: 'user_missing', - to: placeholderUserId, - }, - { - table: 'puzzle_agent_session', - rowKey: 'draft-1', - from: '', - to: placeholderUserId, - }, - ]); - expect(migration.tables[1].rows[0].owner_user_id).toBe(placeholderUserId); - expect(migration.tables[1].rows[1].owner_user_id).toBe('user_alive'); - expect(migration.tables[1].rows[2].owner_user_id).toBe(placeholderUserId); - expect(migration.tables[2].rows[0].owner_user_id).toBe(placeholderUserId); - expect(migration.tables[3].rows[0].owner_user_id).toBe('user_missing'); - }); -}); diff --git a/server-rs/crates/spacetime-client/src/module_bindings.rs b/server-rs/crates/spacetime-client/src/module_bindings.rs index ae7484ee8..1ad32a79e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings.rs @@ -135,56 +135,16 @@ pub mod authenticate_external_api_key_and_return_procedure; pub mod authorize_database_migration_operator_procedure; pub mod backfill_editor_canvas_layout_and_return_procedure; pub mod backfill_external_generation_job_summaries_and_return_procedure; -pub mod bark_battle_draft_config_row_type; -pub mod bark_battle_draft_config_table; -pub mod bark_battle_leaderboard_entry_row_type; -pub mod bark_battle_leaderboard_entry_table; -pub mod bark_battle_personal_best_projection_row_type; -pub mod bark_battle_personal_best_projection_table; -pub mod bark_battle_published_config_row_type; -pub mod bark_battle_published_config_table; -pub mod bark_battle_runtime_run_row_type; -pub mod bark_battle_runtime_run_table; -pub mod bark_battle_score_record_row_type; -pub mod bark_battle_score_record_table; -pub mod bark_battle_work_stats_projection_row_type; -pub mod bark_battle_work_stats_projection_table; -pub mod battle_mode_type; -pub mod battle_state_table; -pub mod battle_state_type; -pub mod battle_status_type; -pub mod big_fish_agent_message_kind_type; -pub mod big_fish_agent_message_role_type; -pub mod big_fish_agent_message_table; -pub mod big_fish_agent_message_type; -pub mod big_fish_asset_kind_type; -pub mod big_fish_asset_slot_table; -pub mod big_fish_asset_slot_type; -pub mod big_fish_asset_status_type; -pub mod big_fish_creation_session_table; -pub mod big_fish_creation_session_type; -pub mod big_fish_creation_stage_type; -pub mod big_fish_event_kind_type; -pub mod big_fish_event_table; -pub mod big_fish_event_type; -pub mod big_fish_run_status_type; -pub mod big_fish_runtime_run_table; -pub mod big_fish_runtime_run_type; pub mod bind_asset_object_to_entity_and_return_procedure; pub mod bind_asset_object_to_entity_reducer; pub mod cancel_ai_task_and_return_procedure; pub mod cancel_game_distribution_version_and_return_procedure; -pub mod chapter_pace_band_type; -pub mod chapter_progression_table; -pub mod chapter_progression_type; pub mod claim_external_generation_jobs_and_return_procedure; pub mod claim_profile_recharge_order_expiration_schedule_and_return_procedure; pub mod claim_profile_task_reward_and_return_procedure; pub mod clean_editor_image_asset_kind_and_return_procedure; pub mod clear_database_migration_import_chunks_procedure; -pub mod clear_retired_database_tables_procedure; pub mod close_profile_recharge_order_and_return_procedure; -pub mod combat_outcome_type; pub mod compact_external_generation_job_payloads_and_return_procedure; pub mod complete_ai_stage_and_return_procedure; pub mod complete_ai_task_and_return_procedure; @@ -212,29 +172,7 @@ pub mod creation_entry_config_table; pub mod creation_entry_config_type; pub mod creation_entry_type_config_table; pub mod creation_entry_type_config_type; -pub mod custom_world_agent_message_table; -pub mod custom_world_agent_message_type; -pub mod custom_world_agent_operation_table; -pub mod custom_world_agent_operation_type; -pub mod custom_world_agent_session_table; -pub mod custom_world_agent_session_type; -pub mod custom_world_draft_card_table; -pub mod custom_world_draft_card_type; -pub mod custom_world_gallery_entry_table; -pub mod custom_world_gallery_entry_type; -pub mod custom_world_generation_mode_type; -pub mod custom_world_profile_table; -pub mod custom_world_profile_type; -pub mod custom_world_publication_status_type; -pub mod custom_world_role_asset_status_type; -pub mod custom_world_session_status_type; -pub mod custom_world_session_table; -pub mod custom_world_session_type; -pub mod custom_world_theme_mode_type; pub mod database_migration_authorize_operator_input_type; -pub mod database_migration_clear_retired_tables_input_type; -pub mod database_migration_clear_retired_tables_result_type; -pub mod database_migration_clear_table_stat_type; pub mod database_migration_export_input_type; pub mod database_migration_import_chunk_input_type; pub mod database_migration_import_chunk_table; @@ -527,22 +465,6 @@ pub mod import_database_migration_from_file_procedure; pub mod import_database_migration_incremental_from_chunks_procedure; pub mod import_database_migration_incremental_from_file_procedure; pub mod initialize_editor_generation_pricing_config_if_missing_and_return_procedure; -pub mod inventory_container_kind_type; -pub mod inventory_equipment_slot_type; -pub mod inventory_item_rarity_type; -pub mod inventory_item_source_kind_type; -pub mod inventory_slot_table; -pub mod inventory_slot_type; -pub mod jump_hop_agent_session_row_type; -pub mod jump_hop_agent_session_table; -pub mod jump_hop_event_row_type; -pub mod jump_hop_event_table; -pub mod jump_hop_leaderboard_entry_row_type; -pub mod jump_hop_leaderboard_entry_table; -pub mod jump_hop_runtime_run_row_type; -pub mod jump_hop_runtime_run_table; -pub mod jump_hop_work_profile_row_type; -pub mod jump_hop_work_profile_table; pub mod list_admin_accounts_and_return_procedure; pub mod list_asset_history_and_return_procedure; pub mod list_editor_agent_conversations_and_return_procedure; @@ -575,26 +497,10 @@ pub mod llm_router_quota_settlement_result_type; pub mod mark_editor_showcase_asset_refunded_and_return_procedure; pub mod mark_profile_recharge_order_expiration_checked_procedure; pub mod mark_profile_recharge_order_paid_and_return_procedure; -pub mod match_3_d_agent_message_row_type; -pub mod match_3_d_agent_message_table; -pub mod match_3_d_agent_session_row_type; -pub mod match_3_d_agent_session_table; -pub mod match_3_d_runtime_run_row_type; -pub mod match_3_d_runtime_run_table; -pub mod match_3_d_work_profile_row_type; -pub mod match_3_d_work_profile_table; pub mod normalize_editor_character_animation_metadata_and_return_procedure; -pub mod npc_relation_stance_type; -pub mod npc_relation_state_type; -pub mod npc_stance_profile_type; -pub mod npc_state_table; -pub mod npc_state_type; pub mod persist_editor_generation_result_and_return_procedure; pub mod persist_editor_pixel_art_result_and_return_procedure; pub mod persist_editor_spritesheet_slice_batch_and_return_procedure; -pub mod player_progression_grant_source_type; -pub mod player_progression_table; -pub mod player_progression_type; pub mod preflight_editor_generation_target_and_return_procedure; pub mod preflight_editor_pixel_art_result_and_return_procedure; pub mod prepare_profile_recharge_refund_hold_and_return_procedure; @@ -662,59 +568,7 @@ pub mod public_work_like_type; pub mod public_work_play_daily_stat_table; pub mod public_work_play_daily_stat_type; pub mod put_database_migration_import_chunk_procedure; -pub mod puzzle_agent_message_kind_type; -pub mod puzzle_agent_message_role_type; -pub mod puzzle_agent_message_row_type; -pub mod puzzle_agent_message_table; -pub mod puzzle_agent_session_row_type; -pub mod puzzle_agent_session_table; -pub mod puzzle_agent_stage_type; -pub mod puzzle_background_compile_task_row_type; -pub mod puzzle_background_compile_task_table; -pub mod puzzle_clear_agent_session_row_type; -pub mod puzzle_clear_agent_session_table; -pub mod puzzle_clear_event_row_type; -pub mod puzzle_clear_event_table; -pub mod puzzle_clear_runtime_run_row_type; -pub mod puzzle_clear_runtime_run_table; -pub mod puzzle_clear_work_profile_row_type; -pub mod puzzle_clear_work_profile_table; -pub mod puzzle_event_kind_type; -pub mod puzzle_event_table; -pub mod puzzle_event_type; -pub mod puzzle_leaderboard_entry_row_type; -pub mod puzzle_leaderboard_entry_table; -pub mod puzzle_publication_status_type; -pub mod puzzle_runtime_run_row_type; -pub mod puzzle_runtime_run_table; -pub mod puzzle_work_profile_row_type; -pub mod puzzle_work_profile_table; pub mod query_analytics_metric_procedure; -pub mod quest_hostile_npc_defeated_signal_type; -pub mod quest_item_delivered_signal_type; -pub mod quest_log_event_kind_type; -pub mod quest_log_table; -pub mod quest_log_type; -pub mod quest_narrative_binding_snapshot_type; -pub mod quest_narrative_origin_type; -pub mod quest_narrative_type_type; -pub mod quest_npc_spar_completed_signal_type; -pub mod quest_npc_talk_completed_signal_type; -pub mod quest_objective_kind_type; -pub mod quest_objective_snapshot_type; -pub mod quest_progress_signal_type; -pub mod quest_record_table; -pub mod quest_record_type; -pub mod quest_reward_equipment_slot_type; -pub mod quest_reward_intel_type; -pub mod quest_reward_item_rarity_type; -pub mod quest_reward_item_type; -pub mod quest_reward_snapshot_type; -pub mod quest_scene_reached_signal_type; -pub mod quest_signal_kind_type; -pub mod quest_status_type; -pub mod quest_step_snapshot_type; -pub mod quest_treasure_inspected_signal_type; pub mod read_agc_model_catalog_procedure; pub mod record_daily_login_tracking_event_and_return_procedure; pub mod record_profile_recharge_refund_observation_and_return_procedure; @@ -738,17 +592,7 @@ pub mod revoke_database_migration_operator_procedure; pub mod revoke_external_api_key_and_return_procedure; pub mod rollback_editor_canvas_layout_and_return_procedure; pub mod rotate_editor_generation_runtime_service_identity_and_return_procedure; -pub mod rpg_agent_draft_card_kind_type; -pub mod rpg_agent_draft_card_status_type; -pub mod rpg_agent_message_kind_type; -pub mod rpg_agent_message_role_type; -pub mod rpg_agent_operation_status_type; -pub mod rpg_agent_operation_type_type; -pub mod rpg_agent_stage_type; pub mod runtime_browse_history_theme_mode_type; -pub mod runtime_item_equipment_slot_type; -pub mod runtime_item_reward_item_rarity_type; -pub mod runtime_item_reward_item_snapshot_type; pub mod runtime_platform_theme_type; pub mod runtime_profile_admin_wallet_detail_procedure_result_type; pub mod runtime_profile_admin_wallet_get_input_type; @@ -897,22 +741,8 @@ pub mod save_editor_project_layout_v_2_and_return_procedure; pub mod seed_analytics_date_dimensions_reducer; pub mod set_editor_showcase_asset_like_for_viewer_and_return_procedure; pub mod settle_llm_router_quota_and_return_procedure; -pub mod square_hole_agent_message_row_type; -pub mod square_hole_agent_message_table; -pub mod square_hole_agent_session_row_type; -pub mod square_hole_agent_session_table; -pub mod square_hole_runtime_run_row_type; -pub mod square_hole_runtime_run_table; -pub mod square_hole_work_profile_row_type; -pub mod square_hole_work_profile_table; pub mod start_ai_task_reducer; pub mod start_ai_task_stage_reducer; -pub mod story_event_kind_type; -pub mod story_event_table; -pub mod story_event_type; -pub mod story_session_status_type; -pub mod story_session_table; -pub mod story_session_type; pub mod submit_editor_showcase_asset_and_return_procedure; pub mod submit_game_distribution_version_for_review_and_return_procedure; pub mod submit_profile_feedback_and_return_procedure; @@ -923,9 +753,6 @@ pub mod tracking_daily_stat_table; pub mod tracking_daily_stat_type; pub mod tracking_event_table; pub mod tracking_event_type; -pub mod treasure_interaction_action_type; -pub mod treasure_record_table; -pub mod treasure_record_type; pub mod unpublish_game_distribution_game_and_return_procedure; pub mod update_admin_account_and_return_procedure; pub mod update_editor_asset_and_return_procedure; @@ -944,26 +771,6 @@ pub mod user_account_type; pub mod user_browse_history_table; pub mod user_browse_history_type; pub mod validate_auth_session_procedure; -pub mod visual_novel_agent_message_row_type; -pub mod visual_novel_agent_message_table; -pub mod visual_novel_agent_session_row_type; -pub mod visual_novel_agent_session_table; -pub mod visual_novel_runtime_event_table; -pub mod visual_novel_runtime_event_type; -pub mod visual_novel_runtime_history_entry_row_type; -pub mod visual_novel_runtime_history_entry_table; -pub mod visual_novel_runtime_run_row_type; -pub mod visual_novel_runtime_run_table; -pub mod visual_novel_work_profile_row_type; -pub mod visual_novel_work_profile_table; -pub mod wooden_fish_agent_session_row_type; -pub mod wooden_fish_agent_session_table; -pub mod wooden_fish_event_row_type; -pub mod wooden_fish_event_table; -pub mod wooden_fish_runtime_run_row_type; -pub mod wooden_fish_runtime_run_table; -pub mod wooden_fish_work_profile_row_type; -pub mod wooden_fish_work_profile_table; pub use acknowledge_external_generation_job_summaries_and_return_procedure::acknowledge_external_generation_job_summaries_and_return; pub use acknowledge_external_generation_jobs_and_return_procedure::acknowledge_external_generation_jobs_and_return; @@ -1094,56 +901,16 @@ pub use authenticate_external_api_key_and_return_procedure::authenticate_externa pub use authorize_database_migration_operator_procedure::authorize_database_migration_operator; pub use backfill_editor_canvas_layout_and_return_procedure::backfill_editor_canvas_layout_and_return; pub use backfill_external_generation_job_summaries_and_return_procedure::backfill_external_generation_job_summaries_and_return; -pub use bark_battle_draft_config_row_type::BarkBattleDraftConfigRow; -pub use bark_battle_draft_config_table::*; -pub use bark_battle_leaderboard_entry_row_type::BarkBattleLeaderboardEntryRow; -pub use bark_battle_leaderboard_entry_table::*; -pub use bark_battle_personal_best_projection_row_type::BarkBattlePersonalBestProjectionRow; -pub use bark_battle_personal_best_projection_table::*; -pub use bark_battle_published_config_row_type::BarkBattlePublishedConfigRow; -pub use bark_battle_published_config_table::*; -pub use bark_battle_runtime_run_row_type::BarkBattleRuntimeRunRow; -pub use bark_battle_runtime_run_table::*; -pub use bark_battle_score_record_row_type::BarkBattleScoreRecordRow; -pub use bark_battle_score_record_table::*; -pub use bark_battle_work_stats_projection_row_type::BarkBattleWorkStatsProjectionRow; -pub use bark_battle_work_stats_projection_table::*; -pub use battle_mode_type::BattleMode; -pub use battle_state_table::*; -pub use battle_state_type::BattleState; -pub use battle_status_type::BattleStatus; -pub use big_fish_agent_message_kind_type::BigFishAgentMessageKind; -pub use big_fish_agent_message_role_type::BigFishAgentMessageRole; -pub use big_fish_agent_message_table::*; -pub use big_fish_agent_message_type::BigFishAgentMessage; -pub use big_fish_asset_kind_type::BigFishAssetKind; -pub use big_fish_asset_slot_table::*; -pub use big_fish_asset_slot_type::BigFishAssetSlot; -pub use big_fish_asset_status_type::BigFishAssetStatus; -pub use big_fish_creation_session_table::*; -pub use big_fish_creation_session_type::BigFishCreationSession; -pub use big_fish_creation_stage_type::BigFishCreationStage; -pub use big_fish_event_kind_type::BigFishEventKind; -pub use big_fish_event_table::*; -pub use big_fish_event_type::BigFishEvent; -pub use big_fish_run_status_type::BigFishRunStatus; -pub use big_fish_runtime_run_table::*; -pub use big_fish_runtime_run_type::BigFishRuntimeRun; pub use bind_asset_object_to_entity_and_return_procedure::bind_asset_object_to_entity_and_return; pub use bind_asset_object_to_entity_reducer::bind_asset_object_to_entity; pub use cancel_ai_task_and_return_procedure::cancel_ai_task_and_return; pub use cancel_game_distribution_version_and_return_procedure::cancel_game_distribution_version_and_return; -pub use chapter_pace_band_type::ChapterPaceBand; -pub use chapter_progression_table::*; -pub use chapter_progression_type::ChapterProgression; pub use claim_external_generation_jobs_and_return_procedure::claim_external_generation_jobs_and_return; pub use claim_profile_recharge_order_expiration_schedule_and_return_procedure::claim_profile_recharge_order_expiration_schedule_and_return; pub use claim_profile_task_reward_and_return_procedure::claim_profile_task_reward_and_return; pub use clean_editor_image_asset_kind_and_return_procedure::clean_editor_image_asset_kind_and_return; pub use clear_database_migration_import_chunks_procedure::clear_database_migration_import_chunks; -pub use clear_retired_database_tables_procedure::clear_retired_database_tables; pub use close_profile_recharge_order_and_return_procedure::close_profile_recharge_order_and_return; -pub use combat_outcome_type::CombatOutcome; pub use compact_external_generation_job_payloads_and_return_procedure::compact_external_generation_job_payloads_and_return; 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; @@ -1171,29 +938,7 @@ pub use creation_entry_config_table::*; pub use creation_entry_config_type::CreationEntryConfig; pub use creation_entry_type_config_table::*; pub use creation_entry_type_config_type::CreationEntryTypeConfig; -pub use custom_world_agent_message_table::*; -pub use custom_world_agent_message_type::CustomWorldAgentMessage; -pub use custom_world_agent_operation_table::*; -pub use custom_world_agent_operation_type::CustomWorldAgentOperation; -pub use custom_world_agent_session_table::*; -pub use custom_world_agent_session_type::CustomWorldAgentSession; -pub use custom_world_draft_card_table::*; -pub use custom_world_draft_card_type::CustomWorldDraftCard; -pub use custom_world_gallery_entry_table::*; -pub use custom_world_gallery_entry_type::CustomWorldGalleryEntry; -pub use custom_world_generation_mode_type::CustomWorldGenerationMode; -pub use custom_world_profile_table::*; -pub use custom_world_profile_type::CustomWorldProfile; -pub use custom_world_publication_status_type::CustomWorldPublicationStatus; -pub use custom_world_role_asset_status_type::CustomWorldRoleAssetStatus; -pub use custom_world_session_status_type::CustomWorldSessionStatus; -pub use custom_world_session_table::*; -pub use custom_world_session_type::CustomWorldSession; -pub use custom_world_theme_mode_type::CustomWorldThemeMode; pub use database_migration_authorize_operator_input_type::DatabaseMigrationAuthorizeOperatorInput; -pub use database_migration_clear_retired_tables_input_type::DatabaseMigrationClearRetiredTablesInput; -pub use database_migration_clear_retired_tables_result_type::DatabaseMigrationClearRetiredTablesResult; -pub use database_migration_clear_table_stat_type::DatabaseMigrationClearTableStat; pub use database_migration_export_input_type::DatabaseMigrationExportInput; pub use database_migration_import_chunk_input_type::DatabaseMigrationImportChunkInput; pub use database_migration_import_chunk_table::*; @@ -1486,22 +1231,6 @@ pub use import_database_migration_from_file_procedure::import_database_migration pub use import_database_migration_incremental_from_chunks_procedure::import_database_migration_incremental_from_chunks; pub use import_database_migration_incremental_from_file_procedure::import_database_migration_incremental_from_file; pub use initialize_editor_generation_pricing_config_if_missing_and_return_procedure::initialize_editor_generation_pricing_config_if_missing_and_return; -pub use inventory_container_kind_type::InventoryContainerKind; -pub use inventory_equipment_slot_type::InventoryEquipmentSlot; -pub use inventory_item_rarity_type::InventoryItemRarity; -pub use inventory_item_source_kind_type::InventoryItemSourceKind; -pub use inventory_slot_table::*; -pub use inventory_slot_type::InventorySlot; -pub use jump_hop_agent_session_row_type::JumpHopAgentSessionRow; -pub use jump_hop_agent_session_table::*; -pub use jump_hop_event_row_type::JumpHopEventRow; -pub use jump_hop_event_table::*; -pub use jump_hop_leaderboard_entry_row_type::JumpHopLeaderboardEntryRow; -pub use jump_hop_leaderboard_entry_table::*; -pub use jump_hop_runtime_run_row_type::JumpHopRuntimeRunRow; -pub use jump_hop_runtime_run_table::*; -pub use jump_hop_work_profile_row_type::JumpHopWorkProfileRow; -pub use jump_hop_work_profile_table::*; pub use list_admin_accounts_and_return_procedure::list_admin_accounts_and_return; pub use list_asset_history_and_return_procedure::list_asset_history_and_return; pub use list_editor_agent_conversations_and_return_procedure::list_editor_agent_conversations_and_return; @@ -1534,26 +1263,10 @@ pub use llm_router_quota_settlement_result_type::LlmRouterQuotaSettlementResult; pub use mark_editor_showcase_asset_refunded_and_return_procedure::mark_editor_showcase_asset_refunded_and_return; pub use mark_profile_recharge_order_expiration_checked_procedure::mark_profile_recharge_order_expiration_checked; pub use mark_profile_recharge_order_paid_and_return_procedure::mark_profile_recharge_order_paid_and_return; -pub use match_3_d_agent_message_row_type::Match3DAgentMessageRow; -pub use match_3_d_agent_message_table::*; -pub use match_3_d_agent_session_row_type::Match3DAgentSessionRow; -pub use match_3_d_agent_session_table::*; -pub use match_3_d_runtime_run_row_type::Match3DRuntimeRunRow; -pub use match_3_d_runtime_run_table::*; -pub use match_3_d_work_profile_row_type::Match3DWorkProfileRow; -pub use match_3_d_work_profile_table::*; pub use normalize_editor_character_animation_metadata_and_return_procedure::normalize_editor_character_animation_metadata_and_return; -pub use npc_relation_stance_type::NpcRelationStance; -pub use npc_relation_state_type::NpcRelationState; -pub use npc_stance_profile_type::NpcStanceProfile; -pub use npc_state_table::*; -pub use npc_state_type::NpcState; pub use persist_editor_generation_result_and_return_procedure::persist_editor_generation_result_and_return; pub use persist_editor_pixel_art_result_and_return_procedure::persist_editor_pixel_art_result_and_return; pub use persist_editor_spritesheet_slice_batch_and_return_procedure::persist_editor_spritesheet_slice_batch_and_return; -pub use player_progression_grant_source_type::PlayerProgressionGrantSource; -pub use player_progression_table::*; -pub use player_progression_type::PlayerProgression; pub use preflight_editor_generation_target_and_return_procedure::preflight_editor_generation_target_and_return; pub use preflight_editor_pixel_art_result_and_return_procedure::preflight_editor_pixel_art_result_and_return; pub use prepare_profile_recharge_refund_hold_and_return_procedure::prepare_profile_recharge_refund_hold_and_return; @@ -1621,59 +1334,7 @@ pub use public_work_like_type::PublicWorkLike; pub use public_work_play_daily_stat_table::*; pub use public_work_play_daily_stat_type::PublicWorkPlayDailyStat; pub use put_database_migration_import_chunk_procedure::put_database_migration_import_chunk; -pub use puzzle_agent_message_kind_type::PuzzleAgentMessageKind; -pub use puzzle_agent_message_role_type::PuzzleAgentMessageRole; -pub use puzzle_agent_message_row_type::PuzzleAgentMessageRow; -pub use puzzle_agent_message_table::*; -pub use puzzle_agent_session_row_type::PuzzleAgentSessionRow; -pub use puzzle_agent_session_table::*; -pub use puzzle_agent_stage_type::PuzzleAgentStage; -pub use puzzle_background_compile_task_row_type::PuzzleBackgroundCompileTaskRow; -pub use puzzle_background_compile_task_table::*; -pub use puzzle_clear_agent_session_row_type::PuzzleClearAgentSessionRow; -pub use puzzle_clear_agent_session_table::*; -pub use puzzle_clear_event_row_type::PuzzleClearEventRow; -pub use puzzle_clear_event_table::*; -pub use puzzle_clear_runtime_run_row_type::PuzzleClearRuntimeRunRow; -pub use puzzle_clear_runtime_run_table::*; -pub use puzzle_clear_work_profile_row_type::PuzzleClearWorkProfileRow; -pub use puzzle_clear_work_profile_table::*; -pub use puzzle_event_kind_type::PuzzleEventKind; -pub use puzzle_event_table::*; -pub use puzzle_event_type::PuzzleEvent; -pub use puzzle_leaderboard_entry_row_type::PuzzleLeaderboardEntryRow; -pub use puzzle_leaderboard_entry_table::*; -pub use puzzle_publication_status_type::PuzzlePublicationStatus; -pub use puzzle_runtime_run_row_type::PuzzleRuntimeRunRow; -pub use puzzle_runtime_run_table::*; -pub use puzzle_work_profile_row_type::PuzzleWorkProfileRow; -pub use puzzle_work_profile_table::*; pub use query_analytics_metric_procedure::query_analytics_metric; -pub use quest_hostile_npc_defeated_signal_type::QuestHostileNpcDefeatedSignal; -pub use quest_item_delivered_signal_type::QuestItemDeliveredSignal; -pub use quest_log_event_kind_type::QuestLogEventKind; -pub use quest_log_table::*; -pub use quest_log_type::QuestLog; -pub use quest_narrative_binding_snapshot_type::QuestNarrativeBindingSnapshot; -pub use quest_narrative_origin_type::QuestNarrativeOrigin; -pub use quest_narrative_type_type::QuestNarrativeType; -pub use quest_npc_spar_completed_signal_type::QuestNpcSparCompletedSignal; -pub use quest_npc_talk_completed_signal_type::QuestNpcTalkCompletedSignal; -pub use quest_objective_kind_type::QuestObjectiveKind; -pub use quest_objective_snapshot_type::QuestObjectiveSnapshot; -pub use quest_progress_signal_type::QuestProgressSignal; -pub use quest_record_table::*; -pub use quest_record_type::QuestRecord; -pub use quest_reward_equipment_slot_type::QuestRewardEquipmentSlot; -pub use quest_reward_intel_type::QuestRewardIntel; -pub use quest_reward_item_rarity_type::QuestRewardItemRarity; -pub use quest_reward_item_type::QuestRewardItem; -pub use quest_reward_snapshot_type::QuestRewardSnapshot; -pub use quest_scene_reached_signal_type::QuestSceneReachedSignal; -pub use quest_signal_kind_type::QuestSignalKind; -pub use quest_status_type::QuestStatus; -pub use quest_step_snapshot_type::QuestStepSnapshot; -pub use quest_treasure_inspected_signal_type::QuestTreasureInspectedSignal; pub use read_agc_model_catalog_procedure::read_agc_model_catalog; pub use record_daily_login_tracking_event_and_return_procedure::record_daily_login_tracking_event_and_return; pub use record_profile_recharge_refund_observation_and_return_procedure::record_profile_recharge_refund_observation_and_return; @@ -1697,17 +1358,7 @@ pub use revoke_database_migration_operator_procedure::revoke_database_migration_ pub use revoke_external_api_key_and_return_procedure::revoke_external_api_key_and_return; pub use rollback_editor_canvas_layout_and_return_procedure::rollback_editor_canvas_layout_and_return; pub use rotate_editor_generation_runtime_service_identity_and_return_procedure::rotate_editor_generation_runtime_service_identity_and_return; -pub use rpg_agent_draft_card_kind_type::RpgAgentDraftCardKind; -pub use rpg_agent_draft_card_status_type::RpgAgentDraftCardStatus; -pub use rpg_agent_message_kind_type::RpgAgentMessageKind; -pub use rpg_agent_message_role_type::RpgAgentMessageRole; -pub use rpg_agent_operation_status_type::RpgAgentOperationStatus; -pub use rpg_agent_operation_type_type::RpgAgentOperationType; -pub use rpg_agent_stage_type::RpgAgentStage; pub use runtime_browse_history_theme_mode_type::RuntimeBrowseHistoryThemeMode; -pub use runtime_item_equipment_slot_type::RuntimeItemEquipmentSlot; -pub use runtime_item_reward_item_rarity_type::RuntimeItemRewardItemRarity; -pub use runtime_item_reward_item_snapshot_type::RuntimeItemRewardItemSnapshot; pub use runtime_platform_theme_type::RuntimePlatformTheme; pub use runtime_profile_admin_wallet_detail_procedure_result_type::RuntimeProfileAdminWalletDetailProcedureResult; pub use runtime_profile_admin_wallet_get_input_type::RuntimeProfileAdminWalletGetInput; @@ -1856,22 +1507,8 @@ pub use save_editor_project_layout_v_2_and_return_procedure::save_editor_project pub use seed_analytics_date_dimensions_reducer::seed_analytics_date_dimensions; pub use set_editor_showcase_asset_like_for_viewer_and_return_procedure::set_editor_showcase_asset_like_for_viewer_and_return; pub use settle_llm_router_quota_and_return_procedure::settle_llm_router_quota_and_return; -pub use square_hole_agent_message_row_type::SquareHoleAgentMessageRow; -pub use square_hole_agent_message_table::*; -pub use square_hole_agent_session_row_type::SquareHoleAgentSessionRow; -pub use square_hole_agent_session_table::*; -pub use square_hole_runtime_run_row_type::SquareHoleRuntimeRunRow; -pub use square_hole_runtime_run_table::*; -pub use square_hole_work_profile_row_type::SquareHoleWorkProfileRow; -pub use square_hole_work_profile_table::*; pub use start_ai_task_reducer::start_ai_task; pub use start_ai_task_stage_reducer::start_ai_task_stage; -pub use story_event_kind_type::StoryEventKind; -pub use story_event_table::*; -pub use story_event_type::StoryEvent; -pub use story_session_status_type::StorySessionStatus; -pub use story_session_table::*; -pub use story_session_type::StorySession; pub use submit_editor_showcase_asset_and_return_procedure::submit_editor_showcase_asset_and_return; pub use submit_game_distribution_version_for_review_and_return_procedure::submit_game_distribution_version_for_review_and_return; pub use submit_profile_feedback_and_return_procedure::submit_profile_feedback_and_return; @@ -1882,9 +1519,6 @@ pub use tracking_daily_stat_table::*; pub use tracking_daily_stat_type::TrackingDailyStat; pub use tracking_event_table::*; pub use tracking_event_type::TrackingEvent; -pub use treasure_interaction_action_type::TreasureInteractionAction; -pub use treasure_record_table::*; -pub use treasure_record_type::TreasureRecord; pub use unpublish_game_distribution_game_and_return_procedure::unpublish_game_distribution_game_and_return; pub use update_admin_account_and_return_procedure::update_admin_account_and_return; pub use update_editor_asset_and_return_procedure::update_editor_asset_and_return; @@ -1903,26 +1537,6 @@ pub use user_account_type::UserAccount; pub use user_browse_history_table::*; pub use user_browse_history_type::UserBrowseHistory; pub use validate_auth_session_procedure::validate_auth_session; -pub use visual_novel_agent_message_row_type::VisualNovelAgentMessageRow; -pub use visual_novel_agent_message_table::*; -pub use visual_novel_agent_session_row_type::VisualNovelAgentSessionRow; -pub use visual_novel_agent_session_table::*; -pub use visual_novel_runtime_event_table::*; -pub use visual_novel_runtime_event_type::VisualNovelRuntimeEvent; -pub use visual_novel_runtime_history_entry_row_type::VisualNovelRuntimeHistoryEntryRow; -pub use visual_novel_runtime_history_entry_table::*; -pub use visual_novel_runtime_run_row_type::VisualNovelRuntimeRunRow; -pub use visual_novel_runtime_run_table::*; -pub use visual_novel_work_profile_row_type::VisualNovelWorkProfileRow; -pub use visual_novel_work_profile_table::*; -pub use wooden_fish_agent_session_row_type::WoodenFishAgentSessionRow; -pub use wooden_fish_agent_session_table::*; -pub use wooden_fish_event_row_type::WoodenFishEventRow; -pub use wooden_fish_event_table::*; -pub use wooden_fish_runtime_run_row_type::WoodenFishRuntimeRunRow; -pub use wooden_fish_runtime_run_table::*; -pub use wooden_fish_work_profile_row_type::WoodenFishWorkProfileRow; -pub use wooden_fish_work_profile_table::*; #[derive(Clone, PartialEq, Debug)] @@ -2046,29 +1660,8 @@ pub struct DbUpdate { asset_operation_wallet_settlement: __sdk::TableUpdate, auth_identity: __sdk::TableUpdate, auth_store_projection_meta: __sdk::TableUpdate, - bark_battle_draft_config: __sdk::TableUpdate, - bark_battle_leaderboard_entry: __sdk::TableUpdate, - bark_battle_personal_best_projection: __sdk::TableUpdate, - bark_battle_published_config: __sdk::TableUpdate, - bark_battle_runtime_run: __sdk::TableUpdate, - bark_battle_score_record: __sdk::TableUpdate, - bark_battle_work_stats_projection: __sdk::TableUpdate, - battle_state: __sdk::TableUpdate, - big_fish_agent_message: __sdk::TableUpdate, - big_fish_asset_slot: __sdk::TableUpdate, - big_fish_creation_session: __sdk::TableUpdate, - big_fish_event: __sdk::TableUpdate, - big_fish_runtime_run: __sdk::TableUpdate, - chapter_progression: __sdk::TableUpdate, creation_entry_config: __sdk::TableUpdate, creation_entry_type_config: __sdk::TableUpdate, - custom_world_agent_message: __sdk::TableUpdate, - custom_world_agent_operation: __sdk::TableUpdate, - custom_world_agent_session: __sdk::TableUpdate, - custom_world_draft_card: __sdk::TableUpdate, - custom_world_gallery_entry: __sdk::TableUpdate, - custom_world_profile: __sdk::TableUpdate, - custom_world_session: __sdk::TableUpdate, database_migration_import_chunk: __sdk::TableUpdate, database_migration_operator: __sdk::TableUpdate, editor_agent_conversation: __sdk::TableUpdate, @@ -2099,20 +1692,8 @@ pub struct DbUpdate { game_distribution_game: __sdk::TableUpdate, game_distribution_idempotency_receipt: __sdk::TableUpdate, game_distribution_version: __sdk::TableUpdate, - inventory_slot: __sdk::TableUpdate, - jump_hop_agent_session: __sdk::TableUpdate, - jump_hop_event: __sdk::TableUpdate, - jump_hop_leaderboard_entry: __sdk::TableUpdate, - jump_hop_runtime_run: __sdk::TableUpdate, - jump_hop_work_profile: __sdk::TableUpdate, llm_router_account: __sdk::TableUpdate, llm_router_billing_checkpoint: __sdk::TableUpdate, - match_3_d_agent_message: __sdk::TableUpdate, - match_3_d_agent_session: __sdk::TableUpdate, - match_3_d_runtime_run: __sdk::TableUpdate, - match_3_d_work_profile: __sdk::TableUpdate, - npc_state: __sdk::TableUpdate, - player_progression: __sdk::TableUpdate, profile_code_operation: __sdk::TableUpdate, profile_daily_free_points: __sdk::TableUpdate, profile_dashboard_state: __sdk::TableUpdate, @@ -2147,43 +1728,13 @@ pub struct DbUpdate { profile_wallet_refund_outbox: __sdk::TableUpdate, public_work_like: __sdk::TableUpdate, public_work_play_daily_stat: __sdk::TableUpdate, - puzzle_agent_message: __sdk::TableUpdate, - puzzle_agent_session: __sdk::TableUpdate, - puzzle_background_compile_task: __sdk::TableUpdate, - puzzle_clear_agent_session: __sdk::TableUpdate, - puzzle_clear_event: __sdk::TableUpdate, - puzzle_clear_runtime_run: __sdk::TableUpdate, - puzzle_clear_work_profile: __sdk::TableUpdate, - puzzle_event: __sdk::TableUpdate, - puzzle_leaderboard_entry: __sdk::TableUpdate, - puzzle_runtime_run: __sdk::TableUpdate, - puzzle_work_profile: __sdk::TableUpdate, - quest_log: __sdk::TableUpdate, - quest_record: __sdk::TableUpdate, refresh_session: __sdk::TableUpdate, runtime_setting: __sdk::TableUpdate, runtime_snapshot: __sdk::TableUpdate, - square_hole_agent_message: __sdk::TableUpdate, - square_hole_agent_session: __sdk::TableUpdate, - square_hole_runtime_run: __sdk::TableUpdate, - square_hole_work_profile: __sdk::TableUpdate, - story_event: __sdk::TableUpdate, - story_session: __sdk::TableUpdate, tracking_daily_stat: __sdk::TableUpdate, tracking_event: __sdk::TableUpdate, - treasure_record: __sdk::TableUpdate, user_account: __sdk::TableUpdate, user_browse_history: __sdk::TableUpdate, - visual_novel_agent_message: __sdk::TableUpdate, - visual_novel_agent_session: __sdk::TableUpdate, - visual_novel_runtime_event: __sdk::TableUpdate, - visual_novel_runtime_history_entry: __sdk::TableUpdate, - visual_novel_runtime_run: __sdk::TableUpdate, - visual_novel_work_profile: __sdk::TableUpdate, - wooden_fish_agent_session: __sdk::TableUpdate, - wooden_fish_event: __sdk::TableUpdate, - wooden_fish_runtime_run: __sdk::TableUpdate, - wooden_fish_work_profile: __sdk::TableUpdate, } impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { @@ -2236,81 +1787,12 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { "auth_store_projection_meta" => db_update.auth_store_projection_meta.append( auth_store_projection_meta_table::parse_table_update(table_update)?, ), - "bark_battle_draft_config" => db_update.bark_battle_draft_config.append( - bark_battle_draft_config_table::parse_table_update(table_update)?, - ), - "bark_battle_leaderboard_entry" => db_update.bark_battle_leaderboard_entry.append( - bark_battle_leaderboard_entry_table::parse_table_update(table_update)?, - ), - "bark_battle_personal_best_projection" => { - db_update.bark_battle_personal_best_projection.append( - bark_battle_personal_best_projection_table::parse_table_update( - table_update, - )?, - ) - } - "bark_battle_published_config" => db_update.bark_battle_published_config.append( - bark_battle_published_config_table::parse_table_update(table_update)?, - ), - "bark_battle_runtime_run" => db_update.bark_battle_runtime_run.append( - bark_battle_runtime_run_table::parse_table_update(table_update)?, - ), - "bark_battle_score_record" => db_update.bark_battle_score_record.append( - bark_battle_score_record_table::parse_table_update(table_update)?, - ), - "bark_battle_work_stats_projection" => { - db_update.bark_battle_work_stats_projection.append( - bark_battle_work_stats_projection_table::parse_table_update(table_update)?, - ) - } - "battle_state" => db_update - .battle_state - .append(battle_state_table::parse_table_update(table_update)?), - "big_fish_agent_message" => db_update.big_fish_agent_message.append( - big_fish_agent_message_table::parse_table_update(table_update)?, - ), - "big_fish_asset_slot" => db_update - .big_fish_asset_slot - .append(big_fish_asset_slot_table::parse_table_update(table_update)?), - "big_fish_creation_session" => db_update.big_fish_creation_session.append( - big_fish_creation_session_table::parse_table_update(table_update)?, - ), - "big_fish_event" => db_update - .big_fish_event - .append(big_fish_event_table::parse_table_update(table_update)?), - "big_fish_runtime_run" => db_update.big_fish_runtime_run.append( - big_fish_runtime_run_table::parse_table_update(table_update)?, - ), - "chapter_progression" => db_update - .chapter_progression - .append(chapter_progression_table::parse_table_update(table_update)?), "creation_entry_config" => db_update.creation_entry_config.append( creation_entry_config_table::parse_table_update(table_update)?, ), "creation_entry_type_config" => db_update.creation_entry_type_config.append( creation_entry_type_config_table::parse_table_update(table_update)?, ), - "custom_world_agent_message" => db_update.custom_world_agent_message.append( - custom_world_agent_message_table::parse_table_update(table_update)?, - ), - "custom_world_agent_operation" => db_update.custom_world_agent_operation.append( - custom_world_agent_operation_table::parse_table_update(table_update)?, - ), - "custom_world_agent_session" => db_update.custom_world_agent_session.append( - custom_world_agent_session_table::parse_table_update(table_update)?, - ), - "custom_world_draft_card" => db_update.custom_world_draft_card.append( - custom_world_draft_card_table::parse_table_update(table_update)?, - ), - "custom_world_gallery_entry" => db_update.custom_world_gallery_entry.append( - custom_world_gallery_entry_table::parse_table_update(table_update)?, - ), - "custom_world_profile" => db_update.custom_world_profile.append( - custom_world_profile_table::parse_table_update(table_update)?, - ), - "custom_world_session" => db_update.custom_world_session.append( - custom_world_session_table::parse_table_update(table_update)?, - ), "database_migration_import_chunk" => { db_update.database_migration_import_chunk.append( database_migration_import_chunk_table::parse_table_update(table_update)?, @@ -2424,48 +1906,12 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { "game_distribution_version" => db_update.game_distribution_version.append( game_distribution_version_table::parse_table_update(table_update)?, ), - "inventory_slot" => db_update - .inventory_slot - .append(inventory_slot_table::parse_table_update(table_update)?), - "jump_hop_agent_session" => db_update.jump_hop_agent_session.append( - jump_hop_agent_session_table::parse_table_update(table_update)?, - ), - "jump_hop_event" => db_update - .jump_hop_event - .append(jump_hop_event_table::parse_table_update(table_update)?), - "jump_hop_leaderboard_entry" => db_update.jump_hop_leaderboard_entry.append( - jump_hop_leaderboard_entry_table::parse_table_update(table_update)?, - ), - "jump_hop_runtime_run" => db_update.jump_hop_runtime_run.append( - jump_hop_runtime_run_table::parse_table_update(table_update)?, - ), - "jump_hop_work_profile" => db_update.jump_hop_work_profile.append( - jump_hop_work_profile_table::parse_table_update(table_update)?, - ), "llm_router_account" => db_update .llm_router_account .append(llm_router_account_table::parse_table_update(table_update)?), "llm_router_billing_checkpoint" => db_update.llm_router_billing_checkpoint.append( llm_router_billing_checkpoint_table::parse_table_update(table_update)?, ), - "match_3_d_agent_message" => db_update.match_3_d_agent_message.append( - match_3_d_agent_message_table::parse_table_update(table_update)?, - ), - "match_3_d_agent_session" => db_update.match_3_d_agent_session.append( - match_3_d_agent_session_table::parse_table_update(table_update)?, - ), - "match_3_d_runtime_run" => db_update.match_3_d_runtime_run.append( - match_3_d_runtime_run_table::parse_table_update(table_update)?, - ), - "match_3_d_work_profile" => db_update.match_3_d_work_profile.append( - match_3_d_work_profile_table::parse_table_update(table_update)?, - ), - "npc_state" => db_update - .npc_state - .append(npc_state_table::parse_table_update(table_update)?), - "player_progression" => db_update - .player_progression - .append(player_progression_table::parse_table_update(table_update)?), "profile_code_operation" => db_update.profile_code_operation.append( profile_code_operation_table::parse_table_update(table_update)?, ), @@ -2582,47 +2028,6 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { "public_work_play_daily_stat" => db_update.public_work_play_daily_stat.append( public_work_play_daily_stat_table::parse_table_update(table_update)?, ), - "puzzle_agent_message" => db_update.puzzle_agent_message.append( - puzzle_agent_message_table::parse_table_update(table_update)?, - ), - "puzzle_agent_session" => db_update.puzzle_agent_session.append( - puzzle_agent_session_table::parse_table_update(table_update)?, - ), - "puzzle_background_compile_task" => { - db_update.puzzle_background_compile_task.append( - puzzle_background_compile_task_table::parse_table_update(table_update)?, - ) - } - "puzzle_clear_agent_session" => db_update.puzzle_clear_agent_session.append( - puzzle_clear_agent_session_table::parse_table_update(table_update)?, - ), - "puzzle_clear_event" => db_update - .puzzle_clear_event - .append(puzzle_clear_event_table::parse_table_update(table_update)?), - "puzzle_clear_runtime_run" => db_update.puzzle_clear_runtime_run.append( - puzzle_clear_runtime_run_table::parse_table_update(table_update)?, - ), - "puzzle_clear_work_profile" => db_update.puzzle_clear_work_profile.append( - puzzle_clear_work_profile_table::parse_table_update(table_update)?, - ), - "puzzle_event" => db_update - .puzzle_event - .append(puzzle_event_table::parse_table_update(table_update)?), - "puzzle_leaderboard_entry" => db_update.puzzle_leaderboard_entry.append( - puzzle_leaderboard_entry_table::parse_table_update(table_update)?, - ), - "puzzle_runtime_run" => db_update - .puzzle_runtime_run - .append(puzzle_runtime_run_table::parse_table_update(table_update)?), - "puzzle_work_profile" => db_update - .puzzle_work_profile - .append(puzzle_work_profile_table::parse_table_update(table_update)?), - "quest_log" => db_update - .quest_log - .append(quest_log_table::parse_table_update(table_update)?), - "quest_record" => db_update - .quest_record - .append(quest_record_table::parse_table_update(table_update)?), "refresh_session" => db_update .refresh_session .append(refresh_session_table::parse_table_update(table_update)?), @@ -2632,71 +2037,18 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { "runtime_snapshot" => db_update .runtime_snapshot .append(runtime_snapshot_table::parse_table_update(table_update)?), - "square_hole_agent_message" => db_update.square_hole_agent_message.append( - square_hole_agent_message_table::parse_table_update(table_update)?, - ), - "square_hole_agent_session" => db_update.square_hole_agent_session.append( - square_hole_agent_session_table::parse_table_update(table_update)?, - ), - "square_hole_runtime_run" => db_update.square_hole_runtime_run.append( - square_hole_runtime_run_table::parse_table_update(table_update)?, - ), - "square_hole_work_profile" => db_update.square_hole_work_profile.append( - square_hole_work_profile_table::parse_table_update(table_update)?, - ), - "story_event" => db_update - .story_event - .append(story_event_table::parse_table_update(table_update)?), - "story_session" => db_update - .story_session - .append(story_session_table::parse_table_update(table_update)?), "tracking_daily_stat" => db_update .tracking_daily_stat .append(tracking_daily_stat_table::parse_table_update(table_update)?), "tracking_event" => db_update .tracking_event .append(tracking_event_table::parse_table_update(table_update)?), - "treasure_record" => db_update - .treasure_record - .append(treasure_record_table::parse_table_update(table_update)?), "user_account" => db_update .user_account .append(user_account_table::parse_table_update(table_update)?), "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)?, - ), - "wooden_fish_agent_session" => db_update.wooden_fish_agent_session.append( - wooden_fish_agent_session_table::parse_table_update(table_update)?, - ), - "wooden_fish_event" => db_update - .wooden_fish_event - .append(wooden_fish_event_table::parse_table_update(table_update)?), - "wooden_fish_runtime_run" => db_update.wooden_fish_runtime_run.append( - wooden_fish_runtime_run_table::parse_table_update(table_update)?, - ), - "wooden_fish_work_profile" => db_update.wooden_fish_work_profile.append( - wooden_fish_work_profile_table::parse_table_update(table_update)?, - ), unknown => { return Err(__sdk::InternalError::unknown_name( @@ -2776,82 +2128,6 @@ impl __sdk::DbUpdate for DbUpdate { &self.auth_store_projection_meta, ) .with_updates_by_pk(|row| &row.meta_id); - diff.bark_battle_draft_config = cache - .apply_diff_to_table::( - "bark_battle_draft_config", - &self.bark_battle_draft_config, - ) - .with_updates_by_pk(|row| &row.draft_id); - diff.bark_battle_leaderboard_entry = cache - .apply_diff_to_table::( - "bark_battle_leaderboard_entry", - &self.bark_battle_leaderboard_entry, - ) - .with_updates_by_pk(|row| &row.leaderboard_entry_id); - diff.bark_battle_personal_best_projection = cache - .apply_diff_to_table::( - "bark_battle_personal_best_projection", - &self.bark_battle_personal_best_projection, - ) - .with_updates_by_pk(|row| &row.personal_best_id); - diff.bark_battle_published_config = cache - .apply_diff_to_table::( - "bark_battle_published_config", - &self.bark_battle_published_config, - ) - .with_updates_by_pk(|row| &row.work_id); - diff.bark_battle_runtime_run = cache - .apply_diff_to_table::( - "bark_battle_runtime_run", - &self.bark_battle_runtime_run, - ) - .with_updates_by_pk(|row| &row.run_id); - diff.bark_battle_score_record = cache - .apply_diff_to_table::( - "bark_battle_score_record", - &self.bark_battle_score_record, - ) - .with_updates_by_pk(|row| &row.score_id); - diff.bark_battle_work_stats_projection = cache - .apply_diff_to_table::( - "bark_battle_work_stats_projection", - &self.bark_battle_work_stats_projection, - ) - .with_updates_by_pk(|row| &row.work_id); - diff.battle_state = cache - .apply_diff_to_table::("battle_state", &self.battle_state) - .with_updates_by_pk(|row| &row.battle_state_id); - diff.big_fish_agent_message = cache - .apply_diff_to_table::( - "big_fish_agent_message", - &self.big_fish_agent_message, - ) - .with_updates_by_pk(|row| &row.message_id); - diff.big_fish_asset_slot = cache - .apply_diff_to_table::( - "big_fish_asset_slot", - &self.big_fish_asset_slot, - ) - .with_updates_by_pk(|row| &row.slot_id); - diff.big_fish_creation_session = cache - .apply_diff_to_table::( - "big_fish_creation_session", - &self.big_fish_creation_session, - ) - .with_updates_by_pk(|row| &row.session_id); - diff.big_fish_event = self.big_fish_event.into_event_diff(); - diff.big_fish_runtime_run = cache - .apply_diff_to_table::( - "big_fish_runtime_run", - &self.big_fish_runtime_run, - ) - .with_updates_by_pk(|row| &row.run_id); - diff.chapter_progression = cache - .apply_diff_to_table::( - "chapter_progression", - &self.chapter_progression, - ) - .with_updates_by_pk(|row| &row.chapter_progression_id); diff.creation_entry_config = cache .apply_diff_to_table::( "creation_entry_config", @@ -2864,48 +2140,6 @@ impl __sdk::DbUpdate for DbUpdate { &self.creation_entry_type_config, ) .with_updates_by_pk(|row| &row.id); - diff.custom_world_agent_message = cache - .apply_diff_to_table::( - "custom_world_agent_message", - &self.custom_world_agent_message, - ) - .with_updates_by_pk(|row| &row.message_id); - diff.custom_world_agent_operation = cache - .apply_diff_to_table::( - "custom_world_agent_operation", - &self.custom_world_agent_operation, - ) - .with_updates_by_pk(|row| &row.operation_id); - diff.custom_world_agent_session = cache - .apply_diff_to_table::( - "custom_world_agent_session", - &self.custom_world_agent_session, - ) - .with_updates_by_pk(|row| &row.session_id); - diff.custom_world_draft_card = cache - .apply_diff_to_table::( - "custom_world_draft_card", - &self.custom_world_draft_card, - ) - .with_updates_by_pk(|row| &row.card_id); - diff.custom_world_gallery_entry = cache - .apply_diff_to_table::( - "custom_world_gallery_entry", - &self.custom_world_gallery_entry, - ) - .with_updates_by_pk(|row| &row.profile_id); - diff.custom_world_profile = cache - .apply_diff_to_table::( - "custom_world_profile", - &self.custom_world_profile, - ) - .with_updates_by_pk(|row| &row.profile_id); - diff.custom_world_session = cache - .apply_diff_to_table::( - "custom_world_session", - &self.custom_world_session, - ) - .with_updates_by_pk(|row| &row.session_id); diff.database_migration_import_chunk = cache .apply_diff_to_table::( "database_migration_import_chunk", @@ -3065,36 +2299,6 @@ impl __sdk::DbUpdate for DbUpdate { &self.game_distribution_version, ) .with_updates_by_pk(|row| &row.version_id); - diff.inventory_slot = cache - .apply_diff_to_table::("inventory_slot", &self.inventory_slot) - .with_updates_by_pk(|row| &row.slot_id); - diff.jump_hop_agent_session = cache - .apply_diff_to_table::( - "jump_hop_agent_session", - &self.jump_hop_agent_session, - ) - .with_updates_by_pk(|row| &row.session_id); - diff.jump_hop_event = cache - .apply_diff_to_table::("jump_hop_event", &self.jump_hop_event) - .with_updates_by_pk(|row| &row.event_id); - diff.jump_hop_leaderboard_entry = cache - .apply_diff_to_table::( - "jump_hop_leaderboard_entry", - &self.jump_hop_leaderboard_entry, - ) - .with_updates_by_pk(|row| &row.entry_id); - diff.jump_hop_runtime_run = cache - .apply_diff_to_table::( - "jump_hop_runtime_run", - &self.jump_hop_runtime_run, - ) - .with_updates_by_pk(|row| &row.run_id); - diff.jump_hop_work_profile = cache - .apply_diff_to_table::( - "jump_hop_work_profile", - &self.jump_hop_work_profile, - ) - .with_updates_by_pk(|row| &row.profile_id); diff.llm_router_account = cache .apply_diff_to_table::("llm_router_account", &self.llm_router_account) .with_updates_by_pk(|row| &row.account_key); @@ -3104,39 +2308,6 @@ impl __sdk::DbUpdate for DbUpdate { &self.llm_router_billing_checkpoint, ) .with_updates_by_pk(|row| &row.account_key); - diff.match_3_d_agent_message = cache - .apply_diff_to_table::( - "match_3_d_agent_message", - &self.match_3_d_agent_message, - ) - .with_updates_by_pk(|row| &row.message_id); - diff.match_3_d_agent_session = cache - .apply_diff_to_table::( - "match_3_d_agent_session", - &self.match_3_d_agent_session, - ) - .with_updates_by_pk(|row| &row.session_id); - diff.match_3_d_runtime_run = cache - .apply_diff_to_table::( - "match_3_d_runtime_run", - &self.match_3_d_runtime_run, - ) - .with_updates_by_pk(|row| &row.run_id); - diff.match_3_d_work_profile = cache - .apply_diff_to_table::( - "match_3_d_work_profile", - &self.match_3_d_work_profile, - ) - .with_updates_by_pk(|row| &row.profile_id); - diff.npc_state = cache - .apply_diff_to_table::("npc_state", &self.npc_state) - .with_updates_by_pk(|row| &row.npc_state_id); - diff.player_progression = cache - .apply_diff_to_table::( - "player_progression", - &self.player_progression, - ) - .with_updates_by_pk(|row| &row.user_id); diff.profile_code_operation = cache .apply_diff_to_table::( "profile_code_operation", @@ -3314,73 +2485,6 @@ impl __sdk::DbUpdate for DbUpdate { &self.public_work_play_daily_stat, ) .with_updates_by_pk(|row| &row.stat_id); - diff.puzzle_agent_message = cache - .apply_diff_to_table::( - "puzzle_agent_message", - &self.puzzle_agent_message, - ) - .with_updates_by_pk(|row| &row.message_id); - diff.puzzle_agent_session = cache - .apply_diff_to_table::( - "puzzle_agent_session", - &self.puzzle_agent_session, - ) - .with_updates_by_pk(|row| &row.session_id); - diff.puzzle_background_compile_task = cache - .apply_diff_to_table::( - "puzzle_background_compile_task", - &self.puzzle_background_compile_task, - ) - .with_updates_by_pk(|row| &row.task_id); - diff.puzzle_clear_agent_session = cache - .apply_diff_to_table::( - "puzzle_clear_agent_session", - &self.puzzle_clear_agent_session, - ) - .with_updates_by_pk(|row| &row.session_id); - diff.puzzle_clear_event = cache - .apply_diff_to_table::( - "puzzle_clear_event", - &self.puzzle_clear_event, - ) - .with_updates_by_pk(|row| &row.event_id); - diff.puzzle_clear_runtime_run = cache - .apply_diff_to_table::( - "puzzle_clear_runtime_run", - &self.puzzle_clear_runtime_run, - ) - .with_updates_by_pk(|row| &row.run_id); - diff.puzzle_clear_work_profile = cache - .apply_diff_to_table::( - "puzzle_clear_work_profile", - &self.puzzle_clear_work_profile, - ) - .with_updates_by_pk(|row| &row.profile_id); - diff.puzzle_event = self.puzzle_event.into_event_diff(); - diff.puzzle_leaderboard_entry = cache - .apply_diff_to_table::( - "puzzle_leaderboard_entry", - &self.puzzle_leaderboard_entry, - ) - .with_updates_by_pk(|row| &row.entry_id); - diff.puzzle_runtime_run = cache - .apply_diff_to_table::( - "puzzle_runtime_run", - &self.puzzle_runtime_run, - ) - .with_updates_by_pk(|row| &row.run_id); - diff.puzzle_work_profile = cache - .apply_diff_to_table::( - "puzzle_work_profile", - &self.puzzle_work_profile, - ) - .with_updates_by_pk(|row| &row.profile_id); - diff.quest_log = cache - .apply_diff_to_table::("quest_log", &self.quest_log) - .with_updates_by_pk(|row| &row.log_id); - diff.quest_record = cache - .apply_diff_to_table::("quest_record", &self.quest_record) - .with_updates_by_pk(|row| &row.quest_id); diff.refresh_session = cache .apply_diff_to_table::("refresh_session", &self.refresh_session) .with_updates_by_pk(|row| &row.session_id); @@ -3390,36 +2494,6 @@ impl __sdk::DbUpdate for DbUpdate { diff.runtime_snapshot = cache .apply_diff_to_table::("runtime_snapshot", &self.runtime_snapshot) .with_updates_by_pk(|row| &row.user_id); - diff.square_hole_agent_message = cache - .apply_diff_to_table::( - "square_hole_agent_message", - &self.square_hole_agent_message, - ) - .with_updates_by_pk(|row| &row.message_id); - diff.square_hole_agent_session = cache - .apply_diff_to_table::( - "square_hole_agent_session", - &self.square_hole_agent_session, - ) - .with_updates_by_pk(|row| &row.session_id); - diff.square_hole_runtime_run = cache - .apply_diff_to_table::( - "square_hole_runtime_run", - &self.square_hole_runtime_run, - ) - .with_updates_by_pk(|row| &row.run_id); - diff.square_hole_work_profile = cache - .apply_diff_to_table::( - "square_hole_work_profile", - &self.square_hole_work_profile, - ) - .with_updates_by_pk(|row| &row.profile_id); - diff.story_event = cache - .apply_diff_to_table::("story_event", &self.story_event) - .with_updates_by_pk(|row| &row.event_id); - diff.story_session = cache - .apply_diff_to_table::("story_session", &self.story_session) - .with_updates_by_pk(|row| &row.story_session_id); diff.tracking_daily_stat = cache .apply_diff_to_table::( "tracking_daily_stat", @@ -3429,9 +2503,6 @@ impl __sdk::DbUpdate for DbUpdate { diff.tracking_event = cache .apply_diff_to_table::("tracking_event", &self.tracking_event) .with_updates_by_pk(|row| &row.event_id); - diff.treasure_record = cache - .apply_diff_to_table::("treasure_record", &self.treasure_record) - .with_updates_by_pk(|row| &row.treasure_record_id); diff.user_account = cache .apply_diff_to_table::("user_account", &self.user_account) .with_updates_by_pk(|row| &row.user_id); @@ -3441,58 +2512,6 @@ 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::( - "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::( - "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::( - "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::( - "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::( - "visual_novel_work_profile", - &self.visual_novel_work_profile, - ) - .with_updates_by_pk(|row| &row.profile_id); - diff.wooden_fish_agent_session = cache - .apply_diff_to_table::( - "wooden_fish_agent_session", - &self.wooden_fish_agent_session, - ) - .with_updates_by_pk(|row| &row.session_id); - diff.wooden_fish_event = cache - .apply_diff_to_table::("wooden_fish_event", &self.wooden_fish_event) - .with_updates_by_pk(|row| &row.event_id); - diff.wooden_fish_runtime_run = cache - .apply_diff_to_table::( - "wooden_fish_runtime_run", - &self.wooden_fish_runtime_run, - ) - .with_updates_by_pk(|row| &row.run_id); - diff.wooden_fish_work_profile = cache - .apply_diff_to_table::( - "wooden_fish_work_profile", - &self.wooden_fish_work_profile, - ) - .with_updates_by_pk(|row| &row.profile_id); diff } @@ -3542,75 +2561,12 @@ impl __sdk::DbUpdate for DbUpdate { "auth_store_projection_meta" => db_update .auth_store_projection_meta .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "bark_battle_draft_config" => db_update - .bark_battle_draft_config - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "bark_battle_leaderboard_entry" => db_update - .bark_battle_leaderboard_entry - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "bark_battle_personal_best_projection" => db_update - .bark_battle_personal_best_projection - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "bark_battle_published_config" => db_update - .bark_battle_published_config - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "bark_battle_runtime_run" => db_update - .bark_battle_runtime_run - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "bark_battle_score_record" => db_update - .bark_battle_score_record - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "bark_battle_work_stats_projection" => db_update - .bark_battle_work_stats_projection - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "battle_state" => db_update - .battle_state - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "big_fish_agent_message" => db_update - .big_fish_agent_message - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "big_fish_asset_slot" => db_update - .big_fish_asset_slot - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "big_fish_creation_session" => db_update - .big_fish_creation_session - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "big_fish_event" => db_update - .big_fish_event - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "big_fish_runtime_run" => db_update - .big_fish_runtime_run - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "chapter_progression" => db_update - .chapter_progression - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "creation_entry_config" => db_update .creation_entry_config .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "creation_entry_type_config" => db_update .creation_entry_type_config .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "custom_world_agent_message" => db_update - .custom_world_agent_message - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "custom_world_agent_operation" => db_update - .custom_world_agent_operation - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "custom_world_agent_session" => db_update - .custom_world_agent_session - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "custom_world_draft_card" => db_update - .custom_world_draft_card - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "custom_world_gallery_entry" => db_update - .custom_world_gallery_entry - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "custom_world_profile" => db_update - .custom_world_profile - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "custom_world_session" => db_update - .custom_world_session - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "database_migration_import_chunk" => db_update .database_migration_import_chunk .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), @@ -3698,48 +2654,12 @@ impl __sdk::DbUpdate for DbUpdate { "game_distribution_version" => db_update .game_distribution_version .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "inventory_slot" => db_update - .inventory_slot - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "jump_hop_agent_session" => db_update - .jump_hop_agent_session - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "jump_hop_event" => db_update - .jump_hop_event - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "jump_hop_leaderboard_entry" => db_update - .jump_hop_leaderboard_entry - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "jump_hop_runtime_run" => db_update - .jump_hop_runtime_run - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "jump_hop_work_profile" => db_update - .jump_hop_work_profile - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "llm_router_account" => db_update .llm_router_account .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "llm_router_billing_checkpoint" => db_update .llm_router_billing_checkpoint .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "match_3_d_agent_message" => db_update - .match_3_d_agent_message - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "match_3_d_agent_session" => db_update - .match_3_d_agent_session - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "match_3_d_runtime_run" => db_update - .match_3_d_runtime_run - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "match_3_d_work_profile" => db_update - .match_3_d_work_profile - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "npc_state" => db_update - .npc_state - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "player_progression" => db_update - .player_progression - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "profile_code_operation" => db_update .profile_code_operation .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), @@ -3830,45 +2750,6 @@ impl __sdk::DbUpdate for DbUpdate { "public_work_play_daily_stat" => db_update .public_work_play_daily_stat .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "puzzle_agent_message" => db_update - .puzzle_agent_message - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "puzzle_agent_session" => db_update - .puzzle_agent_session - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "puzzle_background_compile_task" => db_update - .puzzle_background_compile_task - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "puzzle_clear_agent_session" => db_update - .puzzle_clear_agent_session - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "puzzle_clear_event" => db_update - .puzzle_clear_event - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "puzzle_clear_runtime_run" => db_update - .puzzle_clear_runtime_run - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "puzzle_clear_work_profile" => db_update - .puzzle_clear_work_profile - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "puzzle_event" => db_update - .puzzle_event - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "puzzle_leaderboard_entry" => db_update - .puzzle_leaderboard_entry - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "puzzle_runtime_run" => db_update - .puzzle_runtime_run - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "puzzle_work_profile" => db_update - .puzzle_work_profile - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "quest_log" => db_update - .quest_log - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "quest_record" => db_update - .quest_record - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "refresh_session" => db_update .refresh_session .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), @@ -3878,69 +2759,18 @@ impl __sdk::DbUpdate for DbUpdate { "runtime_snapshot" => db_update .runtime_snapshot .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "square_hole_agent_message" => db_update - .square_hole_agent_message - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "square_hole_agent_session" => db_update - .square_hole_agent_session - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "square_hole_runtime_run" => db_update - .square_hole_runtime_run - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "square_hole_work_profile" => db_update - .square_hole_work_profile - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "story_event" => db_update - .story_event - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "story_session" => db_update - .story_session - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "tracking_daily_stat" => db_update .tracking_daily_stat .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "tracking_event" => db_update .tracking_event .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "treasure_record" => db_update - .treasure_record - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "user_account" => db_update .user_account .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), "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)?), - "wooden_fish_agent_session" => db_update - .wooden_fish_agent_session - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "wooden_fish_event" => db_update - .wooden_fish_event - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "wooden_fish_runtime_run" => db_update - .wooden_fish_runtime_run - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "wooden_fish_work_profile" => db_update - .wooden_fish_work_profile - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), unknown => { return Err( __sdk::InternalError::unknown_name("table", unknown, "QueryRows").into(), @@ -3996,75 +2826,12 @@ impl __sdk::DbUpdate for DbUpdate { "auth_store_projection_meta" => db_update .auth_store_projection_meta .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "bark_battle_draft_config" => db_update - .bark_battle_draft_config - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "bark_battle_leaderboard_entry" => db_update - .bark_battle_leaderboard_entry - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "bark_battle_personal_best_projection" => db_update - .bark_battle_personal_best_projection - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "bark_battle_published_config" => db_update - .bark_battle_published_config - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "bark_battle_runtime_run" => db_update - .bark_battle_runtime_run - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "bark_battle_score_record" => db_update - .bark_battle_score_record - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "bark_battle_work_stats_projection" => db_update - .bark_battle_work_stats_projection - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "battle_state" => db_update - .battle_state - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "big_fish_agent_message" => db_update - .big_fish_agent_message - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "big_fish_asset_slot" => db_update - .big_fish_asset_slot - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "big_fish_creation_session" => db_update - .big_fish_creation_session - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "big_fish_event" => db_update - .big_fish_event - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "big_fish_runtime_run" => db_update - .big_fish_runtime_run - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "chapter_progression" => db_update - .chapter_progression - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "creation_entry_config" => db_update .creation_entry_config .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "creation_entry_type_config" => db_update .creation_entry_type_config .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "custom_world_agent_message" => db_update - .custom_world_agent_message - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "custom_world_agent_operation" => db_update - .custom_world_agent_operation - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "custom_world_agent_session" => db_update - .custom_world_agent_session - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "custom_world_draft_card" => db_update - .custom_world_draft_card - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "custom_world_gallery_entry" => db_update - .custom_world_gallery_entry - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "custom_world_profile" => db_update - .custom_world_profile - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "custom_world_session" => db_update - .custom_world_session - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "database_migration_import_chunk" => db_update .database_migration_import_chunk .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), @@ -4152,48 +2919,12 @@ impl __sdk::DbUpdate for DbUpdate { "game_distribution_version" => db_update .game_distribution_version .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "inventory_slot" => db_update - .inventory_slot - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "jump_hop_agent_session" => db_update - .jump_hop_agent_session - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "jump_hop_event" => db_update - .jump_hop_event - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "jump_hop_leaderboard_entry" => db_update - .jump_hop_leaderboard_entry - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "jump_hop_runtime_run" => db_update - .jump_hop_runtime_run - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "jump_hop_work_profile" => db_update - .jump_hop_work_profile - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "llm_router_account" => db_update .llm_router_account .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "llm_router_billing_checkpoint" => db_update .llm_router_billing_checkpoint .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "match_3_d_agent_message" => db_update - .match_3_d_agent_message - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "match_3_d_agent_session" => db_update - .match_3_d_agent_session - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "match_3_d_runtime_run" => db_update - .match_3_d_runtime_run - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "match_3_d_work_profile" => db_update - .match_3_d_work_profile - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "npc_state" => db_update - .npc_state - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "player_progression" => db_update - .player_progression - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "profile_code_operation" => db_update .profile_code_operation .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), @@ -4284,45 +3015,6 @@ impl __sdk::DbUpdate for DbUpdate { "public_work_play_daily_stat" => db_update .public_work_play_daily_stat .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "puzzle_agent_message" => db_update - .puzzle_agent_message - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "puzzle_agent_session" => db_update - .puzzle_agent_session - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "puzzle_background_compile_task" => db_update - .puzzle_background_compile_task - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "puzzle_clear_agent_session" => db_update - .puzzle_clear_agent_session - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "puzzle_clear_event" => db_update - .puzzle_clear_event - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "puzzle_clear_runtime_run" => db_update - .puzzle_clear_runtime_run - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "puzzle_clear_work_profile" => db_update - .puzzle_clear_work_profile - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "puzzle_event" => db_update - .puzzle_event - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "puzzle_leaderboard_entry" => db_update - .puzzle_leaderboard_entry - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "puzzle_runtime_run" => db_update - .puzzle_runtime_run - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "puzzle_work_profile" => db_update - .puzzle_work_profile - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "quest_log" => db_update - .quest_log - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "quest_record" => db_update - .quest_record - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "refresh_session" => db_update .refresh_session .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), @@ -4332,69 +3024,18 @@ impl __sdk::DbUpdate for DbUpdate { "runtime_snapshot" => db_update .runtime_snapshot .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "square_hole_agent_message" => db_update - .square_hole_agent_message - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "square_hole_agent_session" => db_update - .square_hole_agent_session - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "square_hole_runtime_run" => db_update - .square_hole_runtime_run - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "square_hole_work_profile" => db_update - .square_hole_work_profile - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "story_event" => db_update - .story_event - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "story_session" => db_update - .story_session - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "tracking_daily_stat" => db_update .tracking_daily_stat .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "tracking_event" => db_update .tracking_event .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "treasure_record" => db_update - .treasure_record - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "user_account" => db_update .user_account .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), "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)?), - "wooden_fish_agent_session" => db_update - .wooden_fish_agent_session - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "wooden_fish_event" => db_update - .wooden_fish_event - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "wooden_fish_runtime_run" => db_update - .wooden_fish_runtime_run - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "wooden_fish_work_profile" => db_update - .wooden_fish_work_profile - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), unknown => { return Err( __sdk::InternalError::unknown_name("table", unknown, "QueryRows").into(), @@ -4424,31 +3065,8 @@ pub struct AppliedDiff<'r> { asset_operation_wallet_settlement: __sdk::TableAppliedDiff<'r, AssetOperationWalletSettlement>, auth_identity: __sdk::TableAppliedDiff<'r, AuthIdentity>, auth_store_projection_meta: __sdk::TableAppliedDiff<'r, AuthStoreProjectionMeta>, - bark_battle_draft_config: __sdk::TableAppliedDiff<'r, BarkBattleDraftConfigRow>, - bark_battle_leaderboard_entry: __sdk::TableAppliedDiff<'r, BarkBattleLeaderboardEntryRow>, - bark_battle_personal_best_projection: - __sdk::TableAppliedDiff<'r, BarkBattlePersonalBestProjectionRow>, - bark_battle_published_config: __sdk::TableAppliedDiff<'r, BarkBattlePublishedConfigRow>, - bark_battle_runtime_run: __sdk::TableAppliedDiff<'r, BarkBattleRuntimeRunRow>, - bark_battle_score_record: __sdk::TableAppliedDiff<'r, BarkBattleScoreRecordRow>, - bark_battle_work_stats_projection: - __sdk::TableAppliedDiff<'r, BarkBattleWorkStatsProjectionRow>, - battle_state: __sdk::TableAppliedDiff<'r, BattleState>, - big_fish_agent_message: __sdk::TableAppliedDiff<'r, BigFishAgentMessage>, - big_fish_asset_slot: __sdk::TableAppliedDiff<'r, BigFishAssetSlot>, - big_fish_creation_session: __sdk::TableAppliedDiff<'r, BigFishCreationSession>, - big_fish_event: __sdk::TableAppliedDiff<'r, BigFishEvent>, - big_fish_runtime_run: __sdk::TableAppliedDiff<'r, BigFishRuntimeRun>, - chapter_progression: __sdk::TableAppliedDiff<'r, ChapterProgression>, creation_entry_config: __sdk::TableAppliedDiff<'r, CreationEntryConfig>, creation_entry_type_config: __sdk::TableAppliedDiff<'r, CreationEntryTypeConfig>, - custom_world_agent_message: __sdk::TableAppliedDiff<'r, CustomWorldAgentMessage>, - custom_world_agent_operation: __sdk::TableAppliedDiff<'r, CustomWorldAgentOperation>, - custom_world_agent_session: __sdk::TableAppliedDiff<'r, CustomWorldAgentSession>, - custom_world_draft_card: __sdk::TableAppliedDiff<'r, CustomWorldDraftCard>, - custom_world_gallery_entry: __sdk::TableAppliedDiff<'r, CustomWorldGalleryEntry>, - custom_world_profile: __sdk::TableAppliedDiff<'r, CustomWorldProfile>, - custom_world_session: __sdk::TableAppliedDiff<'r, CustomWorldSession>, database_migration_import_chunk: __sdk::TableAppliedDiff<'r, DatabaseMigrationImportChunk>, database_migration_operator: __sdk::TableAppliedDiff<'r, DatabaseMigrationOperator>, editor_agent_conversation: __sdk::TableAppliedDiff<'r, EditorAgentConversation>, @@ -4481,20 +3099,8 @@ pub struct AppliedDiff<'r> { game_distribution_idempotency_receipt: __sdk::TableAppliedDiff<'r, GameDistributionIdempotencyReceipt>, game_distribution_version: __sdk::TableAppliedDiff<'r, GameDistributionVersion>, - inventory_slot: __sdk::TableAppliedDiff<'r, InventorySlot>, - jump_hop_agent_session: __sdk::TableAppliedDiff<'r, JumpHopAgentSessionRow>, - jump_hop_event: __sdk::TableAppliedDiff<'r, JumpHopEventRow>, - jump_hop_leaderboard_entry: __sdk::TableAppliedDiff<'r, JumpHopLeaderboardEntryRow>, - jump_hop_runtime_run: __sdk::TableAppliedDiff<'r, JumpHopRuntimeRunRow>, - jump_hop_work_profile: __sdk::TableAppliedDiff<'r, JumpHopWorkProfileRow>, llm_router_account: __sdk::TableAppliedDiff<'r, LlmRouterAccount>, llm_router_billing_checkpoint: __sdk::TableAppliedDiff<'r, LlmRouterBillingCheckpoint>, - match_3_d_agent_message: __sdk::TableAppliedDiff<'r, Match3DAgentMessageRow>, - match_3_d_agent_session: __sdk::TableAppliedDiff<'r, Match3DAgentSessionRow>, - match_3_d_runtime_run: __sdk::TableAppliedDiff<'r, Match3DRuntimeRunRow>, - match_3_d_work_profile: __sdk::TableAppliedDiff<'r, Match3DWorkProfileRow>, - npc_state: __sdk::TableAppliedDiff<'r, NpcState>, - player_progression: __sdk::TableAppliedDiff<'r, PlayerProgression>, profile_code_operation: __sdk::TableAppliedDiff<'r, ProfileCodeOperation>, profile_daily_free_points: __sdk::TableAppliedDiff<'r, ProfileDailyFreePoints>, profile_dashboard_state: __sdk::TableAppliedDiff<'r, ProfileDashboardState>, @@ -4530,44 +3136,13 @@ pub struct AppliedDiff<'r> { profile_wallet_refund_outbox: __sdk::TableAppliedDiff<'r, ProfileWalletRefundOutbox>, public_work_like: __sdk::TableAppliedDiff<'r, PublicWorkLike>, public_work_play_daily_stat: __sdk::TableAppliedDiff<'r, PublicWorkPlayDailyStat>, - puzzle_agent_message: __sdk::TableAppliedDiff<'r, PuzzleAgentMessageRow>, - puzzle_agent_session: __sdk::TableAppliedDiff<'r, PuzzleAgentSessionRow>, - puzzle_background_compile_task: __sdk::TableAppliedDiff<'r, PuzzleBackgroundCompileTaskRow>, - puzzle_clear_agent_session: __sdk::TableAppliedDiff<'r, PuzzleClearAgentSessionRow>, - puzzle_clear_event: __sdk::TableAppliedDiff<'r, PuzzleClearEventRow>, - puzzle_clear_runtime_run: __sdk::TableAppliedDiff<'r, PuzzleClearRuntimeRunRow>, - puzzle_clear_work_profile: __sdk::TableAppliedDiff<'r, PuzzleClearWorkProfileRow>, - puzzle_event: __sdk::TableAppliedDiff<'r, PuzzleEvent>, - puzzle_leaderboard_entry: __sdk::TableAppliedDiff<'r, PuzzleLeaderboardEntryRow>, - puzzle_runtime_run: __sdk::TableAppliedDiff<'r, PuzzleRuntimeRunRow>, - puzzle_work_profile: __sdk::TableAppliedDiff<'r, PuzzleWorkProfileRow>, - quest_log: __sdk::TableAppliedDiff<'r, QuestLog>, - quest_record: __sdk::TableAppliedDiff<'r, QuestRecord>, refresh_session: __sdk::TableAppliedDiff<'r, RefreshSession>, runtime_setting: __sdk::TableAppliedDiff<'r, RuntimeSetting>, runtime_snapshot: __sdk::TableAppliedDiff<'r, RuntimeSnapshotRow>, - square_hole_agent_message: __sdk::TableAppliedDiff<'r, SquareHoleAgentMessageRow>, - square_hole_agent_session: __sdk::TableAppliedDiff<'r, SquareHoleAgentSessionRow>, - square_hole_runtime_run: __sdk::TableAppliedDiff<'r, SquareHoleRuntimeRunRow>, - square_hole_work_profile: __sdk::TableAppliedDiff<'r, SquareHoleWorkProfileRow>, - story_event: __sdk::TableAppliedDiff<'r, StoryEvent>, - story_session: __sdk::TableAppliedDiff<'r, StorySession>, tracking_daily_stat: __sdk::TableAppliedDiff<'r, TrackingDailyStat>, tracking_event: __sdk::TableAppliedDiff<'r, TrackingEvent>, - 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>, - wooden_fish_agent_session: __sdk::TableAppliedDiff<'r, WoodenFishAgentSessionRow>, - wooden_fish_event: __sdk::TableAppliedDiff<'r, WoodenFishEventRow>, - wooden_fish_runtime_run: __sdk::TableAppliedDiff<'r, WoodenFishRuntimeRunRow>, - wooden_fish_work_profile: __sdk::TableAppliedDiff<'r, WoodenFishWorkProfileRow>, __unused: std::marker::PhantomData<&'r ()>, } @@ -4643,76 +3218,6 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> { &self.auth_store_projection_meta, event, ); - callbacks.invoke_table_row_callbacks::( - "bark_battle_draft_config", - &self.bark_battle_draft_config, - event, - ); - callbacks.invoke_table_row_callbacks::( - "bark_battle_leaderboard_entry", - &self.bark_battle_leaderboard_entry, - event, - ); - callbacks.invoke_table_row_callbacks::( - "bark_battle_personal_best_projection", - &self.bark_battle_personal_best_projection, - event, - ); - callbacks.invoke_table_row_callbacks::( - "bark_battle_published_config", - &self.bark_battle_published_config, - event, - ); - callbacks.invoke_table_row_callbacks::( - "bark_battle_runtime_run", - &self.bark_battle_runtime_run, - event, - ); - callbacks.invoke_table_row_callbacks::( - "bark_battle_score_record", - &self.bark_battle_score_record, - event, - ); - callbacks.invoke_table_row_callbacks::( - "bark_battle_work_stats_projection", - &self.bark_battle_work_stats_projection, - event, - ); - callbacks.invoke_table_row_callbacks::( - "battle_state", - &self.battle_state, - event, - ); - callbacks.invoke_table_row_callbacks::( - "big_fish_agent_message", - &self.big_fish_agent_message, - event, - ); - callbacks.invoke_table_row_callbacks::( - "big_fish_asset_slot", - &self.big_fish_asset_slot, - event, - ); - callbacks.invoke_table_row_callbacks::( - "big_fish_creation_session", - &self.big_fish_creation_session, - event, - ); - callbacks.invoke_table_row_callbacks::( - "big_fish_event", - &self.big_fish_event, - event, - ); - callbacks.invoke_table_row_callbacks::( - "big_fish_runtime_run", - &self.big_fish_runtime_run, - event, - ); - callbacks.invoke_table_row_callbacks::( - "chapter_progression", - &self.chapter_progression, - event, - ); callbacks.invoke_table_row_callbacks::( "creation_entry_config", &self.creation_entry_config, @@ -4723,41 +3228,6 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> { &self.creation_entry_type_config, event, ); - callbacks.invoke_table_row_callbacks::( - "custom_world_agent_message", - &self.custom_world_agent_message, - event, - ); - callbacks.invoke_table_row_callbacks::( - "custom_world_agent_operation", - &self.custom_world_agent_operation, - event, - ); - callbacks.invoke_table_row_callbacks::( - "custom_world_agent_session", - &self.custom_world_agent_session, - event, - ); - callbacks.invoke_table_row_callbacks::( - "custom_world_draft_card", - &self.custom_world_draft_card, - event, - ); - callbacks.invoke_table_row_callbacks::( - "custom_world_gallery_entry", - &self.custom_world_gallery_entry, - event, - ); - callbacks.invoke_table_row_callbacks::( - "custom_world_profile", - &self.custom_world_profile, - event, - ); - callbacks.invoke_table_row_callbacks::( - "custom_world_session", - &self.custom_world_session, - event, - ); callbacks.invoke_table_row_callbacks::( "database_migration_import_chunk", &self.database_migration_import_chunk, @@ -4903,36 +3373,6 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> { &self.game_distribution_version, event, ); - callbacks.invoke_table_row_callbacks::( - "inventory_slot", - &self.inventory_slot, - event, - ); - callbacks.invoke_table_row_callbacks::( - "jump_hop_agent_session", - &self.jump_hop_agent_session, - event, - ); - callbacks.invoke_table_row_callbacks::( - "jump_hop_event", - &self.jump_hop_event, - event, - ); - callbacks.invoke_table_row_callbacks::( - "jump_hop_leaderboard_entry", - &self.jump_hop_leaderboard_entry, - event, - ); - callbacks.invoke_table_row_callbacks::( - "jump_hop_runtime_run", - &self.jump_hop_runtime_run, - event, - ); - callbacks.invoke_table_row_callbacks::( - "jump_hop_work_profile", - &self.jump_hop_work_profile, - event, - ); callbacks.invoke_table_row_callbacks::( "llm_router_account", &self.llm_router_account, @@ -4943,32 +3383,6 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> { &self.llm_router_billing_checkpoint, event, ); - callbacks.invoke_table_row_callbacks::( - "match_3_d_agent_message", - &self.match_3_d_agent_message, - event, - ); - callbacks.invoke_table_row_callbacks::( - "match_3_d_agent_session", - &self.match_3_d_agent_session, - event, - ); - callbacks.invoke_table_row_callbacks::( - "match_3_d_runtime_run", - &self.match_3_d_runtime_run, - event, - ); - callbacks.invoke_table_row_callbacks::( - "match_3_d_work_profile", - &self.match_3_d_work_profile, - event, - ); - callbacks.invoke_table_row_callbacks::("npc_state", &self.npc_state, event); - callbacks.invoke_table_row_callbacks::( - "player_progression", - &self.player_progression, - event, - ); callbacks.invoke_table_row_callbacks::( "profile_code_operation", &self.profile_code_operation, @@ -5119,67 +3533,6 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> { &self.public_work_play_daily_stat, event, ); - callbacks.invoke_table_row_callbacks::( - "puzzle_agent_message", - &self.puzzle_agent_message, - event, - ); - callbacks.invoke_table_row_callbacks::( - "puzzle_agent_session", - &self.puzzle_agent_session, - event, - ); - callbacks.invoke_table_row_callbacks::( - "puzzle_background_compile_task", - &self.puzzle_background_compile_task, - event, - ); - callbacks.invoke_table_row_callbacks::( - "puzzle_clear_agent_session", - &self.puzzle_clear_agent_session, - event, - ); - callbacks.invoke_table_row_callbacks::( - "puzzle_clear_event", - &self.puzzle_clear_event, - event, - ); - callbacks.invoke_table_row_callbacks::( - "puzzle_clear_runtime_run", - &self.puzzle_clear_runtime_run, - event, - ); - callbacks.invoke_table_row_callbacks::( - "puzzle_clear_work_profile", - &self.puzzle_clear_work_profile, - event, - ); - callbacks.invoke_table_row_callbacks::( - "puzzle_event", - &self.puzzle_event, - event, - ); - callbacks.invoke_table_row_callbacks::( - "puzzle_leaderboard_entry", - &self.puzzle_leaderboard_entry, - event, - ); - callbacks.invoke_table_row_callbacks::( - "puzzle_runtime_run", - &self.puzzle_runtime_run, - event, - ); - callbacks.invoke_table_row_callbacks::( - "puzzle_work_profile", - &self.puzzle_work_profile, - event, - ); - callbacks.invoke_table_row_callbacks::("quest_log", &self.quest_log, event); - callbacks.invoke_table_row_callbacks::( - "quest_record", - &self.quest_record, - event, - ); callbacks.invoke_table_row_callbacks::( "refresh_session", &self.refresh_session, @@ -5195,32 +3548,6 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> { &self.runtime_snapshot, event, ); - callbacks.invoke_table_row_callbacks::( - "square_hole_agent_message", - &self.square_hole_agent_message, - event, - ); - callbacks.invoke_table_row_callbacks::( - "square_hole_agent_session", - &self.square_hole_agent_session, - event, - ); - callbacks.invoke_table_row_callbacks::( - "square_hole_runtime_run", - &self.square_hole_runtime_run, - event, - ); - callbacks.invoke_table_row_callbacks::( - "square_hole_work_profile", - &self.square_hole_work_profile, - event, - ); - callbacks.invoke_table_row_callbacks::("story_event", &self.story_event, event); - callbacks.invoke_table_row_callbacks::( - "story_session", - &self.story_session, - event, - ); callbacks.invoke_table_row_callbacks::( "tracking_daily_stat", &self.tracking_daily_stat, @@ -5231,11 +3558,6 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> { &self.tracking_event, event, ); - callbacks.invoke_table_row_callbacks::( - "treasure_record", - &self.treasure_record, - event, - ); callbacks.invoke_table_row_callbacks::( "user_account", &self.user_account, @@ -5246,56 +3568,6 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> { &self.user_browse_history, event, ); - callbacks.invoke_table_row_callbacks::( - "visual_novel_agent_message", - &self.visual_novel_agent_message, - event, - ); - callbacks.invoke_table_row_callbacks::( - "visual_novel_agent_session", - &self.visual_novel_agent_session, - event, - ); - callbacks.invoke_table_row_callbacks::( - "visual_novel_runtime_event", - &self.visual_novel_runtime_event, - event, - ); - callbacks.invoke_table_row_callbacks::( - "visual_novel_runtime_history_entry", - &self.visual_novel_runtime_history_entry, - event, - ); - callbacks.invoke_table_row_callbacks::( - "visual_novel_runtime_run", - &self.visual_novel_runtime_run, - event, - ); - callbacks.invoke_table_row_callbacks::( - "visual_novel_work_profile", - &self.visual_novel_work_profile, - event, - ); - callbacks.invoke_table_row_callbacks::( - "wooden_fish_agent_session", - &self.wooden_fish_agent_session, - event, - ); - callbacks.invoke_table_row_callbacks::( - "wooden_fish_event", - &self.wooden_fish_event, - event, - ); - callbacks.invoke_table_row_callbacks::( - "wooden_fish_runtime_run", - &self.wooden_fish_runtime_run, - event, - ); - callbacks.invoke_table_row_callbacks::( - "wooden_fish_work_profile", - &self.wooden_fish_work_profile, - event, - ); } } @@ -5970,29 +4242,8 @@ impl __sdk::SpacetimeModule for RemoteModule { asset_operation_wallet_settlement_table::register_table(client_cache); auth_identity_table::register_table(client_cache); auth_store_projection_meta_table::register_table(client_cache); - bark_battle_draft_config_table::register_table(client_cache); - bark_battle_leaderboard_entry_table::register_table(client_cache); - bark_battle_personal_best_projection_table::register_table(client_cache); - bark_battle_published_config_table::register_table(client_cache); - bark_battle_runtime_run_table::register_table(client_cache); - bark_battle_score_record_table::register_table(client_cache); - bark_battle_work_stats_projection_table::register_table(client_cache); - battle_state_table::register_table(client_cache); - big_fish_agent_message_table::register_table(client_cache); - big_fish_asset_slot_table::register_table(client_cache); - big_fish_creation_session_table::register_table(client_cache); - big_fish_event_table::register_table(client_cache); - big_fish_runtime_run_table::register_table(client_cache); - chapter_progression_table::register_table(client_cache); creation_entry_config_table::register_table(client_cache); creation_entry_type_config_table::register_table(client_cache); - custom_world_agent_message_table::register_table(client_cache); - custom_world_agent_operation_table::register_table(client_cache); - custom_world_agent_session_table::register_table(client_cache); - custom_world_draft_card_table::register_table(client_cache); - custom_world_gallery_entry_table::register_table(client_cache); - custom_world_profile_table::register_table(client_cache); - custom_world_session_table::register_table(client_cache); database_migration_import_chunk_table::register_table(client_cache); database_migration_operator_table::register_table(client_cache); editor_agent_conversation_table::register_table(client_cache); @@ -6022,20 +4273,8 @@ impl __sdk::SpacetimeModule for RemoteModule { game_distribution_game_table::register_table(client_cache); game_distribution_idempotency_receipt_table::register_table(client_cache); game_distribution_version_table::register_table(client_cache); - inventory_slot_table::register_table(client_cache); - jump_hop_agent_session_table::register_table(client_cache); - jump_hop_event_table::register_table(client_cache); - jump_hop_leaderboard_entry_table::register_table(client_cache); - jump_hop_runtime_run_table::register_table(client_cache); - jump_hop_work_profile_table::register_table(client_cache); llm_router_account_table::register_table(client_cache); llm_router_billing_checkpoint_table::register_table(client_cache); - match_3_d_agent_message_table::register_table(client_cache); - match_3_d_agent_session_table::register_table(client_cache); - match_3_d_runtime_run_table::register_table(client_cache); - match_3_d_work_profile_table::register_table(client_cache); - npc_state_table::register_table(client_cache); - player_progression_table::register_table(client_cache); profile_code_operation_table::register_table(client_cache); profile_daily_free_points_table::register_table(client_cache); profile_dashboard_state_table::register_table(client_cache); @@ -6066,43 +4305,13 @@ impl __sdk::SpacetimeModule for RemoteModule { profile_wallet_refund_outbox_table::register_table(client_cache); public_work_like_table::register_table(client_cache); public_work_play_daily_stat_table::register_table(client_cache); - puzzle_agent_message_table::register_table(client_cache); - puzzle_agent_session_table::register_table(client_cache); - puzzle_background_compile_task_table::register_table(client_cache); - puzzle_clear_agent_session_table::register_table(client_cache); - puzzle_clear_event_table::register_table(client_cache); - puzzle_clear_runtime_run_table::register_table(client_cache); - puzzle_clear_work_profile_table::register_table(client_cache); - puzzle_event_table::register_table(client_cache); - puzzle_leaderboard_entry_table::register_table(client_cache); - puzzle_runtime_run_table::register_table(client_cache); - puzzle_work_profile_table::register_table(client_cache); - quest_log_table::register_table(client_cache); - quest_record_table::register_table(client_cache); refresh_session_table::register_table(client_cache); runtime_setting_table::register_table(client_cache); runtime_snapshot_table::register_table(client_cache); - square_hole_agent_message_table::register_table(client_cache); - square_hole_agent_session_table::register_table(client_cache); - square_hole_runtime_run_table::register_table(client_cache); - square_hole_work_profile_table::register_table(client_cache); - story_event_table::register_table(client_cache); - story_session_table::register_table(client_cache); tracking_daily_stat_table::register_table(client_cache); tracking_event_table::register_table(client_cache); - 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); - wooden_fish_agent_session_table::register_table(client_cache); - wooden_fish_event_table::register_table(client_cache); - wooden_fish_runtime_run_table::register_table(client_cache); - wooden_fish_work_profile_table::register_table(client_cache); } const ALL_TABLE_NAMES: &'static [&'static str] = &[ "admin_account", @@ -6119,29 +4328,8 @@ impl __sdk::SpacetimeModule for RemoteModule { "asset_operation_wallet_settlement", "auth_identity", "auth_store_projection_meta", - "bark_battle_draft_config", - "bark_battle_leaderboard_entry", - "bark_battle_personal_best_projection", - "bark_battle_published_config", - "bark_battle_runtime_run", - "bark_battle_score_record", - "bark_battle_work_stats_projection", - "battle_state", - "big_fish_agent_message", - "big_fish_asset_slot", - "big_fish_creation_session", - "big_fish_event", - "big_fish_runtime_run", - "chapter_progression", "creation_entry_config", "creation_entry_type_config", - "custom_world_agent_message", - "custom_world_agent_operation", - "custom_world_agent_session", - "custom_world_draft_card", - "custom_world_gallery_entry", - "custom_world_profile", - "custom_world_session", "database_migration_import_chunk", "database_migration_operator", "editor_agent_conversation", @@ -6171,20 +4359,8 @@ impl __sdk::SpacetimeModule for RemoteModule { "game_distribution_game", "game_distribution_idempotency_receipt", "game_distribution_version", - "inventory_slot", - "jump_hop_agent_session", - "jump_hop_event", - "jump_hop_leaderboard_entry", - "jump_hop_runtime_run", - "jump_hop_work_profile", "llm_router_account", "llm_router_billing_checkpoint", - "match_3_d_agent_message", - "match_3_d_agent_session", - "match_3_d_runtime_run", - "match_3_d_work_profile", - "npc_state", - "player_progression", "profile_code_operation", "profile_daily_free_points", "profile_dashboard_state", @@ -6215,42 +4391,12 @@ impl __sdk::SpacetimeModule for RemoteModule { "profile_wallet_refund_outbox", "public_work_like", "public_work_play_daily_stat", - "puzzle_agent_message", - "puzzle_agent_session", - "puzzle_background_compile_task", - "puzzle_clear_agent_session", - "puzzle_clear_event", - "puzzle_clear_runtime_run", - "puzzle_clear_work_profile", - "puzzle_event", - "puzzle_leaderboard_entry", - "puzzle_runtime_run", - "puzzle_work_profile", - "quest_log", - "quest_record", "refresh_session", "runtime_setting", "runtime_snapshot", - "square_hole_agent_message", - "square_hole_agent_session", - "square_hole_runtime_run", - "square_hole_work_profile", - "story_event", - "story_session", "tracking_daily_stat", "tracking_event", - "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", - "wooden_fish_agent_session", - "wooden_fish_event", - "wooden_fish_runtime_run", - "wooden_fish_work_profile", ]; } diff --git a/server-rs/crates/spacetime-client/src/module_bindings/acknowledge_external_generation_job_summaries_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/acknowledge_external_generation_job_summaries_and_return_procedure.rs index 48ec50384..5ef0251b0 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/acknowledge_external_generation_job_summaries_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/acknowledge_external_generation_job_summaries_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait acknowledge_external_generation_job_summaries_and_return { input: ExternalGenerationJobAcknowledgeInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl acknowledge_external_generation_job_summaries_and_return for super::RemoteP input: ExternalGenerationJobAcknowledgeInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, ExternalGenerationJobSummaryProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/acknowledge_external_generation_jobs_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/acknowledge_external_generation_jobs_and_return_procedure.rs index 4c83af9ca..e9b1c18fe 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/acknowledge_external_generation_jobs_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/acknowledge_external_generation_jobs_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait acknowledge_external_generation_jobs_and_return { input: ExternalGenerationJobAcknowledgeInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl acknowledge_external_generation_jobs_and_return for super::RemoteProcedures input: ExternalGenerationJobAcknowledgeInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, ExternalGenerationJobProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/activate_editor_canvas_layout_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/activate_editor_canvas_layout_and_return_procedure.rs index a92a1ed66..b9c3aa0ba 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/activate_editor_canvas_layout_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/activate_editor_canvas_layout_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait activate_editor_canvas_layout_and_return { input: EditorCanvasLayoutMigrationInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl activate_editor_canvas_layout_and_return for super::RemoteProcedures { input: EditorCanvasLayoutMigrationInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorCanvasLayoutMigrationProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/admin_disable_profile_redeem_code_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/admin_disable_profile_redeem_code_procedure.rs index 9865ace59..bbdaab4f3 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/admin_disable_profile_redeem_code_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/admin_disable_profile_redeem_code_procedure.rs @@ -31,10 +31,10 @@ pub trait admin_disable_profile_redeem_code { input: RuntimeProfileRedeemCodeAdminDisableInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl admin_disable_profile_redeem_code for super::RemoteProcedures { input: RuntimeProfileRedeemCodeAdminDisableInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileRedeemCodeAdminProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/admin_disable_profile_task_config_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/admin_disable_profile_task_config_procedure.rs index 0417bd2e9..c968f950d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/admin_disable_profile_task_config_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/admin_disable_profile_task_config_procedure.rs @@ -31,10 +31,10 @@ pub trait admin_disable_profile_task_config { input: RuntimeProfileTaskConfigAdminDisableInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl admin_disable_profile_task_config for super::RemoteProcedures { input: RuntimeProfileTaskConfigAdminDisableInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileTaskConfigAdminProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/admin_get_profile_wallet_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/admin_get_profile_wallet_and_return_procedure.rs index 782d73f58..b482cdd15 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/admin_get_profile_wallet_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/admin_get_profile_wallet_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait admin_get_profile_wallet_and_return { input: RuntimeProfileAdminWalletGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl admin_get_profile_wallet_and_return for super::RemoteProcedures { input: RuntimeProfileAdminWalletGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileAdminWalletProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/admin_get_profile_wallet_config_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/admin_get_profile_wallet_config_procedure.rs index 1f48e0770..c7c836f1b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/admin_get_profile_wallet_config_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/admin_get_profile_wallet_config_procedure.rs @@ -31,10 +31,10 @@ pub trait admin_get_profile_wallet_config { input: RuntimeProfileWalletConfigAdminGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl admin_get_profile_wallet_config for super::RemoteProcedures { input: RuntimeProfileWalletConfigAdminGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileWalletConfigAdminProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/admin_get_profile_wallet_detail_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/admin_get_profile_wallet_detail_and_return_procedure.rs index bacc1bbb4..95f78510c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/admin_get_profile_wallet_detail_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/admin_get_profile_wallet_detail_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait admin_get_profile_wallet_detail_and_return { input: RuntimeProfileAdminWalletGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl admin_get_profile_wallet_detail_and_return for super::RemoteProcedures { input: RuntimeProfileAdminWalletGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileAdminWalletDetailProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/admin_initialize_profile_wallet_consumption_projections_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/admin_initialize_profile_wallet_consumption_projections_and_return_procedure.rs index 9c5414c9c..02fa9d1f6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/admin_initialize_profile_wallet_consumption_projections_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/admin_initialize_profile_wallet_consumption_projections_and_return_procedure.rs @@ -37,13 +37,13 @@ pub trait admin_initialize_profile_wallet_consumption_projections_and_return { input: RuntimeProfileWalletConsumptionProjectionInitializeInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result< - RuntimeProfileWalletConsumptionProjectionInitializeProcedureResult, - __sdk::InternalError, - >, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result< + RuntimeProfileWalletConsumptionProjectionInitializeProcedureResult, + __sdk::InternalError, + >, + ) + Send + + 'static, ); } @@ -55,13 +55,13 @@ impl admin_initialize_profile_wallet_consumption_projections_and_return input: RuntimeProfileWalletConsumptionProjectionInitializeInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result< - RuntimeProfileWalletConsumptionProjectionInitializeProcedureResult, - __sdk::InternalError, - >, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result< + RuntimeProfileWalletConsumptionProjectionInitializeProcedureResult, + __sdk::InternalError, + >, + ) + Send + + 'static, ) { self.imp.invoke_procedure_with_callback::<_, RuntimeProfileWalletConsumptionProjectionInitializeProcedureResult>( "admin_initialize_profile_wallet_consumption_projections_and_return", diff --git a/server-rs/crates/spacetime-client/src/module_bindings/admin_list_editor_assets_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/admin_list_editor_assets_and_return_procedure.rs index 8e3589adb..cc3c8ecd6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/admin_list_editor_assets_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/admin_list_editor_assets_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait admin_list_editor_assets_and_return { input: AdminEditorAssetListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl admin_list_editor_assets_and_return for super::RemoteProcedures { input: AdminEditorAssetListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, AdminEditorAssetListProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/admin_list_editor_showcase_assets_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/admin_list_editor_showcase_assets_and_return_procedure.rs index a740930a7..69ce4beca 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/admin_list_editor_showcase_assets_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/admin_list_editor_showcase_assets_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait admin_list_editor_showcase_assets_and_return { input: EditorShowcaseAssetAdminListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl admin_list_editor_showcase_assets_and_return for super::RemoteProcedures { input: EditorShowcaseAssetAdminListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorShowcaseAssetListProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/admin_list_profile_invite_codes_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/admin_list_profile_invite_codes_procedure.rs index 96d2350f5..cdfa27d91 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/admin_list_profile_invite_codes_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/admin_list_profile_invite_codes_procedure.rs @@ -31,10 +31,10 @@ pub trait admin_list_profile_invite_codes { input: RuntimeProfileInviteCodeAdminListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl admin_list_profile_invite_codes for super::RemoteProcedures { input: RuntimeProfileInviteCodeAdminListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileInviteCodeAdminListProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/admin_list_profile_recharge_orders_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/admin_list_profile_recharge_orders_and_return_procedure.rs index f0238f7a0..d0c49b1a7 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/admin_list_profile_recharge_orders_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/admin_list_profile_recharge_orders_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait admin_list_profile_recharge_orders_and_return { input: RuntimeProfileRechargeOrderAdminListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl admin_list_profile_recharge_orders_and_return for super::RemoteProcedures { input: RuntimeProfileRechargeOrderAdminListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp.invoke_procedure_with_callback::<_, RuntimeProfileRechargeOrderAdminListProcedureResult>( "admin_list_profile_recharge_orders_and_return", diff --git a/server-rs/crates/spacetime-client/src/module_bindings/admin_list_profile_recharge_products_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/admin_list_profile_recharge_products_procedure.rs index a1deed886..e84d4ec62 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/admin_list_profile_recharge_products_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/admin_list_profile_recharge_products_procedure.rs @@ -34,10 +34,10 @@ pub trait admin_list_profile_recharge_products { input: RuntimeProfileRechargeProductAdminListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl admin_list_profile_recharge_products for super::RemoteProcedures { input: RuntimeProfileRechargeProductAdminListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp.invoke_procedure_with_callback::<_, RuntimeProfileRechargeProductAdminListProcedureResult>( "admin_list_profile_recharge_products", diff --git a/server-rs/crates/spacetime-client/src/module_bindings/admin_list_profile_redeem_codes_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/admin_list_profile_redeem_codes_procedure.rs index c7d6a78e8..2c9b9dd73 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/admin_list_profile_redeem_codes_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/admin_list_profile_redeem_codes_procedure.rs @@ -31,10 +31,10 @@ pub trait admin_list_profile_redeem_codes { input: RuntimeProfileRedeemCodeAdminListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl admin_list_profile_redeem_codes for super::RemoteProcedures { input: RuntimeProfileRedeemCodeAdminListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileRedeemCodeAdminListProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/admin_list_profile_task_configs_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/admin_list_profile_task_configs_procedure.rs index a152116df..88ca28d55 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/admin_list_profile_task_configs_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/admin_list_profile_task_configs_procedure.rs @@ -31,10 +31,10 @@ pub trait admin_list_profile_task_configs { input: RuntimeProfileTaskConfigAdminListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl admin_list_profile_task_configs for super::RemoteProcedures { input: RuntimeProfileTaskConfigAdminListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileTaskConfigAdminListProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/admin_reconcile_profile_wallet_consumption_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/admin_reconcile_profile_wallet_consumption_and_return_procedure.rs index 1002fcc4e..f267d78af 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/admin_reconcile_profile_wallet_consumption_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/admin_reconcile_profile_wallet_consumption_and_return_procedure.rs @@ -34,10 +34,13 @@ pub trait admin_reconcile_profile_wallet_consumption_and_return { input: RuntimeProfileWalletConsumptionReconcileInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result< + RuntimeProfileWalletConsumptionReconcileProcedureResult, + __sdk::InternalError, + >, + ) + Send + + 'static, ); } @@ -47,10 +50,13 @@ impl admin_reconcile_profile_wallet_consumption_and_return for super::RemoteProc input: RuntimeProfileWalletConsumptionReconcileInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result< + RuntimeProfileWalletConsumptionReconcileProcedureResult, + __sdk::InternalError, + >, + ) + Send + + 'static, ) { self.imp.invoke_procedure_with_callback::<_, RuntimeProfileWalletConsumptionReconcileProcedureResult>( "admin_reconcile_profile_wallet_consumption_and_return", diff --git a/server-rs/crates/spacetime-client/src/module_bindings/admin_review_editor_showcase_asset_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/admin_review_editor_showcase_asset_and_return_procedure.rs index 71334fc07..29b2ecf60 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/admin_review_editor_showcase_asset_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/admin_review_editor_showcase_asset_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait admin_review_editor_showcase_asset_and_return { input: EditorShowcaseAssetAdminReviewInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl admin_review_editor_showcase_asset_and_return for super::RemoteProcedures { input: EditorShowcaseAssetAdminReviewInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorShowcaseAssetProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/admin_upsert_profile_invite_code_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/admin_upsert_profile_invite_code_procedure.rs index 2411092d2..3601be97f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/admin_upsert_profile_invite_code_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/admin_upsert_profile_invite_code_procedure.rs @@ -31,10 +31,10 @@ pub trait admin_upsert_profile_invite_code { input: RuntimeProfileInviteCodeAdminUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl admin_upsert_profile_invite_code for super::RemoteProcedures { input: RuntimeProfileInviteCodeAdminUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileInviteCodeAdminProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/admin_upsert_profile_recharge_product_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/admin_upsert_profile_recharge_product_procedure.rs index 83941b836..e3f42278b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/admin_upsert_profile_recharge_product_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/admin_upsert_profile_recharge_product_procedure.rs @@ -34,10 +34,10 @@ pub trait admin_upsert_profile_recharge_product { input: RuntimeProfileRechargeProductAdminUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl admin_upsert_profile_recharge_product for super::RemoteProcedures { input: RuntimeProfileRechargeProductAdminUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileRechargeProductAdminProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/admin_upsert_profile_redeem_code_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/admin_upsert_profile_redeem_code_procedure.rs index 9c7ae92f1..7e918220f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/admin_upsert_profile_redeem_code_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/admin_upsert_profile_redeem_code_procedure.rs @@ -31,10 +31,10 @@ pub trait admin_upsert_profile_redeem_code { input: RuntimeProfileRedeemCodeAdminUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl admin_upsert_profile_redeem_code for super::RemoteProcedures { input: RuntimeProfileRedeemCodeAdminUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileRedeemCodeAdminProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/admin_upsert_profile_task_config_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/admin_upsert_profile_task_config_procedure.rs index b441a8084..a3d3e11a4 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/admin_upsert_profile_task_config_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/admin_upsert_profile_task_config_procedure.rs @@ -31,10 +31,10 @@ pub trait admin_upsert_profile_task_config { input: RuntimeProfileTaskConfigAdminUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl admin_upsert_profile_task_config for super::RemoteProcedures { input: RuntimeProfileTaskConfigAdminUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileTaskConfigAdminProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/admin_upsert_profile_wallet_config_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/admin_upsert_profile_wallet_config_procedure.rs index 46814d669..b87b6506d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/admin_upsert_profile_wallet_config_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/admin_upsert_profile_wallet_config_procedure.rs @@ -34,10 +34,10 @@ pub trait admin_upsert_profile_wallet_config { input: RuntimeProfileWalletConfigAdminUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl admin_upsert_profile_wallet_config for super::RemoteProcedures { input: RuntimeProfileWalletConfigAdminUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileWalletConfigAdminProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/admin_upsert_profile_wallet_manual_restriction_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/admin_upsert_profile_wallet_manual_restriction_and_return_procedure.rs index c313d2d44..54786f87a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/admin_upsert_profile_wallet_manual_restriction_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/admin_upsert_profile_wallet_manual_restriction_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait admin_upsert_profile_wallet_manual_restriction_and_return { input: RuntimeProfileWalletManualRestrictionUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl admin_upsert_profile_wallet_manual_restriction_and_return for super::Remote input: RuntimeProfileWalletManualRestrictionUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileAdminWalletProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/advance_profile_recharge_refund_bill_checkpoint_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/advance_profile_recharge_refund_bill_checkpoint_and_return_procedure.rs index 06631fcfe..064148be6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/advance_profile_recharge_refund_bill_checkpoint_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/advance_profile_recharge_refund_bill_checkpoint_and_return_procedure.rs @@ -34,10 +34,13 @@ pub trait advance_profile_recharge_refund_bill_checkpoint_and_return { input: RuntimeProfileRechargeRefundBillCheckpointAdvanceInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result< + RuntimeProfileRechargeRefundBillCheckpointProcedureResult, + __sdk::InternalError, + >, + ) + Send + + 'static, ); } @@ -47,10 +50,13 @@ impl advance_profile_recharge_refund_bill_checkpoint_and_return for super::Remot input: RuntimeProfileRechargeRefundBillCheckpointAdvanceInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result< + RuntimeProfileRechargeRefundBillCheckpointProcedureResult, + __sdk::InternalError, + >, + ) + Send + + 'static, ) { self.imp.invoke_procedure_with_callback::<_, RuntimeProfileRechargeRefundBillCheckpointProcedureResult>( "advance_profile_recharge_refund_bill_checkpoint_and_return", diff --git a/server-rs/crates/spacetime-client/src/module_bindings/append_ai_text_chunk_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/append_ai_text_chunk_and_return_procedure.rs index 191e2ea7c..11323392d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/append_ai_text_chunk_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/append_ai_text_chunk_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait append_ai_text_chunk_and_return { input: AiTextChunkAppendInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl append_ai_text_chunk_and_return for super::RemoteProcedures { input: AiTextChunkAppendInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, AiTaskProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/attach_ai_result_reference_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/attach_ai_result_reference_and_return_procedure.rs index 94d418502..2f3edbe2a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/attach_ai_result_reference_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/attach_ai_result_reference_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait attach_ai_result_reference_and_return { input: AiResultReferenceInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl attach_ai_result_reference_and_return for super::RemoteProcedures { input: AiResultReferenceInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, AiTaskProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/authenticate_external_api_key_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/authenticate_external_api_key_and_return_procedure.rs index 279534f41..4c3aec34c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/authenticate_external_api_key_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/authenticate_external_api_key_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait authenticate_external_api_key_and_return { input: ExternalApiKeyAuthenticateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl authenticate_external_api_key_and_return for super::RemoteProcedures { input: ExternalApiKeyAuthenticateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, ExternalApiKeyProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/authorize_database_migration_operator_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/authorize_database_migration_operator_procedure.rs index ac77f7e80..b58850228 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/authorize_database_migration_operator_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/authorize_database_migration_operator_procedure.rs @@ -34,10 +34,10 @@ pub trait authorize_database_migration_operator { input: DatabaseMigrationAuthorizeOperatorInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl authorize_database_migration_operator for super::RemoteProcedures { input: DatabaseMigrationAuthorizeOperatorInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, DatabaseMigrationOperatorProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/backfill_editor_canvas_layout_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/backfill_editor_canvas_layout_and_return_procedure.rs index 714b64947..9af4d59d3 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/backfill_editor_canvas_layout_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/backfill_editor_canvas_layout_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait backfill_editor_canvas_layout_and_return { input: EditorCanvasLayoutMigrationInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl backfill_editor_canvas_layout_and_return for super::RemoteProcedures { input: EditorCanvasLayoutMigrationInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorCanvasLayoutMigrationProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/backfill_external_generation_job_summaries_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/backfill_external_generation_job_summaries_and_return_procedure.rs index 315b908ab..8636a1587 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/backfill_external_generation_job_summaries_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/backfill_external_generation_job_summaries_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait backfill_external_generation_job_summaries_and_return { input: ExternalGenerationJobSummaryBackfillInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl backfill_external_generation_job_summaries_and_return for super::RemoteProc input: ExternalGenerationJobSummaryBackfillInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp.invoke_procedure_with_callback::<_, ExternalGenerationJobSummaryBackfillProcedureResult>( "backfill_external_generation_job_summaries_and_return", diff --git a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_draft_config_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_draft_config_row_type.rs deleted file mode 100644 index 37494c810..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_draft_config_row_type.rs +++ /dev/null @@ -1,86 +0,0 @@ -// 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 BarkBattleDraftConfigRow { - 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: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for BarkBattleDraftConfigRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `BarkBattleDraftConfigRow`. -/// -/// Provides typed access to columns for query building. -pub struct BarkBattleDraftConfigRowCols { - pub draft_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub work_id: __sdk::__query_builder::Col, - pub config_version: __sdk::__query_builder::Col, - pub ruleset_version: __sdk::__query_builder::Col, - pub difficulty_preset: __sdk::__query_builder::Col, - pub leaderboard_enabled: __sdk::__query_builder::Col, - pub config_json: __sdk::__query_builder::Col, - pub editor_state_json: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for BarkBattleDraftConfigRow { - type Cols = BarkBattleDraftConfigRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - BarkBattleDraftConfigRowCols { - draft_id: __sdk::__query_builder::Col::new(table_name, "draft_id"), - owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"), - work_id: __sdk::__query_builder::Col::new(table_name, "work_id"), - config_version: __sdk::__query_builder::Col::new(table_name, "config_version"), - ruleset_version: __sdk::__query_builder::Col::new(table_name, "ruleset_version"), - difficulty_preset: __sdk::__query_builder::Col::new(table_name, "difficulty_preset"), - leaderboard_enabled: __sdk::__query_builder::Col::new( - table_name, - "leaderboard_enabled", - ), - config_json: __sdk::__query_builder::Col::new(table_name, "config_json"), - editor_state_json: __sdk::__query_builder::Col::new(table_name, "editor_state_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 `BarkBattleDraftConfigRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct BarkBattleDraftConfigRowIxCols { - pub draft_id: __sdk::__query_builder::IxCol, - pub owner_user_id: __sdk::__query_builder::IxCol, - pub work_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for BarkBattleDraftConfigRow { - type IxCols = BarkBattleDraftConfigRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - BarkBattleDraftConfigRowIxCols { - draft_id: __sdk::__query_builder::IxCol::new(table_name, "draft_id"), - owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"), - work_id: __sdk::__query_builder::IxCol::new(table_name, "work_id"), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for BarkBattleDraftConfigRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_draft_config_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_draft_config_table.rs deleted file mode 100644 index 4675aace0..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_draft_config_table.rs +++ /dev/null @@ -1,231 +0,0 @@ -// 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::bark_battle_draft_config_row_type::BarkBattleDraftConfigRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `bark_battle_draft_config`. -/// -/// Obtain a handle from the [`BarkBattleDraftConfigTableAccess::bark_battle_draft_config`] method on [`super::RemoteTables`], -/// like `ctx.db.bark_battle_draft_config()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.bark_battle_draft_config().on_insert(...)`. -pub struct BarkBattleDraftConfigTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `bark_battle_draft_config`. -pub struct BarkBattleDraftConfigTableAccessor; - -impl __sdk::TableAccessor for BarkBattleDraftConfigTableAccessor { - type Row = BarkBattleDraftConfigRow; - type Handle<'db> = BarkBattleDraftConfigTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.bark_battle_draft_config() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `bark_battle_draft_config`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait BarkBattleDraftConfigTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`BarkBattleDraftConfigTableHandle`], which mediates access to the table `bark_battle_draft_config`. - fn bark_battle_draft_config(&self) -> BarkBattleDraftConfigTableHandle<'_>; -} - -impl BarkBattleDraftConfigTableAccess for super::RemoteTables { - fn bark_battle_draft_config(&self) -> BarkBattleDraftConfigTableHandle<'_> { - BarkBattleDraftConfigTableHandle { - imp: self - .imp - .get_table::("bark_battle_draft_config"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct BarkBattleDraftConfigInsertCallbackId(__sdk::CallbackId); -pub struct BarkBattleDraftConfigDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for BarkBattleDraftConfigTableHandle<'ctx> { - type Row = BarkBattleDraftConfigRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for BarkBattleDraftConfigTableHandle<'ctx> { - type Row = BarkBattleDraftConfigRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = BarkBattleDraftConfigInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattleDraftConfigInsertCallbackId { - BarkBattleDraftConfigInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BarkBattleDraftConfigInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = BarkBattleDraftConfigDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattleDraftConfigDeleteCallbackId { - BarkBattleDraftConfigDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: BarkBattleDraftConfigDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for BarkBattleDraftConfigTableHandle<'ctx> { - type InsertCallbackId = BarkBattleDraftConfigInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattleDraftConfigInsertCallbackId { - BarkBattleDraftConfigInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BarkBattleDraftConfigInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for BarkBattleDraftConfigTableHandle<'ctx> { - type DeleteCallbackId = BarkBattleDraftConfigDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattleDraftConfigDeleteCallbackId { - BarkBattleDraftConfigDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: BarkBattleDraftConfigDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct BarkBattleDraftConfigUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for BarkBattleDraftConfigTableHandle<'ctx> { - type UpdateCallbackId = BarkBattleDraftConfigUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> BarkBattleDraftConfigUpdateCallbackId { - BarkBattleDraftConfigUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: BarkBattleDraftConfigUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for BarkBattleDraftConfigTableHandle<'ctx> { - type UpdateCallbackId = BarkBattleDraftConfigUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> BarkBattleDraftConfigUpdateCallbackId { - BarkBattleDraftConfigUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: BarkBattleDraftConfigUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `draft_id` unique index on the table `bark_battle_draft_config`, -/// which allows point queries on the field of the same name -/// via the [`BarkBattleDraftConfigDraftIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.bark_battle_draft_config().draft_id().find(...)`. -pub struct BarkBattleDraftConfigDraftIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> BarkBattleDraftConfigTableHandle<'ctx> { - /// Get a handle on the `draft_id` unique index on the table `bark_battle_draft_config`. - pub fn draft_id(&self) -> BarkBattleDraftConfigDraftIdUnique<'ctx> { - BarkBattleDraftConfigDraftIdUnique { - imp: self.imp.get_unique_constraint::("draft_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> BarkBattleDraftConfigDraftIdUnique<'ctx> { - /// Find the subscribed row whose `draft_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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("bark_battle_draft_config"); - _table.add_unique_constraint::("draft_id", |row| &row.draft_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `BarkBattleDraftConfigRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait bark_battle_draft_configQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `BarkBattleDraftConfigRow`. - fn bark_battle_draft_config(&self) -> __sdk::__query_builder::Table; -} - -impl bark_battle_draft_configQueryTableAccess for __sdk::QueryTableAccessor { - fn bark_battle_draft_config(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("bark_battle_draft_config") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_leaderboard_entry_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_leaderboard_entry_row_type.rs deleted file mode 100644 index c23b8e6da..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_leaderboard_entry_row_type.rs +++ /dev/null @@ -1,94 +0,0 @@ -// 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 BarkBattleLeaderboardEntryRow { - pub leaderboard_entry_id: String, - pub work_id: String, - pub owner_user_id: String, - pub run_id: String, - pub score_id: String, - pub leaderboard_score: u64, - pub final_energy: f32, - pub trigger_count: u64, - pub max_volume: f32, - pub duration_closeness_ms: u64, - pub finished_at_micros: i64, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for BarkBattleLeaderboardEntryRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `BarkBattleLeaderboardEntryRow`. -/// -/// Provides typed access to columns for query building. -pub struct BarkBattleLeaderboardEntryRowCols { - pub leaderboard_entry_id: __sdk::__query_builder::Col, - pub work_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub run_id: __sdk::__query_builder::Col, - pub score_id: __sdk::__query_builder::Col, - pub leaderboard_score: __sdk::__query_builder::Col, - pub final_energy: __sdk::__query_builder::Col, - pub trigger_count: __sdk::__query_builder::Col, - pub max_volume: __sdk::__query_builder::Col, - pub duration_closeness_ms: __sdk::__query_builder::Col, - pub finished_at_micros: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for BarkBattleLeaderboardEntryRow { - type Cols = BarkBattleLeaderboardEntryRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - BarkBattleLeaderboardEntryRowCols { - leaderboard_entry_id: __sdk::__query_builder::Col::new( - table_name, - "leaderboard_entry_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"), - run_id: __sdk::__query_builder::Col::new(table_name, "run_id"), - score_id: __sdk::__query_builder::Col::new(table_name, "score_id"), - leaderboard_score: __sdk::__query_builder::Col::new(table_name, "leaderboard_score"), - final_energy: __sdk::__query_builder::Col::new(table_name, "final_energy"), - trigger_count: __sdk::__query_builder::Col::new(table_name, "trigger_count"), - max_volume: __sdk::__query_builder::Col::new(table_name, "max_volume"), - duration_closeness_ms: __sdk::__query_builder::Col::new( - table_name, - "duration_closeness_ms", - ), - finished_at_micros: __sdk::__query_builder::Col::new(table_name, "finished_at_micros"), - 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 `BarkBattleLeaderboardEntryRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct BarkBattleLeaderboardEntryRowIxCols { - pub leaderboard_entry_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for BarkBattleLeaderboardEntryRow { - type IxCols = BarkBattleLeaderboardEntryRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - BarkBattleLeaderboardEntryRowIxCols { - leaderboard_entry_id: __sdk::__query_builder::IxCol::new( - table_name, - "leaderboard_entry_id", - ), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for BarkBattleLeaderboardEntryRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_leaderboard_entry_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_leaderboard_entry_table.rs deleted file mode 100644 index ae1423815..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_leaderboard_entry_table.rs +++ /dev/null @@ -1,240 +0,0 @@ -// 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::bark_battle_leaderboard_entry_row_type::BarkBattleLeaderboardEntryRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `bark_battle_leaderboard_entry`. -/// -/// Obtain a handle from the [`BarkBattleLeaderboardEntryTableAccess::bark_battle_leaderboard_entry`] method on [`super::RemoteTables`], -/// like `ctx.db.bark_battle_leaderboard_entry()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.bark_battle_leaderboard_entry().on_insert(...)`. -pub struct BarkBattleLeaderboardEntryTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `bark_battle_leaderboard_entry`. -pub struct BarkBattleLeaderboardEntryTableAccessor; - -impl __sdk::TableAccessor for BarkBattleLeaderboardEntryTableAccessor { - type Row = BarkBattleLeaderboardEntryRow; - type Handle<'db> = BarkBattleLeaderboardEntryTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.bark_battle_leaderboard_entry() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `bark_battle_leaderboard_entry`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait BarkBattleLeaderboardEntryTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`BarkBattleLeaderboardEntryTableHandle`], which mediates access to the table `bark_battle_leaderboard_entry`. - fn bark_battle_leaderboard_entry(&self) -> BarkBattleLeaderboardEntryTableHandle<'_>; -} - -impl BarkBattleLeaderboardEntryTableAccess for super::RemoteTables { - fn bark_battle_leaderboard_entry(&self) -> BarkBattleLeaderboardEntryTableHandle<'_> { - BarkBattleLeaderboardEntryTableHandle { - imp: self - .imp - .get_table::("bark_battle_leaderboard_entry"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct BarkBattleLeaderboardEntryInsertCallbackId(__sdk::CallbackId); -pub struct BarkBattleLeaderboardEntryDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for BarkBattleLeaderboardEntryTableHandle<'ctx> { - type Row = BarkBattleLeaderboardEntryRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for BarkBattleLeaderboardEntryTableHandle<'ctx> { - type Row = BarkBattleLeaderboardEntryRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = BarkBattleLeaderboardEntryInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattleLeaderboardEntryInsertCallbackId { - BarkBattleLeaderboardEntryInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BarkBattleLeaderboardEntryInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = BarkBattleLeaderboardEntryDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattleLeaderboardEntryDeleteCallbackId { - BarkBattleLeaderboardEntryDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: BarkBattleLeaderboardEntryDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for BarkBattleLeaderboardEntryTableHandle<'ctx> { - type InsertCallbackId = BarkBattleLeaderboardEntryInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattleLeaderboardEntryInsertCallbackId { - BarkBattleLeaderboardEntryInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BarkBattleLeaderboardEntryInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for BarkBattleLeaderboardEntryTableHandle<'ctx> { - type DeleteCallbackId = BarkBattleLeaderboardEntryDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattleLeaderboardEntryDeleteCallbackId { - BarkBattleLeaderboardEntryDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: BarkBattleLeaderboardEntryDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct BarkBattleLeaderboardEntryUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for BarkBattleLeaderboardEntryTableHandle<'ctx> { - type UpdateCallbackId = BarkBattleLeaderboardEntryUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> BarkBattleLeaderboardEntryUpdateCallbackId { - BarkBattleLeaderboardEntryUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: BarkBattleLeaderboardEntryUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for BarkBattleLeaderboardEntryTableHandle<'ctx> { - type UpdateCallbackId = BarkBattleLeaderboardEntryUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> BarkBattleLeaderboardEntryUpdateCallbackId { - BarkBattleLeaderboardEntryUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: BarkBattleLeaderboardEntryUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `leaderboard_entry_id` unique index on the table `bark_battle_leaderboard_entry`, -/// which allows point queries on the field of the same name -/// via the [`BarkBattleLeaderboardEntryLeaderboardEntryIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.bark_battle_leaderboard_entry().leaderboard_entry_id().find(...)`. -pub struct BarkBattleLeaderboardEntryLeaderboardEntryIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> BarkBattleLeaderboardEntryTableHandle<'ctx> { - /// Get a handle on the `leaderboard_entry_id` unique index on the table `bark_battle_leaderboard_entry`. - pub fn leaderboard_entry_id(&self) -> BarkBattleLeaderboardEntryLeaderboardEntryIdUnique<'ctx> { - BarkBattleLeaderboardEntryLeaderboardEntryIdUnique { - imp: self - .imp - .get_unique_constraint::("leaderboard_entry_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> BarkBattleLeaderboardEntryLeaderboardEntryIdUnique<'ctx> { - /// Find the subscribed row whose `leaderboard_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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache - .get_or_make_table::("bark_battle_leaderboard_entry"); - _table.add_unique_constraint::("leaderboard_entry_id", |row| &row.leaderboard_entry_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse( - "TableUpdate", - "TableUpdate", - ) - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `BarkBattleLeaderboardEntryRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait bark_battle_leaderboard_entryQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `BarkBattleLeaderboardEntryRow`. - fn bark_battle_leaderboard_entry( - &self, - ) -> __sdk::__query_builder::Table; -} - -impl bark_battle_leaderboard_entryQueryTableAccess for __sdk::QueryTableAccessor { - fn bark_battle_leaderboard_entry( - &self, - ) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("bark_battle_leaderboard_entry") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_personal_best_projection_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_personal_best_projection_row_type.rs deleted file mode 100644 index e7a882839..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_personal_best_projection_row_type.rs +++ /dev/null @@ -1,107 +0,0 @@ -// 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 BarkBattlePersonalBestProjectionRow { - pub personal_best_id: String, - pub owner_user_id: String, - pub work_id: String, - pub run_id: String, - pub score_id: String, - pub leaderboard_entry_id: Option, - pub leaderboard_score: Option, - pub final_energy: f32, - pub trigger_count: u64, - pub max_volume: f32, - pub duration_closeness_ms: u64, - pub server_result: String, - pub validation_status: String, - pub finished_at_micros: i64, - pub summary_json: String, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for BarkBattlePersonalBestProjectionRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `BarkBattlePersonalBestProjectionRow`. -/// -/// Provides typed access to columns for query building. -pub struct BarkBattlePersonalBestProjectionRowCols { - pub personal_best_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub work_id: __sdk::__query_builder::Col, - pub run_id: __sdk::__query_builder::Col, - pub score_id: __sdk::__query_builder::Col, - pub leaderboard_entry_id: - __sdk::__query_builder::Col>, - pub leaderboard_score: - __sdk::__query_builder::Col>, - pub final_energy: __sdk::__query_builder::Col, - pub trigger_count: __sdk::__query_builder::Col, - pub max_volume: __sdk::__query_builder::Col, - pub duration_closeness_ms: - __sdk::__query_builder::Col, - pub server_result: __sdk::__query_builder::Col, - pub validation_status: __sdk::__query_builder::Col, - pub finished_at_micros: __sdk::__query_builder::Col, - pub summary_json: __sdk::__query_builder::Col, - pub updated_at: - __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for BarkBattlePersonalBestProjectionRow { - type Cols = BarkBattlePersonalBestProjectionRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - BarkBattlePersonalBestProjectionRowCols { - personal_best_id: __sdk::__query_builder::Col::new(table_name, "personal_best_id"), - owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"), - work_id: __sdk::__query_builder::Col::new(table_name, "work_id"), - run_id: __sdk::__query_builder::Col::new(table_name, "run_id"), - score_id: __sdk::__query_builder::Col::new(table_name, "score_id"), - leaderboard_entry_id: __sdk::__query_builder::Col::new( - table_name, - "leaderboard_entry_id", - ), - leaderboard_score: __sdk::__query_builder::Col::new(table_name, "leaderboard_score"), - final_energy: __sdk::__query_builder::Col::new(table_name, "final_energy"), - trigger_count: __sdk::__query_builder::Col::new(table_name, "trigger_count"), - max_volume: __sdk::__query_builder::Col::new(table_name, "max_volume"), - duration_closeness_ms: __sdk::__query_builder::Col::new( - table_name, - "duration_closeness_ms", - ), - server_result: __sdk::__query_builder::Col::new(table_name, "server_result"), - validation_status: __sdk::__query_builder::Col::new(table_name, "validation_status"), - finished_at_micros: __sdk::__query_builder::Col::new(table_name, "finished_at_micros"), - summary_json: __sdk::__query_builder::Col::new(table_name, "summary_json"), - updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), - } - } -} - -/// Indexed column accessor struct for the table `BarkBattlePersonalBestProjectionRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct BarkBattlePersonalBestProjectionRowIxCols { - pub personal_best_id: - __sdk::__query_builder::IxCol, - pub work_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for BarkBattlePersonalBestProjectionRow { - type IxCols = BarkBattlePersonalBestProjectionRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - BarkBattlePersonalBestProjectionRowIxCols { - personal_best_id: __sdk::__query_builder::IxCol::new(table_name, "personal_best_id"), - work_id: __sdk::__query_builder::IxCol::new(table_name, "work_id"), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for BarkBattlePersonalBestProjectionRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_personal_best_projection_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_personal_best_projection_table.rs deleted file mode 100644 index 7c1080cb1..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_personal_best_projection_table.rs +++ /dev/null @@ -1,243 +0,0 @@ -// 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::bark_battle_personal_best_projection_row_type::BarkBattlePersonalBestProjectionRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `bark_battle_personal_best_projection`. -/// -/// Obtain a handle from the [`BarkBattlePersonalBestProjectionTableAccess::bark_battle_personal_best_projection`] method on [`super::RemoteTables`], -/// like `ctx.db.bark_battle_personal_best_projection()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.bark_battle_personal_best_projection().on_insert(...)`. -pub struct BarkBattlePersonalBestProjectionTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `bark_battle_personal_best_projection`. -pub struct BarkBattlePersonalBestProjectionTableAccessor; - -impl __sdk::TableAccessor for BarkBattlePersonalBestProjectionTableAccessor { - type Row = BarkBattlePersonalBestProjectionRow; - type Handle<'db> = BarkBattlePersonalBestProjectionTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.bark_battle_personal_best_projection() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `bark_battle_personal_best_projection`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait BarkBattlePersonalBestProjectionTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`BarkBattlePersonalBestProjectionTableHandle`], which mediates access to the table `bark_battle_personal_best_projection`. - fn bark_battle_personal_best_projection( - &self, - ) -> BarkBattlePersonalBestProjectionTableHandle<'_>; -} - -impl BarkBattlePersonalBestProjectionTableAccess for super::RemoteTables { - fn bark_battle_personal_best_projection( - &self, - ) -> BarkBattlePersonalBestProjectionTableHandle<'_> { - BarkBattlePersonalBestProjectionTableHandle { - imp: self.imp.get_table::( - "bark_battle_personal_best_projection", - ), - ctx: std::marker::PhantomData, - } - } -} - -pub struct BarkBattlePersonalBestProjectionInsertCallbackId(__sdk::CallbackId); -pub struct BarkBattlePersonalBestProjectionDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for BarkBattlePersonalBestProjectionTableHandle<'ctx> { - type Row = BarkBattlePersonalBestProjectionRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for BarkBattlePersonalBestProjectionTableHandle<'ctx> { - type Row = BarkBattlePersonalBestProjectionRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = BarkBattlePersonalBestProjectionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattlePersonalBestProjectionInsertCallbackId { - BarkBattlePersonalBestProjectionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BarkBattlePersonalBestProjectionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = BarkBattlePersonalBestProjectionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattlePersonalBestProjectionDeleteCallbackId { - BarkBattlePersonalBestProjectionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: BarkBattlePersonalBestProjectionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for BarkBattlePersonalBestProjectionTableHandle<'ctx> { - type InsertCallbackId = BarkBattlePersonalBestProjectionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattlePersonalBestProjectionInsertCallbackId { - BarkBattlePersonalBestProjectionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BarkBattlePersonalBestProjectionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for BarkBattlePersonalBestProjectionTableHandle<'ctx> { - type DeleteCallbackId = BarkBattlePersonalBestProjectionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattlePersonalBestProjectionDeleteCallbackId { - BarkBattlePersonalBestProjectionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: BarkBattlePersonalBestProjectionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct BarkBattlePersonalBestProjectionUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for BarkBattlePersonalBestProjectionTableHandle<'ctx> { - type UpdateCallbackId = BarkBattlePersonalBestProjectionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> BarkBattlePersonalBestProjectionUpdateCallbackId { - BarkBattlePersonalBestProjectionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: BarkBattlePersonalBestProjectionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for BarkBattlePersonalBestProjectionTableHandle<'ctx> { - type UpdateCallbackId = BarkBattlePersonalBestProjectionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> BarkBattlePersonalBestProjectionUpdateCallbackId { - BarkBattlePersonalBestProjectionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: BarkBattlePersonalBestProjectionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `personal_best_id` unique index on the table `bark_battle_personal_best_projection`, -/// which allows point queries on the field of the same name -/// via the [`BarkBattlePersonalBestProjectionPersonalBestIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.bark_battle_personal_best_projection().personal_best_id().find(...)`. -pub struct BarkBattlePersonalBestProjectionPersonalBestIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> BarkBattlePersonalBestProjectionTableHandle<'ctx> { - /// Get a handle on the `personal_best_id` unique index on the table `bark_battle_personal_best_projection`. - pub fn personal_best_id(&self) -> BarkBattlePersonalBestProjectionPersonalBestIdUnique<'ctx> { - BarkBattlePersonalBestProjectionPersonalBestIdUnique { - imp: self.imp.get_unique_constraint::("personal_best_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> BarkBattlePersonalBestProjectionPersonalBestIdUnique<'ctx> { - /// Find the subscribed row whose `personal_best_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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::( - "bark_battle_personal_best_projection", - ); - _table.add_unique_constraint::("personal_best_id", |row| &row.personal_best_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse( - "TableUpdate", - "TableUpdate", - ) - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `BarkBattlePersonalBestProjectionRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait bark_battle_personal_best_projectionQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `BarkBattlePersonalBestProjectionRow`. - fn bark_battle_personal_best_projection( - &self, - ) -> __sdk::__query_builder::Table; -} - -impl bark_battle_personal_best_projectionQueryTableAccess for __sdk::QueryTableAccessor { - fn bark_battle_personal_best_projection( - &self, - ) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("bark_battle_personal_best_projection") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_published_config_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_published_config_row_type.rs deleted file mode 100644 index 64f11bacc..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_published_config_row_type.rs +++ /dev/null @@ -1,93 +0,0 @@ -// 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 BarkBattlePublishedConfigRow { - pub work_id: String, - pub owner_user_id: String, - pub source_draft_id: Option, - 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 created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, - pub published_at: __sdk::Timestamp, - pub visible: bool, -} - -impl __sdk::InModule for BarkBattlePublishedConfigRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `BarkBattlePublishedConfigRow`. -/// -/// Provides typed access to columns for query building. -pub struct BarkBattlePublishedConfigRowCols { - pub work_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub source_draft_id: __sdk::__query_builder::Col>, - pub config_version: __sdk::__query_builder::Col, - pub ruleset_version: __sdk::__query_builder::Col, - pub difficulty_preset: __sdk::__query_builder::Col, - pub leaderboard_enabled: __sdk::__query_builder::Col, - pub config_json: __sdk::__query_builder::Col, - pub published_snapshot_json: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, - pub published_at: __sdk::__query_builder::Col, - pub visible: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for BarkBattlePublishedConfigRow { - type Cols = BarkBattlePublishedConfigRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - BarkBattlePublishedConfigRowCols { - 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_draft_id: __sdk::__query_builder::Col::new(table_name, "source_draft_id"), - config_version: __sdk::__query_builder::Col::new(table_name, "config_version"), - ruleset_version: __sdk::__query_builder::Col::new(table_name, "ruleset_version"), - difficulty_preset: __sdk::__query_builder::Col::new(table_name, "difficulty_preset"), - leaderboard_enabled: __sdk::__query_builder::Col::new( - table_name, - "leaderboard_enabled", - ), - config_json: __sdk::__query_builder::Col::new(table_name, "config_json"), - published_snapshot_json: __sdk::__query_builder::Col::new( - table_name, - "published_snapshot_json", - ), - 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"), - visible: __sdk::__query_builder::Col::new(table_name, "visible"), - } - } -} - -/// Indexed column accessor struct for the table `BarkBattlePublishedConfigRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct BarkBattlePublishedConfigRowIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub work_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for BarkBattlePublishedConfigRow { - type IxCols = BarkBattlePublishedConfigRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - BarkBattlePublishedConfigRowIxCols { - owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"), - work_id: __sdk::__query_builder::IxCol::new(table_name, "work_id"), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for BarkBattlePublishedConfigRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_published_config_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_published_config_table.rs deleted file mode 100644 index 0f61595ce..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_published_config_table.rs +++ /dev/null @@ -1,238 +0,0 @@ -// 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::bark_battle_published_config_row_type::BarkBattlePublishedConfigRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `bark_battle_published_config`. -/// -/// Obtain a handle from the [`BarkBattlePublishedConfigTableAccess::bark_battle_published_config`] method on [`super::RemoteTables`], -/// like `ctx.db.bark_battle_published_config()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.bark_battle_published_config().on_insert(...)`. -pub struct BarkBattlePublishedConfigTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `bark_battle_published_config`. -pub struct BarkBattlePublishedConfigTableAccessor; - -impl __sdk::TableAccessor for BarkBattlePublishedConfigTableAccessor { - type Row = BarkBattlePublishedConfigRow; - type Handle<'db> = BarkBattlePublishedConfigTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.bark_battle_published_config() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `bark_battle_published_config`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait BarkBattlePublishedConfigTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`BarkBattlePublishedConfigTableHandle`], which mediates access to the table `bark_battle_published_config`. - fn bark_battle_published_config(&self) -> BarkBattlePublishedConfigTableHandle<'_>; -} - -impl BarkBattlePublishedConfigTableAccess for super::RemoteTables { - fn bark_battle_published_config(&self) -> BarkBattlePublishedConfigTableHandle<'_> { - BarkBattlePublishedConfigTableHandle { - imp: self - .imp - .get_table::("bark_battle_published_config"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct BarkBattlePublishedConfigInsertCallbackId(__sdk::CallbackId); -pub struct BarkBattlePublishedConfigDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for BarkBattlePublishedConfigTableHandle<'ctx> { - type Row = BarkBattlePublishedConfigRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for BarkBattlePublishedConfigTableHandle<'ctx> { - type Row = BarkBattlePublishedConfigRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = BarkBattlePublishedConfigInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattlePublishedConfigInsertCallbackId { - BarkBattlePublishedConfigInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BarkBattlePublishedConfigInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = BarkBattlePublishedConfigDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattlePublishedConfigDeleteCallbackId { - BarkBattlePublishedConfigDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: BarkBattlePublishedConfigDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for BarkBattlePublishedConfigTableHandle<'ctx> { - type InsertCallbackId = BarkBattlePublishedConfigInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattlePublishedConfigInsertCallbackId { - BarkBattlePublishedConfigInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BarkBattlePublishedConfigInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for BarkBattlePublishedConfigTableHandle<'ctx> { - type DeleteCallbackId = BarkBattlePublishedConfigDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattlePublishedConfigDeleteCallbackId { - BarkBattlePublishedConfigDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: BarkBattlePublishedConfigDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct BarkBattlePublishedConfigUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for BarkBattlePublishedConfigTableHandle<'ctx> { - type UpdateCallbackId = BarkBattlePublishedConfigUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> BarkBattlePublishedConfigUpdateCallbackId { - BarkBattlePublishedConfigUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: BarkBattlePublishedConfigUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for BarkBattlePublishedConfigTableHandle<'ctx> { - type UpdateCallbackId = BarkBattlePublishedConfigUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> BarkBattlePublishedConfigUpdateCallbackId { - BarkBattlePublishedConfigUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: BarkBattlePublishedConfigUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `work_id` unique index on the table `bark_battle_published_config`, -/// which allows point queries on the field of the same name -/// via the [`BarkBattlePublishedConfigWorkIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.bark_battle_published_config().work_id().find(...)`. -pub struct BarkBattlePublishedConfigWorkIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> BarkBattlePublishedConfigTableHandle<'ctx> { - /// Get a handle on the `work_id` unique index on the table `bark_battle_published_config`. - pub fn work_id(&self) -> BarkBattlePublishedConfigWorkIdUnique<'ctx> { - BarkBattlePublishedConfigWorkIdUnique { - imp: self.imp.get_unique_constraint::("work_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> BarkBattlePublishedConfigWorkIdUnique<'ctx> { - /// Find the subscribed row whose `work_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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache - .get_or_make_table::("bark_battle_published_config"); - _table.add_unique_constraint::("work_id", |row| &row.work_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse( - "TableUpdate", - "TableUpdate", - ) - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `BarkBattlePublishedConfigRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait bark_battle_published_configQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `BarkBattlePublishedConfigRow`. - fn bark_battle_published_config( - &self, - ) -> __sdk::__query_builder::Table; -} - -impl bark_battle_published_configQueryTableAccess for __sdk::QueryTableAccessor { - fn bark_battle_published_config( - &self, - ) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("bark_battle_published_config") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_runtime_run_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_runtime_run_row_type.rs deleted file mode 100644 index 24edf9c6b..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_runtime_run_row_type.rs +++ /dev/null @@ -1,127 +0,0 @@ -// 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 BarkBattleRuntimeRunRow { - pub run_id: String, - pub run_token_hash: 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: __sdk::Timestamp, - pub client_finished_at_micros: Option, - pub server_finished_at: Option<__sdk::Timestamp>, - pub metrics_json: String, - pub server_result: Option, - pub validation_status: String, - pub anti_cheat_flags_json: String, - pub leaderboard_score: Option, - pub score_id: Option, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for BarkBattleRuntimeRunRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `BarkBattleRuntimeRunRow`. -/// -/// Provides typed access to columns for query building. -pub struct BarkBattleRuntimeRunRowCols { - pub run_id: __sdk::__query_builder::Col, - pub run_token_hash: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub work_id: __sdk::__query_builder::Col, - pub config_version: __sdk::__query_builder::Col, - pub ruleset_version: __sdk::__query_builder::Col, - pub difficulty_preset: __sdk::__query_builder::Col, - pub leaderboard_enabled: __sdk::__query_builder::Col, - pub status: __sdk::__query_builder::Col, - pub client_started_at_micros: __sdk::__query_builder::Col, - pub server_started_at: __sdk::__query_builder::Col, - pub client_finished_at_micros: - __sdk::__query_builder::Col>, - pub server_finished_at: - __sdk::__query_builder::Col>, - pub metrics_json: __sdk::__query_builder::Col, - pub server_result: __sdk::__query_builder::Col>, - pub validation_status: __sdk::__query_builder::Col, - pub anti_cheat_flags_json: __sdk::__query_builder::Col, - pub leaderboard_score: __sdk::__query_builder::Col>, - pub score_id: __sdk::__query_builder::Col>, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for BarkBattleRuntimeRunRow { - type Cols = BarkBattleRuntimeRunRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - BarkBattleRuntimeRunRowCols { - run_id: __sdk::__query_builder::Col::new(table_name, "run_id"), - run_token_hash: __sdk::__query_builder::Col::new(table_name, "run_token_hash"), - owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"), - work_id: __sdk::__query_builder::Col::new(table_name, "work_id"), - config_version: __sdk::__query_builder::Col::new(table_name, "config_version"), - ruleset_version: __sdk::__query_builder::Col::new(table_name, "ruleset_version"), - difficulty_preset: __sdk::__query_builder::Col::new(table_name, "difficulty_preset"), - leaderboard_enabled: __sdk::__query_builder::Col::new( - table_name, - "leaderboard_enabled", - ), - status: __sdk::__query_builder::Col::new(table_name, "status"), - client_started_at_micros: __sdk::__query_builder::Col::new( - table_name, - "client_started_at_micros", - ), - server_started_at: __sdk::__query_builder::Col::new(table_name, "server_started_at"), - client_finished_at_micros: __sdk::__query_builder::Col::new( - table_name, - "client_finished_at_micros", - ), - server_finished_at: __sdk::__query_builder::Col::new(table_name, "server_finished_at"), - metrics_json: __sdk::__query_builder::Col::new(table_name, "metrics_json"), - server_result: __sdk::__query_builder::Col::new(table_name, "server_result"), - validation_status: __sdk::__query_builder::Col::new(table_name, "validation_status"), - anti_cheat_flags_json: __sdk::__query_builder::Col::new( - table_name, - "anti_cheat_flags_json", - ), - leaderboard_score: __sdk::__query_builder::Col::new(table_name, "leaderboard_score"), - score_id: __sdk::__query_builder::Col::new(table_name, "score_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 `BarkBattleRuntimeRunRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct BarkBattleRuntimeRunRowIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub run_id: __sdk::__query_builder::IxCol, - pub work_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for BarkBattleRuntimeRunRow { - type IxCols = BarkBattleRuntimeRunRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - BarkBattleRuntimeRunRowIxCols { - owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"), - run_id: __sdk::__query_builder::IxCol::new(table_name, "run_id"), - work_id: __sdk::__query_builder::IxCol::new(table_name, "work_id"), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for BarkBattleRuntimeRunRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_runtime_run_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_runtime_run_table.rs deleted file mode 100644 index e1ce7b5db..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_runtime_run_table.rs +++ /dev/null @@ -1,231 +0,0 @@ -// 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::bark_battle_runtime_run_row_type::BarkBattleRuntimeRunRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `bark_battle_runtime_run`. -/// -/// Obtain a handle from the [`BarkBattleRuntimeRunTableAccess::bark_battle_runtime_run`] method on [`super::RemoteTables`], -/// like `ctx.db.bark_battle_runtime_run()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.bark_battle_runtime_run().on_insert(...)`. -pub struct BarkBattleRuntimeRunTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `bark_battle_runtime_run`. -pub struct BarkBattleRuntimeRunTableAccessor; - -impl __sdk::TableAccessor for BarkBattleRuntimeRunTableAccessor { - type Row = BarkBattleRuntimeRunRow; - type Handle<'db> = BarkBattleRuntimeRunTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.bark_battle_runtime_run() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `bark_battle_runtime_run`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait BarkBattleRuntimeRunTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`BarkBattleRuntimeRunTableHandle`], which mediates access to the table `bark_battle_runtime_run`. - fn bark_battle_runtime_run(&self) -> BarkBattleRuntimeRunTableHandle<'_>; -} - -impl BarkBattleRuntimeRunTableAccess for super::RemoteTables { - fn bark_battle_runtime_run(&self) -> BarkBattleRuntimeRunTableHandle<'_> { - BarkBattleRuntimeRunTableHandle { - imp: self - .imp - .get_table::("bark_battle_runtime_run"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct BarkBattleRuntimeRunInsertCallbackId(__sdk::CallbackId); -pub struct BarkBattleRuntimeRunDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for BarkBattleRuntimeRunTableHandle<'ctx> { - type Row = BarkBattleRuntimeRunRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for BarkBattleRuntimeRunTableHandle<'ctx> { - type Row = BarkBattleRuntimeRunRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = BarkBattleRuntimeRunInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattleRuntimeRunInsertCallbackId { - BarkBattleRuntimeRunInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BarkBattleRuntimeRunInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = BarkBattleRuntimeRunDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattleRuntimeRunDeleteCallbackId { - BarkBattleRuntimeRunDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: BarkBattleRuntimeRunDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for BarkBattleRuntimeRunTableHandle<'ctx> { - type InsertCallbackId = BarkBattleRuntimeRunInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattleRuntimeRunInsertCallbackId { - BarkBattleRuntimeRunInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BarkBattleRuntimeRunInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for BarkBattleRuntimeRunTableHandle<'ctx> { - type DeleteCallbackId = BarkBattleRuntimeRunDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattleRuntimeRunDeleteCallbackId { - BarkBattleRuntimeRunDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: BarkBattleRuntimeRunDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct BarkBattleRuntimeRunUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for BarkBattleRuntimeRunTableHandle<'ctx> { - type UpdateCallbackId = BarkBattleRuntimeRunUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> BarkBattleRuntimeRunUpdateCallbackId { - BarkBattleRuntimeRunUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: BarkBattleRuntimeRunUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for BarkBattleRuntimeRunTableHandle<'ctx> { - type UpdateCallbackId = BarkBattleRuntimeRunUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> BarkBattleRuntimeRunUpdateCallbackId { - BarkBattleRuntimeRunUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: BarkBattleRuntimeRunUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `run_id` unique index on the table `bark_battle_runtime_run`, -/// which allows point queries on the field of the same name -/// via the [`BarkBattleRuntimeRunRunIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.bark_battle_runtime_run().run_id().find(...)`. -pub struct BarkBattleRuntimeRunRunIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> BarkBattleRuntimeRunTableHandle<'ctx> { - /// Get a handle on the `run_id` unique index on the table `bark_battle_runtime_run`. - pub fn run_id(&self) -> BarkBattleRuntimeRunRunIdUnique<'ctx> { - BarkBattleRuntimeRunRunIdUnique { - imp: self.imp.get_unique_constraint::("run_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> BarkBattleRuntimeRunRunIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("bark_battle_runtime_run"); - _table.add_unique_constraint::("run_id", |row| &row.run_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `BarkBattleRuntimeRunRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait bark_battle_runtime_runQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `BarkBattleRuntimeRunRow`. - fn bark_battle_runtime_run(&self) -> __sdk::__query_builder::Table; -} - -impl bark_battle_runtime_runQueryTableAccess for __sdk::QueryTableAccessor { - fn bark_battle_runtime_run(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("bark_battle_runtime_run") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_score_record_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_score_record_row_type.rs deleted file mode 100644 index 8c8703b4b..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_score_record_row_type.rs +++ /dev/null @@ -1,106 +0,0 @@ -// 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 BarkBattleScoreRecordRow { - pub score_id: String, - pub owner_user_id: String, - pub work_id: String, - pub run_id: String, - pub config_version: u64, - pub ruleset_version: String, - pub difficulty_preset: String, - pub leaderboard_enabled: bool, - pub metrics_json: String, - pub derived_metrics_json: String, - pub server_result: String, - pub validation_status: String, - pub anti_cheat_flags_json: String, - pub leaderboard_score: Option, - pub recorded_at: __sdk::Timestamp, -} - -impl __sdk::InModule for BarkBattleScoreRecordRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `BarkBattleScoreRecordRow`. -/// -/// Provides typed access to columns for query building. -pub struct BarkBattleScoreRecordRowCols { - pub score_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub work_id: __sdk::__query_builder::Col, - pub run_id: __sdk::__query_builder::Col, - pub config_version: __sdk::__query_builder::Col, - pub ruleset_version: __sdk::__query_builder::Col, - pub difficulty_preset: __sdk::__query_builder::Col, - pub leaderboard_enabled: __sdk::__query_builder::Col, - pub metrics_json: __sdk::__query_builder::Col, - pub derived_metrics_json: __sdk::__query_builder::Col, - pub server_result: __sdk::__query_builder::Col, - pub validation_status: __sdk::__query_builder::Col, - pub anti_cheat_flags_json: __sdk::__query_builder::Col, - pub leaderboard_score: __sdk::__query_builder::Col>, - pub recorded_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for BarkBattleScoreRecordRow { - type Cols = BarkBattleScoreRecordRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - BarkBattleScoreRecordRowCols { - score_id: __sdk::__query_builder::Col::new(table_name, "score_id"), - owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"), - work_id: __sdk::__query_builder::Col::new(table_name, "work_id"), - run_id: __sdk::__query_builder::Col::new(table_name, "run_id"), - config_version: __sdk::__query_builder::Col::new(table_name, "config_version"), - ruleset_version: __sdk::__query_builder::Col::new(table_name, "ruleset_version"), - difficulty_preset: __sdk::__query_builder::Col::new(table_name, "difficulty_preset"), - leaderboard_enabled: __sdk::__query_builder::Col::new( - table_name, - "leaderboard_enabled", - ), - metrics_json: __sdk::__query_builder::Col::new(table_name, "metrics_json"), - derived_metrics_json: __sdk::__query_builder::Col::new( - table_name, - "derived_metrics_json", - ), - server_result: __sdk::__query_builder::Col::new(table_name, "server_result"), - validation_status: __sdk::__query_builder::Col::new(table_name, "validation_status"), - anti_cheat_flags_json: __sdk::__query_builder::Col::new( - table_name, - "anti_cheat_flags_json", - ), - leaderboard_score: __sdk::__query_builder::Col::new(table_name, "leaderboard_score"), - recorded_at: __sdk::__query_builder::Col::new(table_name, "recorded_at"), - } - } -} - -/// Indexed column accessor struct for the table `BarkBattleScoreRecordRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct BarkBattleScoreRecordRowIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub run_id: __sdk::__query_builder::IxCol, - pub score_id: __sdk::__query_builder::IxCol, - pub work_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for BarkBattleScoreRecordRow { - type IxCols = BarkBattleScoreRecordRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - BarkBattleScoreRecordRowIxCols { - owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"), - run_id: __sdk::__query_builder::IxCol::new(table_name, "run_id"), - score_id: __sdk::__query_builder::IxCol::new(table_name, "score_id"), - work_id: __sdk::__query_builder::IxCol::new(table_name, "work_id"), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for BarkBattleScoreRecordRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_score_record_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_score_record_table.rs deleted file mode 100644 index c466c9d1a..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_score_record_table.rs +++ /dev/null @@ -1,231 +0,0 @@ -// 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::bark_battle_score_record_row_type::BarkBattleScoreRecordRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `bark_battle_score_record`. -/// -/// Obtain a handle from the [`BarkBattleScoreRecordTableAccess::bark_battle_score_record`] method on [`super::RemoteTables`], -/// like `ctx.db.bark_battle_score_record()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.bark_battle_score_record().on_insert(...)`. -pub struct BarkBattleScoreRecordTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `bark_battle_score_record`. -pub struct BarkBattleScoreRecordTableAccessor; - -impl __sdk::TableAccessor for BarkBattleScoreRecordTableAccessor { - type Row = BarkBattleScoreRecordRow; - type Handle<'db> = BarkBattleScoreRecordTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.bark_battle_score_record() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `bark_battle_score_record`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait BarkBattleScoreRecordTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`BarkBattleScoreRecordTableHandle`], which mediates access to the table `bark_battle_score_record`. - fn bark_battle_score_record(&self) -> BarkBattleScoreRecordTableHandle<'_>; -} - -impl BarkBattleScoreRecordTableAccess for super::RemoteTables { - fn bark_battle_score_record(&self) -> BarkBattleScoreRecordTableHandle<'_> { - BarkBattleScoreRecordTableHandle { - imp: self - .imp - .get_table::("bark_battle_score_record"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct BarkBattleScoreRecordInsertCallbackId(__sdk::CallbackId); -pub struct BarkBattleScoreRecordDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for BarkBattleScoreRecordTableHandle<'ctx> { - type Row = BarkBattleScoreRecordRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for BarkBattleScoreRecordTableHandle<'ctx> { - type Row = BarkBattleScoreRecordRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = BarkBattleScoreRecordInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattleScoreRecordInsertCallbackId { - BarkBattleScoreRecordInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BarkBattleScoreRecordInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = BarkBattleScoreRecordDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattleScoreRecordDeleteCallbackId { - BarkBattleScoreRecordDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: BarkBattleScoreRecordDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for BarkBattleScoreRecordTableHandle<'ctx> { - type InsertCallbackId = BarkBattleScoreRecordInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattleScoreRecordInsertCallbackId { - BarkBattleScoreRecordInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BarkBattleScoreRecordInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for BarkBattleScoreRecordTableHandle<'ctx> { - type DeleteCallbackId = BarkBattleScoreRecordDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattleScoreRecordDeleteCallbackId { - BarkBattleScoreRecordDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: BarkBattleScoreRecordDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct BarkBattleScoreRecordUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for BarkBattleScoreRecordTableHandle<'ctx> { - type UpdateCallbackId = BarkBattleScoreRecordUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> BarkBattleScoreRecordUpdateCallbackId { - BarkBattleScoreRecordUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: BarkBattleScoreRecordUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for BarkBattleScoreRecordTableHandle<'ctx> { - type UpdateCallbackId = BarkBattleScoreRecordUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> BarkBattleScoreRecordUpdateCallbackId { - BarkBattleScoreRecordUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: BarkBattleScoreRecordUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `score_id` unique index on the table `bark_battle_score_record`, -/// which allows point queries on the field of the same name -/// via the [`BarkBattleScoreRecordScoreIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.bark_battle_score_record().score_id().find(...)`. -pub struct BarkBattleScoreRecordScoreIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> BarkBattleScoreRecordTableHandle<'ctx> { - /// Get a handle on the `score_id` unique index on the table `bark_battle_score_record`. - pub fn score_id(&self) -> BarkBattleScoreRecordScoreIdUnique<'ctx> { - BarkBattleScoreRecordScoreIdUnique { - imp: self.imp.get_unique_constraint::("score_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> BarkBattleScoreRecordScoreIdUnique<'ctx> { - /// Find the subscribed row whose `score_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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("bark_battle_score_record"); - _table.add_unique_constraint::("score_id", |row| &row.score_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `BarkBattleScoreRecordRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait bark_battle_score_recordQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `BarkBattleScoreRecordRow`. - fn bark_battle_score_record(&self) -> __sdk::__query_builder::Table; -} - -impl bark_battle_score_recordQueryTableAccess for __sdk::QueryTableAccessor { - fn bark_battle_score_record(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("bark_battle_score_record") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_work_stats_projection_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_work_stats_projection_row_type.rs deleted file mode 100644 index 2d1163957..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_work_stats_projection_row_type.rs +++ /dev/null @@ -1,111 +0,0 @@ -// 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 BarkBattleWorkStatsProjectionRow { - pub work_id: String, - pub owner_user_id: String, - pub play_count: u64, - pub finished_count: u64, - pub accepted_score_count: u64, - pub leaderboard_entry_count: u64, - pub best_leaderboard_score: Option, - pub best_score_id: Option, - pub best_run_id: Option, - pub average_final_energy: f32, - pub average_trigger_count: f32, - pub last_finished_at_micros: Option, - pub stats_json: String, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for BarkBattleWorkStatsProjectionRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `BarkBattleWorkStatsProjectionRow`. -/// -/// Provides typed access to columns for query building. -pub struct BarkBattleWorkStatsProjectionRowCols { - pub work_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub play_count: __sdk::__query_builder::Col, - pub finished_count: __sdk::__query_builder::Col, - pub accepted_score_count: __sdk::__query_builder::Col, - pub leaderboard_entry_count: __sdk::__query_builder::Col, - pub best_leaderboard_score: - __sdk::__query_builder::Col>, - pub best_score_id: - __sdk::__query_builder::Col>, - pub best_run_id: __sdk::__query_builder::Col>, - pub average_final_energy: __sdk::__query_builder::Col, - pub average_trigger_count: __sdk::__query_builder::Col, - pub last_finished_at_micros: - __sdk::__query_builder::Col>, - pub stats_json: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for BarkBattleWorkStatsProjectionRow { - type Cols = BarkBattleWorkStatsProjectionRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - BarkBattleWorkStatsProjectionRowCols { - work_id: __sdk::__query_builder::Col::new(table_name, "work_id"), - owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"), - play_count: __sdk::__query_builder::Col::new(table_name, "play_count"), - finished_count: __sdk::__query_builder::Col::new(table_name, "finished_count"), - accepted_score_count: __sdk::__query_builder::Col::new( - table_name, - "accepted_score_count", - ), - leaderboard_entry_count: __sdk::__query_builder::Col::new( - table_name, - "leaderboard_entry_count", - ), - best_leaderboard_score: __sdk::__query_builder::Col::new( - table_name, - "best_leaderboard_score", - ), - best_score_id: __sdk::__query_builder::Col::new(table_name, "best_score_id"), - best_run_id: __sdk::__query_builder::Col::new(table_name, "best_run_id"), - average_final_energy: __sdk::__query_builder::Col::new( - table_name, - "average_final_energy", - ), - average_trigger_count: __sdk::__query_builder::Col::new( - table_name, - "average_trigger_count", - ), - last_finished_at_micros: __sdk::__query_builder::Col::new( - table_name, - "last_finished_at_micros", - ), - stats_json: __sdk::__query_builder::Col::new(table_name, "stats_json"), - updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), - } - } -} - -/// Indexed column accessor struct for the table `BarkBattleWorkStatsProjectionRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct BarkBattleWorkStatsProjectionRowIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub work_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for BarkBattleWorkStatsProjectionRow { - type IxCols = BarkBattleWorkStatsProjectionRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - BarkBattleWorkStatsProjectionRowIxCols { - owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"), - work_id: __sdk::__query_builder::IxCol::new(table_name, "work_id"), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for BarkBattleWorkStatsProjectionRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_work_stats_projection_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_work_stats_projection_table.rs deleted file mode 100644 index bc6346f76..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/bark_battle_work_stats_projection_table.rs +++ /dev/null @@ -1,238 +0,0 @@ -// 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::bark_battle_work_stats_projection_row_type::BarkBattleWorkStatsProjectionRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `bark_battle_work_stats_projection`. -/// -/// Obtain a handle from the [`BarkBattleWorkStatsProjectionTableAccess::bark_battle_work_stats_projection`] method on [`super::RemoteTables`], -/// like `ctx.db.bark_battle_work_stats_projection()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.bark_battle_work_stats_projection().on_insert(...)`. -pub struct BarkBattleWorkStatsProjectionTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `bark_battle_work_stats_projection`. -pub struct BarkBattleWorkStatsProjectionTableAccessor; - -impl __sdk::TableAccessor for BarkBattleWorkStatsProjectionTableAccessor { - type Row = BarkBattleWorkStatsProjectionRow; - type Handle<'db> = BarkBattleWorkStatsProjectionTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.bark_battle_work_stats_projection() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `bark_battle_work_stats_projection`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait BarkBattleWorkStatsProjectionTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`BarkBattleWorkStatsProjectionTableHandle`], which mediates access to the table `bark_battle_work_stats_projection`. - fn bark_battle_work_stats_projection(&self) -> BarkBattleWorkStatsProjectionTableHandle<'_>; -} - -impl BarkBattleWorkStatsProjectionTableAccess for super::RemoteTables { - fn bark_battle_work_stats_projection(&self) -> BarkBattleWorkStatsProjectionTableHandle<'_> { - BarkBattleWorkStatsProjectionTableHandle { - imp: self - .imp - .get_table::("bark_battle_work_stats_projection"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct BarkBattleWorkStatsProjectionInsertCallbackId(__sdk::CallbackId); -pub struct BarkBattleWorkStatsProjectionDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for BarkBattleWorkStatsProjectionTableHandle<'ctx> { - type Row = BarkBattleWorkStatsProjectionRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for BarkBattleWorkStatsProjectionTableHandle<'ctx> { - type Row = BarkBattleWorkStatsProjectionRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = BarkBattleWorkStatsProjectionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattleWorkStatsProjectionInsertCallbackId { - BarkBattleWorkStatsProjectionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BarkBattleWorkStatsProjectionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = BarkBattleWorkStatsProjectionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattleWorkStatsProjectionDeleteCallbackId { - BarkBattleWorkStatsProjectionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: BarkBattleWorkStatsProjectionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for BarkBattleWorkStatsProjectionTableHandle<'ctx> { - type InsertCallbackId = BarkBattleWorkStatsProjectionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattleWorkStatsProjectionInsertCallbackId { - BarkBattleWorkStatsProjectionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BarkBattleWorkStatsProjectionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for BarkBattleWorkStatsProjectionTableHandle<'ctx> { - type DeleteCallbackId = BarkBattleWorkStatsProjectionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BarkBattleWorkStatsProjectionDeleteCallbackId { - BarkBattleWorkStatsProjectionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: BarkBattleWorkStatsProjectionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct BarkBattleWorkStatsProjectionUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for BarkBattleWorkStatsProjectionTableHandle<'ctx> { - type UpdateCallbackId = BarkBattleWorkStatsProjectionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> BarkBattleWorkStatsProjectionUpdateCallbackId { - BarkBattleWorkStatsProjectionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: BarkBattleWorkStatsProjectionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for BarkBattleWorkStatsProjectionTableHandle<'ctx> { - type UpdateCallbackId = BarkBattleWorkStatsProjectionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> BarkBattleWorkStatsProjectionUpdateCallbackId { - BarkBattleWorkStatsProjectionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: BarkBattleWorkStatsProjectionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `work_id` unique index on the table `bark_battle_work_stats_projection`, -/// which allows point queries on the field of the same name -/// via the [`BarkBattleWorkStatsProjectionWorkIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.bark_battle_work_stats_projection().work_id().find(...)`. -pub struct BarkBattleWorkStatsProjectionWorkIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> BarkBattleWorkStatsProjectionTableHandle<'ctx> { - /// Get a handle on the `work_id` unique index on the table `bark_battle_work_stats_projection`. - pub fn work_id(&self) -> BarkBattleWorkStatsProjectionWorkIdUnique<'ctx> { - BarkBattleWorkStatsProjectionWorkIdUnique { - imp: self.imp.get_unique_constraint::("work_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> BarkBattleWorkStatsProjectionWorkIdUnique<'ctx> { - /// Find the subscribed row whose `work_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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache - .get_or_make_table::("bark_battle_work_stats_projection"); - _table.add_unique_constraint::("work_id", |row| &row.work_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse( - "TableUpdate", - "TableUpdate", - ) - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `BarkBattleWorkStatsProjectionRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait bark_battle_work_stats_projectionQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `BarkBattleWorkStatsProjectionRow`. - fn bark_battle_work_stats_projection( - &self, - ) -> __sdk::__query_builder::Table; -} - -impl bark_battle_work_stats_projectionQueryTableAccess for __sdk::QueryTableAccessor { - fn bark_battle_work_stats_projection( - &self, - ) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("bark_battle_work_stats_projection") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/battle_mode_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/battle_mode_type.rs deleted file mode 100644 index a88c25f4a..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/battle_mode_type.rs +++ /dev/null @@ -1,18 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum BattleMode { - Fight, - - Spar, -} - -impl __sdk::InModule for BattleMode { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/battle_state_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/battle_state_table.rs deleted file mode 100644 index 6b59fb16c..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/battle_state_table.rs +++ /dev/null @@ -1,232 +0,0 @@ -// 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::battle_mode_type::BattleMode; -use super::battle_state_type::BattleState; -use super::battle_status_type::BattleStatus; -use super::combat_outcome_type::CombatOutcome; -use super::runtime_item_reward_item_snapshot_type::RuntimeItemRewardItemSnapshot; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `battle_state`. -/// -/// Obtain a handle from the [`BattleStateTableAccess::battle_state`] method on [`super::RemoteTables`], -/// like `ctx.db.battle_state()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.battle_state().on_insert(...)`. -pub struct BattleStateTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `battle_state`. -pub struct BattleStateTableAccessor; - -impl __sdk::TableAccessor for BattleStateTableAccessor { - type Row = BattleState; - type Handle<'db> = BattleStateTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.battle_state() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `battle_state`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait BattleStateTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`BattleStateTableHandle`], which mediates access to the table `battle_state`. - fn battle_state(&self) -> BattleStateTableHandle<'_>; -} - -impl BattleStateTableAccess for super::RemoteTables { - fn battle_state(&self) -> BattleStateTableHandle<'_> { - BattleStateTableHandle { - imp: self.imp.get_table::("battle_state"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct BattleStateInsertCallbackId(__sdk::CallbackId); -pub struct BattleStateDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for BattleStateTableHandle<'ctx> { - type Row = BattleState; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for BattleStateTableHandle<'ctx> { - type Row = BattleState; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = BattleStateInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BattleStateInsertCallbackId { - BattleStateInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BattleStateInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = BattleStateDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BattleStateDeleteCallbackId { - BattleStateDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: BattleStateDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for BattleStateTableHandle<'ctx> { - type InsertCallbackId = BattleStateInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BattleStateInsertCallbackId { - BattleStateInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BattleStateInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for BattleStateTableHandle<'ctx> { - type DeleteCallbackId = BattleStateDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BattleStateDeleteCallbackId { - BattleStateDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: BattleStateDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct BattleStateUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for BattleStateTableHandle<'ctx> { - type UpdateCallbackId = BattleStateUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> BattleStateUpdateCallbackId { - BattleStateUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: BattleStateUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for BattleStateTableHandle<'ctx> { - type UpdateCallbackId = BattleStateUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> BattleStateUpdateCallbackId { - BattleStateUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: BattleStateUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `battle_state_id` unique index on the table `battle_state`, -/// which allows point queries on the field of the same name -/// via the [`BattleStateBattleStateIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.battle_state().battle_state_id().find(...)`. -pub struct BattleStateBattleStateIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> BattleStateTableHandle<'ctx> { - /// Get a handle on the `battle_state_id` unique index on the table `battle_state`. - pub fn battle_state_id(&self) -> BattleStateBattleStateIdUnique<'ctx> { - BattleStateBattleStateIdUnique { - imp: self.imp.get_unique_constraint::("battle_state_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> BattleStateBattleStateIdUnique<'ctx> { - /// Find the subscribed row whose `battle_state_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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("battle_state"); - _table.add_unique_constraint::("battle_state_id", |row| &row.battle_state_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `BattleState`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait battle_stateQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `BattleState`. - fn battle_state(&self) -> __sdk::__query_builder::Table; -} - -impl battle_stateQueryTableAccess for __sdk::QueryTableAccessor { - fn battle_state(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("battle_state") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/battle_state_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/battle_state_type.rs deleted file mode 100644 index 9d9b852ff..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/battle_state_type.rs +++ /dev/null @@ -1,144 +0,0 @@ -// 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::battle_mode_type::BattleMode; -use super::battle_status_type::BattleStatus; -use super::combat_outcome_type::CombatOutcome; -use super::runtime_item_reward_item_snapshot_type::RuntimeItemRewardItemSnapshot; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct BattleState { - pub battle_state_id: String, - pub story_session_id: String, - pub runtime_session_id: String, - pub actor_user_id: String, - pub chapter_id: Option, - pub target_npc_id: String, - pub target_name: String, - pub battle_mode: BattleMode, - pub status: BattleStatus, - pub player_hp: i32, - pub player_max_hp: i32, - pub player_mana: i32, - pub player_max_mana: i32, - pub target_hp: i32, - pub target_max_hp: i32, - pub experience_reward: u32, - pub reward_items: Vec, - pub turn_index: u32, - pub last_action_function_id: Option, - pub last_action_text: Option, - pub last_result_text: Option, - pub last_damage_dealt: i32, - pub last_damage_taken: i32, - pub last_outcome: CombatOutcome, - pub version: u32, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for BattleState { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `BattleState`. -/// -/// Provides typed access to columns for query building. -pub struct BattleStateCols { - pub battle_state_id: __sdk::__query_builder::Col, - pub story_session_id: __sdk::__query_builder::Col, - pub runtime_session_id: __sdk::__query_builder::Col, - pub actor_user_id: __sdk::__query_builder::Col, - pub chapter_id: __sdk::__query_builder::Col>, - pub target_npc_id: __sdk::__query_builder::Col, - pub target_name: __sdk::__query_builder::Col, - pub battle_mode: __sdk::__query_builder::Col, - pub status: __sdk::__query_builder::Col, - pub player_hp: __sdk::__query_builder::Col, - pub player_max_hp: __sdk::__query_builder::Col, - pub player_mana: __sdk::__query_builder::Col, - pub player_max_mana: __sdk::__query_builder::Col, - pub target_hp: __sdk::__query_builder::Col, - pub target_max_hp: __sdk::__query_builder::Col, - pub experience_reward: __sdk::__query_builder::Col, - pub reward_items: __sdk::__query_builder::Col>, - pub turn_index: __sdk::__query_builder::Col, - pub last_action_function_id: __sdk::__query_builder::Col>, - pub last_action_text: __sdk::__query_builder::Col>, - pub last_result_text: __sdk::__query_builder::Col>, - pub last_damage_dealt: __sdk::__query_builder::Col, - pub last_damage_taken: __sdk::__query_builder::Col, - pub last_outcome: __sdk::__query_builder::Col, - pub version: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for BattleState { - type Cols = BattleStateCols; - fn cols(table_name: &'static str) -> Self::Cols { - BattleStateCols { - battle_state_id: __sdk::__query_builder::Col::new(table_name, "battle_state_id"), - story_session_id: __sdk::__query_builder::Col::new(table_name, "story_session_id"), - runtime_session_id: __sdk::__query_builder::Col::new(table_name, "runtime_session_id"), - actor_user_id: __sdk::__query_builder::Col::new(table_name, "actor_user_id"), - chapter_id: __sdk::__query_builder::Col::new(table_name, "chapter_id"), - target_npc_id: __sdk::__query_builder::Col::new(table_name, "target_npc_id"), - target_name: __sdk::__query_builder::Col::new(table_name, "target_name"), - battle_mode: __sdk::__query_builder::Col::new(table_name, "battle_mode"), - status: __sdk::__query_builder::Col::new(table_name, "status"), - player_hp: __sdk::__query_builder::Col::new(table_name, "player_hp"), - player_max_hp: __sdk::__query_builder::Col::new(table_name, "player_max_hp"), - player_mana: __sdk::__query_builder::Col::new(table_name, "player_mana"), - player_max_mana: __sdk::__query_builder::Col::new(table_name, "player_max_mana"), - target_hp: __sdk::__query_builder::Col::new(table_name, "target_hp"), - target_max_hp: __sdk::__query_builder::Col::new(table_name, "target_max_hp"), - experience_reward: __sdk::__query_builder::Col::new(table_name, "experience_reward"), - reward_items: __sdk::__query_builder::Col::new(table_name, "reward_items"), - turn_index: __sdk::__query_builder::Col::new(table_name, "turn_index"), - last_action_function_id: __sdk::__query_builder::Col::new( - table_name, - "last_action_function_id", - ), - last_action_text: __sdk::__query_builder::Col::new(table_name, "last_action_text"), - last_result_text: __sdk::__query_builder::Col::new(table_name, "last_result_text"), - last_damage_dealt: __sdk::__query_builder::Col::new(table_name, "last_damage_dealt"), - last_damage_taken: __sdk::__query_builder::Col::new(table_name, "last_damage_taken"), - last_outcome: __sdk::__query_builder::Col::new(table_name, "last_outcome"), - version: __sdk::__query_builder::Col::new(table_name, "version"), - 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 `BattleState`. -/// -/// Provides typed access to indexed columns for query building. -pub struct BattleStateIxCols { - pub actor_user_id: __sdk::__query_builder::IxCol, - pub battle_state_id: __sdk::__query_builder::IxCol, - pub runtime_session_id: __sdk::__query_builder::IxCol, - pub story_session_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for BattleState { - type IxCols = BattleStateIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - BattleStateIxCols { - actor_user_id: __sdk::__query_builder::IxCol::new(table_name, "actor_user_id"), - battle_state_id: __sdk::__query_builder::IxCol::new(table_name, "battle_state_id"), - runtime_session_id: __sdk::__query_builder::IxCol::new( - table_name, - "runtime_session_id", - ), - story_session_id: __sdk::__query_builder::IxCol::new(table_name, "story_session_id"), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for BattleState {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/battle_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/battle_status_type.rs deleted file mode 100644 index 0aba4f432..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/battle_status_type.rs +++ /dev/null @@ -1,20 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum BattleStatus { - Ongoing, - - Resolved, - - Aborted, -} - -impl __sdk::InModule for BattleStatus { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_kind_type.rs deleted file mode 100644 index 00f36e4ef..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_kind_type.rs +++ /dev/null @@ -1,22 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum BigFishAgentMessageKind { - Chat, - - Summary, - - ActionResult, - - Warning, -} - -impl __sdk::InModule for BigFishAgentMessageKind { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_role_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_role_type.rs deleted file mode 100644 index d8a1a82c3..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_role_type.rs +++ /dev/null @@ -1,20 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum BigFishAgentMessageRole { - User, - - Assistant, - - System, -} - -impl __sdk::InModule for BigFishAgentMessageRole { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_table.rs deleted file mode 100644 index 51683b3d3..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_table.rs +++ /dev/null @@ -1,232 +0,0 @@ -// 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::big_fish_agent_message_kind_type::BigFishAgentMessageKind; -use super::big_fish_agent_message_role_type::BigFishAgentMessageRole; -use super::big_fish_agent_message_type::BigFishAgentMessage; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `big_fish_agent_message`. -/// -/// Obtain a handle from the [`BigFishAgentMessageTableAccess::big_fish_agent_message`] method on [`super::RemoteTables`], -/// like `ctx.db.big_fish_agent_message()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.big_fish_agent_message().on_insert(...)`. -pub struct BigFishAgentMessageTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `big_fish_agent_message`. -pub struct BigFishAgentMessageTableAccessor; - -impl __sdk::TableAccessor for BigFishAgentMessageTableAccessor { - type Row = BigFishAgentMessage; - type Handle<'db> = BigFishAgentMessageTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.big_fish_agent_message() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `big_fish_agent_message`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait BigFishAgentMessageTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`BigFishAgentMessageTableHandle`], which mediates access to the table `big_fish_agent_message`. - fn big_fish_agent_message(&self) -> BigFishAgentMessageTableHandle<'_>; -} - -impl BigFishAgentMessageTableAccess for super::RemoteTables { - fn big_fish_agent_message(&self) -> BigFishAgentMessageTableHandle<'_> { - BigFishAgentMessageTableHandle { - imp: self - .imp - .get_table::("big_fish_agent_message"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct BigFishAgentMessageInsertCallbackId(__sdk::CallbackId); -pub struct BigFishAgentMessageDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for BigFishAgentMessageTableHandle<'ctx> { - type Row = BigFishAgentMessage; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for BigFishAgentMessageTableHandle<'ctx> { - type Row = BigFishAgentMessage; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = BigFishAgentMessageInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BigFishAgentMessageInsertCallbackId { - BigFishAgentMessageInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BigFishAgentMessageInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = BigFishAgentMessageDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BigFishAgentMessageDeleteCallbackId { - BigFishAgentMessageDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: BigFishAgentMessageDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for BigFishAgentMessageTableHandle<'ctx> { - type InsertCallbackId = BigFishAgentMessageInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BigFishAgentMessageInsertCallbackId { - BigFishAgentMessageInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BigFishAgentMessageInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for BigFishAgentMessageTableHandle<'ctx> { - type DeleteCallbackId = BigFishAgentMessageDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BigFishAgentMessageDeleteCallbackId { - BigFishAgentMessageDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: BigFishAgentMessageDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct BigFishAgentMessageUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for BigFishAgentMessageTableHandle<'ctx> { - type UpdateCallbackId = BigFishAgentMessageUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> BigFishAgentMessageUpdateCallbackId { - BigFishAgentMessageUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: BigFishAgentMessageUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for BigFishAgentMessageTableHandle<'ctx> { - type UpdateCallbackId = BigFishAgentMessageUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> BigFishAgentMessageUpdateCallbackId { - BigFishAgentMessageUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: BigFishAgentMessageUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `message_id` unique index on the table `big_fish_agent_message`, -/// which allows point queries on the field of the same name -/// via the [`BigFishAgentMessageMessageIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.big_fish_agent_message().message_id().find(...)`. -pub struct BigFishAgentMessageMessageIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> BigFishAgentMessageTableHandle<'ctx> { - /// Get a handle on the `message_id` unique index on the table `big_fish_agent_message`. - pub fn message_id(&self) -> BigFishAgentMessageMessageIdUnique<'ctx> { - BigFishAgentMessageMessageIdUnique { - imp: self.imp.get_unique_constraint::("message_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> BigFishAgentMessageMessageIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("big_fish_agent_message"); - _table.add_unique_constraint::("message_id", |row| &row.message_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `BigFishAgentMessage`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait big_fish_agent_messageQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `BigFishAgentMessage`. - fn big_fish_agent_message(&self) -> __sdk::__query_builder::Table; -} - -impl big_fish_agent_messageQueryTableAccess for __sdk::QueryTableAccessor { - fn big_fish_agent_message(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("big_fish_agent_message") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_type.rs deleted file mode 100644 index a5e70272d..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_type.rs +++ /dev/null @@ -1,69 +0,0 @@ -// 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_agent_message_kind_type::BigFishAgentMessageKind; -use super::big_fish_agent_message_role_type::BigFishAgentMessageRole; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct BigFishAgentMessage { - pub message_id: String, - pub session_id: String, - pub role: BigFishAgentMessageRole, - pub kind: BigFishAgentMessageKind, - pub text: String, - pub created_at: __sdk::Timestamp, -} - -impl __sdk::InModule for BigFishAgentMessage { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `BigFishAgentMessage`. -/// -/// Provides typed access to columns for query building. -pub struct BigFishAgentMessageCols { - pub message_id: __sdk::__query_builder::Col, - pub session_id: __sdk::__query_builder::Col, - pub role: __sdk::__query_builder::Col, - pub kind: __sdk::__query_builder::Col, - pub text: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for BigFishAgentMessage { - type Cols = BigFishAgentMessageCols; - fn cols(table_name: &'static str) -> Self::Cols { - BigFishAgentMessageCols { - 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 `BigFishAgentMessage`. -/// -/// Provides typed access to indexed columns for query building. -pub struct BigFishAgentMessageIxCols { - pub message_id: __sdk::__query_builder::IxCol, - pub session_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for BigFishAgentMessage { - type IxCols = BigFishAgentMessageIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - BigFishAgentMessageIxCols { - 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 BigFishAgentMessage {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_kind_type.rs deleted file mode 100644 index b4c9dcd1f..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_kind_type.rs +++ /dev/null @@ -1,20 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum BigFishAssetKind { - LevelMainImage, - - LevelMotion, - - StageBackground, -} - -impl __sdk::InModule for BigFishAssetKind { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_slot_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_slot_table.rs deleted file mode 100644 index 1cc8b52cc..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_slot_table.rs +++ /dev/null @@ -1,232 +0,0 @@ -// 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::big_fish_asset_kind_type::BigFishAssetKind; -use super::big_fish_asset_slot_type::BigFishAssetSlot; -use super::big_fish_asset_status_type::BigFishAssetStatus; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `big_fish_asset_slot`. -/// -/// Obtain a handle from the [`BigFishAssetSlotTableAccess::big_fish_asset_slot`] method on [`super::RemoteTables`], -/// like `ctx.db.big_fish_asset_slot()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.big_fish_asset_slot().on_insert(...)`. -pub struct BigFishAssetSlotTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `big_fish_asset_slot`. -pub struct BigFishAssetSlotTableAccessor; - -impl __sdk::TableAccessor for BigFishAssetSlotTableAccessor { - type Row = BigFishAssetSlot; - type Handle<'db> = BigFishAssetSlotTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.big_fish_asset_slot() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `big_fish_asset_slot`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait BigFishAssetSlotTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`BigFishAssetSlotTableHandle`], which mediates access to the table `big_fish_asset_slot`. - fn big_fish_asset_slot(&self) -> BigFishAssetSlotTableHandle<'_>; -} - -impl BigFishAssetSlotTableAccess for super::RemoteTables { - fn big_fish_asset_slot(&self) -> BigFishAssetSlotTableHandle<'_> { - BigFishAssetSlotTableHandle { - imp: self - .imp - .get_table::("big_fish_asset_slot"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct BigFishAssetSlotInsertCallbackId(__sdk::CallbackId); -pub struct BigFishAssetSlotDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for BigFishAssetSlotTableHandle<'ctx> { - type Row = BigFishAssetSlot; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for BigFishAssetSlotTableHandle<'ctx> { - type Row = BigFishAssetSlot; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = BigFishAssetSlotInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BigFishAssetSlotInsertCallbackId { - BigFishAssetSlotInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BigFishAssetSlotInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = BigFishAssetSlotDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BigFishAssetSlotDeleteCallbackId { - BigFishAssetSlotDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: BigFishAssetSlotDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for BigFishAssetSlotTableHandle<'ctx> { - type InsertCallbackId = BigFishAssetSlotInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BigFishAssetSlotInsertCallbackId { - BigFishAssetSlotInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BigFishAssetSlotInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for BigFishAssetSlotTableHandle<'ctx> { - type DeleteCallbackId = BigFishAssetSlotDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BigFishAssetSlotDeleteCallbackId { - BigFishAssetSlotDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: BigFishAssetSlotDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct BigFishAssetSlotUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for BigFishAssetSlotTableHandle<'ctx> { - type UpdateCallbackId = BigFishAssetSlotUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> BigFishAssetSlotUpdateCallbackId { - BigFishAssetSlotUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: BigFishAssetSlotUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for BigFishAssetSlotTableHandle<'ctx> { - type UpdateCallbackId = BigFishAssetSlotUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> BigFishAssetSlotUpdateCallbackId { - BigFishAssetSlotUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: BigFishAssetSlotUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `slot_id` unique index on the table `big_fish_asset_slot`, -/// which allows point queries on the field of the same name -/// via the [`BigFishAssetSlotSlotIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.big_fish_asset_slot().slot_id().find(...)`. -pub struct BigFishAssetSlotSlotIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> BigFishAssetSlotTableHandle<'ctx> { - /// Get a handle on the `slot_id` unique index on the table `big_fish_asset_slot`. - pub fn slot_id(&self) -> BigFishAssetSlotSlotIdUnique<'ctx> { - BigFishAssetSlotSlotIdUnique { - imp: self.imp.get_unique_constraint::("slot_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> BigFishAssetSlotSlotIdUnique<'ctx> { - /// Find the subscribed row whose `slot_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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("big_fish_asset_slot"); - _table.add_unique_constraint::("slot_id", |row| &row.slot_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `BigFishAssetSlot`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait big_fish_asset_slotQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `BigFishAssetSlot`. - fn big_fish_asset_slot(&self) -> __sdk::__query_builder::Table; -} - -impl big_fish_asset_slotQueryTableAccess for __sdk::QueryTableAccessor { - fn big_fish_asset_slot(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("big_fish_asset_slot") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_slot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_slot_type.rs deleted file mode 100644 index 406c151d0..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_slot_type.rs +++ /dev/null @@ -1,78 +0,0 @@ -// 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_asset_kind_type::BigFishAssetKind; -use super::big_fish_asset_status_type::BigFishAssetStatus; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct BigFishAssetSlot { - pub slot_id: String, - pub session_id: String, - pub asset_kind: BigFishAssetKind, - pub level: Option, - pub motion_key: Option, - pub status: BigFishAssetStatus, - pub asset_url: Option, - pub prompt_snapshot: String, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for BigFishAssetSlot { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `BigFishAssetSlot`. -/// -/// Provides typed access to columns for query building. -pub struct BigFishAssetSlotCols { - pub slot_id: __sdk::__query_builder::Col, - pub session_id: __sdk::__query_builder::Col, - pub asset_kind: __sdk::__query_builder::Col, - pub level: __sdk::__query_builder::Col>, - pub motion_key: __sdk::__query_builder::Col>, - pub status: __sdk::__query_builder::Col, - pub asset_url: __sdk::__query_builder::Col>, - pub prompt_snapshot: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for BigFishAssetSlot { - type Cols = BigFishAssetSlotCols; - fn cols(table_name: &'static str) -> Self::Cols { - BigFishAssetSlotCols { - slot_id: __sdk::__query_builder::Col::new(table_name, "slot_id"), - session_id: __sdk::__query_builder::Col::new(table_name, "session_id"), - asset_kind: __sdk::__query_builder::Col::new(table_name, "asset_kind"), - level: __sdk::__query_builder::Col::new(table_name, "level"), - motion_key: __sdk::__query_builder::Col::new(table_name, "motion_key"), - status: __sdk::__query_builder::Col::new(table_name, "status"), - asset_url: __sdk::__query_builder::Col::new(table_name, "asset_url"), - prompt_snapshot: __sdk::__query_builder::Col::new(table_name, "prompt_snapshot"), - updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), - } - } -} - -/// Indexed column accessor struct for the table `BigFishAssetSlot`. -/// -/// Provides typed access to indexed columns for query building. -pub struct BigFishAssetSlotIxCols { - pub session_id: __sdk::__query_builder::IxCol, - pub slot_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for BigFishAssetSlot { - type IxCols = BigFishAssetSlotIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - BigFishAssetSlotIxCols { - session_id: __sdk::__query_builder::IxCol::new(table_name, "session_id"), - slot_id: __sdk::__query_builder::IxCol::new(table_name, "slot_id"), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for BigFishAssetSlot {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_status_type.rs deleted file mode 100644 index c673f0f33..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_status_type.rs +++ /dev/null @@ -1,18 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum BigFishAssetStatus { - Missing, - - Ready, -} - -impl __sdk::InModule for BigFishAssetStatus { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_creation_session_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_creation_session_table.rs deleted file mode 100644 index 62451f321..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_creation_session_table.rs +++ /dev/null @@ -1,232 +0,0 @@ -// 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::big_fish_creation_session_type::BigFishCreationSession; -use super::big_fish_creation_stage_type::BigFishCreationStage; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `big_fish_creation_session`. -/// -/// Obtain a handle from the [`BigFishCreationSessionTableAccess::big_fish_creation_session`] method on [`super::RemoteTables`], -/// like `ctx.db.big_fish_creation_session()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.big_fish_creation_session().on_insert(...)`. -pub struct BigFishCreationSessionTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `big_fish_creation_session`. -pub struct BigFishCreationSessionTableAccessor; - -impl __sdk::TableAccessor for BigFishCreationSessionTableAccessor { - type Row = BigFishCreationSession; - type Handle<'db> = BigFishCreationSessionTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.big_fish_creation_session() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `big_fish_creation_session`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait BigFishCreationSessionTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`BigFishCreationSessionTableHandle`], which mediates access to the table `big_fish_creation_session`. - fn big_fish_creation_session(&self) -> BigFishCreationSessionTableHandle<'_>; -} - -impl BigFishCreationSessionTableAccess for super::RemoteTables { - fn big_fish_creation_session(&self) -> BigFishCreationSessionTableHandle<'_> { - BigFishCreationSessionTableHandle { - imp: self - .imp - .get_table::("big_fish_creation_session"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct BigFishCreationSessionInsertCallbackId(__sdk::CallbackId); -pub struct BigFishCreationSessionDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for BigFishCreationSessionTableHandle<'ctx> { - type Row = BigFishCreationSession; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for BigFishCreationSessionTableHandle<'ctx> { - type Row = BigFishCreationSession; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = BigFishCreationSessionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BigFishCreationSessionInsertCallbackId { - BigFishCreationSessionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BigFishCreationSessionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = BigFishCreationSessionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BigFishCreationSessionDeleteCallbackId { - BigFishCreationSessionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: BigFishCreationSessionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for BigFishCreationSessionTableHandle<'ctx> { - type InsertCallbackId = BigFishCreationSessionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BigFishCreationSessionInsertCallbackId { - BigFishCreationSessionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BigFishCreationSessionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for BigFishCreationSessionTableHandle<'ctx> { - type DeleteCallbackId = BigFishCreationSessionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BigFishCreationSessionDeleteCallbackId { - BigFishCreationSessionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: BigFishCreationSessionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct BigFishCreationSessionUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for BigFishCreationSessionTableHandle<'ctx> { - type UpdateCallbackId = BigFishCreationSessionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> BigFishCreationSessionUpdateCallbackId { - BigFishCreationSessionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: BigFishCreationSessionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for BigFishCreationSessionTableHandle<'ctx> { - type UpdateCallbackId = BigFishCreationSessionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> BigFishCreationSessionUpdateCallbackId { - BigFishCreationSessionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: BigFishCreationSessionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `session_id` unique index on the table `big_fish_creation_session`, -/// which allows point queries on the field of the same name -/// via the [`BigFishCreationSessionSessionIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.big_fish_creation_session().session_id().find(...)`. -pub struct BigFishCreationSessionSessionIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> BigFishCreationSessionTableHandle<'ctx> { - /// Get a handle on the `session_id` unique index on the table `big_fish_creation_session`. - pub fn session_id(&self) -> BigFishCreationSessionSessionIdUnique<'ctx> { - BigFishCreationSessionSessionIdUnique { - imp: self.imp.get_unique_constraint::("session_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> BigFishCreationSessionSessionIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("big_fish_creation_session"); - _table.add_unique_constraint::("session_id", |row| &row.session_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `BigFishCreationSession`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait big_fish_creation_sessionQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `BigFishCreationSession`. - fn big_fish_creation_session(&self) -> __sdk::__query_builder::Table; -} - -impl big_fish_creation_sessionQueryTableAccess for __sdk::QueryTableAccessor { - fn big_fish_creation_session(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("big_fish_creation_session") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_creation_session_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_creation_session_type.rs deleted file mode 100644 index 25aaff8c8..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_creation_session_type.rs +++ /dev/null @@ -1,112 +0,0 @@ -// 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_creation_stage_type::BigFishCreationStage; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct BigFishCreationSession { - pub session_id: String, - pub owner_user_id: String, - pub seed_text: String, - pub current_turn: u32, - pub progress_percent: u32, - pub stage: BigFishCreationStage, - pub anchor_pack_json: String, - pub draft_json: Option, - pub asset_coverage_json: String, - pub last_assistant_reply: Option, - pub publish_ready: bool, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, - pub play_count: u32, - pub remix_count: u32, - pub like_count: u32, - pub published_at: Option<__sdk::Timestamp>, - pub visible: bool, -} - -impl __sdk::InModule for BigFishCreationSession { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `BigFishCreationSession`. -/// -/// Provides typed access to columns for query building. -pub struct BigFishCreationSessionCols { - pub session_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub seed_text: __sdk::__query_builder::Col, - pub current_turn: __sdk::__query_builder::Col, - pub progress_percent: __sdk::__query_builder::Col, - pub stage: __sdk::__query_builder::Col, - pub anchor_pack_json: __sdk::__query_builder::Col, - pub draft_json: __sdk::__query_builder::Col>, - pub asset_coverage_json: __sdk::__query_builder::Col, - pub last_assistant_reply: __sdk::__query_builder::Col>, - pub publish_ready: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, - pub play_count: __sdk::__query_builder::Col, - pub remix_count: __sdk::__query_builder::Col, - pub like_count: __sdk::__query_builder::Col, - pub published_at: __sdk::__query_builder::Col>, - pub visible: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for BigFishCreationSession { - type Cols = BigFishCreationSessionCols; - fn cols(table_name: &'static str) -> Self::Cols { - BigFishCreationSessionCols { - session_id: __sdk::__query_builder::Col::new(table_name, "session_id"), - owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"), - seed_text: __sdk::__query_builder::Col::new(table_name, "seed_text"), - current_turn: __sdk::__query_builder::Col::new(table_name, "current_turn"), - progress_percent: __sdk::__query_builder::Col::new(table_name, "progress_percent"), - stage: __sdk::__query_builder::Col::new(table_name, "stage"), - anchor_pack_json: __sdk::__query_builder::Col::new(table_name, "anchor_pack_json"), - draft_json: __sdk::__query_builder::Col::new(table_name, "draft_json"), - asset_coverage_json: __sdk::__query_builder::Col::new( - table_name, - "asset_coverage_json", - ), - last_assistant_reply: __sdk::__query_builder::Col::new( - table_name, - "last_assistant_reply", - ), - publish_ready: __sdk::__query_builder::Col::new(table_name, "publish_ready"), - created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), - updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), - play_count: __sdk::__query_builder::Col::new(table_name, "play_count"), - remix_count: __sdk::__query_builder::Col::new(table_name, "remix_count"), - like_count: __sdk::__query_builder::Col::new(table_name, "like_count"), - published_at: __sdk::__query_builder::Col::new(table_name, "published_at"), - visible: __sdk::__query_builder::Col::new(table_name, "visible"), - } - } -} - -/// Indexed column accessor struct for the table `BigFishCreationSession`. -/// -/// Provides typed access to indexed columns for query building. -pub struct BigFishCreationSessionIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub session_id: __sdk::__query_builder::IxCol, - pub stage: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for BigFishCreationSession { - type IxCols = BigFishCreationSessionIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - BigFishCreationSessionIxCols { - owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"), - session_id: __sdk::__query_builder::IxCol::new(table_name, "session_id"), - stage: __sdk::__query_builder::IxCol::new(table_name, "stage"), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for BigFishCreationSession {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_creation_stage_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_creation_stage_type.rs deleted file mode 100644 index c878d467a..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_creation_stage_type.rs +++ /dev/null @@ -1,24 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum BigFishCreationStage { - CollectingAnchors, - - DraftReady, - - AssetRefining, - - ReadyToPublish, - - Published, -} - -impl __sdk::InModule for BigFishCreationStage { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_event_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_event_kind_type.rs deleted file mode 100644 index d033e0265..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_event_kind_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum BigFishEventKind { - PublishReadinessEvaluated, -} - -impl __sdk::InModule for BigFishEventKind { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_event_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_event_table.rs deleted file mode 100644 index 1999f9fa9..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_event_table.rs +++ /dev/null @@ -1,138 +0,0 @@ -// 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::big_fish_event_kind_type::BigFishEventKind; -use super::big_fish_event_type::BigFishEvent; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `big_fish_event`. -/// -/// Obtain a handle from the [`BigFishEventTableAccess::big_fish_event`] method on [`super::RemoteTables`], -/// like `ctx.db.big_fish_event()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.big_fish_event().on_insert(...)`. -pub struct BigFishEventTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `big_fish_event`. -pub struct BigFishEventTableAccessor; - -impl __sdk::TableAccessor for BigFishEventTableAccessor { - type Row = BigFishEvent; - type Handle<'db> = BigFishEventTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.big_fish_event() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `big_fish_event`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait BigFishEventTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`BigFishEventTableHandle`], which mediates access to the table `big_fish_event`. - fn big_fish_event(&self) -> BigFishEventTableHandle<'_>; -} - -impl BigFishEventTableAccess for super::RemoteTables { - fn big_fish_event(&self) -> BigFishEventTableHandle<'_> { - BigFishEventTableHandle { - imp: self.imp.get_table::("big_fish_event"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct BigFishEventInsertCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for BigFishEventTableHandle<'ctx> { - type Row = BigFishEvent; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::EventTable for BigFishEventTableHandle<'ctx> { - type Row = BigFishEvent; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = BigFishEventInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BigFishEventInsertCallbackId { - BigFishEventInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BigFishEventInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for BigFishEventTableHandle<'ctx> { - type InsertCallbackId = BigFishEventInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BigFishEventInsertCallbackId { - BigFishEventInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BigFishEventInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("big_fish_event"); - _table.add_unique_constraint::("event_id", |row| &row.event_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `BigFishEvent`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait big_fish_eventQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `BigFishEvent`. - fn big_fish_event(&self) -> __sdk::__query_builder::Table; -} - -impl big_fish_eventQueryTableAccess for __sdk::QueryTableAccessor { - fn big_fish_event(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("big_fish_event") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_event_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_event_type.rs deleted file mode 100644 index d5fd1db54..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_event_type.rs +++ /dev/null @@ -1,71 +0,0 @@ -// 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_event_kind_type::BigFishEventKind; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct BigFishEvent { - pub event_id: String, - pub session_id: String, - pub owner_user_id: String, - pub event_kind: BigFishEventKind, - pub publish_ready: bool, - pub blockers_json: String, - pub occurred_at: __sdk::Timestamp, -} - -impl __sdk::InModule for BigFishEvent { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `BigFishEvent`. -/// -/// Provides typed access to columns for query building. -pub struct BigFishEventCols { - pub event_id: __sdk::__query_builder::Col, - pub session_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub event_kind: __sdk::__query_builder::Col, - pub publish_ready: __sdk::__query_builder::Col, - pub blockers_json: __sdk::__query_builder::Col, - pub occurred_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for BigFishEvent { - type Cols = BigFishEventCols; - fn cols(table_name: &'static str) -> Self::Cols { - BigFishEventCols { - event_id: __sdk::__query_builder::Col::new(table_name, "event_id"), - session_id: __sdk::__query_builder::Col::new(table_name, "session_id"), - owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"), - event_kind: __sdk::__query_builder::Col::new(table_name, "event_kind"), - publish_ready: __sdk::__query_builder::Col::new(table_name, "publish_ready"), - blockers_json: __sdk::__query_builder::Col::new(table_name, "blockers_json"), - occurred_at: __sdk::__query_builder::Col::new(table_name, "occurred_at"), - } - } -} - -/// Indexed column accessor struct for the table `BigFishEvent`. -/// -/// Provides typed access to indexed columns for query building. -pub struct BigFishEventIxCols { - pub event_id: __sdk::__query_builder::IxCol, - pub owner_user_id: __sdk::__query_builder::IxCol, - pub session_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for BigFishEvent { - type IxCols = BigFishEventIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - BigFishEventIxCols { - event_id: __sdk::__query_builder::IxCol::new(table_name, "event_id"), - owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"), - session_id: __sdk::__query_builder::IxCol::new(table_name, "session_id"), - } - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_status_type.rs deleted file mode 100644 index 6bb94f360..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_status_type.rs +++ /dev/null @@ -1,20 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum BigFishRunStatus { - Running, - - Won, - - Failed, -} - -impl __sdk::InModule for BigFishRunStatus { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_run_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_run_table.rs deleted file mode 100644 index 1b037679a..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_run_table.rs +++ /dev/null @@ -1,231 +0,0 @@ -// 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::big_fish_run_status_type::BigFishRunStatus; -use super::big_fish_runtime_run_type::BigFishRuntimeRun; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `big_fish_runtime_run`. -/// -/// Obtain a handle from the [`BigFishRuntimeRunTableAccess::big_fish_runtime_run`] method on [`super::RemoteTables`], -/// like `ctx.db.big_fish_runtime_run()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.big_fish_runtime_run().on_insert(...)`. -pub struct BigFishRuntimeRunTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `big_fish_runtime_run`. -pub struct BigFishRuntimeRunTableAccessor; - -impl __sdk::TableAccessor for BigFishRuntimeRunTableAccessor { - type Row = BigFishRuntimeRun; - type Handle<'db> = BigFishRuntimeRunTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.big_fish_runtime_run() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `big_fish_runtime_run`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait BigFishRuntimeRunTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`BigFishRuntimeRunTableHandle`], which mediates access to the table `big_fish_runtime_run`. - fn big_fish_runtime_run(&self) -> BigFishRuntimeRunTableHandle<'_>; -} - -impl BigFishRuntimeRunTableAccess for super::RemoteTables { - fn big_fish_runtime_run(&self) -> BigFishRuntimeRunTableHandle<'_> { - BigFishRuntimeRunTableHandle { - imp: self - .imp - .get_table::("big_fish_runtime_run"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct BigFishRuntimeRunInsertCallbackId(__sdk::CallbackId); -pub struct BigFishRuntimeRunDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for BigFishRuntimeRunTableHandle<'ctx> { - type Row = BigFishRuntimeRun; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for BigFishRuntimeRunTableHandle<'ctx> { - type Row = BigFishRuntimeRun; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = BigFishRuntimeRunInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BigFishRuntimeRunInsertCallbackId { - BigFishRuntimeRunInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BigFishRuntimeRunInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = BigFishRuntimeRunDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BigFishRuntimeRunDeleteCallbackId { - BigFishRuntimeRunDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: BigFishRuntimeRunDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for BigFishRuntimeRunTableHandle<'ctx> { - type InsertCallbackId = BigFishRuntimeRunInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BigFishRuntimeRunInsertCallbackId { - BigFishRuntimeRunInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: BigFishRuntimeRunInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for BigFishRuntimeRunTableHandle<'ctx> { - type DeleteCallbackId = BigFishRuntimeRunDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> BigFishRuntimeRunDeleteCallbackId { - BigFishRuntimeRunDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: BigFishRuntimeRunDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct BigFishRuntimeRunUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for BigFishRuntimeRunTableHandle<'ctx> { - type UpdateCallbackId = BigFishRuntimeRunUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> BigFishRuntimeRunUpdateCallbackId { - BigFishRuntimeRunUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: BigFishRuntimeRunUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for BigFishRuntimeRunTableHandle<'ctx> { - type UpdateCallbackId = BigFishRuntimeRunUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> BigFishRuntimeRunUpdateCallbackId { - BigFishRuntimeRunUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: BigFishRuntimeRunUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `run_id` unique index on the table `big_fish_runtime_run`, -/// which allows point queries on the field of the same name -/// via the [`BigFishRuntimeRunRunIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.big_fish_runtime_run().run_id().find(...)`. -pub struct BigFishRuntimeRunRunIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> BigFishRuntimeRunTableHandle<'ctx> { - /// Get a handle on the `run_id` unique index on the table `big_fish_runtime_run`. - pub fn run_id(&self) -> BigFishRuntimeRunRunIdUnique<'ctx> { - BigFishRuntimeRunRunIdUnique { - imp: self.imp.get_unique_constraint::("run_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> BigFishRuntimeRunRunIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("big_fish_runtime_run"); - _table.add_unique_constraint::("run_id", |row| &row.run_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `BigFishRuntimeRun`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait big_fish_runtime_runQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `BigFishRuntimeRun`. - fn big_fish_runtime_run(&self) -> __sdk::__query_builder::Table; -} - -impl big_fish_runtime_runQueryTableAccess for __sdk::QueryTableAccessor { - fn big_fish_runtime_run(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("big_fish_runtime_run") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_run_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_run_type.rs deleted file mode 100644 index 01852b9cc..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_run_type.rs +++ /dev/null @@ -1,82 +0,0 @@ -// 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; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct BigFishRuntimeRun { - pub run_id: String, - pub session_id: String, - pub owner_user_id: String, - pub status: BigFishRunStatus, - pub snapshot_json: String, - pub last_input_x: f32, - pub last_input_y: f32, - pub tick: u64, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for BigFishRuntimeRun { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `BigFishRuntimeRun`. -/// -/// Provides typed access to columns for query building. -pub struct BigFishRuntimeRunCols { - pub run_id: __sdk::__query_builder::Col, - pub session_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub status: __sdk::__query_builder::Col, - pub snapshot_json: __sdk::__query_builder::Col, - pub last_input_x: __sdk::__query_builder::Col, - pub last_input_y: __sdk::__query_builder::Col, - pub tick: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for BigFishRuntimeRun { - type Cols = BigFishRuntimeRunCols; - fn cols(table_name: &'static str) -> Self::Cols { - BigFishRuntimeRunCols { - run_id: __sdk::__query_builder::Col::new(table_name, "run_id"), - session_id: __sdk::__query_builder::Col::new(table_name, "session_id"), - owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"), - status: __sdk::__query_builder::Col::new(table_name, "status"), - snapshot_json: __sdk::__query_builder::Col::new(table_name, "snapshot_json"), - last_input_x: __sdk::__query_builder::Col::new(table_name, "last_input_x"), - last_input_y: __sdk::__query_builder::Col::new(table_name, "last_input_y"), - tick: __sdk::__query_builder::Col::new(table_name, "tick"), - 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 `BigFishRuntimeRun`. -/// -/// Provides typed access to indexed columns for query building. -pub struct BigFishRuntimeRunIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub run_id: __sdk::__query_builder::IxCol, - pub session_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for BigFishRuntimeRun { - type IxCols = BigFishRuntimeRunIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - BigFishRuntimeRunIxCols { - owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"), - run_id: __sdk::__query_builder::IxCol::new(table_name, "run_id"), - session_id: __sdk::__query_builder::IxCol::new(table_name, "session_id"), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for BigFishRuntimeRun {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/bind_asset_object_to_entity_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/bind_asset_object_to_entity_and_return_procedure.rs index 78c80aee5..b709d5c2f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/bind_asset_object_to_entity_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/bind_asset_object_to_entity_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait bind_asset_object_to_entity_and_return { input: AssetEntityBindingInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl bind_asset_object_to_entity_and_return for super::RemoteProcedures { input: AssetEntityBindingInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, AssetEntityBindingProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/bind_asset_object_to_entity_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/bind_asset_object_to_entity_reducer.rs index caf48b269..b20bc5b23 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/bind_asset_object_to_entity_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/bind_asset_object_to_entity_reducer.rs @@ -47,11 +47,9 @@ pub trait bind_asset_object_to_entity { &self, input: AssetEntityBindingInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -60,11 +58,9 @@ impl bind_asset_object_to_entity for super::RemoteReducers { &self, input: AssetEntityBindingInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { self.imp .invoke_reducer_with_callback(BindAssetObjectToEntityArgs { input }, callback) diff --git a/server-rs/crates/spacetime-client/src/module_bindings/cancel_ai_task_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/cancel_ai_task_and_return_procedure.rs index 0c5dc3eb4..b239e0600 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/cancel_ai_task_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/cancel_ai_task_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait cancel_ai_task_and_return { input: AiTaskCancelInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl cancel_ai_task_and_return for super::RemoteProcedures { input: AiTaskCancelInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, AiTaskProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/chapter_pace_band_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/chapter_pace_band_type.rs deleted file mode 100644 index effbeb9d4..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/chapter_pace_band_type.rs +++ /dev/null @@ -1,22 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum ChapterPaceBand { - OpeningFast, - - Steady, - - Pressure, - - FinaleDense, -} - -impl __sdk::InModule for ChapterPaceBand { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_table.rs deleted file mode 100644 index 2072a6a90..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_table.rs +++ /dev/null @@ -1,235 +0,0 @@ -// 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::chapter_pace_band_type::ChapterPaceBand; -use super::chapter_progression_type::ChapterProgression; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `chapter_progression`. -/// -/// Obtain a handle from the [`ChapterProgressionTableAccess::chapter_progression`] method on [`super::RemoteTables`], -/// like `ctx.db.chapter_progression()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.chapter_progression().on_insert(...)`. -pub struct ChapterProgressionTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `chapter_progression`. -pub struct ChapterProgressionTableAccessor; - -impl __sdk::TableAccessor for ChapterProgressionTableAccessor { - type Row = ChapterProgression; - type Handle<'db> = ChapterProgressionTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.chapter_progression() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `chapter_progression`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait ChapterProgressionTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`ChapterProgressionTableHandle`], which mediates access to the table `chapter_progression`. - fn chapter_progression(&self) -> ChapterProgressionTableHandle<'_>; -} - -impl ChapterProgressionTableAccess for super::RemoteTables { - fn chapter_progression(&self) -> ChapterProgressionTableHandle<'_> { - ChapterProgressionTableHandle { - imp: self - .imp - .get_table::("chapter_progression"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct ChapterProgressionInsertCallbackId(__sdk::CallbackId); -pub struct ChapterProgressionDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for ChapterProgressionTableHandle<'ctx> { - type Row = ChapterProgression; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for ChapterProgressionTableHandle<'ctx> { - type Row = ChapterProgression; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = ChapterProgressionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> ChapterProgressionInsertCallbackId { - ChapterProgressionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: ChapterProgressionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = ChapterProgressionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> ChapterProgressionDeleteCallbackId { - ChapterProgressionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: ChapterProgressionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for ChapterProgressionTableHandle<'ctx> { - type InsertCallbackId = ChapterProgressionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> ChapterProgressionInsertCallbackId { - ChapterProgressionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: ChapterProgressionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for ChapterProgressionTableHandle<'ctx> { - type DeleteCallbackId = ChapterProgressionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> ChapterProgressionDeleteCallbackId { - ChapterProgressionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: ChapterProgressionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct ChapterProgressionUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for ChapterProgressionTableHandle<'ctx> { - type UpdateCallbackId = ChapterProgressionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> ChapterProgressionUpdateCallbackId { - ChapterProgressionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: ChapterProgressionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for ChapterProgressionTableHandle<'ctx> { - type UpdateCallbackId = ChapterProgressionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> ChapterProgressionUpdateCallbackId { - ChapterProgressionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: ChapterProgressionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `chapter_progression_id` unique index on the table `chapter_progression`, -/// which allows point queries on the field of the same name -/// via the [`ChapterProgressionChapterProgressionIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.chapter_progression().chapter_progression_id().find(...)`. -pub struct ChapterProgressionChapterProgressionIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> ChapterProgressionTableHandle<'ctx> { - /// Get a handle on the `chapter_progression_id` unique index on the table `chapter_progression`. - pub fn chapter_progression_id(&self) -> ChapterProgressionChapterProgressionIdUnique<'ctx> { - ChapterProgressionChapterProgressionIdUnique { - imp: self - .imp - .get_unique_constraint::("chapter_progression_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> ChapterProgressionChapterProgressionIdUnique<'ctx> { - /// Find the subscribed row whose `chapter_progression_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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("chapter_progression"); - _table.add_unique_constraint::("chapter_progression_id", |row| { - &row.chapter_progression_id - }); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `ChapterProgression`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait chapter_progressionQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `ChapterProgression`. - fn chapter_progression(&self) -> __sdk::__query_builder::Table; -} - -impl chapter_progressionQueryTableAccess for __sdk::QueryTableAccessor { - fn chapter_progression(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("chapter_progression") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_type.rs deleted file mode 100644 index c94a7196d..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_type.rs +++ /dev/null @@ -1,133 +0,0 @@ -// 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::chapter_pace_band_type::ChapterPaceBand; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct ChapterProgression { - pub chapter_progression_id: String, - pub user_id: String, - pub chapter_id: String, - pub chapter_index: u32, - pub total_chapters: u32, - pub entry_pseudo_level_millis: u32, - pub exit_pseudo_level_millis: u32, - pub entry_level: u32, - pub exit_level: u32, - pub planned_total_xp: u32, - pub planned_quest_xp: u32, - pub planned_hostile_xp: u32, - pub actual_quest_xp: u32, - pub actual_hostile_xp: u32, - pub expected_hostile_defeat_count: u32, - pub actual_hostile_defeat_count: u32, - pub level_at_entry: u32, - pub level_at_exit: Option, - pub pace_band: ChapterPaceBand, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for ChapterProgression { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `ChapterProgression`. -/// -/// Provides typed access to columns for query building. -pub struct ChapterProgressionCols { - pub chapter_progression_id: __sdk::__query_builder::Col, - pub user_id: __sdk::__query_builder::Col, - pub chapter_id: __sdk::__query_builder::Col, - pub chapter_index: __sdk::__query_builder::Col, - pub total_chapters: __sdk::__query_builder::Col, - pub entry_pseudo_level_millis: __sdk::__query_builder::Col, - pub exit_pseudo_level_millis: __sdk::__query_builder::Col, - pub entry_level: __sdk::__query_builder::Col, - pub exit_level: __sdk::__query_builder::Col, - pub planned_total_xp: __sdk::__query_builder::Col, - pub planned_quest_xp: __sdk::__query_builder::Col, - pub planned_hostile_xp: __sdk::__query_builder::Col, - pub actual_quest_xp: __sdk::__query_builder::Col, - pub actual_hostile_xp: __sdk::__query_builder::Col, - pub expected_hostile_defeat_count: __sdk::__query_builder::Col, - pub actual_hostile_defeat_count: __sdk::__query_builder::Col, - pub level_at_entry: __sdk::__query_builder::Col, - pub level_at_exit: __sdk::__query_builder::Col>, - pub pace_band: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for ChapterProgression { - type Cols = ChapterProgressionCols; - fn cols(table_name: &'static str) -> Self::Cols { - ChapterProgressionCols { - chapter_progression_id: __sdk::__query_builder::Col::new( - table_name, - "chapter_progression_id", - ), - user_id: __sdk::__query_builder::Col::new(table_name, "user_id"), - chapter_id: __sdk::__query_builder::Col::new(table_name, "chapter_id"), - chapter_index: __sdk::__query_builder::Col::new(table_name, "chapter_index"), - total_chapters: __sdk::__query_builder::Col::new(table_name, "total_chapters"), - entry_pseudo_level_millis: __sdk::__query_builder::Col::new( - table_name, - "entry_pseudo_level_millis", - ), - exit_pseudo_level_millis: __sdk::__query_builder::Col::new( - table_name, - "exit_pseudo_level_millis", - ), - entry_level: __sdk::__query_builder::Col::new(table_name, "entry_level"), - exit_level: __sdk::__query_builder::Col::new(table_name, "exit_level"), - planned_total_xp: __sdk::__query_builder::Col::new(table_name, "planned_total_xp"), - planned_quest_xp: __sdk::__query_builder::Col::new(table_name, "planned_quest_xp"), - planned_hostile_xp: __sdk::__query_builder::Col::new(table_name, "planned_hostile_xp"), - actual_quest_xp: __sdk::__query_builder::Col::new(table_name, "actual_quest_xp"), - actual_hostile_xp: __sdk::__query_builder::Col::new(table_name, "actual_hostile_xp"), - expected_hostile_defeat_count: __sdk::__query_builder::Col::new( - table_name, - "expected_hostile_defeat_count", - ), - actual_hostile_defeat_count: __sdk::__query_builder::Col::new( - table_name, - "actual_hostile_defeat_count", - ), - level_at_entry: __sdk::__query_builder::Col::new(table_name, "level_at_entry"), - level_at_exit: __sdk::__query_builder::Col::new(table_name, "level_at_exit"), - pace_band: __sdk::__query_builder::Col::new(table_name, "pace_band"), - 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 `ChapterProgression`. -/// -/// Provides typed access to indexed columns for query building. -pub struct ChapterProgressionIxCols { - pub chapter_id: __sdk::__query_builder::IxCol, - pub chapter_progression_id: __sdk::__query_builder::IxCol, - pub user_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for ChapterProgression { - type IxCols = ChapterProgressionIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - ChapterProgressionIxCols { - chapter_id: __sdk::__query_builder::IxCol::new(table_name, "chapter_id"), - chapter_progression_id: __sdk::__query_builder::IxCol::new( - table_name, - "chapter_progression_id", - ), - user_id: __sdk::__query_builder::IxCol::new(table_name, "user_id"), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for ChapterProgression {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/claim_external_generation_jobs_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/claim_external_generation_jobs_and_return_procedure.rs index 979ea56cc..6455c7b2e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/claim_external_generation_jobs_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/claim_external_generation_jobs_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait claim_external_generation_jobs_and_return { input: ExternalGenerationJobClaimInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl claim_external_generation_jobs_and_return for super::RemoteProcedures { input: ExternalGenerationJobClaimInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, ExternalGenerationJobProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/claim_profile_recharge_order_expiration_schedule_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/claim_profile_recharge_order_expiration_schedule_and_return_procedure.rs index 93d75e737..93a626b00 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/claim_profile_recharge_order_expiration_schedule_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/claim_profile_recharge_order_expiration_schedule_and_return_procedure.rs @@ -34,10 +34,13 @@ pub trait claim_profile_recharge_order_expiration_schedule_and_return { input: RuntimeProfileRechargeOrderExpirationClaimInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result< + RuntimeProfileRechargeOrderExpirationClaimProcedureResult, + __sdk::InternalError, + >, + ) + Send + + 'static, ); } @@ -47,10 +50,13 @@ impl claim_profile_recharge_order_expiration_schedule_and_return for super::Remo input: RuntimeProfileRechargeOrderExpirationClaimInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result< + RuntimeProfileRechargeOrderExpirationClaimProcedureResult, + __sdk::InternalError, + >, + ) + Send + + 'static, ) { self.imp.invoke_procedure_with_callback::<_, RuntimeProfileRechargeOrderExpirationClaimProcedureResult>( "claim_profile_recharge_order_expiration_schedule_and_return", diff --git a/server-rs/crates/spacetime-client/src/module_bindings/claim_profile_task_reward_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/claim_profile_task_reward_and_return_procedure.rs index ea5010707..5a386f3cd 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/claim_profile_task_reward_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/claim_profile_task_reward_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait claim_profile_task_reward_and_return { input: RuntimeProfileTaskClaimInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl claim_profile_task_reward_and_return for super::RemoteProcedures { input: RuntimeProfileTaskClaimInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileTaskClaimProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/clean_editor_image_asset_kind_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/clean_editor_image_asset_kind_and_return_procedure.rs index a32372261..1241d9343 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/clean_editor_image_asset_kind_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/clean_editor_image_asset_kind_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait clean_editor_image_asset_kind_and_return { input: EditorImageAssetKindCleanupInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl clean_editor_image_asset_kind_and_return for super::RemoteProcedures { input: EditorImageAssetKindCleanupInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorImageAssetKindCleanupProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/clear_database_migration_import_chunks_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/clear_database_migration_import_chunks_procedure.rs index d05fcdf27..51146e998 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/clear_database_migration_import_chunks_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/clear_database_migration_import_chunks_procedure.rs @@ -34,10 +34,10 @@ pub trait clear_database_migration_import_chunks { input: DatabaseMigrationImportChunksClearInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl clear_database_migration_import_chunks for super::RemoteProcedures { input: DatabaseMigrationImportChunksClearInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, DatabaseMigrationProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/clear_retired_database_tables_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/clear_retired_database_tables_procedure.rs deleted file mode 100644 index 3d7e1b5d6..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/clear_retired_database_tables_procedure.rs +++ /dev/null @@ -1,59 +0,0 @@ -// 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::database_migration_clear_retired_tables_input_type::DatabaseMigrationClearRetiredTablesInput; -use super::database_migration_clear_retired_tables_result_type::DatabaseMigrationClearRetiredTablesResult; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -struct ClearRetiredDatabaseTablesArgs { - pub input: DatabaseMigrationClearRetiredTablesInput, -} - -impl __sdk::InModule for ClearRetiredDatabaseTablesArgs { - type Module = super::RemoteModule; -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the procedure `clear_retired_database_tables`. -/// -/// Implemented for [`super::RemoteProcedures`]. -pub trait clear_retired_database_tables { - fn clear_retired_database_tables(&self, input: DatabaseMigrationClearRetiredTablesInput) { - self.clear_retired_database_tables_then(input, |_, _| {}); - } - - fn clear_retired_database_tables_then( - &self, - input: DatabaseMigrationClearRetiredTablesInput, - - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, - ); -} - -impl clear_retired_database_tables for super::RemoteProcedures { - fn clear_retired_database_tables_then( - &self, - input: DatabaseMigrationClearRetiredTablesInput, - - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, - ) { - self.imp - .invoke_procedure_with_callback::<_, DatabaseMigrationClearRetiredTablesResult>( - "clear_retired_database_tables", - ClearRetiredDatabaseTablesArgs { input }, - __callback, - ); - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/close_profile_recharge_order_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/close_profile_recharge_order_and_return_procedure.rs index 984e99294..461f43399 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/close_profile_recharge_order_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/close_profile_recharge_order_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait close_profile_recharge_order_and_return { input: RuntimeProfileRechargeOrderCloseInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl close_profile_recharge_order_and_return for super::RemoteProcedures { input: RuntimeProfileRechargeOrderCloseInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileRechargeCenterProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/combat_outcome_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/combat_outcome_type.rs deleted file mode 100644 index 731563dd5..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/combat_outcome_type.rs +++ /dev/null @@ -1,22 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum CombatOutcome { - Ongoing, - - Victory, - - SparComplete, - - Escaped, -} - -impl __sdk::InModule for CombatOutcome { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/compact_external_generation_job_payloads_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/compact_external_generation_job_payloads_and_return_procedure.rs index e98609333..416c06161 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/compact_external_generation_job_payloads_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/compact_external_generation_job_payloads_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait compact_external_generation_job_payloads_and_return { input: ExternalGenerationJobPayloadCompactionInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl compact_external_generation_job_payloads_and_return for super::RemoteProced input: ExternalGenerationJobPayloadCompactionInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp.invoke_procedure_with_callback::<_, ExternalGenerationJobPayloadCompactionProcedureResult>( "compact_external_generation_job_payloads_and_return", diff --git a/server-rs/crates/spacetime-client/src/module_bindings/complete_ai_stage_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/complete_ai_stage_and_return_procedure.rs index e59ab8f0e..51375935c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/complete_ai_stage_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/complete_ai_stage_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait complete_ai_stage_and_return { input: AiStageCompletionInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl complete_ai_stage_and_return for super::RemoteProcedures { input: AiStageCompletionInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, AiTaskProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/complete_ai_task_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/complete_ai_task_and_return_procedure.rs index ca7eab9f8..040af6392 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/complete_ai_task_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/complete_ai_task_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait complete_ai_task_and_return { input: AiTaskFinishInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl complete_ai_task_and_return for super::RemoteProcedures { input: AiTaskFinishInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, AiTaskProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/complete_editor_asset_group_cohort_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/complete_editor_asset_group_cohort_and_return_procedure.rs index 7b2a74f89..189f54bd5 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/complete_editor_asset_group_cohort_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/complete_editor_asset_group_cohort_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait complete_editor_asset_group_cohort_and_return { input: EditorAssetGroupCohortCompleteInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl complete_editor_asset_group_cohort_and_return for super::RemoteProcedures { input: EditorAssetGroupCohortCompleteInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorAssetProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/complete_external_generation_job_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/complete_external_generation_job_and_return_procedure.rs index cebd89edd..9c923b968 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/complete_external_generation_job_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/complete_external_generation_job_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait complete_external_generation_job_and_return { input: ExternalGenerationJobCompleteInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl complete_external_generation_job_and_return for super::RemoteProcedures { input: ExternalGenerationJobCompleteInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, ExternalGenerationJobProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/complete_profile_recharge_order_expiration_schedule_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/complete_profile_recharge_order_expiration_schedule_and_return_procedure.rs index 64040eb0e..b3c8a39e2 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/complete_profile_recharge_order_expiration_schedule_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/complete_profile_recharge_order_expiration_schedule_and_return_procedure.rs @@ -34,13 +34,13 @@ pub trait complete_profile_recharge_order_expiration_schedule_and_return { input: RuntimeProfileRechargeOrderExpirationCompleteInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result< - RuntimeProfileRechargeOrderExpirationCompleteProcedureResult, - __sdk::InternalError, - >, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result< + RuntimeProfileRechargeOrderExpirationCompleteProcedureResult, + __sdk::InternalError, + >, + ) + Send + + 'static, ); } @@ -50,13 +50,13 @@ impl complete_profile_recharge_order_expiration_schedule_and_return for super::R input: RuntimeProfileRechargeOrderExpirationCompleteInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result< - RuntimeProfileRechargeOrderExpirationCompleteProcedureResult, - __sdk::InternalError, - >, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result< + RuntimeProfileRechargeOrderExpirationCompleteProcedureResult, + __sdk::InternalError, + >, + ) + Send + + 'static, ) { self.imp.invoke_procedure_with_callback::<_, RuntimeProfileRechargeOrderExpirationCompleteProcedureResult>( "complete_profile_recharge_order_expiration_schedule_and_return", diff --git a/server-rs/crates/spacetime-client/src/module_bindings/confirm_asset_object_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/confirm_asset_object_and_return_procedure.rs index cc65f7445..0b4f26b2b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/confirm_asset_object_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/confirm_asset_object_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait confirm_asset_object_and_return { input: AssetObjectUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl confirm_asset_object_and_return for super::RemoteProcedures { input: AssetObjectUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, AssetObjectProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/confirm_asset_object_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/confirm_asset_object_reducer.rs index f5edb63a4..183c2efa8 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/confirm_asset_object_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/confirm_asset_object_reducer.rs @@ -47,11 +47,9 @@ pub trait confirm_asset_object { &self, input: AssetObjectUpsertInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -60,11 +58,9 @@ impl confirm_asset_object for super::RemoteReducers { &self, input: AssetObjectUpsertInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { self.imp .invoke_reducer_with_callback(ConfirmAssetObjectArgs { input }, callback) diff --git a/server-rs/crates/spacetime-client/src/module_bindings/consume_profile_wallet_points_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/consume_profile_wallet_points_and_return_procedure.rs index 11394b665..3d3e47a20 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/consume_profile_wallet_points_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/consume_profile_wallet_points_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait consume_profile_wallet_points_and_return { input: RuntimeProfileWalletAdjustmentInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl consume_profile_wallet_points_and_return for super::RemoteProcedures { input: RuntimeProfileWalletAdjustmentInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileWalletAdjustmentProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/create_admin_account_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/create_admin_account_and_return_procedure.rs index dc9f883ec..0271d730c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/create_admin_account_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/create_admin_account_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait create_admin_account_and_return { input: AdminAccountCreateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl create_admin_account_and_return for super::RemoteProcedures { input: AdminAccountCreateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, AdminAccountProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/create_ai_task_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/create_ai_task_and_return_procedure.rs index a2f40fd06..20d8ceee1 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/create_ai_task_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/create_ai_task_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait create_ai_task_and_return { input: AiTaskCreateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl create_ai_task_and_return for super::RemoteProcedures { input: AiTaskCreateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, AiTaskProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/create_ai_task_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/create_ai_task_reducer.rs index b87207f02..213f28e58 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/create_ai_task_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/create_ai_task_reducer.rs @@ -47,11 +47,9 @@ pub trait create_ai_task { &self, input: AiTaskCreateInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -60,11 +58,9 @@ impl create_ai_task for super::RemoteReducers { &self, input: AiTaskCreateInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { self.imp .invoke_reducer_with_callback(CreateAiTaskArgs { input }, callback) diff --git a/server-rs/crates/spacetime-client/src/module_bindings/create_editor_agent_conversation_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/create_editor_agent_conversation_and_return_procedure.rs index 6e45ee7c2..0317b0856 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/create_editor_agent_conversation_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/create_editor_agent_conversation_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait create_editor_agent_conversation_and_return { input: EditorAgentConversationCreateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl create_editor_agent_conversation_and_return for super::RemoteProcedures { input: EditorAgentConversationCreateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorAgentConversationProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/create_editor_asset_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/create_editor_asset_and_return_procedure.rs index e1926a0ef..8ca475434 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/create_editor_asset_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/create_editor_asset_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait create_editor_asset_and_return { input: EditorAssetCreateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl create_editor_asset_and_return for super::RemoteProcedures { input: EditorAssetCreateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorAssetProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/create_editor_asset_folder_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/create_editor_asset_folder_and_return_procedure.rs index e45dcf833..33ec7f85c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/create_editor_asset_folder_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/create_editor_asset_folder_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait create_editor_asset_folder_and_return { input: EditorAssetFolderCreateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl create_editor_asset_folder_and_return for super::RemoteProcedures { input: EditorAssetFolderCreateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorAssetFolderProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/create_editor_project_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/create_editor_project_and_return_procedure.rs index 7c305c26e..7340d97d3 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/create_editor_project_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/create_editor_project_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait create_editor_project_and_return { input: EditorProjectCreateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl create_editor_project_and_return for super::RemoteProcedures { input: EditorProjectCreateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorProjectProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/create_editor_project_resource_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/create_editor_project_resource_and_return_procedure.rs index 957e3aff0..649d2a3e0 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/create_editor_project_resource_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/create_editor_project_resource_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait create_editor_project_resource_and_return { input: EditorProjectResourceCreateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl create_editor_project_resource_and_return for super::RemoteProcedures { input: EditorProjectResourceCreateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorProjectResourceProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/create_external_api_key_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/create_external_api_key_and_return_procedure.rs index 7dc438368..daf4a676f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/create_external_api_key_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/create_external_api_key_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait create_external_api_key_and_return { input: ExternalApiKeyCreateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl create_external_api_key_and_return for super::RemoteProcedures { input: ExternalApiKeyCreateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, ExternalApiKeyProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/create_profile_recharge_order_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/create_profile_recharge_order_and_return_procedure.rs index 1c53f6aea..893fbdf68 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/create_profile_recharge_order_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/create_profile_recharge_order_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait create_profile_recharge_order_and_return { input: RuntimeProfileRechargeOrderCreateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl create_profile_recharge_order_and_return for super::RemoteProcedures { input: RuntimeProfileRechargeOrderCreateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileRechargeCenterProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_table.rs deleted file mode 100644 index df529c284..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_table.rs +++ /dev/null @@ -1,233 +0,0 @@ -// 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::custom_world_agent_message_type::CustomWorldAgentMessage; -use super::rpg_agent_message_kind_type::RpgAgentMessageKind; -use super::rpg_agent_message_role_type::RpgAgentMessageRole; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `custom_world_agent_message`. -/// -/// Obtain a handle from the [`CustomWorldAgentMessageTableAccess::custom_world_agent_message`] method on [`super::RemoteTables`], -/// like `ctx.db.custom_world_agent_message()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.custom_world_agent_message().on_insert(...)`. -pub struct CustomWorldAgentMessageTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `custom_world_agent_message`. -pub struct CustomWorldAgentMessageTableAccessor; - -impl __sdk::TableAccessor for CustomWorldAgentMessageTableAccessor { - type Row = CustomWorldAgentMessage; - type Handle<'db> = CustomWorldAgentMessageTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.custom_world_agent_message() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `custom_world_agent_message`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait CustomWorldAgentMessageTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`CustomWorldAgentMessageTableHandle`], which mediates access to the table `custom_world_agent_message`. - fn custom_world_agent_message(&self) -> CustomWorldAgentMessageTableHandle<'_>; -} - -impl CustomWorldAgentMessageTableAccess for super::RemoteTables { - fn custom_world_agent_message(&self) -> CustomWorldAgentMessageTableHandle<'_> { - CustomWorldAgentMessageTableHandle { - imp: self - .imp - .get_table::("custom_world_agent_message"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct CustomWorldAgentMessageInsertCallbackId(__sdk::CallbackId); -pub struct CustomWorldAgentMessageDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for CustomWorldAgentMessageTableHandle<'ctx> { - type Row = CustomWorldAgentMessage; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for CustomWorldAgentMessageTableHandle<'ctx> { - type Row = CustomWorldAgentMessage; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = CustomWorldAgentMessageInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldAgentMessageInsertCallbackId { - CustomWorldAgentMessageInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: CustomWorldAgentMessageInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = CustomWorldAgentMessageDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldAgentMessageDeleteCallbackId { - CustomWorldAgentMessageDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: CustomWorldAgentMessageDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for CustomWorldAgentMessageTableHandle<'ctx> { - type InsertCallbackId = CustomWorldAgentMessageInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldAgentMessageInsertCallbackId { - CustomWorldAgentMessageInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: CustomWorldAgentMessageInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for CustomWorldAgentMessageTableHandle<'ctx> { - type DeleteCallbackId = CustomWorldAgentMessageDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldAgentMessageDeleteCallbackId { - CustomWorldAgentMessageDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: CustomWorldAgentMessageDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct CustomWorldAgentMessageUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldAgentMessageTableHandle<'ctx> { - type UpdateCallbackId = CustomWorldAgentMessageUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> CustomWorldAgentMessageUpdateCallbackId { - CustomWorldAgentMessageUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: CustomWorldAgentMessageUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for CustomWorldAgentMessageTableHandle<'ctx> { - type UpdateCallbackId = CustomWorldAgentMessageUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> CustomWorldAgentMessageUpdateCallbackId { - CustomWorldAgentMessageUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: CustomWorldAgentMessageUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `message_id` unique index on the table `custom_world_agent_message`, -/// which allows point queries on the field of the same name -/// via the [`CustomWorldAgentMessageMessageIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.custom_world_agent_message().message_id().find(...)`. -pub struct CustomWorldAgentMessageMessageIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> CustomWorldAgentMessageTableHandle<'ctx> { - /// Get a handle on the `message_id` unique index on the table `custom_world_agent_message`. - pub fn message_id(&self) -> CustomWorldAgentMessageMessageIdUnique<'ctx> { - CustomWorldAgentMessageMessageIdUnique { - imp: self.imp.get_unique_constraint::("message_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> CustomWorldAgentMessageMessageIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("custom_world_agent_message"); - _table.add_unique_constraint::("message_id", |row| &row.message_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `CustomWorldAgentMessage`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait custom_world_agent_messageQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `CustomWorldAgentMessage`. - fn custom_world_agent_message(&self) -> __sdk::__query_builder::Table; -} - -impl custom_world_agent_messageQueryTableAccess for __sdk::QueryTableAccessor { - fn custom_world_agent_message(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("custom_world_agent_message") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_type.rs deleted file mode 100644 index 751108606..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_type.rs +++ /dev/null @@ -1,75 +0,0 @@ -// 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::rpg_agent_message_kind_type::RpgAgentMessageKind; -use super::rpg_agent_message_role_type::RpgAgentMessageRole; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct CustomWorldAgentMessage { - pub message_id: String, - pub session_id: String, - pub role: RpgAgentMessageRole, - pub kind: RpgAgentMessageKind, - pub text: String, - pub related_operation_id: Option, - pub created_at: __sdk::Timestamp, -} - -impl __sdk::InModule for CustomWorldAgentMessage { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `CustomWorldAgentMessage`. -/// -/// Provides typed access to columns for query building. -pub struct CustomWorldAgentMessageCols { - pub message_id: __sdk::__query_builder::Col, - pub session_id: __sdk::__query_builder::Col, - pub role: __sdk::__query_builder::Col, - pub kind: __sdk::__query_builder::Col, - pub text: __sdk::__query_builder::Col, - pub related_operation_id: __sdk::__query_builder::Col>, - pub created_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for CustomWorldAgentMessage { - type Cols = CustomWorldAgentMessageCols; - fn cols(table_name: &'static str) -> Self::Cols { - CustomWorldAgentMessageCols { - 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"), - related_operation_id: __sdk::__query_builder::Col::new( - table_name, - "related_operation_id", - ), - created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), - } - } -} - -/// Indexed column accessor struct for the table `CustomWorldAgentMessage`. -/// -/// Provides typed access to indexed columns for query building. -pub struct CustomWorldAgentMessageIxCols { - pub message_id: __sdk::__query_builder::IxCol, - pub session_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for CustomWorldAgentMessage { - type IxCols = CustomWorldAgentMessageIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - CustomWorldAgentMessageIxCols { - 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 CustomWorldAgentMessage {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_table.rs deleted file mode 100644 index e7eec6e80..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_table.rs +++ /dev/null @@ -1,237 +0,0 @@ -// 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::custom_world_agent_operation_type::CustomWorldAgentOperation; -use super::rpg_agent_operation_status_type::RpgAgentOperationStatus; -use super::rpg_agent_operation_type_type::RpgAgentOperationType; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `custom_world_agent_operation`. -/// -/// Obtain a handle from the [`CustomWorldAgentOperationTableAccess::custom_world_agent_operation`] method on [`super::RemoteTables`], -/// like `ctx.db.custom_world_agent_operation()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.custom_world_agent_operation().on_insert(...)`. -pub struct CustomWorldAgentOperationTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `custom_world_agent_operation`. -pub struct CustomWorldAgentOperationTableAccessor; - -impl __sdk::TableAccessor for CustomWorldAgentOperationTableAccessor { - type Row = CustomWorldAgentOperation; - type Handle<'db> = CustomWorldAgentOperationTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.custom_world_agent_operation() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `custom_world_agent_operation`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait CustomWorldAgentOperationTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`CustomWorldAgentOperationTableHandle`], which mediates access to the table `custom_world_agent_operation`. - fn custom_world_agent_operation(&self) -> CustomWorldAgentOperationTableHandle<'_>; -} - -impl CustomWorldAgentOperationTableAccess for super::RemoteTables { - fn custom_world_agent_operation(&self) -> CustomWorldAgentOperationTableHandle<'_> { - CustomWorldAgentOperationTableHandle { - imp: self - .imp - .get_table::("custom_world_agent_operation"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct CustomWorldAgentOperationInsertCallbackId(__sdk::CallbackId); -pub struct CustomWorldAgentOperationDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for CustomWorldAgentOperationTableHandle<'ctx> { - type Row = CustomWorldAgentOperation; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for CustomWorldAgentOperationTableHandle<'ctx> { - type Row = CustomWorldAgentOperation; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = CustomWorldAgentOperationInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldAgentOperationInsertCallbackId { - CustomWorldAgentOperationInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: CustomWorldAgentOperationInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = CustomWorldAgentOperationDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldAgentOperationDeleteCallbackId { - CustomWorldAgentOperationDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: CustomWorldAgentOperationDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for CustomWorldAgentOperationTableHandle<'ctx> { - type InsertCallbackId = CustomWorldAgentOperationInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldAgentOperationInsertCallbackId { - CustomWorldAgentOperationInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: CustomWorldAgentOperationInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for CustomWorldAgentOperationTableHandle<'ctx> { - type DeleteCallbackId = CustomWorldAgentOperationDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldAgentOperationDeleteCallbackId { - CustomWorldAgentOperationDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: CustomWorldAgentOperationDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct CustomWorldAgentOperationUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldAgentOperationTableHandle<'ctx> { - type UpdateCallbackId = CustomWorldAgentOperationUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> CustomWorldAgentOperationUpdateCallbackId { - CustomWorldAgentOperationUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: CustomWorldAgentOperationUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for CustomWorldAgentOperationTableHandle<'ctx> { - type UpdateCallbackId = CustomWorldAgentOperationUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> CustomWorldAgentOperationUpdateCallbackId { - CustomWorldAgentOperationUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: CustomWorldAgentOperationUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `operation_id` unique index on the table `custom_world_agent_operation`, -/// which allows point queries on the field of the same name -/// via the [`CustomWorldAgentOperationOperationIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.custom_world_agent_operation().operation_id().find(...)`. -pub struct CustomWorldAgentOperationOperationIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> CustomWorldAgentOperationTableHandle<'ctx> { - /// Get a handle on the `operation_id` unique index on the table `custom_world_agent_operation`. - pub fn operation_id(&self) -> CustomWorldAgentOperationOperationIdUnique<'ctx> { - CustomWorldAgentOperationOperationIdUnique { - imp: self.imp.get_unique_constraint::("operation_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> CustomWorldAgentOperationOperationIdUnique<'ctx> { - /// Find the subscribed row whose `operation_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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("custom_world_agent_operation"); - _table.add_unique_constraint::("operation_id", |row| &row.operation_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `CustomWorldAgentOperation`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait custom_world_agent_operationQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `CustomWorldAgentOperation`. - fn custom_world_agent_operation( - &self, - ) -> __sdk::__query_builder::Table; -} - -impl custom_world_agent_operationQueryTableAccess for __sdk::QueryTableAccessor { - fn custom_world_agent_operation( - &self, - ) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("custom_world_agent_operation") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_type.rs deleted file mode 100644 index 41957317f..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_type.rs +++ /dev/null @@ -1,82 +0,0 @@ -// 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::rpg_agent_operation_status_type::RpgAgentOperationStatus; -use super::rpg_agent_operation_type_type::RpgAgentOperationType; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct CustomWorldAgentOperation { - pub operation_id: String, - pub session_id: String, - pub operation_type: RpgAgentOperationType, - pub status: RpgAgentOperationStatus, - pub phase_label: String, - pub phase_detail: String, - pub progress: u32, - pub error_message: Option, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for CustomWorldAgentOperation { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `CustomWorldAgentOperation`. -/// -/// Provides typed access to columns for query building. -pub struct CustomWorldAgentOperationCols { - pub operation_id: __sdk::__query_builder::Col, - pub session_id: __sdk::__query_builder::Col, - pub operation_type: - __sdk::__query_builder::Col, - pub status: __sdk::__query_builder::Col, - pub phase_label: __sdk::__query_builder::Col, - pub phase_detail: __sdk::__query_builder::Col, - pub progress: __sdk::__query_builder::Col, - pub error_message: __sdk::__query_builder::Col>, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for CustomWorldAgentOperation { - type Cols = CustomWorldAgentOperationCols; - fn cols(table_name: &'static str) -> Self::Cols { - CustomWorldAgentOperationCols { - operation_id: __sdk::__query_builder::Col::new(table_name, "operation_id"), - session_id: __sdk::__query_builder::Col::new(table_name, "session_id"), - operation_type: __sdk::__query_builder::Col::new(table_name, "operation_type"), - status: __sdk::__query_builder::Col::new(table_name, "status"), - phase_label: __sdk::__query_builder::Col::new(table_name, "phase_label"), - phase_detail: __sdk::__query_builder::Col::new(table_name, "phase_detail"), - progress: __sdk::__query_builder::Col::new(table_name, "progress"), - error_message: __sdk::__query_builder::Col::new(table_name, "error_message"), - 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 `CustomWorldAgentOperation`. -/// -/// Provides typed access to indexed columns for query building. -pub struct CustomWorldAgentOperationIxCols { - pub operation_id: __sdk::__query_builder::IxCol, - pub session_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for CustomWorldAgentOperation { - type IxCols = CustomWorldAgentOperationIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - CustomWorldAgentOperationIxCols { - operation_id: __sdk::__query_builder::IxCol::new(table_name, "operation_id"), - session_id: __sdk::__query_builder::IxCol::new(table_name, "session_id"), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for CustomWorldAgentOperation {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_table.rs deleted file mode 100644 index 30a77d90c..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_table.rs +++ /dev/null @@ -1,232 +0,0 @@ -// 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::custom_world_agent_session_type::CustomWorldAgentSession; -use super::rpg_agent_stage_type::RpgAgentStage; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `custom_world_agent_session`. -/// -/// Obtain a handle from the [`CustomWorldAgentSessionTableAccess::custom_world_agent_session`] method on [`super::RemoteTables`], -/// like `ctx.db.custom_world_agent_session()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.custom_world_agent_session().on_insert(...)`. -pub struct CustomWorldAgentSessionTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `custom_world_agent_session`. -pub struct CustomWorldAgentSessionTableAccessor; - -impl __sdk::TableAccessor for CustomWorldAgentSessionTableAccessor { - type Row = CustomWorldAgentSession; - type Handle<'db> = CustomWorldAgentSessionTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.custom_world_agent_session() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `custom_world_agent_session`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait CustomWorldAgentSessionTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`CustomWorldAgentSessionTableHandle`], which mediates access to the table `custom_world_agent_session`. - fn custom_world_agent_session(&self) -> CustomWorldAgentSessionTableHandle<'_>; -} - -impl CustomWorldAgentSessionTableAccess for super::RemoteTables { - fn custom_world_agent_session(&self) -> CustomWorldAgentSessionTableHandle<'_> { - CustomWorldAgentSessionTableHandle { - imp: self - .imp - .get_table::("custom_world_agent_session"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct CustomWorldAgentSessionInsertCallbackId(__sdk::CallbackId); -pub struct CustomWorldAgentSessionDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for CustomWorldAgentSessionTableHandle<'ctx> { - type Row = CustomWorldAgentSession; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for CustomWorldAgentSessionTableHandle<'ctx> { - type Row = CustomWorldAgentSession; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = CustomWorldAgentSessionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldAgentSessionInsertCallbackId { - CustomWorldAgentSessionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: CustomWorldAgentSessionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = CustomWorldAgentSessionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldAgentSessionDeleteCallbackId { - CustomWorldAgentSessionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: CustomWorldAgentSessionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for CustomWorldAgentSessionTableHandle<'ctx> { - type InsertCallbackId = CustomWorldAgentSessionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldAgentSessionInsertCallbackId { - CustomWorldAgentSessionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: CustomWorldAgentSessionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for CustomWorldAgentSessionTableHandle<'ctx> { - type DeleteCallbackId = CustomWorldAgentSessionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldAgentSessionDeleteCallbackId { - CustomWorldAgentSessionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: CustomWorldAgentSessionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct CustomWorldAgentSessionUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldAgentSessionTableHandle<'ctx> { - type UpdateCallbackId = CustomWorldAgentSessionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> CustomWorldAgentSessionUpdateCallbackId { - CustomWorldAgentSessionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: CustomWorldAgentSessionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for CustomWorldAgentSessionTableHandle<'ctx> { - type UpdateCallbackId = CustomWorldAgentSessionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> CustomWorldAgentSessionUpdateCallbackId { - CustomWorldAgentSessionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: CustomWorldAgentSessionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `session_id` unique index on the table `custom_world_agent_session`, -/// which allows point queries on the field of the same name -/// via the [`CustomWorldAgentSessionSessionIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.custom_world_agent_session().session_id().find(...)`. -pub struct CustomWorldAgentSessionSessionIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> CustomWorldAgentSessionTableHandle<'ctx> { - /// Get a handle on the `session_id` unique index on the table `custom_world_agent_session`. - pub fn session_id(&self) -> CustomWorldAgentSessionSessionIdUnique<'ctx> { - CustomWorldAgentSessionSessionIdUnique { - imp: self.imp.get_unique_constraint::("session_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> CustomWorldAgentSessionSessionIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("custom_world_agent_session"); - _table.add_unique_constraint::("session_id", |row| &row.session_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `CustomWorldAgentSession`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait custom_world_agent_sessionQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `CustomWorldAgentSession`. - fn custom_world_agent_session(&self) -> __sdk::__query_builder::Table; -} - -impl custom_world_agent_sessionQueryTableAccess for __sdk::QueryTableAccessor { - fn custom_world_agent_session(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("custom_world_agent_session") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_type.rs deleted file mode 100644 index 105bc9247..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_type.rs +++ /dev/null @@ -1,154 +0,0 @@ -// 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::rpg_agent_stage_type::RpgAgentStage; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct CustomWorldAgentSession { - pub session_id: String, - pub owner_user_id: String, - pub seed_text: String, - pub current_turn: u32, - pub progress_percent: u32, - pub stage: RpgAgentStage, - pub focus_card_id: Option, - pub anchor_content_json: String, - pub creator_intent_json: Option, - pub creator_intent_readiness_json: String, - pub anchor_pack_json: Option, - pub lock_state_json: Option, - pub draft_profile_json: Option, - pub last_assistant_reply: Option, - pub publish_gate_json: Option, - pub result_preview_json: Option, - pub pending_clarifications_json: String, - pub quality_findings_json: String, - pub suggested_actions_json: String, - pub recommended_replies_json: String, - pub asset_coverage_json: String, - pub checkpoints_json: String, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for CustomWorldAgentSession { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `CustomWorldAgentSession`. -/// -/// Provides typed access to columns for query building. -pub struct CustomWorldAgentSessionCols { - pub session_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub seed_text: __sdk::__query_builder::Col, - pub current_turn: __sdk::__query_builder::Col, - pub progress_percent: __sdk::__query_builder::Col, - pub stage: __sdk::__query_builder::Col, - pub focus_card_id: __sdk::__query_builder::Col>, - pub anchor_content_json: __sdk::__query_builder::Col, - pub creator_intent_json: __sdk::__query_builder::Col>, - pub creator_intent_readiness_json: __sdk::__query_builder::Col, - pub anchor_pack_json: __sdk::__query_builder::Col>, - pub lock_state_json: __sdk::__query_builder::Col>, - pub draft_profile_json: __sdk::__query_builder::Col>, - pub last_assistant_reply: __sdk::__query_builder::Col>, - pub publish_gate_json: __sdk::__query_builder::Col>, - pub result_preview_json: __sdk::__query_builder::Col>, - pub pending_clarifications_json: __sdk::__query_builder::Col, - pub quality_findings_json: __sdk::__query_builder::Col, - pub suggested_actions_json: __sdk::__query_builder::Col, - pub recommended_replies_json: __sdk::__query_builder::Col, - pub asset_coverage_json: __sdk::__query_builder::Col, - pub checkpoints_json: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for CustomWorldAgentSession { - type Cols = CustomWorldAgentSessionCols; - fn cols(table_name: &'static str) -> Self::Cols { - CustomWorldAgentSessionCols { - session_id: __sdk::__query_builder::Col::new(table_name, "session_id"), - owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"), - seed_text: __sdk::__query_builder::Col::new(table_name, "seed_text"), - current_turn: __sdk::__query_builder::Col::new(table_name, "current_turn"), - progress_percent: __sdk::__query_builder::Col::new(table_name, "progress_percent"), - stage: __sdk::__query_builder::Col::new(table_name, "stage"), - focus_card_id: __sdk::__query_builder::Col::new(table_name, "focus_card_id"), - anchor_content_json: __sdk::__query_builder::Col::new( - table_name, - "anchor_content_json", - ), - creator_intent_json: __sdk::__query_builder::Col::new( - table_name, - "creator_intent_json", - ), - creator_intent_readiness_json: __sdk::__query_builder::Col::new( - table_name, - "creator_intent_readiness_json", - ), - anchor_pack_json: __sdk::__query_builder::Col::new(table_name, "anchor_pack_json"), - lock_state_json: __sdk::__query_builder::Col::new(table_name, "lock_state_json"), - draft_profile_json: __sdk::__query_builder::Col::new(table_name, "draft_profile_json"), - last_assistant_reply: __sdk::__query_builder::Col::new( - table_name, - "last_assistant_reply", - ), - publish_gate_json: __sdk::__query_builder::Col::new(table_name, "publish_gate_json"), - result_preview_json: __sdk::__query_builder::Col::new( - table_name, - "result_preview_json", - ), - pending_clarifications_json: __sdk::__query_builder::Col::new( - table_name, - "pending_clarifications_json", - ), - quality_findings_json: __sdk::__query_builder::Col::new( - table_name, - "quality_findings_json", - ), - suggested_actions_json: __sdk::__query_builder::Col::new( - table_name, - "suggested_actions_json", - ), - recommended_replies_json: __sdk::__query_builder::Col::new( - table_name, - "recommended_replies_json", - ), - asset_coverage_json: __sdk::__query_builder::Col::new( - table_name, - "asset_coverage_json", - ), - checkpoints_json: __sdk::__query_builder::Col::new(table_name, "checkpoints_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 `CustomWorldAgentSession`. -/// -/// Provides typed access to indexed columns for query building. -pub struct CustomWorldAgentSessionIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub session_id: __sdk::__query_builder::IxCol, - pub stage: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for CustomWorldAgentSession { - type IxCols = CustomWorldAgentSessionIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - CustomWorldAgentSessionIxCols { - owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"), - session_id: __sdk::__query_builder::IxCol::new(table_name, "session_id"), - stage: __sdk::__query_builder::IxCol::new(table_name, "stage"), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for CustomWorldAgentSession {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_table.rs deleted file mode 100644 index 45c003c5e..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_table.rs +++ /dev/null @@ -1,233 +0,0 @@ -// 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::custom_world_draft_card_type::CustomWorldDraftCard; -use super::custom_world_role_asset_status_type::CustomWorldRoleAssetStatus; -use super::rpg_agent_draft_card_kind_type::RpgAgentDraftCardKind; -use super::rpg_agent_draft_card_status_type::RpgAgentDraftCardStatus; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `custom_world_draft_card`. -/// -/// Obtain a handle from the [`CustomWorldDraftCardTableAccess::custom_world_draft_card`] method on [`super::RemoteTables`], -/// like `ctx.db.custom_world_draft_card()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.custom_world_draft_card().on_insert(...)`. -pub struct CustomWorldDraftCardTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `custom_world_draft_card`. -pub struct CustomWorldDraftCardTableAccessor; - -impl __sdk::TableAccessor for CustomWorldDraftCardTableAccessor { - type Row = CustomWorldDraftCard; - type Handle<'db> = CustomWorldDraftCardTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.custom_world_draft_card() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `custom_world_draft_card`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait CustomWorldDraftCardTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`CustomWorldDraftCardTableHandle`], which mediates access to the table `custom_world_draft_card`. - fn custom_world_draft_card(&self) -> CustomWorldDraftCardTableHandle<'_>; -} - -impl CustomWorldDraftCardTableAccess for super::RemoteTables { - fn custom_world_draft_card(&self) -> CustomWorldDraftCardTableHandle<'_> { - CustomWorldDraftCardTableHandle { - imp: self - .imp - .get_table::("custom_world_draft_card"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct CustomWorldDraftCardInsertCallbackId(__sdk::CallbackId); -pub struct CustomWorldDraftCardDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for CustomWorldDraftCardTableHandle<'ctx> { - type Row = CustomWorldDraftCard; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for CustomWorldDraftCardTableHandle<'ctx> { - type Row = CustomWorldDraftCard; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = CustomWorldDraftCardInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldDraftCardInsertCallbackId { - CustomWorldDraftCardInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: CustomWorldDraftCardInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = CustomWorldDraftCardDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldDraftCardDeleteCallbackId { - CustomWorldDraftCardDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: CustomWorldDraftCardDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for CustomWorldDraftCardTableHandle<'ctx> { - type InsertCallbackId = CustomWorldDraftCardInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldDraftCardInsertCallbackId { - CustomWorldDraftCardInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: CustomWorldDraftCardInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for CustomWorldDraftCardTableHandle<'ctx> { - type DeleteCallbackId = CustomWorldDraftCardDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldDraftCardDeleteCallbackId { - CustomWorldDraftCardDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: CustomWorldDraftCardDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct CustomWorldDraftCardUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldDraftCardTableHandle<'ctx> { - type UpdateCallbackId = CustomWorldDraftCardUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> CustomWorldDraftCardUpdateCallbackId { - CustomWorldDraftCardUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: CustomWorldDraftCardUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for CustomWorldDraftCardTableHandle<'ctx> { - type UpdateCallbackId = CustomWorldDraftCardUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> CustomWorldDraftCardUpdateCallbackId { - CustomWorldDraftCardUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: CustomWorldDraftCardUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `card_id` unique index on the table `custom_world_draft_card`, -/// which allows point queries on the field of the same name -/// via the [`CustomWorldDraftCardCardIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.custom_world_draft_card().card_id().find(...)`. -pub struct CustomWorldDraftCardCardIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> CustomWorldDraftCardTableHandle<'ctx> { - /// Get a handle on the `card_id` unique index on the table `custom_world_draft_card`. - pub fn card_id(&self) -> CustomWorldDraftCardCardIdUnique<'ctx> { - CustomWorldDraftCardCardIdUnique { - imp: self.imp.get_unique_constraint::("card_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> CustomWorldDraftCardCardIdUnique<'ctx> { - /// Find the subscribed row whose `card_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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("custom_world_draft_card"); - _table.add_unique_constraint::("card_id", |row| &row.card_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `CustomWorldDraftCard`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait custom_world_draft_cardQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `CustomWorldDraftCard`. - fn custom_world_draft_card(&self) -> __sdk::__query_builder::Table; -} - -impl custom_world_draft_cardQueryTableAccess for __sdk::QueryTableAccessor { - fn custom_world_draft_card(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("custom_world_draft_card") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_type.rs deleted file mode 100644 index 600c1f310..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_type.rs +++ /dev/null @@ -1,100 +0,0 @@ -// 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::custom_world_role_asset_status_type::CustomWorldRoleAssetStatus; -use super::rpg_agent_draft_card_kind_type::RpgAgentDraftCardKind; -use super::rpg_agent_draft_card_status_type::RpgAgentDraftCardStatus; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct CustomWorldDraftCard { - pub card_id: String, - pub session_id: String, - pub kind: RpgAgentDraftCardKind, - pub status: RpgAgentDraftCardStatus, - pub title: String, - pub subtitle: String, - pub summary: String, - pub linked_ids_json: String, - pub warning_count: u32, - pub asset_status: Option, - pub asset_status_label: Option, - pub detail_payload_json: Option, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for CustomWorldDraftCard { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `CustomWorldDraftCard`. -/// -/// Provides typed access to columns for query building. -pub struct CustomWorldDraftCardCols { - pub card_id: __sdk::__query_builder::Col, - pub session_id: __sdk::__query_builder::Col, - pub kind: __sdk::__query_builder::Col, - pub status: __sdk::__query_builder::Col, - pub title: __sdk::__query_builder::Col, - pub subtitle: __sdk::__query_builder::Col, - pub summary: __sdk::__query_builder::Col, - pub linked_ids_json: __sdk::__query_builder::Col, - pub warning_count: __sdk::__query_builder::Col, - pub asset_status: - __sdk::__query_builder::Col>, - pub asset_status_label: __sdk::__query_builder::Col>, - pub detail_payload_json: __sdk::__query_builder::Col>, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for CustomWorldDraftCard { - type Cols = CustomWorldDraftCardCols; - fn cols(table_name: &'static str) -> Self::Cols { - CustomWorldDraftCardCols { - card_id: __sdk::__query_builder::Col::new(table_name, "card_id"), - session_id: __sdk::__query_builder::Col::new(table_name, "session_id"), - kind: __sdk::__query_builder::Col::new(table_name, "kind"), - status: __sdk::__query_builder::Col::new(table_name, "status"), - title: __sdk::__query_builder::Col::new(table_name, "title"), - subtitle: __sdk::__query_builder::Col::new(table_name, "subtitle"), - summary: __sdk::__query_builder::Col::new(table_name, "summary"), - linked_ids_json: __sdk::__query_builder::Col::new(table_name, "linked_ids_json"), - warning_count: __sdk::__query_builder::Col::new(table_name, "warning_count"), - asset_status: __sdk::__query_builder::Col::new(table_name, "asset_status"), - asset_status_label: __sdk::__query_builder::Col::new(table_name, "asset_status_label"), - detail_payload_json: __sdk::__query_builder::Col::new( - table_name, - "detail_payload_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 `CustomWorldDraftCard`. -/// -/// Provides typed access to indexed columns for query building. -pub struct CustomWorldDraftCardIxCols { - pub card_id: __sdk::__query_builder::IxCol, - pub kind: __sdk::__query_builder::IxCol, - pub session_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for CustomWorldDraftCard { - type IxCols = CustomWorldDraftCardIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - CustomWorldDraftCardIxCols { - card_id: __sdk::__query_builder::IxCol::new(table_name, "card_id"), - kind: __sdk::__query_builder::IxCol::new(table_name, "kind"), - session_id: __sdk::__query_builder::IxCol::new(table_name, "session_id"), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for CustomWorldDraftCard {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_entry_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_entry_table.rs deleted file mode 100644 index 293f489fe..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_entry_table.rs +++ /dev/null @@ -1,232 +0,0 @@ -// 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::custom_world_gallery_entry_type::CustomWorldGalleryEntry; -use super::custom_world_theme_mode_type::CustomWorldThemeMode; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `custom_world_gallery_entry`. -/// -/// Obtain a handle from the [`CustomWorldGalleryEntryTableAccess::custom_world_gallery_entry`] method on [`super::RemoteTables`], -/// like `ctx.db.custom_world_gallery_entry()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.custom_world_gallery_entry().on_insert(...)`. -pub struct CustomWorldGalleryEntryTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `custom_world_gallery_entry`. -pub struct CustomWorldGalleryEntryTableAccessor; - -impl __sdk::TableAccessor for CustomWorldGalleryEntryTableAccessor { - type Row = CustomWorldGalleryEntry; - type Handle<'db> = CustomWorldGalleryEntryTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.custom_world_gallery_entry() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `custom_world_gallery_entry`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait CustomWorldGalleryEntryTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`CustomWorldGalleryEntryTableHandle`], which mediates access to the table `custom_world_gallery_entry`. - fn custom_world_gallery_entry(&self) -> CustomWorldGalleryEntryTableHandle<'_>; -} - -impl CustomWorldGalleryEntryTableAccess for super::RemoteTables { - fn custom_world_gallery_entry(&self) -> CustomWorldGalleryEntryTableHandle<'_> { - CustomWorldGalleryEntryTableHandle { - imp: self - .imp - .get_table::("custom_world_gallery_entry"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct CustomWorldGalleryEntryInsertCallbackId(__sdk::CallbackId); -pub struct CustomWorldGalleryEntryDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for CustomWorldGalleryEntryTableHandle<'ctx> { - type Row = CustomWorldGalleryEntry; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for CustomWorldGalleryEntryTableHandle<'ctx> { - type Row = CustomWorldGalleryEntry; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = CustomWorldGalleryEntryInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldGalleryEntryInsertCallbackId { - CustomWorldGalleryEntryInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: CustomWorldGalleryEntryInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = CustomWorldGalleryEntryDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldGalleryEntryDeleteCallbackId { - CustomWorldGalleryEntryDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: CustomWorldGalleryEntryDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for CustomWorldGalleryEntryTableHandle<'ctx> { - type InsertCallbackId = CustomWorldGalleryEntryInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldGalleryEntryInsertCallbackId { - CustomWorldGalleryEntryInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: CustomWorldGalleryEntryInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for CustomWorldGalleryEntryTableHandle<'ctx> { - type DeleteCallbackId = CustomWorldGalleryEntryDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldGalleryEntryDeleteCallbackId { - CustomWorldGalleryEntryDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: CustomWorldGalleryEntryDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct CustomWorldGalleryEntryUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldGalleryEntryTableHandle<'ctx> { - type UpdateCallbackId = CustomWorldGalleryEntryUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> CustomWorldGalleryEntryUpdateCallbackId { - CustomWorldGalleryEntryUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: CustomWorldGalleryEntryUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for CustomWorldGalleryEntryTableHandle<'ctx> { - type UpdateCallbackId = CustomWorldGalleryEntryUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> CustomWorldGalleryEntryUpdateCallbackId { - CustomWorldGalleryEntryUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: CustomWorldGalleryEntryUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `profile_id` unique index on the table `custom_world_gallery_entry`, -/// which allows point queries on the field of the same name -/// via the [`CustomWorldGalleryEntryProfileIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.custom_world_gallery_entry().profile_id().find(...)`. -pub struct CustomWorldGalleryEntryProfileIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> CustomWorldGalleryEntryTableHandle<'ctx> { - /// Get a handle on the `profile_id` unique index on the table `custom_world_gallery_entry`. - pub fn profile_id(&self) -> CustomWorldGalleryEntryProfileIdUnique<'ctx> { - CustomWorldGalleryEntryProfileIdUnique { - imp: self.imp.get_unique_constraint::("profile_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> CustomWorldGalleryEntryProfileIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("custom_world_gallery_entry"); - _table.add_unique_constraint::("profile_id", |row| &row.profile_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `CustomWorldGalleryEntry`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait custom_world_gallery_entryQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `CustomWorldGalleryEntry`. - fn custom_world_gallery_entry(&self) -> __sdk::__query_builder::Table; -} - -impl custom_world_gallery_entryQueryTableAccess for __sdk::QueryTableAccessor { - fn custom_world_gallery_entry(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("custom_world_gallery_entry") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_entry_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_entry_type.rs deleted file mode 100644 index 4e8a9b2aa..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_entry_type.rs +++ /dev/null @@ -1,114 +0,0 @@ -// 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::custom_world_theme_mode_type::CustomWorldThemeMode; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct CustomWorldGalleryEntry { - pub profile_id: String, - pub owner_user_id: String, - pub public_work_code: String, - pub author_public_user_code: String, - pub author_display_name: String, - pub world_name: String, - pub subtitle: String, - pub summary_text: String, - pub cover_image_src: Option, - pub theme_mode: CustomWorldThemeMode, - pub playable_npc_count: u32, - pub landmark_count: u32, - pub play_count: u32, - pub remix_count: u32, - pub like_count: u32, - pub published_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, - pub visible: bool, -} - -impl __sdk::InModule for CustomWorldGalleryEntry { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `CustomWorldGalleryEntry`. -/// -/// Provides typed access to columns for query building. -pub struct CustomWorldGalleryEntryCols { - pub profile_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub public_work_code: __sdk::__query_builder::Col, - pub author_public_user_code: __sdk::__query_builder::Col, - pub author_display_name: __sdk::__query_builder::Col, - pub world_name: __sdk::__query_builder::Col, - pub subtitle: __sdk::__query_builder::Col, - pub summary_text: __sdk::__query_builder::Col, - pub cover_image_src: __sdk::__query_builder::Col>, - pub theme_mode: __sdk::__query_builder::Col, - pub playable_npc_count: __sdk::__query_builder::Col, - pub landmark_count: __sdk::__query_builder::Col, - pub play_count: __sdk::__query_builder::Col, - pub remix_count: __sdk::__query_builder::Col, - pub like_count: __sdk::__query_builder::Col, - pub published_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, - pub visible: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for CustomWorldGalleryEntry { - type Cols = CustomWorldGalleryEntryCols; - fn cols(table_name: &'static str) -> Self::Cols { - CustomWorldGalleryEntryCols { - profile_id: __sdk::__query_builder::Col::new(table_name, "profile_id"), - owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"), - public_work_code: __sdk::__query_builder::Col::new(table_name, "public_work_code"), - author_public_user_code: __sdk::__query_builder::Col::new( - table_name, - "author_public_user_code", - ), - author_display_name: __sdk::__query_builder::Col::new( - table_name, - "author_display_name", - ), - world_name: __sdk::__query_builder::Col::new(table_name, "world_name"), - subtitle: __sdk::__query_builder::Col::new(table_name, "subtitle"), - summary_text: __sdk::__query_builder::Col::new(table_name, "summary_text"), - cover_image_src: __sdk::__query_builder::Col::new(table_name, "cover_image_src"), - theme_mode: __sdk::__query_builder::Col::new(table_name, "theme_mode"), - playable_npc_count: __sdk::__query_builder::Col::new(table_name, "playable_npc_count"), - landmark_count: __sdk::__query_builder::Col::new(table_name, "landmark_count"), - play_count: __sdk::__query_builder::Col::new(table_name, "play_count"), - remix_count: __sdk::__query_builder::Col::new(table_name, "remix_count"), - like_count: __sdk::__query_builder::Col::new(table_name, "like_count"), - published_at: __sdk::__query_builder::Col::new(table_name, "published_at"), - updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), - visible: __sdk::__query_builder::Col::new(table_name, "visible"), - } - } -} - -/// Indexed column accessor struct for the table `CustomWorldGalleryEntry`. -/// -/// Provides typed access to indexed columns for query building. -pub struct CustomWorldGalleryEntryIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub profile_id: __sdk::__query_builder::IxCol, - pub public_work_code: __sdk::__query_builder::IxCol, - pub theme_mode: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for CustomWorldGalleryEntry { - type IxCols = CustomWorldGalleryEntryIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - CustomWorldGalleryEntryIxCols { - owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"), - profile_id: __sdk::__query_builder::IxCol::new(table_name, "profile_id"), - public_work_code: __sdk::__query_builder::IxCol::new(table_name, "public_work_code"), - theme_mode: __sdk::__query_builder::IxCol::new(table_name, "theme_mode"), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for CustomWorldGalleryEntry {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_generation_mode_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_generation_mode_type.rs deleted file mode 100644 index 8b424a9a7..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_generation_mode_type.rs +++ /dev/null @@ -1,18 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum CustomWorldGenerationMode { - Fast, - - Full, -} - -impl __sdk::InModule for CustomWorldGenerationMode { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_table.rs deleted file mode 100644 index 963f9cb0a..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_table.rs +++ /dev/null @@ -1,232 +0,0 @@ -// 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::custom_world_profile_type::CustomWorldProfile; -use super::custom_world_publication_status_type::CustomWorldPublicationStatus; -use super::custom_world_theme_mode_type::CustomWorldThemeMode; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `custom_world_profile`. -/// -/// Obtain a handle from the [`CustomWorldProfileTableAccess::custom_world_profile`] method on [`super::RemoteTables`], -/// like `ctx.db.custom_world_profile()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.custom_world_profile().on_insert(...)`. -pub struct CustomWorldProfileTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `custom_world_profile`. -pub struct CustomWorldProfileTableAccessor; - -impl __sdk::TableAccessor for CustomWorldProfileTableAccessor { - type Row = CustomWorldProfile; - type Handle<'db> = CustomWorldProfileTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.custom_world_profile() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `custom_world_profile`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait CustomWorldProfileTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`CustomWorldProfileTableHandle`], which mediates access to the table `custom_world_profile`. - fn custom_world_profile(&self) -> CustomWorldProfileTableHandle<'_>; -} - -impl CustomWorldProfileTableAccess for super::RemoteTables { - fn custom_world_profile(&self) -> CustomWorldProfileTableHandle<'_> { - CustomWorldProfileTableHandle { - imp: self - .imp - .get_table::("custom_world_profile"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct CustomWorldProfileInsertCallbackId(__sdk::CallbackId); -pub struct CustomWorldProfileDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for CustomWorldProfileTableHandle<'ctx> { - type Row = CustomWorldProfile; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for CustomWorldProfileTableHandle<'ctx> { - type Row = CustomWorldProfile; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = CustomWorldProfileInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldProfileInsertCallbackId { - CustomWorldProfileInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: CustomWorldProfileInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = CustomWorldProfileDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldProfileDeleteCallbackId { - CustomWorldProfileDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: CustomWorldProfileDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for CustomWorldProfileTableHandle<'ctx> { - type InsertCallbackId = CustomWorldProfileInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldProfileInsertCallbackId { - CustomWorldProfileInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: CustomWorldProfileInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for CustomWorldProfileTableHandle<'ctx> { - type DeleteCallbackId = CustomWorldProfileDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldProfileDeleteCallbackId { - CustomWorldProfileDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: CustomWorldProfileDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct CustomWorldProfileUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldProfileTableHandle<'ctx> { - type UpdateCallbackId = CustomWorldProfileUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> CustomWorldProfileUpdateCallbackId { - CustomWorldProfileUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: CustomWorldProfileUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for CustomWorldProfileTableHandle<'ctx> { - type UpdateCallbackId = CustomWorldProfileUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> CustomWorldProfileUpdateCallbackId { - CustomWorldProfileUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: CustomWorldProfileUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `profile_id` unique index on the table `custom_world_profile`, -/// which allows point queries on the field of the same name -/// via the [`CustomWorldProfileProfileIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.custom_world_profile().profile_id().find(...)`. -pub struct CustomWorldProfileProfileIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> CustomWorldProfileTableHandle<'ctx> { - /// Get a handle on the `profile_id` unique index on the table `custom_world_profile`. - pub fn profile_id(&self) -> CustomWorldProfileProfileIdUnique<'ctx> { - CustomWorldProfileProfileIdUnique { - imp: self.imp.get_unique_constraint::("profile_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> CustomWorldProfileProfileIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("custom_world_profile"); - _table.add_unique_constraint::("profile_id", |row| &row.profile_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `CustomWorldProfile`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait custom_world_profileQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `CustomWorldProfile`. - fn custom_world_profile(&self) -> __sdk::__query_builder::Table; -} - -impl custom_world_profileQueryTableAccess for __sdk::QueryTableAccessor { - fn custom_world_profile(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("custom_world_profile") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_type.rs deleted file mode 100644 index bbed3f0da..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_type.rs +++ /dev/null @@ -1,139 +0,0 @@ -// 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::custom_world_publication_status_type::CustomWorldPublicationStatus; -use super::custom_world_theme_mode_type::CustomWorldThemeMode; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct CustomWorldProfile { - pub profile_id: String, - pub owner_user_id: String, - pub public_work_code: Option, - pub author_public_user_code: Option, - pub source_agent_session_id: Option, - pub publication_status: CustomWorldPublicationStatus, - pub world_name: String, - pub subtitle: String, - pub summary_text: String, - pub theme_mode: CustomWorldThemeMode, - pub cover_image_src: Option, - pub profile_payload_json: String, - pub playable_npc_count: u32, - pub landmark_count: u32, - pub play_count: u32, - pub remix_count: u32, - pub like_count: u32, - pub author_display_name: String, - pub published_at: Option<__sdk::Timestamp>, - pub deleted_at: Option<__sdk::Timestamp>, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, - pub visible: bool, -} - -impl __sdk::InModule for CustomWorldProfile { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `CustomWorldProfile`. -/// -/// Provides typed access to columns for query building. -pub struct CustomWorldProfileCols { - pub profile_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub public_work_code: __sdk::__query_builder::Col>, - pub author_public_user_code: __sdk::__query_builder::Col>, - pub source_agent_session_id: __sdk::__query_builder::Col>, - pub publication_status: - __sdk::__query_builder::Col, - pub world_name: __sdk::__query_builder::Col, - pub subtitle: __sdk::__query_builder::Col, - pub summary_text: __sdk::__query_builder::Col, - pub theme_mode: __sdk::__query_builder::Col, - pub cover_image_src: __sdk::__query_builder::Col>, - pub profile_payload_json: __sdk::__query_builder::Col, - pub playable_npc_count: __sdk::__query_builder::Col, - pub landmark_count: __sdk::__query_builder::Col, - pub play_count: __sdk::__query_builder::Col, - pub remix_count: __sdk::__query_builder::Col, - pub like_count: __sdk::__query_builder::Col, - pub author_display_name: __sdk::__query_builder::Col, - pub published_at: __sdk::__query_builder::Col>, - pub deleted_at: __sdk::__query_builder::Col>, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, - pub visible: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for CustomWorldProfile { - type Cols = CustomWorldProfileCols; - fn cols(table_name: &'static str) -> Self::Cols { - CustomWorldProfileCols { - profile_id: __sdk::__query_builder::Col::new(table_name, "profile_id"), - owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"), - public_work_code: __sdk::__query_builder::Col::new(table_name, "public_work_code"), - author_public_user_code: __sdk::__query_builder::Col::new( - table_name, - "author_public_user_code", - ), - source_agent_session_id: __sdk::__query_builder::Col::new( - table_name, - "source_agent_session_id", - ), - publication_status: __sdk::__query_builder::Col::new(table_name, "publication_status"), - world_name: __sdk::__query_builder::Col::new(table_name, "world_name"), - subtitle: __sdk::__query_builder::Col::new(table_name, "subtitle"), - summary_text: __sdk::__query_builder::Col::new(table_name, "summary_text"), - theme_mode: __sdk::__query_builder::Col::new(table_name, "theme_mode"), - cover_image_src: __sdk::__query_builder::Col::new(table_name, "cover_image_src"), - profile_payload_json: __sdk::__query_builder::Col::new( - table_name, - "profile_payload_json", - ), - playable_npc_count: __sdk::__query_builder::Col::new(table_name, "playable_npc_count"), - landmark_count: __sdk::__query_builder::Col::new(table_name, "landmark_count"), - play_count: __sdk::__query_builder::Col::new(table_name, "play_count"), - remix_count: __sdk::__query_builder::Col::new(table_name, "remix_count"), - like_count: __sdk::__query_builder::Col::new(table_name, "like_count"), - author_display_name: __sdk::__query_builder::Col::new( - table_name, - "author_display_name", - ), - published_at: __sdk::__query_builder::Col::new(table_name, "published_at"), - deleted_at: __sdk::__query_builder::Col::new(table_name, "deleted_at"), - created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), - updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), - visible: __sdk::__query_builder::Col::new(table_name, "visible"), - } - } -} - -/// Indexed column accessor struct for the table `CustomWorldProfile`. -/// -/// Provides typed access to indexed columns for query building. -pub struct CustomWorldProfileIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub profile_id: __sdk::__query_builder::IxCol, - pub publication_status: - __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for CustomWorldProfile { - type IxCols = CustomWorldProfileIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - CustomWorldProfileIxCols { - 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 CustomWorldProfile {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_publication_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_publication_status_type.rs deleted file mode 100644 index f21186ff6..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_publication_status_type.rs +++ /dev/null @@ -1,18 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum CustomWorldPublicationStatus { - Draft, - - Published, -} - -impl __sdk::InModule for CustomWorldPublicationStatus { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_role_asset_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_role_asset_status_type.rs deleted file mode 100644 index 1ab238e93..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_role_asset_status_type.rs +++ /dev/null @@ -1,22 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum CustomWorldRoleAssetStatus { - Missing, - - VisualReady, - - AnimationsReady, - - Complete, -} - -impl __sdk::InModule for CustomWorldRoleAssetStatus { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_session_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_session_status_type.rs deleted file mode 100644 index 9b640e4ff..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_session_status_type.rs +++ /dev/null @@ -1,24 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum CustomWorldSessionStatus { - Clarifying, - - ReadyToGenerate, - - Generating, - - Completed, - - GenerationError, -} - -impl __sdk::InModule for CustomWorldSessionStatus { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_session_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_session_table.rs deleted file mode 100644 index 52d89b600..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_session_table.rs +++ /dev/null @@ -1,232 +0,0 @@ -// 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::custom_world_generation_mode_type::CustomWorldGenerationMode; -use super::custom_world_session_status_type::CustomWorldSessionStatus; -use super::custom_world_session_type::CustomWorldSession; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `custom_world_session`. -/// -/// Obtain a handle from the [`CustomWorldSessionTableAccess::custom_world_session`] method on [`super::RemoteTables`], -/// like `ctx.db.custom_world_session()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.custom_world_session().on_insert(...)`. -pub struct CustomWorldSessionTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `custom_world_session`. -pub struct CustomWorldSessionTableAccessor; - -impl __sdk::TableAccessor for CustomWorldSessionTableAccessor { - type Row = CustomWorldSession; - type Handle<'db> = CustomWorldSessionTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.custom_world_session() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `custom_world_session`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait CustomWorldSessionTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`CustomWorldSessionTableHandle`], which mediates access to the table `custom_world_session`. - fn custom_world_session(&self) -> CustomWorldSessionTableHandle<'_>; -} - -impl CustomWorldSessionTableAccess for super::RemoteTables { - fn custom_world_session(&self) -> CustomWorldSessionTableHandle<'_> { - CustomWorldSessionTableHandle { - imp: self - .imp - .get_table::("custom_world_session"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct CustomWorldSessionInsertCallbackId(__sdk::CallbackId); -pub struct CustomWorldSessionDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for CustomWorldSessionTableHandle<'ctx> { - type Row = CustomWorldSession; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for CustomWorldSessionTableHandle<'ctx> { - type Row = CustomWorldSession; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = CustomWorldSessionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldSessionInsertCallbackId { - CustomWorldSessionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: CustomWorldSessionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = CustomWorldSessionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldSessionDeleteCallbackId { - CustomWorldSessionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: CustomWorldSessionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for CustomWorldSessionTableHandle<'ctx> { - type InsertCallbackId = CustomWorldSessionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldSessionInsertCallbackId { - CustomWorldSessionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: CustomWorldSessionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for CustomWorldSessionTableHandle<'ctx> { - type DeleteCallbackId = CustomWorldSessionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> CustomWorldSessionDeleteCallbackId { - CustomWorldSessionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: CustomWorldSessionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct CustomWorldSessionUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldSessionTableHandle<'ctx> { - type UpdateCallbackId = CustomWorldSessionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> CustomWorldSessionUpdateCallbackId { - CustomWorldSessionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: CustomWorldSessionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for CustomWorldSessionTableHandle<'ctx> { - type UpdateCallbackId = CustomWorldSessionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> CustomWorldSessionUpdateCallbackId { - CustomWorldSessionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: CustomWorldSessionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `session_id` unique index on the table `custom_world_session`, -/// which allows point queries on the field of the same name -/// via the [`CustomWorldSessionSessionIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.custom_world_session().session_id().find(...)`. -pub struct CustomWorldSessionSessionIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> CustomWorldSessionTableHandle<'ctx> { - /// Get a handle on the `session_id` unique index on the table `custom_world_session`. - pub fn session_id(&self) -> CustomWorldSessionSessionIdUnique<'ctx> { - CustomWorldSessionSessionIdUnique { - imp: self.imp.get_unique_constraint::("session_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> CustomWorldSessionSessionIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("custom_world_session"); - _table.add_unique_constraint::("session_id", |row| &row.session_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `CustomWorldSession`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait custom_world_sessionQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `CustomWorldSession`. - fn custom_world_session(&self) -> __sdk::__query_builder::Table; -} - -impl custom_world_sessionQueryTableAccess for __sdk::QueryTableAccessor { - fn custom_world_session(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("custom_world_session") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_session_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_session_type.rs deleted file mode 100644 index 58e9f40cc..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_session_type.rs +++ /dev/null @@ -1,93 +0,0 @@ -// 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::custom_world_generation_mode_type::CustomWorldGenerationMode; -use super::custom_world_session_status_type::CustomWorldSessionStatus; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct CustomWorldSession { - pub session_id: String, - pub owner_user_id: String, - pub generation_mode: CustomWorldGenerationMode, - pub status: CustomWorldSessionStatus, - pub setting_text: String, - pub creator_intent_json: Option, - pub question_snapshot_json: String, - pub result_payload_json: Option, - pub last_error_message: Option, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for CustomWorldSession { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `CustomWorldSession`. -/// -/// Provides typed access to columns for query building. -pub struct CustomWorldSessionCols { - pub session_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub generation_mode: __sdk::__query_builder::Col, - pub status: __sdk::__query_builder::Col, - pub setting_text: __sdk::__query_builder::Col, - pub creator_intent_json: __sdk::__query_builder::Col>, - pub question_snapshot_json: __sdk::__query_builder::Col, - pub result_payload_json: __sdk::__query_builder::Col>, - pub last_error_message: __sdk::__query_builder::Col>, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for CustomWorldSession { - type Cols = CustomWorldSessionCols; - fn cols(table_name: &'static str) -> Self::Cols { - CustomWorldSessionCols { - session_id: __sdk::__query_builder::Col::new(table_name, "session_id"), - owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"), - generation_mode: __sdk::__query_builder::Col::new(table_name, "generation_mode"), - status: __sdk::__query_builder::Col::new(table_name, "status"), - setting_text: __sdk::__query_builder::Col::new(table_name, "setting_text"), - creator_intent_json: __sdk::__query_builder::Col::new( - table_name, - "creator_intent_json", - ), - question_snapshot_json: __sdk::__query_builder::Col::new( - table_name, - "question_snapshot_json", - ), - result_payload_json: __sdk::__query_builder::Col::new( - table_name, - "result_payload_json", - ), - last_error_message: __sdk::__query_builder::Col::new(table_name, "last_error_message"), - 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 `CustomWorldSession`. -/// -/// Provides typed access to indexed columns for query building. -pub struct CustomWorldSessionIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub session_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for CustomWorldSession { - type IxCols = CustomWorldSessionIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - CustomWorldSessionIxCols { - 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 CustomWorldSession {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_theme_mode_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_theme_mode_type.rs deleted file mode 100644 index 2084ea043..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_theme_mode_type.rs +++ /dev/null @@ -1,26 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum CustomWorldThemeMode { - Martial, - - Arcane, - - Machina, - - Tide, - - Rift, - - Mythic, -} - -impl __sdk::InModule for CustomWorldThemeMode { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/database_migration_clear_retired_tables_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/database_migration_clear_retired_tables_input_type.rs deleted file mode 100644 index 0e8efa42f..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/database_migration_clear_retired_tables_input_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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 DatabaseMigrationClearRetiredTablesInput { - pub dry_run: bool, -} - -impl __sdk::InModule for DatabaseMigrationClearRetiredTablesInput { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/database_migration_clear_retired_tables_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/database_migration_clear_retired_tables_result_type.rs deleted file mode 100644 index 2507b80d2..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/database_migration_clear_retired_tables_result_type.rs +++ /dev/null @@ -1,20 +0,0 @@ -// 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::database_migration_clear_table_stat_type::DatabaseMigrationClearTableStat; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct DatabaseMigrationClearRetiredTablesResult { - pub ok: bool, - pub dry_run: bool, - pub table_stats: Vec, - pub error_message: Option, -} - -impl __sdk::InModule for DatabaseMigrationClearRetiredTablesResult { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/database_migration_clear_table_stat_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/database_migration_clear_table_stat_type.rs deleted file mode 100644 index 2b83ab354..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/database_migration_clear_table_stat_type.rs +++ /dev/null @@ -1,17 +0,0 @@ -// 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 DatabaseMigrationClearTableStat { - pub table_name: String, - pub row_count_before: u64, - pub cleared_row_count: u64, -} - -impl __sdk::InModule for DatabaseMigrationClearTableStat { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/delete_editor_agent_conversation_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/delete_editor_agent_conversation_and_return_procedure.rs index e7bf76bfd..95157cf96 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/delete_editor_agent_conversation_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/delete_editor_agent_conversation_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait delete_editor_agent_conversation_and_return { input: EditorAgentConversationDeleteInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl delete_editor_agent_conversation_and_return for super::RemoteProcedures { input: EditorAgentConversationDeleteInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorAgentConversationProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/delete_editor_asset_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/delete_editor_asset_and_return_procedure.rs index a7c50753a..4c71ecd53 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/delete_editor_asset_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/delete_editor_asset_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait delete_editor_asset_and_return { input: EditorAssetDeleteInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl delete_editor_asset_and_return for super::RemoteProcedures { input: EditorAssetDeleteInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorAssetProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/delete_editor_asset_folder_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/delete_editor_asset_folder_and_return_procedure.rs index 15aae6008..6500a7c79 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/delete_editor_asset_folder_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/delete_editor_asset_folder_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait delete_editor_asset_folder_and_return { input: EditorAssetFolderDeleteInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl delete_editor_asset_folder_and_return for super::RemoteProcedures { input: EditorAssetFolderDeleteInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorAssetFolderProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/delete_editor_project_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/delete_editor_project_and_return_procedure.rs index 4586a8691..529aec929 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/delete_editor_project_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/delete_editor_project_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait delete_editor_project_and_return { input: EditorProjectDeleteInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl delete_editor_project_and_return for super::RemoteProcedures { input: EditorProjectDeleteInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorProjectDeleteProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/enqueue_external_generation_job_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/enqueue_external_generation_job_and_return_procedure.rs index e38fdf29d..cd14e1432 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/enqueue_external_generation_job_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/enqueue_external_generation_job_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait enqueue_external_generation_job_and_return { input: ExternalGenerationJobEnqueueInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl enqueue_external_generation_job_and_return for super::RemoteProcedures { input: ExternalGenerationJobEnqueueInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, ExternalGenerationJobProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/enqueue_profile_wallet_refund_outbox_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/enqueue_profile_wallet_refund_outbox_and_return_procedure.rs index 2ef1a2997..4f5f28c68 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/enqueue_profile_wallet_refund_outbox_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/enqueue_profile_wallet_refund_outbox_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait enqueue_profile_wallet_refund_outbox_and_return { input: RuntimeProfileWalletRefundOutboxEnqueueInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl enqueue_profile_wallet_refund_outbox_and_return for super::RemoteProcedures input: RuntimeProfileWalletRefundOutboxEnqueueInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileWalletRefundOutboxProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ensure_analytics_date_dimension_for_date_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/ensure_analytics_date_dimension_for_date_reducer.rs index a6ea3098f..30b9ba357 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ensure_analytics_date_dimension_for_date_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ensure_analytics_date_dimension_for_date_reducer.rs @@ -50,11 +50,9 @@ pub trait ensure_analytics_date_dimension_for_date { &self, input: AnalyticsDateDimensionEnsureInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -63,11 +61,9 @@ impl ensure_analytics_date_dimension_for_date for super::RemoteReducers { &self, input: AnalyticsDateDimensionEnsureInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { self.imp.invoke_reducer_with_callback( EnsureAnalyticsDateDimensionForDateArgs { input }, diff --git a/server-rs/crates/spacetime-client/src/module_bindings/expire_profile_recharge_order_timer_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/expire_profile_recharge_order_timer_reducer.rs index 4ee98c011..b9e5a5db5 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/expire_profile_recharge_order_timer_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/expire_profile_recharge_order_timer_reducer.rs @@ -50,11 +50,9 @@ pub trait expire_profile_recharge_order_timer { &self, timer: ProfileRechargeOrderExpirationTimer, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -63,11 +61,9 @@ impl expire_profile_recharge_order_timer for super::RemoteReducers { &self, timer: ProfileRechargeOrderExpirationTimer, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { self.imp .invoke_reducer_with_callback(ExpireProfileRechargeOrderTimerArgs { timer }, callback) diff --git a/server-rs/crates/spacetime-client/src/module_bindings/export_auth_store_projection_from_tables_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/export_auth_store_projection_from_tables_procedure.rs index 9334aa833..ece547ce8 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/export_auth_store_projection_from_tables_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/export_auth_store_projection_from_tables_procedure.rs @@ -27,10 +27,10 @@ pub trait export_auth_store_projection_from_tables { &self, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -39,10 +39,10 @@ impl export_auth_store_projection_from_tables for super::RemoteProcedures { &self, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, AuthStoreProjectionProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/export_database_migration_to_file_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/export_database_migration_to_file_procedure.rs index d850737bc..3dfe18f83 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/export_database_migration_to_file_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/export_database_migration_to_file_procedure.rs @@ -31,10 +31,10 @@ pub trait export_database_migration_to_file { input: DatabaseMigrationExportInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl export_database_migration_to_file for super::RemoteProcedures { input: DatabaseMigrationExportInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, DatabaseMigrationProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/fail_ai_task_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/fail_ai_task_and_return_procedure.rs index 3194799b9..46090a010 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/fail_ai_task_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/fail_ai_task_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait fail_ai_task_and_return { input: AiTaskFailureInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl fail_ai_task_and_return for super::RemoteProcedures { input: AiTaskFailureInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, AiTaskProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/fail_external_generation_job_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/fail_external_generation_job_and_return_procedure.rs index 92be5608f..46c1f8846 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/fail_external_generation_job_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/fail_external_generation_job_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait fail_external_generation_job_and_return { input: ExternalGenerationJobFailInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl fail_external_generation_job_and_return for super::RemoteProcedures { input: ExternalGenerationJobFailInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, ExternalGenerationJobProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/find_editor_asset_group_source_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/find_editor_asset_group_source_and_return_procedure.rs index 1c8b4c32a..7b8d7dbd0 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/find_editor_asset_group_source_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/find_editor_asset_group_source_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait find_editor_asset_group_source_and_return { input: EditorAssetGroupSourceLookupInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl find_editor_asset_group_source_and_return for super::RemoteProcedures { input: EditorAssetGroupSourceLookupInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorAssetProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_admin_account_by_id_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_admin_account_by_id_and_return_procedure.rs index f6a70ccf2..7dccc1606 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_admin_account_by_id_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_admin_account_by_id_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait get_admin_account_by_id_and_return { input: AdminAccountGetByIdInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl get_admin_account_by_id_and_return for super::RemoteProcedures { input: AdminAccountGetByIdInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, AdminAccountProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_admin_account_by_username_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_admin_account_by_username_and_return_procedure.rs index 240260454..a441962e4 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_admin_account_by_username_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_admin_account_by_username_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait get_admin_account_by_username_and_return { input: AdminAccountGetByUsernameInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl get_admin_account_by_username_and_return for super::RemoteProcedures { input: AdminAccountGetByUsernameInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, AdminAccountCredentialProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_admin_dashboard_stats_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_admin_dashboard_stats_and_return_procedure.rs index 4fc1f2929..ec663a6d4 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_admin_dashboard_stats_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_admin_dashboard_stats_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait get_admin_dashboard_stats_and_return { input: AdminDashboardStatsInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl get_admin_dashboard_stats_and_return for super::RemoteProcedures { input: AdminDashboardStatsInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, AdminDashboardStatsProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_asset_object_by_id_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_asset_object_by_id_and_return_procedure.rs index edb842e1e..b1d165b00 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_asset_object_by_id_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_asset_object_by_id_and_return_procedure.rs @@ -30,10 +30,10 @@ pub trait get_asset_object_by_id_and_return { asset_object_id: String, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -43,10 +43,10 @@ impl get_asset_object_by_id_and_return for super::RemoteProcedures { asset_object_id: String, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, AssetObjectProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_asset_object_by_location_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_asset_object_by_location_and_return_procedure.rs index c7ecc9e73..9254cc5c9 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_asset_object_by_location_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_asset_object_by_location_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait get_asset_object_by_location_and_return { input: AssetObjectLocationInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl get_asset_object_by_location_and_return for super::RemoteProcedures { input: AssetObjectLocationInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, AssetObjectProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_asset_read_access_by_location_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_asset_read_access_by_location_and_return_procedure.rs index c2e89aa8e..bb8314cfa 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_asset_read_access_by_location_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_asset_read_access_by_location_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait get_asset_read_access_by_location_and_return { input: AssetObjectLocationInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl get_asset_read_access_by_location_and_return for super::RemoteProcedures { input: AssetObjectLocationInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, AssetObjectReadAccessProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_editor_agent_conversation_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_editor_agent_conversation_and_return_procedure.rs index e45514af6..79b9f43f1 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_editor_agent_conversation_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_editor_agent_conversation_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait get_editor_agent_conversation_and_return { input: EditorAgentConversationGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl get_editor_agent_conversation_and_return for super::RemoteProcedures { input: EditorAgentConversationGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorAgentConversationProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_editor_asset_library_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_editor_asset_library_and_return_procedure.rs index c1053c14c..dca803bbf 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_editor_asset_library_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_editor_asset_library_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait get_editor_asset_library_and_return { input: EditorAssetLibraryGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl get_editor_asset_library_and_return for super::RemoteProcedures { input: EditorAssetLibraryGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorAssetLibraryProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_editor_generation_pricing_config_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_editor_generation_pricing_config_and_return_procedure.rs index 33520d813..e64edf0c2 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_editor_generation_pricing_config_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_editor_generation_pricing_config_and_return_procedure.rs @@ -27,10 +27,10 @@ pub trait get_editor_generation_pricing_config_and_return { &self, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -39,10 +39,10 @@ impl get_editor_generation_pricing_config_and_return for super::RemoteProcedures &self, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorGenerationPricingConfigProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_editor_project_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_editor_project_and_return_procedure.rs index f01b87343..07d5c4fe1 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_editor_project_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_editor_project_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait get_editor_project_and_return { input: EditorProjectGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl get_editor_project_and_return for super::RemoteProcedures { input: EditorProjectGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorProjectProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_editor_showcase_campaign_config_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_editor_showcase_campaign_config_and_return_procedure.rs index 5d7332290..baeb8c837 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_editor_showcase_campaign_config_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_editor_showcase_campaign_config_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait get_editor_showcase_campaign_config_and_return { input: EditorShowcaseCampaignConfigGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl get_editor_showcase_campaign_config_and_return for super::RemoteProcedures input: EditorShowcaseCampaignConfigGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorShowcaseCampaignConfigProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_external_generation_job_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_external_generation_job_and_return_procedure.rs index 51ce17456..e2bc98a33 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_external_generation_job_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_external_generation_job_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait get_external_generation_job_and_return { input: ExternalGenerationJobGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl get_external_generation_job_and_return for super::RemoteProcedures { input: ExternalGenerationJobGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, ExternalGenerationJobProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_external_generation_job_result_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_external_generation_job_result_and_return_procedure.rs index d0ff920cd..367154dfb 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_external_generation_job_result_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_external_generation_job_result_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait get_external_generation_job_result_and_return { input: ExternalGenerationJobGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl get_external_generation_job_result_and_return for super::RemoteProcedures { input: ExternalGenerationJobGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, ExternalGenerationJobResultProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_external_generation_job_summary_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_external_generation_job_summary_and_return_procedure.rs index 2009e65a2..2b5703e72 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_external_generation_job_summary_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_external_generation_job_summary_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait get_external_generation_job_summary_and_return { input: ExternalGenerationJobGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl get_external_generation_job_summary_and_return for super::RemoteProcedures input: ExternalGenerationJobGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, ExternalGenerationJobSummaryProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_external_generation_queue_stats_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_external_generation_queue_stats_and_return_procedure.rs index 429d22f4b..9d7a98a05 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_external_generation_queue_stats_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_external_generation_queue_stats_and_return_procedure.rs @@ -27,10 +27,10 @@ pub trait get_external_generation_queue_stats_and_return { &self, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -39,10 +39,10 @@ impl get_external_generation_queue_stats_and_return for super::RemoteProcedures &self, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, ExternalGenerationQueueStatsProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_feature_gate_config_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_feature_gate_config_procedure.rs index ab7b59b18..5e2bb5c7a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_feature_gate_config_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_feature_gate_config_procedure.rs @@ -27,10 +27,10 @@ pub trait get_feature_gate_config { &self, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -39,10 +39,10 @@ impl get_feature_gate_config for super::RemoteProcedures { &self, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, FeatureGateConfigProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_llm_router_account_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_llm_router_account_and_return_procedure.rs index 71702eee1..be31e0104 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_llm_router_account_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_llm_router_account_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait get_llm_router_account_and_return { input: LlmRouterAccountGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl get_llm_router_account_and_return for super::RemoteProcedures { input: LlmRouterAccountGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, LlmRouterAccountProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_profile_dashboard_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_profile_dashboard_procedure.rs index 6c48fafb3..38200b75a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_profile_dashboard_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_profile_dashboard_procedure.rs @@ -31,10 +31,10 @@ pub trait get_profile_dashboard { input: RuntimeProfileDashboardGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl get_profile_dashboard for super::RemoteProcedures { input: RuntimeProfileDashboardGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileDashboardProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_profile_recharge_center_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_profile_recharge_center_procedure.rs index 3e42f3d57..bf070c9c8 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_profile_recharge_center_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_profile_recharge_center_procedure.rs @@ -31,10 +31,10 @@ pub trait get_profile_recharge_center { input: RuntimeProfileRechargeCenterGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl get_profile_recharge_center for super::RemoteProcedures { input: RuntimeProfileRechargeCenterGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileRechargeCenterProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_profile_recharge_order_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_profile_recharge_order_and_return_procedure.rs index f187bc6fb..437f0048b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_profile_recharge_order_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_profile_recharge_order_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait get_profile_recharge_order_and_return { input: RuntimeProfileRechargeOrderGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl get_profile_recharge_order_and_return for super::RemoteProcedures { input: RuntimeProfileRechargeOrderGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileRechargeCenterProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_profile_recharge_refund_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_profile_recharge_refund_and_return_procedure.rs index 977396098..d1a584f1b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_profile_recharge_refund_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_profile_recharge_refund_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait get_profile_recharge_refund_and_return { input: RuntimeProfileRechargeRefundGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl get_profile_recharge_refund_and_return for super::RemoteProcedures { input: RuntimeProfileRechargeRefundGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileRechargeRefundProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_profile_recharge_refund_bill_checkpoint_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_profile_recharge_refund_bill_checkpoint_and_return_procedure.rs index 2a9b9dcca..9cb29fc5b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_profile_recharge_refund_bill_checkpoint_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_profile_recharge_refund_bill_checkpoint_and_return_procedure.rs @@ -34,10 +34,13 @@ pub trait get_profile_recharge_refund_bill_checkpoint_and_return { input: RuntimeProfileRechargeRefundBillCheckpointGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result< + RuntimeProfileRechargeRefundBillCheckpointProcedureResult, + __sdk::InternalError, + >, + ) + Send + + 'static, ); } @@ -47,10 +50,13 @@ impl get_profile_recharge_refund_bill_checkpoint_and_return for super::RemotePro input: RuntimeProfileRechargeRefundBillCheckpointGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result< + RuntimeProfileRechargeRefundBillCheckpointProcedureResult, + __sdk::InternalError, + >, + ) + Send + + 'static, ) { self.imp.invoke_procedure_with_callback::<_, RuntimeProfileRechargeRefundBillCheckpointProcedureResult>( "get_profile_recharge_refund_bill_checkpoint_and_return", diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_profile_referral_invite_center_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_profile_referral_invite_center_procedure.rs index c72214843..2b3dcdadc 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_profile_referral_invite_center_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_profile_referral_invite_center_procedure.rs @@ -31,10 +31,10 @@ pub trait get_profile_referral_invite_center { input: RuntimeReferralInviteCenterGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl get_profile_referral_invite_center for super::RemoteProcedures { input: RuntimeReferralInviteCenterGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeReferralInviteCenterProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_profile_task_center_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_profile_task_center_procedure.rs index 0aa83260a..105a4f98c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_profile_task_center_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_profile_task_center_procedure.rs @@ -31,10 +31,10 @@ pub trait get_profile_task_center { input: RuntimeProfileTaskCenterGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl get_profile_task_center for super::RemoteProcedures { input: RuntimeProfileTaskCenterGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileTaskCenterProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_recent_editor_project_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_recent_editor_project_and_return_procedure.rs index ea9b9720c..b16395853 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_recent_editor_project_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_recent_editor_project_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait get_recent_editor_project_and_return { input: EditorProjectGetRecentInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl get_recent_editor_project_and_return for super::RemoteProcedures { input: EditorProjectGetRecentInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorProjectProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_runtime_setting_or_default_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_runtime_setting_or_default_procedure.rs index 4ca8b03ea..261caed19 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_runtime_setting_or_default_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_runtime_setting_or_default_procedure.rs @@ -31,10 +31,10 @@ pub trait get_runtime_setting_or_default { input: RuntimeSettingGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl get_runtime_setting_or_default for super::RemoteProcedures { input: RuntimeSettingGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeSettingProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/grant_new_user_registration_wallet_reward_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/grant_new_user_registration_wallet_reward_procedure.rs index 71e481514..c1d7b6dea 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/grant_new_user_registration_wallet_reward_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/grant_new_user_registration_wallet_reward_procedure.rs @@ -31,10 +31,10 @@ pub trait grant_new_user_registration_wallet_reward { input: RuntimeProfileDashboardGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl grant_new_user_registration_wallet_reward for super::RemoteProcedures { input: RuntimeProfileDashboardGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileWalletAdjustmentProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/import_database_migration_from_chunks_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/import_database_migration_from_chunks_procedure.rs index 080dda548..731574800 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/import_database_migration_from_chunks_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/import_database_migration_from_chunks_procedure.rs @@ -31,10 +31,10 @@ pub trait import_database_migration_from_chunks { input: DatabaseMigrationImportChunksInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl import_database_migration_from_chunks for super::RemoteProcedures { input: DatabaseMigrationImportChunksInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, DatabaseMigrationProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/import_database_migration_from_file_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/import_database_migration_from_file_procedure.rs index 2ce4ee2ad..7b2322ee5 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/import_database_migration_from_file_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/import_database_migration_from_file_procedure.rs @@ -31,10 +31,10 @@ pub trait import_database_migration_from_file { input: DatabaseMigrationImportInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl import_database_migration_from_file for super::RemoteProcedures { input: DatabaseMigrationImportInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, DatabaseMigrationProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/import_database_migration_incremental_from_chunks_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/import_database_migration_incremental_from_chunks_procedure.rs index bbe493578..51ff565c0 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/import_database_migration_incremental_from_chunks_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/import_database_migration_incremental_from_chunks_procedure.rs @@ -34,10 +34,10 @@ pub trait import_database_migration_incremental_from_chunks { input: DatabaseMigrationImportChunksInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl import_database_migration_incremental_from_chunks for super::RemoteProcedur input: DatabaseMigrationImportChunksInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, DatabaseMigrationProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/import_database_migration_incremental_from_file_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/import_database_migration_incremental_from_file_procedure.rs index f911c87f8..2fc318044 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/import_database_migration_incremental_from_file_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/import_database_migration_incremental_from_file_procedure.rs @@ -31,10 +31,10 @@ pub trait import_database_migration_incremental_from_file { input: DatabaseMigrationImportInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl import_database_migration_incremental_from_file for super::RemoteProcedures input: DatabaseMigrationImportInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, DatabaseMigrationProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/initialize_editor_generation_pricing_config_if_missing_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/initialize_editor_generation_pricing_config_if_missing_and_return_procedure.rs index 841e0298c..cc4468e45 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/initialize_editor_generation_pricing_config_if_missing_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/initialize_editor_generation_pricing_config_if_missing_and_return_procedure.rs @@ -37,10 +37,10 @@ pub trait initialize_editor_generation_pricing_config_if_missing_and_return { input: EditorGenerationPricingConfigUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -50,10 +50,10 @@ impl initialize_editor_generation_pricing_config_if_missing_and_return for super input: EditorGenerationPricingConfigUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorGenerationPricingConfigProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/inventory_container_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/inventory_container_kind_type.rs deleted file mode 100644 index 45522ce74..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/inventory_container_kind_type.rs +++ /dev/null @@ -1,18 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum InventoryContainerKind { - Backpack, - - Equipment, -} - -impl __sdk::InModule for InventoryContainerKind { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/inventory_equipment_slot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/inventory_equipment_slot_type.rs deleted file mode 100644 index e2055f6af..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/inventory_equipment_slot_type.rs +++ /dev/null @@ -1,20 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum InventoryEquipmentSlot { - Weapon, - - Armor, - - Relic, -} - -impl __sdk::InModule for InventoryEquipmentSlot { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/inventory_item_rarity_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/inventory_item_rarity_type.rs deleted file mode 100644 index 85b460902..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/inventory_item_rarity_type.rs +++ /dev/null @@ -1,24 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum InventoryItemRarity { - Common, - - Uncommon, - - Rare, - - Epic, - - Legendary, -} - -impl __sdk::InModule for InventoryItemRarity { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/inventory_item_source_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/inventory_item_source_kind_type.rs deleted file mode 100644 index 1d3961bc8..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/inventory_item_source_kind_type.rs +++ /dev/null @@ -1,32 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum InventoryItemSourceKind { - StoryReward, - - QuestReward, - - TreasureReward, - - NpcGift, - - NpcTrade, - - CombatDrop, - - ForgeCraft, - - ForgeReforge, - - ManualPatch, -} - -impl __sdk::InModule for InventoryItemSourceKind { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/inventory_slot_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/inventory_slot_table.rs deleted file mode 100644 index 76786f9e1..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/inventory_slot_table.rs +++ /dev/null @@ -1,232 +0,0 @@ -// 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::inventory_container_kind_type::InventoryContainerKind; -use super::inventory_equipment_slot_type::InventoryEquipmentSlot; -use super::inventory_item_rarity_type::InventoryItemRarity; -use super::inventory_item_source_kind_type::InventoryItemSourceKind; -use super::inventory_slot_type::InventorySlot; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `inventory_slot`. -/// -/// Obtain a handle from the [`InventorySlotTableAccess::inventory_slot`] method on [`super::RemoteTables`], -/// like `ctx.db.inventory_slot()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.inventory_slot().on_insert(...)`. -pub struct InventorySlotTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `inventory_slot`. -pub struct InventorySlotTableAccessor; - -impl __sdk::TableAccessor for InventorySlotTableAccessor { - type Row = InventorySlot; - type Handle<'db> = InventorySlotTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.inventory_slot() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `inventory_slot`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait InventorySlotTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`InventorySlotTableHandle`], which mediates access to the table `inventory_slot`. - fn inventory_slot(&self) -> InventorySlotTableHandle<'_>; -} - -impl InventorySlotTableAccess for super::RemoteTables { - fn inventory_slot(&self) -> InventorySlotTableHandle<'_> { - InventorySlotTableHandle { - imp: self.imp.get_table::("inventory_slot"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct InventorySlotInsertCallbackId(__sdk::CallbackId); -pub struct InventorySlotDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for InventorySlotTableHandle<'ctx> { - type Row = InventorySlot; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for InventorySlotTableHandle<'ctx> { - type Row = InventorySlot; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = InventorySlotInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> InventorySlotInsertCallbackId { - InventorySlotInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: InventorySlotInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = InventorySlotDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> InventorySlotDeleteCallbackId { - InventorySlotDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: InventorySlotDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for InventorySlotTableHandle<'ctx> { - type InsertCallbackId = InventorySlotInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> InventorySlotInsertCallbackId { - InventorySlotInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: InventorySlotInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for InventorySlotTableHandle<'ctx> { - type DeleteCallbackId = InventorySlotDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> InventorySlotDeleteCallbackId { - InventorySlotDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: InventorySlotDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct InventorySlotUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for InventorySlotTableHandle<'ctx> { - type UpdateCallbackId = InventorySlotUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> InventorySlotUpdateCallbackId { - InventorySlotUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: InventorySlotUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for InventorySlotTableHandle<'ctx> { - type UpdateCallbackId = InventorySlotUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> InventorySlotUpdateCallbackId { - InventorySlotUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: InventorySlotUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `slot_id` unique index on the table `inventory_slot`, -/// which allows point queries on the field of the same name -/// via the [`InventorySlotSlotIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.inventory_slot().slot_id().find(...)`. -pub struct InventorySlotSlotIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> InventorySlotTableHandle<'ctx> { - /// Get a handle on the `slot_id` unique index on the table `inventory_slot`. - pub fn slot_id(&self) -> InventorySlotSlotIdUnique<'ctx> { - InventorySlotSlotIdUnique { - imp: self.imp.get_unique_constraint::("slot_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> InventorySlotSlotIdUnique<'ctx> { - /// Find the subscribed row whose `slot_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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("inventory_slot"); - _table.add_unique_constraint::("slot_id", |row| &row.slot_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `InventorySlot`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait inventory_slotQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `InventorySlot`. - fn inventory_slot(&self) -> __sdk::__query_builder::Table; -} - -impl inventory_slotQueryTableAccess for __sdk::QueryTableAccessor { - fn inventory_slot(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("inventory_slot") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/inventory_slot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/inventory_slot_type.rs deleted file mode 100644 index fcfbab6a8..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/inventory_slot_type.rs +++ /dev/null @@ -1,124 +0,0 @@ -// 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::inventory_container_kind_type::InventoryContainerKind; -use super::inventory_equipment_slot_type::InventoryEquipmentSlot; -use super::inventory_item_rarity_type::InventoryItemRarity; -use super::inventory_item_source_kind_type::InventoryItemSourceKind; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct InventorySlot { - pub slot_id: String, - pub runtime_session_id: String, - pub story_session_id: Option, - pub actor_user_id: String, - pub container_kind: InventoryContainerKind, - pub slot_key: String, - pub item_id: String, - pub category: String, - pub name: String, - pub description: Option, - pub quantity: u32, - pub rarity: InventoryItemRarity, - pub tags: Vec, - pub stackable: bool, - pub stack_key: String, - pub equipment_slot_id: Option, - pub source_kind: InventoryItemSourceKind, - pub source_reference_id: Option, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for InventorySlot { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `InventorySlot`. -/// -/// Provides typed access to columns for query building. -pub struct InventorySlotCols { - pub slot_id: __sdk::__query_builder::Col, - pub runtime_session_id: __sdk::__query_builder::Col, - pub story_session_id: __sdk::__query_builder::Col>, - pub actor_user_id: __sdk::__query_builder::Col, - pub container_kind: __sdk::__query_builder::Col, - pub slot_key: __sdk::__query_builder::Col, - pub item_id: __sdk::__query_builder::Col, - pub category: __sdk::__query_builder::Col, - pub name: __sdk::__query_builder::Col, - pub description: __sdk::__query_builder::Col>, - pub quantity: __sdk::__query_builder::Col, - pub rarity: __sdk::__query_builder::Col, - pub tags: __sdk::__query_builder::Col>, - pub stackable: __sdk::__query_builder::Col, - pub stack_key: __sdk::__query_builder::Col, - pub equipment_slot_id: - __sdk::__query_builder::Col>, - pub source_kind: __sdk::__query_builder::Col, - pub source_reference_id: __sdk::__query_builder::Col>, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for InventorySlot { - type Cols = InventorySlotCols; - fn cols(table_name: &'static str) -> Self::Cols { - InventorySlotCols { - slot_id: __sdk::__query_builder::Col::new(table_name, "slot_id"), - runtime_session_id: __sdk::__query_builder::Col::new(table_name, "runtime_session_id"), - story_session_id: __sdk::__query_builder::Col::new(table_name, "story_session_id"), - actor_user_id: __sdk::__query_builder::Col::new(table_name, "actor_user_id"), - container_kind: __sdk::__query_builder::Col::new(table_name, "container_kind"), - slot_key: __sdk::__query_builder::Col::new(table_name, "slot_key"), - item_id: __sdk::__query_builder::Col::new(table_name, "item_id"), - category: __sdk::__query_builder::Col::new(table_name, "category"), - name: __sdk::__query_builder::Col::new(table_name, "name"), - description: __sdk::__query_builder::Col::new(table_name, "description"), - quantity: __sdk::__query_builder::Col::new(table_name, "quantity"), - rarity: __sdk::__query_builder::Col::new(table_name, "rarity"), - tags: __sdk::__query_builder::Col::new(table_name, "tags"), - stackable: __sdk::__query_builder::Col::new(table_name, "stackable"), - stack_key: __sdk::__query_builder::Col::new(table_name, "stack_key"), - equipment_slot_id: __sdk::__query_builder::Col::new(table_name, "equipment_slot_id"), - source_kind: __sdk::__query_builder::Col::new(table_name, "source_kind"), - source_reference_id: __sdk::__query_builder::Col::new( - table_name, - "source_reference_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 `InventorySlot`. -/// -/// Provides typed access to indexed columns for query building. -pub struct InventorySlotIxCols { - pub actor_user_id: __sdk::__query_builder::IxCol, - pub item_id: __sdk::__query_builder::IxCol, - pub runtime_session_id: __sdk::__query_builder::IxCol, - pub slot_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for InventorySlot { - type IxCols = InventorySlotIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - InventorySlotIxCols { - actor_user_id: __sdk::__query_builder::IxCol::new(table_name, "actor_user_id"), - item_id: __sdk::__query_builder::IxCol::new(table_name, "item_id"), - runtime_session_id: __sdk::__query_builder::IxCol::new( - table_name, - "runtime_session_id", - ), - slot_id: __sdk::__query_builder::IxCol::new(table_name, "slot_id"), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for InventorySlot {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_agent_session_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_agent_session_row_type.rs deleted file mode 100644 index 9783325ff..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_agent_session_row_type.rs +++ /dev/null @@ -1,90 +0,0 @@ -// 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 JumpHopAgentSessionRow { - pub session_id: String, - pub owner_user_id: String, - pub seed_text: String, - pub current_turn: u32, - pub progress_percent: u32, - pub stage: String, - pub config_json: String, - pub draft_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 JumpHopAgentSessionRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `JumpHopAgentSessionRow`. -/// -/// Provides typed access to columns for query building. -pub struct JumpHopAgentSessionRowCols { - pub session_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub seed_text: __sdk::__query_builder::Col, - pub current_turn: __sdk::__query_builder::Col, - pub progress_percent: __sdk::__query_builder::Col, - pub stage: __sdk::__query_builder::Col, - pub config_json: __sdk::__query_builder::Col, - pub draft_json: __sdk::__query_builder::Col, - pub last_assistant_reply: __sdk::__query_builder::Col, - pub published_profile_id: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for JumpHopAgentSessionRow { - type Cols = JumpHopAgentSessionRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - JumpHopAgentSessionRowCols { - session_id: __sdk::__query_builder::Col::new(table_name, "session_id"), - owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"), - seed_text: __sdk::__query_builder::Col::new(table_name, "seed_text"), - current_turn: __sdk::__query_builder::Col::new(table_name, "current_turn"), - progress_percent: __sdk::__query_builder::Col::new(table_name, "progress_percent"), - stage: __sdk::__query_builder::Col::new(table_name, "stage"), - config_json: __sdk::__query_builder::Col::new(table_name, "config_json"), - draft_json: __sdk::__query_builder::Col::new(table_name, "draft_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 `JumpHopAgentSessionRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct JumpHopAgentSessionRowIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub session_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for JumpHopAgentSessionRow { - type IxCols = JumpHopAgentSessionRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - JumpHopAgentSessionRowIxCols { - 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 JumpHopAgentSessionRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_agent_session_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_agent_session_table.rs deleted file mode 100644 index 62ca0e530..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_agent_session_table.rs +++ /dev/null @@ -1,230 +0,0 @@ -// 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::jump_hop_agent_session_row_type::JumpHopAgentSessionRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `jump_hop_agent_session`. -/// -/// Obtain a handle from the [`JumpHopAgentSessionTableAccess::jump_hop_agent_session`] method on [`super::RemoteTables`], -/// like `ctx.db.jump_hop_agent_session()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.jump_hop_agent_session().on_insert(...)`. -pub struct JumpHopAgentSessionTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `jump_hop_agent_session`. -pub struct JumpHopAgentSessionTableAccessor; - -impl __sdk::TableAccessor for JumpHopAgentSessionTableAccessor { - type Row = JumpHopAgentSessionRow; - type Handle<'db> = JumpHopAgentSessionTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.jump_hop_agent_session() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `jump_hop_agent_session`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait JumpHopAgentSessionTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`JumpHopAgentSessionTableHandle`], which mediates access to the table `jump_hop_agent_session`. - fn jump_hop_agent_session(&self) -> JumpHopAgentSessionTableHandle<'_>; -} - -impl JumpHopAgentSessionTableAccess for super::RemoteTables { - fn jump_hop_agent_session(&self) -> JumpHopAgentSessionTableHandle<'_> { - JumpHopAgentSessionTableHandle { - imp: self - .imp - .get_table::("jump_hop_agent_session"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct JumpHopAgentSessionInsertCallbackId(__sdk::CallbackId); -pub struct JumpHopAgentSessionDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for JumpHopAgentSessionTableHandle<'ctx> { - type Row = JumpHopAgentSessionRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for JumpHopAgentSessionTableHandle<'ctx> { - type Row = JumpHopAgentSessionRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = JumpHopAgentSessionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> JumpHopAgentSessionInsertCallbackId { - JumpHopAgentSessionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: JumpHopAgentSessionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = JumpHopAgentSessionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> JumpHopAgentSessionDeleteCallbackId { - JumpHopAgentSessionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: JumpHopAgentSessionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for JumpHopAgentSessionTableHandle<'ctx> { - type InsertCallbackId = JumpHopAgentSessionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> JumpHopAgentSessionInsertCallbackId { - JumpHopAgentSessionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: JumpHopAgentSessionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for JumpHopAgentSessionTableHandle<'ctx> { - type DeleteCallbackId = JumpHopAgentSessionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> JumpHopAgentSessionDeleteCallbackId { - JumpHopAgentSessionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: JumpHopAgentSessionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct JumpHopAgentSessionUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for JumpHopAgentSessionTableHandle<'ctx> { - type UpdateCallbackId = JumpHopAgentSessionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> JumpHopAgentSessionUpdateCallbackId { - JumpHopAgentSessionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: JumpHopAgentSessionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for JumpHopAgentSessionTableHandle<'ctx> { - type UpdateCallbackId = JumpHopAgentSessionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> JumpHopAgentSessionUpdateCallbackId { - JumpHopAgentSessionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: JumpHopAgentSessionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `session_id` unique index on the table `jump_hop_agent_session`, -/// which allows point queries on the field of the same name -/// via the [`JumpHopAgentSessionSessionIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.jump_hop_agent_session().session_id().find(...)`. -pub struct JumpHopAgentSessionSessionIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> JumpHopAgentSessionTableHandle<'ctx> { - /// Get a handle on the `session_id` unique index on the table `jump_hop_agent_session`. - pub fn session_id(&self) -> JumpHopAgentSessionSessionIdUnique<'ctx> { - JumpHopAgentSessionSessionIdUnique { - imp: self.imp.get_unique_constraint::("session_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> JumpHopAgentSessionSessionIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("jump_hop_agent_session"); - _table.add_unique_constraint::("session_id", |row| &row.session_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `JumpHopAgentSessionRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait jump_hop_agent_sessionQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `JumpHopAgentSessionRow`. - fn jump_hop_agent_session(&self) -> __sdk::__query_builder::Table; -} - -impl jump_hop_agent_sessionQueryTableAccess for __sdk::QueryTableAccessor { - fn jump_hop_agent_session(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("jump_hop_agent_session") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_event_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_event_row_type.rs deleted file mode 100644 index 6e0fe7e2d..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_event_row_type.rs +++ /dev/null @@ -1,71 +0,0 @@ -// 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 JumpHopEventRow { - pub event_id: String, - pub owner_user_id: String, - pub profile_id: String, - pub run_id: String, - pub event_type: String, - pub result: String, - pub occurred_at: __sdk::Timestamp, -} - -impl __sdk::InModule for JumpHopEventRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `JumpHopEventRow`. -/// -/// Provides typed access to columns for query building. -pub struct JumpHopEventRowCols { - pub event_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub profile_id: __sdk::__query_builder::Col, - pub run_id: __sdk::__query_builder::Col, - pub event_type: __sdk::__query_builder::Col, - pub result: __sdk::__query_builder::Col, - pub occurred_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for JumpHopEventRow { - type Cols = JumpHopEventRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - JumpHopEventRowCols { - event_id: __sdk::__query_builder::Col::new(table_name, "event_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"), - run_id: __sdk::__query_builder::Col::new(table_name, "run_id"), - event_type: __sdk::__query_builder::Col::new(table_name, "event_type"), - result: __sdk::__query_builder::Col::new(table_name, "result"), - occurred_at: __sdk::__query_builder::Col::new(table_name, "occurred_at"), - } - } -} - -/// Indexed column accessor struct for the table `JumpHopEventRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct JumpHopEventRowIxCols { - pub event_id: __sdk::__query_builder::IxCol, - pub profile_id: __sdk::__query_builder::IxCol, - pub run_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for JumpHopEventRow { - type IxCols = JumpHopEventRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - JumpHopEventRowIxCols { - event_id: __sdk::__query_builder::IxCol::new(table_name, "event_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 JumpHopEventRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_event_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_event_table.rs deleted file mode 100644 index 5690cfc9a..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_event_table.rs +++ /dev/null @@ -1,228 +0,0 @@ -// 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::jump_hop_event_row_type::JumpHopEventRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `jump_hop_event`. -/// -/// Obtain a handle from the [`JumpHopEventTableAccess::jump_hop_event`] method on [`super::RemoteTables`], -/// like `ctx.db.jump_hop_event()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.jump_hop_event().on_insert(...)`. -pub struct JumpHopEventTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `jump_hop_event`. -pub struct JumpHopEventTableAccessor; - -impl __sdk::TableAccessor for JumpHopEventTableAccessor { - type Row = JumpHopEventRow; - type Handle<'db> = JumpHopEventTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.jump_hop_event() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `jump_hop_event`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait JumpHopEventTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`JumpHopEventTableHandle`], which mediates access to the table `jump_hop_event`. - fn jump_hop_event(&self) -> JumpHopEventTableHandle<'_>; -} - -impl JumpHopEventTableAccess for super::RemoteTables { - fn jump_hop_event(&self) -> JumpHopEventTableHandle<'_> { - JumpHopEventTableHandle { - imp: self.imp.get_table::("jump_hop_event"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct JumpHopEventInsertCallbackId(__sdk::CallbackId); -pub struct JumpHopEventDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for JumpHopEventTableHandle<'ctx> { - type Row = JumpHopEventRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for JumpHopEventTableHandle<'ctx> { - type Row = JumpHopEventRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = JumpHopEventInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> JumpHopEventInsertCallbackId { - JumpHopEventInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: JumpHopEventInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = JumpHopEventDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> JumpHopEventDeleteCallbackId { - JumpHopEventDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: JumpHopEventDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for JumpHopEventTableHandle<'ctx> { - type InsertCallbackId = JumpHopEventInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> JumpHopEventInsertCallbackId { - JumpHopEventInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: JumpHopEventInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for JumpHopEventTableHandle<'ctx> { - type DeleteCallbackId = JumpHopEventDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> JumpHopEventDeleteCallbackId { - JumpHopEventDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: JumpHopEventDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct JumpHopEventUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for JumpHopEventTableHandle<'ctx> { - type UpdateCallbackId = JumpHopEventUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> JumpHopEventUpdateCallbackId { - JumpHopEventUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: JumpHopEventUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for JumpHopEventTableHandle<'ctx> { - type UpdateCallbackId = JumpHopEventUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> JumpHopEventUpdateCallbackId { - JumpHopEventUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: JumpHopEventUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `event_id` unique index on the table `jump_hop_event`, -/// which allows point queries on the field of the same name -/// via the [`JumpHopEventEventIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.jump_hop_event().event_id().find(...)`. -pub struct JumpHopEventEventIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> JumpHopEventTableHandle<'ctx> { - /// Get a handle on the `event_id` unique index on the table `jump_hop_event`. - pub fn event_id(&self) -> JumpHopEventEventIdUnique<'ctx> { - JumpHopEventEventIdUnique { - imp: self.imp.get_unique_constraint::("event_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> JumpHopEventEventIdUnique<'ctx> { - /// Find the subscribed row whose `event_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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("jump_hop_event"); - _table.add_unique_constraint::("event_id", |row| &row.event_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `JumpHopEventRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait jump_hop_eventQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `JumpHopEventRow`. - fn jump_hop_event(&self) -> __sdk::__query_builder::Table; -} - -impl jump_hop_eventQueryTableAccess for __sdk::QueryTableAccessor { - fn jump_hop_event(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("jump_hop_event") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_leaderboard_entry_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_leaderboard_entry_row_type.rs deleted file mode 100644 index 369cbcce7..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_leaderboard_entry_row_type.rs +++ /dev/null @@ -1,72 +0,0 @@ -// 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 JumpHopLeaderboardEntryRow { - pub entry_id: String, - pub profile_id: String, - pub player_id: String, - pub successful_jump_count: u32, - pub duration_ms: u64, - pub run_id: String, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for JumpHopLeaderboardEntryRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `JumpHopLeaderboardEntryRow`. -/// -/// Provides typed access to columns for query building. -pub struct JumpHopLeaderboardEntryRowCols { - pub entry_id: __sdk::__query_builder::Col, - pub profile_id: __sdk::__query_builder::Col, - pub player_id: __sdk::__query_builder::Col, - pub successful_jump_count: __sdk::__query_builder::Col, - pub duration_ms: __sdk::__query_builder::Col, - pub run_id: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for JumpHopLeaderboardEntryRow { - type Cols = JumpHopLeaderboardEntryRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - JumpHopLeaderboardEntryRowCols { - entry_id: __sdk::__query_builder::Col::new(table_name, "entry_id"), - profile_id: __sdk::__query_builder::Col::new(table_name, "profile_id"), - player_id: __sdk::__query_builder::Col::new(table_name, "player_id"), - successful_jump_count: __sdk::__query_builder::Col::new( - table_name, - "successful_jump_count", - ), - duration_ms: __sdk::__query_builder::Col::new(table_name, "duration_ms"), - run_id: __sdk::__query_builder::Col::new(table_name, "run_id"), - updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), - } - } -} - -/// Indexed column accessor struct for the table `JumpHopLeaderboardEntryRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct JumpHopLeaderboardEntryRowIxCols { - pub entry_id: __sdk::__query_builder::IxCol, - pub profile_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for JumpHopLeaderboardEntryRow { - type IxCols = JumpHopLeaderboardEntryRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - JumpHopLeaderboardEntryRowIxCols { - entry_id: __sdk::__query_builder::IxCol::new(table_name, "entry_id"), - profile_id: __sdk::__query_builder::IxCol::new(table_name, "profile_id"), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for JumpHopLeaderboardEntryRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_leaderboard_entry_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_leaderboard_entry_table.rs deleted file mode 100644 index 960cb02a2..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_leaderboard_entry_table.rs +++ /dev/null @@ -1,235 +0,0 @@ -// 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::jump_hop_leaderboard_entry_row_type::JumpHopLeaderboardEntryRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `jump_hop_leaderboard_entry`. -/// -/// Obtain a handle from the [`JumpHopLeaderboardEntryTableAccess::jump_hop_leaderboard_entry`] method on [`super::RemoteTables`], -/// like `ctx.db.jump_hop_leaderboard_entry()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.jump_hop_leaderboard_entry().on_insert(...)`. -pub struct JumpHopLeaderboardEntryTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `jump_hop_leaderboard_entry`. -pub struct JumpHopLeaderboardEntryTableAccessor; - -impl __sdk::TableAccessor for JumpHopLeaderboardEntryTableAccessor { - type Row = JumpHopLeaderboardEntryRow; - type Handle<'db> = JumpHopLeaderboardEntryTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.jump_hop_leaderboard_entry() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `jump_hop_leaderboard_entry`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait JumpHopLeaderboardEntryTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`JumpHopLeaderboardEntryTableHandle`], which mediates access to the table `jump_hop_leaderboard_entry`. - fn jump_hop_leaderboard_entry(&self) -> JumpHopLeaderboardEntryTableHandle<'_>; -} - -impl JumpHopLeaderboardEntryTableAccess for super::RemoteTables { - fn jump_hop_leaderboard_entry(&self) -> JumpHopLeaderboardEntryTableHandle<'_> { - JumpHopLeaderboardEntryTableHandle { - imp: self - .imp - .get_table::("jump_hop_leaderboard_entry"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct JumpHopLeaderboardEntryInsertCallbackId(__sdk::CallbackId); -pub struct JumpHopLeaderboardEntryDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for JumpHopLeaderboardEntryTableHandle<'ctx> { - type Row = JumpHopLeaderboardEntryRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for JumpHopLeaderboardEntryTableHandle<'ctx> { - type Row = JumpHopLeaderboardEntryRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = JumpHopLeaderboardEntryInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> JumpHopLeaderboardEntryInsertCallbackId { - JumpHopLeaderboardEntryInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: JumpHopLeaderboardEntryInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = JumpHopLeaderboardEntryDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> JumpHopLeaderboardEntryDeleteCallbackId { - JumpHopLeaderboardEntryDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: JumpHopLeaderboardEntryDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for JumpHopLeaderboardEntryTableHandle<'ctx> { - type InsertCallbackId = JumpHopLeaderboardEntryInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> JumpHopLeaderboardEntryInsertCallbackId { - JumpHopLeaderboardEntryInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: JumpHopLeaderboardEntryInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for JumpHopLeaderboardEntryTableHandle<'ctx> { - type DeleteCallbackId = JumpHopLeaderboardEntryDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> JumpHopLeaderboardEntryDeleteCallbackId { - JumpHopLeaderboardEntryDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: JumpHopLeaderboardEntryDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct JumpHopLeaderboardEntryUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for JumpHopLeaderboardEntryTableHandle<'ctx> { - type UpdateCallbackId = JumpHopLeaderboardEntryUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> JumpHopLeaderboardEntryUpdateCallbackId { - JumpHopLeaderboardEntryUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: JumpHopLeaderboardEntryUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for JumpHopLeaderboardEntryTableHandle<'ctx> { - type UpdateCallbackId = JumpHopLeaderboardEntryUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> JumpHopLeaderboardEntryUpdateCallbackId { - JumpHopLeaderboardEntryUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: JumpHopLeaderboardEntryUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `entry_id` unique index on the table `jump_hop_leaderboard_entry`, -/// which allows point queries on the field of the same name -/// via the [`JumpHopLeaderboardEntryEntryIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.jump_hop_leaderboard_entry().entry_id().find(...)`. -pub struct JumpHopLeaderboardEntryEntryIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> JumpHopLeaderboardEntryTableHandle<'ctx> { - /// Get a handle on the `entry_id` unique index on the table `jump_hop_leaderboard_entry`. - pub fn entry_id(&self) -> JumpHopLeaderboardEntryEntryIdUnique<'ctx> { - JumpHopLeaderboardEntryEntryIdUnique { - imp: self.imp.get_unique_constraint::("entry_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> JumpHopLeaderboardEntryEntryIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("jump_hop_leaderboard_entry"); - _table.add_unique_constraint::("entry_id", |row| &row.entry_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `JumpHopLeaderboardEntryRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait jump_hop_leaderboard_entryQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `JumpHopLeaderboardEntryRow`. - fn jump_hop_leaderboard_entry( - &self, - ) -> __sdk::__query_builder::Table; -} - -impl jump_hop_leaderboard_entryQueryTableAccess for __sdk::QueryTableAccessor { - fn jump_hop_leaderboard_entry( - &self, - ) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("jump_hop_leaderboard_entry") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_runtime_run_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_runtime_run_row_type.rs deleted file mode 100644 index 1a78cae3d..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_runtime_run_row_type.rs +++ /dev/null @@ -1,92 +0,0 @@ -// 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 JumpHopRuntimeRunRow { - pub run_id: String, - pub owner_user_id: String, - pub profile_id: String, - pub status: String, - pub started_at_ms: i64, - pub finished_at_ms: i64, - pub current_platform_index: u32, - pub score: u32, - pub combo: u32, - pub snapshot_json: String, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, - pub runtime_mode: Option, -} - -impl __sdk::InModule for JumpHopRuntimeRunRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `JumpHopRuntimeRunRow`. -/// -/// Provides typed access to columns for query building. -pub struct JumpHopRuntimeRunRowCols { - pub run_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub profile_id: __sdk::__query_builder::Col, - pub status: __sdk::__query_builder::Col, - pub started_at_ms: __sdk::__query_builder::Col, - pub finished_at_ms: __sdk::__query_builder::Col, - pub current_platform_index: __sdk::__query_builder::Col, - pub score: __sdk::__query_builder::Col, - pub combo: __sdk::__query_builder::Col, - pub snapshot_json: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, - pub runtime_mode: __sdk::__query_builder::Col>, -} - -impl __sdk::__query_builder::HasCols for JumpHopRuntimeRunRow { - type Cols = JumpHopRuntimeRunRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - JumpHopRuntimeRunRowCols { - 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"), - status: __sdk::__query_builder::Col::new(table_name, "status"), - started_at_ms: __sdk::__query_builder::Col::new(table_name, "started_at_ms"), - finished_at_ms: __sdk::__query_builder::Col::new(table_name, "finished_at_ms"), - current_platform_index: __sdk::__query_builder::Col::new( - table_name, - "current_platform_index", - ), - score: __sdk::__query_builder::Col::new(table_name, "score"), - combo: __sdk::__query_builder::Col::new(table_name, "combo"), - 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"), - runtime_mode: __sdk::__query_builder::Col::new(table_name, "runtime_mode"), - } - } -} - -/// Indexed column accessor struct for the table `JumpHopRuntimeRunRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct JumpHopRuntimeRunRowIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub profile_id: __sdk::__query_builder::IxCol, - pub run_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for JumpHopRuntimeRunRow { - type IxCols = JumpHopRuntimeRunRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - JumpHopRuntimeRunRowIxCols { - 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 JumpHopRuntimeRunRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_runtime_run_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_runtime_run_table.rs deleted file mode 100644 index 64e23a7ee..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_runtime_run_table.rs +++ /dev/null @@ -1,230 +0,0 @@ -// 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::jump_hop_runtime_run_row_type::JumpHopRuntimeRunRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `jump_hop_runtime_run`. -/// -/// Obtain a handle from the [`JumpHopRuntimeRunTableAccess::jump_hop_runtime_run`] method on [`super::RemoteTables`], -/// like `ctx.db.jump_hop_runtime_run()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.jump_hop_runtime_run().on_insert(...)`. -pub struct JumpHopRuntimeRunTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `jump_hop_runtime_run`. -pub struct JumpHopRuntimeRunTableAccessor; - -impl __sdk::TableAccessor for JumpHopRuntimeRunTableAccessor { - type Row = JumpHopRuntimeRunRow; - type Handle<'db> = JumpHopRuntimeRunTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.jump_hop_runtime_run() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `jump_hop_runtime_run`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait JumpHopRuntimeRunTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`JumpHopRuntimeRunTableHandle`], which mediates access to the table `jump_hop_runtime_run`. - fn jump_hop_runtime_run(&self) -> JumpHopRuntimeRunTableHandle<'_>; -} - -impl JumpHopRuntimeRunTableAccess for super::RemoteTables { - fn jump_hop_runtime_run(&self) -> JumpHopRuntimeRunTableHandle<'_> { - JumpHopRuntimeRunTableHandle { - imp: self - .imp - .get_table::("jump_hop_runtime_run"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct JumpHopRuntimeRunInsertCallbackId(__sdk::CallbackId); -pub struct JumpHopRuntimeRunDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for JumpHopRuntimeRunTableHandle<'ctx> { - type Row = JumpHopRuntimeRunRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for JumpHopRuntimeRunTableHandle<'ctx> { - type Row = JumpHopRuntimeRunRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = JumpHopRuntimeRunInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> JumpHopRuntimeRunInsertCallbackId { - JumpHopRuntimeRunInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: JumpHopRuntimeRunInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = JumpHopRuntimeRunDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> JumpHopRuntimeRunDeleteCallbackId { - JumpHopRuntimeRunDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: JumpHopRuntimeRunDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for JumpHopRuntimeRunTableHandle<'ctx> { - type InsertCallbackId = JumpHopRuntimeRunInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> JumpHopRuntimeRunInsertCallbackId { - JumpHopRuntimeRunInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: JumpHopRuntimeRunInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for JumpHopRuntimeRunTableHandle<'ctx> { - type DeleteCallbackId = JumpHopRuntimeRunDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> JumpHopRuntimeRunDeleteCallbackId { - JumpHopRuntimeRunDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: JumpHopRuntimeRunDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct JumpHopRuntimeRunUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for JumpHopRuntimeRunTableHandle<'ctx> { - type UpdateCallbackId = JumpHopRuntimeRunUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> JumpHopRuntimeRunUpdateCallbackId { - JumpHopRuntimeRunUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: JumpHopRuntimeRunUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for JumpHopRuntimeRunTableHandle<'ctx> { - type UpdateCallbackId = JumpHopRuntimeRunUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> JumpHopRuntimeRunUpdateCallbackId { - JumpHopRuntimeRunUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: JumpHopRuntimeRunUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `run_id` unique index on the table `jump_hop_runtime_run`, -/// which allows point queries on the field of the same name -/// via the [`JumpHopRuntimeRunRunIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.jump_hop_runtime_run().run_id().find(...)`. -pub struct JumpHopRuntimeRunRunIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> JumpHopRuntimeRunTableHandle<'ctx> { - /// Get a handle on the `run_id` unique index on the table `jump_hop_runtime_run`. - pub fn run_id(&self) -> JumpHopRuntimeRunRunIdUnique<'ctx> { - JumpHopRuntimeRunRunIdUnique { - imp: self.imp.get_unique_constraint::("run_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> JumpHopRuntimeRunRunIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("jump_hop_runtime_run"); - _table.add_unique_constraint::("run_id", |row| &row.run_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `JumpHopRuntimeRunRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait jump_hop_runtime_runQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `JumpHopRuntimeRunRow`. - fn jump_hop_runtime_run(&self) -> __sdk::__query_builder::Table; -} - -impl jump_hop_runtime_runQueryTableAccess for __sdk::QueryTableAccessor { - fn jump_hop_runtime_run(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("jump_hop_runtime_run") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_work_profile_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_work_profile_row_type.rs deleted file mode 100644 index 3a8b9e689..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_work_profile_row_type.rs +++ /dev/null @@ -1,146 +0,0 @@ -// 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 JumpHopWorkProfileRow { - 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 theme_tags_json: String, - pub difficulty: String, - pub style_preset: String, - pub character_prompt: String, - pub tile_prompt: String, - pub end_mood_prompt: String, - pub character_asset_json: String, - pub tile_atlas_asset_json: String, - pub tile_assets_json: String, - pub path_json: String, - pub cover_image_src: String, - pub cover_composite: String, - pub generation_status: String, - pub publication_status: String, - pub play_count: u32, - pub updated_at: __sdk::Timestamp, - pub published_at: Option<__sdk::Timestamp>, - pub visible: bool, - pub theme_text: Option, - pub back_button_asset_json: Option, -} - -impl __sdk::InModule for JumpHopWorkProfileRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `JumpHopWorkProfileRow`. -/// -/// Provides typed access to columns for query building. -pub struct JumpHopWorkProfileRowCols { - pub profile_id: __sdk::__query_builder::Col, - pub work_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub source_session_id: __sdk::__query_builder::Col, - pub author_display_name: __sdk::__query_builder::Col, - pub work_title: __sdk::__query_builder::Col, - pub work_description: __sdk::__query_builder::Col, - pub theme_tags_json: __sdk::__query_builder::Col, - pub difficulty: __sdk::__query_builder::Col, - pub style_preset: __sdk::__query_builder::Col, - pub character_prompt: __sdk::__query_builder::Col, - pub tile_prompt: __sdk::__query_builder::Col, - pub end_mood_prompt: __sdk::__query_builder::Col, - pub character_asset_json: __sdk::__query_builder::Col, - pub tile_atlas_asset_json: __sdk::__query_builder::Col, - pub tile_assets_json: __sdk::__query_builder::Col, - pub path_json: __sdk::__query_builder::Col, - pub cover_image_src: __sdk::__query_builder::Col, - pub cover_composite: __sdk::__query_builder::Col, - pub generation_status: __sdk::__query_builder::Col, - pub publication_status: __sdk::__query_builder::Col, - pub play_count: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, - pub published_at: __sdk::__query_builder::Col>, - pub visible: __sdk::__query_builder::Col, - pub theme_text: __sdk::__query_builder::Col>, - pub back_button_asset_json: __sdk::__query_builder::Col>, -} - -impl __sdk::__query_builder::HasCols for JumpHopWorkProfileRow { - type Cols = JumpHopWorkProfileRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - JumpHopWorkProfileRowCols { - 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"), - theme_tags_json: __sdk::__query_builder::Col::new(table_name, "theme_tags_json"), - difficulty: __sdk::__query_builder::Col::new(table_name, "difficulty"), - style_preset: __sdk::__query_builder::Col::new(table_name, "style_preset"), - character_prompt: __sdk::__query_builder::Col::new(table_name, "character_prompt"), - tile_prompt: __sdk::__query_builder::Col::new(table_name, "tile_prompt"), - end_mood_prompt: __sdk::__query_builder::Col::new(table_name, "end_mood_prompt"), - character_asset_json: __sdk::__query_builder::Col::new( - table_name, - "character_asset_json", - ), - tile_atlas_asset_json: __sdk::__query_builder::Col::new( - table_name, - "tile_atlas_asset_json", - ), - tile_assets_json: __sdk::__query_builder::Col::new(table_name, "tile_assets_json"), - path_json: __sdk::__query_builder::Col::new(table_name, "path_json"), - cover_image_src: __sdk::__query_builder::Col::new(table_name, "cover_image_src"), - cover_composite: __sdk::__query_builder::Col::new(table_name, "cover_composite"), - generation_status: __sdk::__query_builder::Col::new(table_name, "generation_status"), - publication_status: __sdk::__query_builder::Col::new(table_name, "publication_status"), - play_count: __sdk::__query_builder::Col::new(table_name, "play_count"), - updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), - published_at: __sdk::__query_builder::Col::new(table_name, "published_at"), - visible: __sdk::__query_builder::Col::new(table_name, "visible"), - theme_text: __sdk::__query_builder::Col::new(table_name, "theme_text"), - back_button_asset_json: __sdk::__query_builder::Col::new( - table_name, - "back_button_asset_json", - ), - } - } -} - -/// Indexed column accessor struct for the table `JumpHopWorkProfileRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct JumpHopWorkProfileRowIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub profile_id: __sdk::__query_builder::IxCol, - pub publication_status: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for JumpHopWorkProfileRow { - type IxCols = JumpHopWorkProfileRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - JumpHopWorkProfileRowIxCols { - 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 JumpHopWorkProfileRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_work_profile_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_work_profile_table.rs deleted file mode 100644 index aca645f75..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/jump_hop_work_profile_table.rs +++ /dev/null @@ -1,230 +0,0 @@ -// 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::jump_hop_work_profile_row_type::JumpHopWorkProfileRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `jump_hop_work_profile`. -/// -/// Obtain a handle from the [`JumpHopWorkProfileTableAccess::jump_hop_work_profile`] method on [`super::RemoteTables`], -/// like `ctx.db.jump_hop_work_profile()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.jump_hop_work_profile().on_insert(...)`. -pub struct JumpHopWorkProfileTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `jump_hop_work_profile`. -pub struct JumpHopWorkProfileTableAccessor; - -impl __sdk::TableAccessor for JumpHopWorkProfileTableAccessor { - type Row = JumpHopWorkProfileRow; - type Handle<'db> = JumpHopWorkProfileTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.jump_hop_work_profile() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `jump_hop_work_profile`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait JumpHopWorkProfileTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`JumpHopWorkProfileTableHandle`], which mediates access to the table `jump_hop_work_profile`. - fn jump_hop_work_profile(&self) -> JumpHopWorkProfileTableHandle<'_>; -} - -impl JumpHopWorkProfileTableAccess for super::RemoteTables { - fn jump_hop_work_profile(&self) -> JumpHopWorkProfileTableHandle<'_> { - JumpHopWorkProfileTableHandle { - imp: self - .imp - .get_table::("jump_hop_work_profile"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct JumpHopWorkProfileInsertCallbackId(__sdk::CallbackId); -pub struct JumpHopWorkProfileDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for JumpHopWorkProfileTableHandle<'ctx> { - type Row = JumpHopWorkProfileRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for JumpHopWorkProfileTableHandle<'ctx> { - type Row = JumpHopWorkProfileRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = JumpHopWorkProfileInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> JumpHopWorkProfileInsertCallbackId { - JumpHopWorkProfileInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: JumpHopWorkProfileInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = JumpHopWorkProfileDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> JumpHopWorkProfileDeleteCallbackId { - JumpHopWorkProfileDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: JumpHopWorkProfileDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for JumpHopWorkProfileTableHandle<'ctx> { - type InsertCallbackId = JumpHopWorkProfileInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> JumpHopWorkProfileInsertCallbackId { - JumpHopWorkProfileInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: JumpHopWorkProfileInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for JumpHopWorkProfileTableHandle<'ctx> { - type DeleteCallbackId = JumpHopWorkProfileDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> JumpHopWorkProfileDeleteCallbackId { - JumpHopWorkProfileDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: JumpHopWorkProfileDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct JumpHopWorkProfileUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for JumpHopWorkProfileTableHandle<'ctx> { - type UpdateCallbackId = JumpHopWorkProfileUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> JumpHopWorkProfileUpdateCallbackId { - JumpHopWorkProfileUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: JumpHopWorkProfileUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for JumpHopWorkProfileTableHandle<'ctx> { - type UpdateCallbackId = JumpHopWorkProfileUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> JumpHopWorkProfileUpdateCallbackId { - JumpHopWorkProfileUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: JumpHopWorkProfileUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `profile_id` unique index on the table `jump_hop_work_profile`, -/// which allows point queries on the field of the same name -/// via the [`JumpHopWorkProfileProfileIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.jump_hop_work_profile().profile_id().find(...)`. -pub struct JumpHopWorkProfileProfileIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> JumpHopWorkProfileTableHandle<'ctx> { - /// Get a handle on the `profile_id` unique index on the table `jump_hop_work_profile`. - pub fn profile_id(&self) -> JumpHopWorkProfileProfileIdUnique<'ctx> { - JumpHopWorkProfileProfileIdUnique { - imp: self.imp.get_unique_constraint::("profile_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> JumpHopWorkProfileProfileIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("jump_hop_work_profile"); - _table.add_unique_constraint::("profile_id", |row| &row.profile_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `JumpHopWorkProfileRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait jump_hop_work_profileQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `JumpHopWorkProfileRow`. - fn jump_hop_work_profile(&self) -> __sdk::__query_builder::Table; -} - -impl jump_hop_work_profileQueryTableAccess for __sdk::QueryTableAccessor { - fn jump_hop_work_profile(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("jump_hop_work_profile") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_admin_accounts_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_admin_accounts_and_return_procedure.rs index 8258f63a2..0594f17b3 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_admin_accounts_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_admin_accounts_and_return_procedure.rs @@ -27,10 +27,10 @@ pub trait list_admin_accounts_and_return { &self, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -39,10 +39,10 @@ impl list_admin_accounts_and_return for super::RemoteProcedures { &self, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, AdminAccountProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_asset_history_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_asset_history_and_return_procedure.rs index ea689b101..bcc2a742c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_asset_history_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_asset_history_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait list_asset_history_and_return { input: AssetHistoryListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl list_asset_history_and_return for super::RemoteProcedures { input: AssetHistoryListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, AssetHistoryListResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_editor_agent_conversations_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_editor_agent_conversations_and_return_procedure.rs index b1f34b959..148f968cf 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_editor_agent_conversations_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_editor_agent_conversations_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait list_editor_agent_conversations_and_return { input: EditorAgentConversationListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl list_editor_agent_conversations_and_return for super::RemoteProcedures { input: EditorAgentConversationListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorAgentConversationListProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_editor_projects_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_editor_projects_and_return_procedure.rs index c0181cff2..fca9595d0 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_editor_projects_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_editor_projects_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait list_editor_projects_and_return { input: EditorProjectListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl list_editor_projects_and_return for super::RemoteProcedures { input: EditorProjectListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorProjectListProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_external_api_keys_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_external_api_keys_and_return_procedure.rs index d0ab651fb..ca827a562 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_external_api_keys_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_external_api_keys_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait list_external_api_keys_and_return { input: ExternalApiKeyListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl list_external_api_keys_and_return for super::RemoteProcedures { input: ExternalApiKeyListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, ExternalApiKeyProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_external_generation_job_summaries_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_external_generation_job_summaries_and_return_procedure.rs index e6aa64d34..47e617b0d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_external_generation_job_summaries_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_external_generation_job_summaries_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait list_external_generation_job_summaries_and_return { input: ExternalGenerationJobListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl list_external_generation_job_summaries_and_return for super::RemoteProcedur input: ExternalGenerationJobListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, ExternalGenerationJobSummaryProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_external_generation_jobs_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_external_generation_jobs_and_return_procedure.rs index 5164ba9c7..05f3b53ef 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_external_generation_jobs_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_external_generation_jobs_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait list_external_generation_jobs_and_return { input: ExternalGenerationJobListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl list_external_generation_jobs_and_return for super::RemoteProcedures { input: ExternalGenerationJobListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, ExternalGenerationJobProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_profile_recharge_refund_holds_for_reconciliation_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_profile_recharge_refund_holds_for_reconciliation_procedure.rs index c8d5ee7e8..6bcdf41c3 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_profile_recharge_refund_holds_for_reconciliation_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_profile_recharge_refund_holds_for_reconciliation_procedure.rs @@ -34,10 +34,10 @@ pub trait list_profile_recharge_refund_holds_for_reconciliation { input: RuntimeProfileRechargeRefundHoldListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl list_profile_recharge_refund_holds_for_reconciliation for super::RemoteProc input: RuntimeProfileRechargeRefundHoldListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp.invoke_procedure_with_callback::<_, RuntimeProfileRechargeRefundHoldListProcedureResult>( "list_profile_recharge_refund_holds_for_reconciliation", diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_profile_recharge_refunds_for_reconciliation_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_profile_recharge_refunds_for_reconciliation_procedure.rs index 9d089bdc8..0a77320bf 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_profile_recharge_refunds_for_reconciliation_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_profile_recharge_refunds_for_reconciliation_procedure.rs @@ -34,10 +34,10 @@ pub trait list_profile_recharge_refunds_for_reconciliation { input: RuntimeProfileRechargeRefundReconciliationListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl list_profile_recharge_refunds_for_reconciliation for super::RemoteProcedure input: RuntimeProfileRechargeRefundReconciliationListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileRechargeRefundListProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_profile_wallet_ledger_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_profile_wallet_ledger_procedure.rs index d51f0df2d..23496701a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_profile_wallet_ledger_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_profile_wallet_ledger_procedure.rs @@ -31,10 +31,10 @@ pub trait list_profile_wallet_ledger { input: RuntimeProfileWalletLedgerListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl list_profile_wallet_ledger for super::RemoteProcedures { input: RuntimeProfileWalletLedgerListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileWalletLedgerProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_public_editor_project_resources_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_public_editor_project_resources_and_return_procedure.rs index b594fe7ff..70b2895cf 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_public_editor_project_resources_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_public_editor_project_resources_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait list_public_editor_project_resources_and_return { input: EditorProjectResourcePublicShowcaseListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl list_public_editor_project_resources_and_return for super::RemoteProcedures input: EditorProjectResourcePublicShowcaseListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorProjectResourceListProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_public_editor_showcase_assets_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_public_editor_showcase_assets_and_return_procedure.rs index b6b5ad8b8..9e357db4f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_public_editor_showcase_assets_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_public_editor_showcase_assets_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait list_public_editor_showcase_assets_and_return { input: EditorShowcaseAssetPublicListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl list_public_editor_showcase_assets_and_return for super::RemoteProcedures { input: EditorShowcaseAssetPublicListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorShowcaseAssetListProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_public_editor_showcase_assets_for_viewer_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_public_editor_showcase_assets_for_viewer_and_return_procedure.rs index 816054c2c..f89fc1ca9 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_public_editor_showcase_assets_for_viewer_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_public_editor_showcase_assets_for_viewer_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait list_public_editor_showcase_assets_for_viewer_and_return { input: EditorShowcaseAssetViewerListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl list_public_editor_showcase_assets_for_viewer_and_return for super::RemoteP input: EditorShowcaseAssetViewerListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorShowcaseAssetViewerListProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_unchecked_expired_profile_recharge_orders_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_unchecked_expired_profile_recharge_orders_procedure.rs index e930565c3..500ca0cf2 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_unchecked_expired_profile_recharge_orders_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_unchecked_expired_profile_recharge_orders_procedure.rs @@ -34,13 +34,13 @@ pub trait list_unchecked_expired_profile_recharge_orders { input: RuntimeProfileRechargeOrderExpirationCheckListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result< - RuntimeProfileRechargeOrderExpirationCheckListProcedureResult, - __sdk::InternalError, - >, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result< + RuntimeProfileRechargeOrderExpirationCheckListProcedureResult, + __sdk::InternalError, + >, + ) + Send + + 'static, ); } @@ -50,13 +50,13 @@ impl list_unchecked_expired_profile_recharge_orders for super::RemoteProcedures input: RuntimeProfileRechargeOrderExpirationCheckListInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result< - RuntimeProfileRechargeOrderExpirationCheckListProcedureResult, - __sdk::InternalError, - >, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result< + RuntimeProfileRechargeOrderExpirationCheckListProcedureResult, + __sdk::InternalError, + >, + ) + Send + + 'static, ) { self.imp.invoke_procedure_with_callback::<_, RuntimeProfileRechargeOrderExpirationCheckListProcedureResult>( "list_unchecked_expired_profile_recharge_orders", diff --git a/server-rs/crates/spacetime-client/src/module_bindings/mark_editor_showcase_asset_refunded_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/mark_editor_showcase_asset_refunded_and_return_procedure.rs index a2d7ad962..2da58f2ca 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/mark_editor_showcase_asset_refunded_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/mark_editor_showcase_asset_refunded_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait mark_editor_showcase_asset_refunded_and_return { input: EditorShowcaseAssetRefundMarkInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl mark_editor_showcase_asset_refunded_and_return for super::RemoteProcedures input: EditorShowcaseAssetRefundMarkInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorShowcaseAssetProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/mark_profile_recharge_order_expiration_checked_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/mark_profile_recharge_order_expiration_checked_procedure.rs index 22ec511a5..5eb121685 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/mark_profile_recharge_order_expiration_checked_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/mark_profile_recharge_order_expiration_checked_procedure.rs @@ -34,10 +34,13 @@ pub trait mark_profile_recharge_order_expiration_checked { input: RuntimeProfileRechargeOrderExpirationCheckInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result< + RuntimeProfileRechargeOrderExpirationCheckProcedureResult, + __sdk::InternalError, + >, + ) + Send + + 'static, ); } @@ -47,10 +50,13 @@ impl mark_profile_recharge_order_expiration_checked for super::RemoteProcedures input: RuntimeProfileRechargeOrderExpirationCheckInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result< + RuntimeProfileRechargeOrderExpirationCheckProcedureResult, + __sdk::InternalError, + >, + ) + Send + + 'static, ) { self.imp.invoke_procedure_with_callback::<_, RuntimeProfileRechargeOrderExpirationCheckProcedureResult>( "mark_profile_recharge_order_expiration_checked", diff --git a/server-rs/crates/spacetime-client/src/module_bindings/mark_profile_recharge_order_paid_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/mark_profile_recharge_order_paid_and_return_procedure.rs index f412f184a..09ba81c70 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/mark_profile_recharge_order_paid_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/mark_profile_recharge_order_paid_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait mark_profile_recharge_order_paid_and_return { input: RuntimeProfileRechargeOrderPaidInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl mark_profile_recharge_order_paid_and_return for super::RemoteProcedures { input: RuntimeProfileRechargeOrderPaidInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileRechargeCenterProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/match_3_d_agent_message_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/match_3_d_agent_message_row_type.rs deleted file mode 100644 index 691b9f240..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/match_3_d_agent_message_row_type.rs +++ /dev/null @@ -1,66 +0,0 @@ -// 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 Match3DAgentMessageRow { - 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 Match3DAgentMessageRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `Match3DAgentMessageRow`. -/// -/// Provides typed access to columns for query building. -pub struct Match3DAgentMessageRowCols { - pub message_id: __sdk::__query_builder::Col, - pub session_id: __sdk::__query_builder::Col, - pub role: __sdk::__query_builder::Col, - pub kind: __sdk::__query_builder::Col, - pub text: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for Match3DAgentMessageRow { - type Cols = Match3DAgentMessageRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - Match3DAgentMessageRowCols { - 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 `Match3DAgentMessageRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct Match3DAgentMessageRowIxCols { - pub message_id: __sdk::__query_builder::IxCol, - pub session_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for Match3DAgentMessageRow { - type IxCols = Match3DAgentMessageRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - Match3DAgentMessageRowIxCols { - 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 Match3DAgentMessageRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/match_3_d_agent_message_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/match_3_d_agent_message_table.rs deleted file mode 100644 index 6842beee7..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/match_3_d_agent_message_table.rs +++ /dev/null @@ -1,231 +0,0 @@ -// 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::match_3_d_agent_message_row_type::Match3DAgentMessageRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `match_3_d_agent_message`. -/// -/// Obtain a handle from the [`Match3DAgentMessageTableAccess::match_3_d_agent_message`] method on [`super::RemoteTables`], -/// like `ctx.db.match_3_d_agent_message()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.match_3_d_agent_message().on_insert(...)`. -pub struct Match3DAgentMessageTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `match_3_d_agent_message`. -pub struct Match3DAgentMessageTableAccessor; - -impl __sdk::TableAccessor for Match3DAgentMessageTableAccessor { - type Row = Match3DAgentMessageRow; - type Handle<'db> = Match3DAgentMessageTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.match_3_d_agent_message() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `match_3_d_agent_message`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait Match3DAgentMessageTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`Match3DAgentMessageTableHandle`], which mediates access to the table `match_3_d_agent_message`. - fn match_3_d_agent_message(&self) -> Match3DAgentMessageTableHandle<'_>; -} - -impl Match3DAgentMessageTableAccess for super::RemoteTables { - fn match_3_d_agent_message(&self) -> Match3DAgentMessageTableHandle<'_> { - Match3DAgentMessageTableHandle { - imp: self - .imp - .get_table::("match_3_d_agent_message"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct Match3DAgentMessageInsertCallbackId(__sdk::CallbackId); -pub struct Match3DAgentMessageDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for Match3DAgentMessageTableHandle<'ctx> { - type Row = Match3DAgentMessageRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for Match3DAgentMessageTableHandle<'ctx> { - type Row = Match3DAgentMessageRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = Match3DAgentMessageInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> Match3DAgentMessageInsertCallbackId { - Match3DAgentMessageInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: Match3DAgentMessageInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = Match3DAgentMessageDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> Match3DAgentMessageDeleteCallbackId { - Match3DAgentMessageDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: Match3DAgentMessageDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for Match3DAgentMessageTableHandle<'ctx> { - type InsertCallbackId = Match3DAgentMessageInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> Match3DAgentMessageInsertCallbackId { - Match3DAgentMessageInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: Match3DAgentMessageInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for Match3DAgentMessageTableHandle<'ctx> { - type DeleteCallbackId = Match3DAgentMessageDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> Match3DAgentMessageDeleteCallbackId { - Match3DAgentMessageDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: Match3DAgentMessageDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct Match3DAgentMessageUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for Match3DAgentMessageTableHandle<'ctx> { - type UpdateCallbackId = Match3DAgentMessageUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> Match3DAgentMessageUpdateCallbackId { - Match3DAgentMessageUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: Match3DAgentMessageUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for Match3DAgentMessageTableHandle<'ctx> { - type UpdateCallbackId = Match3DAgentMessageUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> Match3DAgentMessageUpdateCallbackId { - Match3DAgentMessageUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: Match3DAgentMessageUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `message_id` unique index on the table `match_3_d_agent_message`, -/// which allows point queries on the field of the same name -/// via the [`Match3DAgentMessageMessageIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.match_3_d_agent_message().message_id().find(...)`. -pub struct Match3DAgentMessageMessageIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> Match3DAgentMessageTableHandle<'ctx> { - /// Get a handle on the `message_id` unique index on the table `match_3_d_agent_message`. - pub fn message_id(&self) -> Match3DAgentMessageMessageIdUnique<'ctx> { - Match3DAgentMessageMessageIdUnique { - imp: self.imp.get_unique_constraint::("message_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> Match3DAgentMessageMessageIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("match_3_d_agent_message"); - _table.add_unique_constraint::("message_id", |row| &row.message_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `Match3DAgentMessageRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait match_3_d_agent_messageQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `Match3DAgentMessageRow`. - fn match_3_d_agent_message(&self) -> __sdk::__query_builder::Table; -} - -impl match_3_d_agent_messageQueryTableAccess for __sdk::QueryTableAccessor { - fn match_3_d_agent_message(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("match_3_d_agent_message") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/match_3_d_agent_session_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/match_3_d_agent_session_row_type.rs deleted file mode 100644 index 49c07da79..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/match_3_d_agent_session_row_type.rs +++ /dev/null @@ -1,90 +0,0 @@ -// 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 Match3DAgentSessionRow { - pub session_id: String, - pub owner_user_id: String, - pub seed_text: String, - pub current_turn: u32, - pub progress_percent: u32, - pub stage: String, - pub config_json: String, - pub draft_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 Match3DAgentSessionRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `Match3DAgentSessionRow`. -/// -/// Provides typed access to columns for query building. -pub struct Match3DAgentSessionRowCols { - pub session_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub seed_text: __sdk::__query_builder::Col, - pub current_turn: __sdk::__query_builder::Col, - pub progress_percent: __sdk::__query_builder::Col, - pub stage: __sdk::__query_builder::Col, - pub config_json: __sdk::__query_builder::Col, - pub draft_json: __sdk::__query_builder::Col, - pub last_assistant_reply: __sdk::__query_builder::Col, - pub published_profile_id: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for Match3DAgentSessionRow { - type Cols = Match3DAgentSessionRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - Match3DAgentSessionRowCols { - session_id: __sdk::__query_builder::Col::new(table_name, "session_id"), - owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"), - seed_text: __sdk::__query_builder::Col::new(table_name, "seed_text"), - current_turn: __sdk::__query_builder::Col::new(table_name, "current_turn"), - progress_percent: __sdk::__query_builder::Col::new(table_name, "progress_percent"), - stage: __sdk::__query_builder::Col::new(table_name, "stage"), - config_json: __sdk::__query_builder::Col::new(table_name, "config_json"), - draft_json: __sdk::__query_builder::Col::new(table_name, "draft_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 `Match3DAgentSessionRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct Match3DAgentSessionRowIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub session_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for Match3DAgentSessionRow { - type IxCols = Match3DAgentSessionRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - Match3DAgentSessionRowIxCols { - 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 Match3DAgentSessionRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/match_3_d_agent_session_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/match_3_d_agent_session_table.rs deleted file mode 100644 index 9e2d554a8..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/match_3_d_agent_session_table.rs +++ /dev/null @@ -1,231 +0,0 @@ -// 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::match_3_d_agent_session_row_type::Match3DAgentSessionRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `match_3_d_agent_session`. -/// -/// Obtain a handle from the [`Match3DAgentSessionTableAccess::match_3_d_agent_session`] method on [`super::RemoteTables`], -/// like `ctx.db.match_3_d_agent_session()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.match_3_d_agent_session().on_insert(...)`. -pub struct Match3DAgentSessionTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `match_3_d_agent_session`. -pub struct Match3DAgentSessionTableAccessor; - -impl __sdk::TableAccessor for Match3DAgentSessionTableAccessor { - type Row = Match3DAgentSessionRow; - type Handle<'db> = Match3DAgentSessionTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.match_3_d_agent_session() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `match_3_d_agent_session`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait Match3DAgentSessionTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`Match3DAgentSessionTableHandle`], which mediates access to the table `match_3_d_agent_session`. - fn match_3_d_agent_session(&self) -> Match3DAgentSessionTableHandle<'_>; -} - -impl Match3DAgentSessionTableAccess for super::RemoteTables { - fn match_3_d_agent_session(&self) -> Match3DAgentSessionTableHandle<'_> { - Match3DAgentSessionTableHandle { - imp: self - .imp - .get_table::("match_3_d_agent_session"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct Match3DAgentSessionInsertCallbackId(__sdk::CallbackId); -pub struct Match3DAgentSessionDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for Match3DAgentSessionTableHandle<'ctx> { - type Row = Match3DAgentSessionRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for Match3DAgentSessionTableHandle<'ctx> { - type Row = Match3DAgentSessionRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = Match3DAgentSessionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> Match3DAgentSessionInsertCallbackId { - Match3DAgentSessionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: Match3DAgentSessionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = Match3DAgentSessionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> Match3DAgentSessionDeleteCallbackId { - Match3DAgentSessionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: Match3DAgentSessionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for Match3DAgentSessionTableHandle<'ctx> { - type InsertCallbackId = Match3DAgentSessionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> Match3DAgentSessionInsertCallbackId { - Match3DAgentSessionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: Match3DAgentSessionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for Match3DAgentSessionTableHandle<'ctx> { - type DeleteCallbackId = Match3DAgentSessionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> Match3DAgentSessionDeleteCallbackId { - Match3DAgentSessionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: Match3DAgentSessionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct Match3DAgentSessionUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for Match3DAgentSessionTableHandle<'ctx> { - type UpdateCallbackId = Match3DAgentSessionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> Match3DAgentSessionUpdateCallbackId { - Match3DAgentSessionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: Match3DAgentSessionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for Match3DAgentSessionTableHandle<'ctx> { - type UpdateCallbackId = Match3DAgentSessionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> Match3DAgentSessionUpdateCallbackId { - Match3DAgentSessionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: Match3DAgentSessionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `session_id` unique index on the table `match_3_d_agent_session`, -/// which allows point queries on the field of the same name -/// via the [`Match3DAgentSessionSessionIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.match_3_d_agent_session().session_id().find(...)`. -pub struct Match3DAgentSessionSessionIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> Match3DAgentSessionTableHandle<'ctx> { - /// Get a handle on the `session_id` unique index on the table `match_3_d_agent_session`. - pub fn session_id(&self) -> Match3DAgentSessionSessionIdUnique<'ctx> { - Match3DAgentSessionSessionIdUnique { - imp: self.imp.get_unique_constraint::("session_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> Match3DAgentSessionSessionIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("match_3_d_agent_session"); - _table.add_unique_constraint::("session_id", |row| &row.session_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `Match3DAgentSessionRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait match_3_d_agent_sessionQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `Match3DAgentSessionRow`. - fn match_3_d_agent_session(&self) -> __sdk::__query_builder::Table; -} - -impl match_3_d_agent_sessionQueryTableAccess for __sdk::QueryTableAccessor { - fn match_3_d_agent_session(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("match_3_d_agent_session") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/match_3_d_runtime_run_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/match_3_d_runtime_run_row_type.rs deleted file mode 100644 index 66e8d4aa9..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/match_3_d_runtime_run_row_type.rs +++ /dev/null @@ -1,98 +0,0 @@ -// 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 Match3DRuntimeRunRow { - pub run_id: String, - pub owner_user_id: String, - pub profile_id: String, - pub status: String, - pub snapshot_version: u32, - pub started_at_ms: i64, - pub duration_limit_ms: i64, - pub finished_at_ms: i64, - pub elapsed_ms: i64, - pub clear_count: u32, - pub total_item_count: u32, - pub cleared_item_count: u32, - pub failure_reason: String, - pub snapshot_json: String, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for Match3DRuntimeRunRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `Match3DRuntimeRunRow`. -/// -/// Provides typed access to columns for query building. -pub struct Match3DRuntimeRunRowCols { - pub run_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub profile_id: __sdk::__query_builder::Col, - pub status: __sdk::__query_builder::Col, - pub snapshot_version: __sdk::__query_builder::Col, - pub started_at_ms: __sdk::__query_builder::Col, - pub duration_limit_ms: __sdk::__query_builder::Col, - pub finished_at_ms: __sdk::__query_builder::Col, - pub elapsed_ms: __sdk::__query_builder::Col, - pub clear_count: __sdk::__query_builder::Col, - pub total_item_count: __sdk::__query_builder::Col, - pub cleared_item_count: __sdk::__query_builder::Col, - pub failure_reason: __sdk::__query_builder::Col, - pub snapshot_json: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for Match3DRuntimeRunRow { - type Cols = Match3DRuntimeRunRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - Match3DRuntimeRunRowCols { - 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"), - status: __sdk::__query_builder::Col::new(table_name, "status"), - snapshot_version: __sdk::__query_builder::Col::new(table_name, "snapshot_version"), - started_at_ms: __sdk::__query_builder::Col::new(table_name, "started_at_ms"), - duration_limit_ms: __sdk::__query_builder::Col::new(table_name, "duration_limit_ms"), - finished_at_ms: __sdk::__query_builder::Col::new(table_name, "finished_at_ms"), - elapsed_ms: __sdk::__query_builder::Col::new(table_name, "elapsed_ms"), - clear_count: __sdk::__query_builder::Col::new(table_name, "clear_count"), - total_item_count: __sdk::__query_builder::Col::new(table_name, "total_item_count"), - cleared_item_count: __sdk::__query_builder::Col::new(table_name, "cleared_item_count"), - failure_reason: __sdk::__query_builder::Col::new(table_name, "failure_reason"), - 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 `Match3DRuntimeRunRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct Match3DRuntimeRunRowIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub profile_id: __sdk::__query_builder::IxCol, - pub run_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for Match3DRuntimeRunRow { - type IxCols = Match3DRuntimeRunRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - Match3DRuntimeRunRowIxCols { - 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 Match3DRuntimeRunRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/match_3_d_runtime_run_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/match_3_d_runtime_run_table.rs deleted file mode 100644 index 3998804da..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/match_3_d_runtime_run_table.rs +++ /dev/null @@ -1,230 +0,0 @@ -// 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::match_3_d_runtime_run_row_type::Match3DRuntimeRunRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `match_3_d_runtime_run`. -/// -/// Obtain a handle from the [`Match3DRuntimeRunTableAccess::match_3_d_runtime_run`] method on [`super::RemoteTables`], -/// like `ctx.db.match_3_d_runtime_run()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.match_3_d_runtime_run().on_insert(...)`. -pub struct Match3DRuntimeRunTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `match_3_d_runtime_run`. -pub struct Match3DRuntimeRunTableAccessor; - -impl __sdk::TableAccessor for Match3DRuntimeRunTableAccessor { - type Row = Match3DRuntimeRunRow; - type Handle<'db> = Match3DRuntimeRunTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.match_3_d_runtime_run() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `match_3_d_runtime_run`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait Match3DRuntimeRunTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`Match3DRuntimeRunTableHandle`], which mediates access to the table `match_3_d_runtime_run`. - fn match_3_d_runtime_run(&self) -> Match3DRuntimeRunTableHandle<'_>; -} - -impl Match3DRuntimeRunTableAccess for super::RemoteTables { - fn match_3_d_runtime_run(&self) -> Match3DRuntimeRunTableHandle<'_> { - Match3DRuntimeRunTableHandle { - imp: self - .imp - .get_table::("match_3_d_runtime_run"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct Match3DRuntimeRunInsertCallbackId(__sdk::CallbackId); -pub struct Match3DRuntimeRunDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for Match3DRuntimeRunTableHandle<'ctx> { - type Row = Match3DRuntimeRunRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for Match3DRuntimeRunTableHandle<'ctx> { - type Row = Match3DRuntimeRunRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = Match3DRuntimeRunInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> Match3DRuntimeRunInsertCallbackId { - Match3DRuntimeRunInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: Match3DRuntimeRunInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = Match3DRuntimeRunDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> Match3DRuntimeRunDeleteCallbackId { - Match3DRuntimeRunDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: Match3DRuntimeRunDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for Match3DRuntimeRunTableHandle<'ctx> { - type InsertCallbackId = Match3DRuntimeRunInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> Match3DRuntimeRunInsertCallbackId { - Match3DRuntimeRunInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: Match3DRuntimeRunInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for Match3DRuntimeRunTableHandle<'ctx> { - type DeleteCallbackId = Match3DRuntimeRunDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> Match3DRuntimeRunDeleteCallbackId { - Match3DRuntimeRunDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: Match3DRuntimeRunDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct Match3DRuntimeRunUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for Match3DRuntimeRunTableHandle<'ctx> { - type UpdateCallbackId = Match3DRuntimeRunUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> Match3DRuntimeRunUpdateCallbackId { - Match3DRuntimeRunUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: Match3DRuntimeRunUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for Match3DRuntimeRunTableHandle<'ctx> { - type UpdateCallbackId = Match3DRuntimeRunUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> Match3DRuntimeRunUpdateCallbackId { - Match3DRuntimeRunUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: Match3DRuntimeRunUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `run_id` unique index on the table `match_3_d_runtime_run`, -/// which allows point queries on the field of the same name -/// via the [`Match3DRuntimeRunRunIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.match_3_d_runtime_run().run_id().find(...)`. -pub struct Match3DRuntimeRunRunIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> Match3DRuntimeRunTableHandle<'ctx> { - /// Get a handle on the `run_id` unique index on the table `match_3_d_runtime_run`. - pub fn run_id(&self) -> Match3DRuntimeRunRunIdUnique<'ctx> { - Match3DRuntimeRunRunIdUnique { - imp: self.imp.get_unique_constraint::("run_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> Match3DRuntimeRunRunIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("match_3_d_runtime_run"); - _table.add_unique_constraint::("run_id", |row| &row.run_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `Match3DRuntimeRunRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait match_3_d_runtime_runQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `Match3DRuntimeRunRow`. - fn match_3_d_runtime_run(&self) -> __sdk::__query_builder::Table; -} - -impl match_3_d_runtime_runQueryTableAccess for __sdk::QueryTableAccessor { - fn match_3_d_runtime_run(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("match_3_d_runtime_run") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/match_3_d_work_profile_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/match_3_d_work_profile_row_type.rs deleted file mode 100644 index aafe2065a..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/match_3_d_work_profile_row_type.rs +++ /dev/null @@ -1,117 +0,0 @@ -// 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 Match3DWorkProfileRow { - pub profile_id: String, - pub owner_user_id: String, - pub source_session_id: String, - pub author_display_name: String, - pub game_name: String, - pub theme_text: String, - pub summary_text: String, - pub tags_json: String, - pub cover_image_src: String, - pub cover_asset_id: String, - pub clear_count: u32, - pub difficulty: u32, - pub config_json: String, - pub publication_status: String, - pub play_count: u32, - pub updated_at: __sdk::Timestamp, - pub published_at: Option<__sdk::Timestamp>, - pub generated_item_assets_json: Option, - pub visible: bool, -} - -impl __sdk::InModule for Match3DWorkProfileRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `Match3DWorkProfileRow`. -/// -/// Provides typed access to columns for query building. -pub struct Match3DWorkProfileRowCols { - pub profile_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub source_session_id: __sdk::__query_builder::Col, - pub author_display_name: __sdk::__query_builder::Col, - pub game_name: __sdk::__query_builder::Col, - pub theme_text: __sdk::__query_builder::Col, - pub summary_text: __sdk::__query_builder::Col, - pub tags_json: __sdk::__query_builder::Col, - pub cover_image_src: __sdk::__query_builder::Col, - pub cover_asset_id: __sdk::__query_builder::Col, - pub clear_count: __sdk::__query_builder::Col, - pub difficulty: __sdk::__query_builder::Col, - pub config_json: __sdk::__query_builder::Col, - pub publication_status: __sdk::__query_builder::Col, - pub play_count: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, - pub published_at: __sdk::__query_builder::Col>, - pub generated_item_assets_json: - __sdk::__query_builder::Col>, - pub visible: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for Match3DWorkProfileRow { - type Cols = Match3DWorkProfileRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - Match3DWorkProfileRowCols { - profile_id: __sdk::__query_builder::Col::new(table_name, "profile_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", - ), - game_name: __sdk::__query_builder::Col::new(table_name, "game_name"), - theme_text: __sdk::__query_builder::Col::new(table_name, "theme_text"), - summary_text: __sdk::__query_builder::Col::new(table_name, "summary_text"), - tags_json: __sdk::__query_builder::Col::new(table_name, "tags_json"), - cover_image_src: __sdk::__query_builder::Col::new(table_name, "cover_image_src"), - cover_asset_id: __sdk::__query_builder::Col::new(table_name, "cover_asset_id"), - clear_count: __sdk::__query_builder::Col::new(table_name, "clear_count"), - difficulty: __sdk::__query_builder::Col::new(table_name, "difficulty"), - config_json: __sdk::__query_builder::Col::new(table_name, "config_json"), - publication_status: __sdk::__query_builder::Col::new(table_name, "publication_status"), - play_count: __sdk::__query_builder::Col::new(table_name, "play_count"), - updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), - published_at: __sdk::__query_builder::Col::new(table_name, "published_at"), - generated_item_assets_json: __sdk::__query_builder::Col::new( - table_name, - "generated_item_assets_json", - ), - visible: __sdk::__query_builder::Col::new(table_name, "visible"), - } - } -} - -/// Indexed column accessor struct for the table `Match3DWorkProfileRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct Match3DWorkProfileRowIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub profile_id: __sdk::__query_builder::IxCol, - pub publication_status: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for Match3DWorkProfileRow { - type IxCols = Match3DWorkProfileRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - Match3DWorkProfileRowIxCols { - 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 Match3DWorkProfileRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/match_3_d_work_profile_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/match_3_d_work_profile_table.rs deleted file mode 100644 index dc5155c43..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/match_3_d_work_profile_table.rs +++ /dev/null @@ -1,230 +0,0 @@ -// 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::match_3_d_work_profile_row_type::Match3DWorkProfileRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `match_3_d_work_profile`. -/// -/// Obtain a handle from the [`Match3DWorkProfileTableAccess::match_3_d_work_profile`] method on [`super::RemoteTables`], -/// like `ctx.db.match_3_d_work_profile()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.match_3_d_work_profile().on_insert(...)`. -pub struct Match3DWorkProfileTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `match_3_d_work_profile`. -pub struct Match3DWorkProfileTableAccessor; - -impl __sdk::TableAccessor for Match3DWorkProfileTableAccessor { - type Row = Match3DWorkProfileRow; - type Handle<'db> = Match3DWorkProfileTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.match_3_d_work_profile() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `match_3_d_work_profile`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait Match3DWorkProfileTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`Match3DWorkProfileTableHandle`], which mediates access to the table `match_3_d_work_profile`. - fn match_3_d_work_profile(&self) -> Match3DWorkProfileTableHandle<'_>; -} - -impl Match3DWorkProfileTableAccess for super::RemoteTables { - fn match_3_d_work_profile(&self) -> Match3DWorkProfileTableHandle<'_> { - Match3DWorkProfileTableHandle { - imp: self - .imp - .get_table::("match_3_d_work_profile"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct Match3DWorkProfileInsertCallbackId(__sdk::CallbackId); -pub struct Match3DWorkProfileDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for Match3DWorkProfileTableHandle<'ctx> { - type Row = Match3DWorkProfileRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for Match3DWorkProfileTableHandle<'ctx> { - type Row = Match3DWorkProfileRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = Match3DWorkProfileInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> Match3DWorkProfileInsertCallbackId { - Match3DWorkProfileInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: Match3DWorkProfileInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = Match3DWorkProfileDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> Match3DWorkProfileDeleteCallbackId { - Match3DWorkProfileDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: Match3DWorkProfileDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for Match3DWorkProfileTableHandle<'ctx> { - type InsertCallbackId = Match3DWorkProfileInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> Match3DWorkProfileInsertCallbackId { - Match3DWorkProfileInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: Match3DWorkProfileInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for Match3DWorkProfileTableHandle<'ctx> { - type DeleteCallbackId = Match3DWorkProfileDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> Match3DWorkProfileDeleteCallbackId { - Match3DWorkProfileDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: Match3DWorkProfileDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct Match3DWorkProfileUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for Match3DWorkProfileTableHandle<'ctx> { - type UpdateCallbackId = Match3DWorkProfileUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> Match3DWorkProfileUpdateCallbackId { - Match3DWorkProfileUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: Match3DWorkProfileUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for Match3DWorkProfileTableHandle<'ctx> { - type UpdateCallbackId = Match3DWorkProfileUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> Match3DWorkProfileUpdateCallbackId { - Match3DWorkProfileUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: Match3DWorkProfileUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `profile_id` unique index on the table `match_3_d_work_profile`, -/// which allows point queries on the field of the same name -/// via the [`Match3DWorkProfileProfileIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.match_3_d_work_profile().profile_id().find(...)`. -pub struct Match3DWorkProfileProfileIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> Match3DWorkProfileTableHandle<'ctx> { - /// Get a handle on the `profile_id` unique index on the table `match_3_d_work_profile`. - pub fn profile_id(&self) -> Match3DWorkProfileProfileIdUnique<'ctx> { - Match3DWorkProfileProfileIdUnique { - imp: self.imp.get_unique_constraint::("profile_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> Match3DWorkProfileProfileIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("match_3_d_work_profile"); - _table.add_unique_constraint::("profile_id", |row| &row.profile_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `Match3DWorkProfileRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait match_3_d_work_profileQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `Match3DWorkProfileRow`. - fn match_3_d_work_profile(&self) -> __sdk::__query_builder::Table; -} - -impl match_3_d_work_profileQueryTableAccess for __sdk::QueryTableAccessor { - fn match_3_d_work_profile(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("match_3_d_work_profile") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/normalize_editor_character_animation_metadata_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/normalize_editor_character_animation_metadata_and_return_procedure.rs index 083ef15b9..68712687d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/normalize_editor_character_animation_metadata_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/normalize_editor_character_animation_metadata_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait normalize_editor_character_animation_metadata_and_return { input: EditorCharacterAnimationNormalizationInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl normalize_editor_character_animation_metadata_and_return for super::RemoteP input: EditorCharacterAnimationNormalizationInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp.invoke_procedure_with_callback::<_, EditorCharacterAnimationNormalizationProcedureResult>( "normalize_editor_character_animation_metadata_and_return", diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_relation_stance_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_relation_stance_type.rs deleted file mode 100644 index 48e8ac700..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_relation_stance_type.rs +++ /dev/null @@ -1,24 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum NpcRelationStance { - Hostile, - - Guarded, - - Neutral, - - Cooperative, - - Bonded, -} - -impl __sdk::InModule for NpcRelationStance { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_relation_state_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_relation_state_type.rs deleted file mode 100644 index b6bbc07d1..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_relation_state_type.rs +++ /dev/null @@ -1,18 +0,0 @@ -// 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::npc_relation_stance_type::NpcRelationStance; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct NpcRelationState { - pub affinity: i32, - pub stance: NpcRelationStance, -} - -impl __sdk::InModule for NpcRelationState { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_stance_profile_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_stance_profile_type.rs deleted file mode 100644 index 73177673f..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_stance_profile_type.rs +++ /dev/null @@ -1,22 +0,0 @@ -// 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 NpcStanceProfile { - pub trust: u8, - pub warmth: u8, - pub ideological_fit: u8, - pub fear_or_guard: u8, - pub loyalty: u8, - pub current_conflict_tag: Option, - pub recent_approvals: Vec, - pub recent_disapprovals: Vec, -} - -impl __sdk::InModule for NpcStanceProfile { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_state_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_state_table.rs deleted file mode 100644 index 83c676126..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_state_table.rs +++ /dev/null @@ -1,230 +0,0 @@ -// 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::npc_relation_state_type::NpcRelationState; -use super::npc_stance_profile_type::NpcStanceProfile; -use super::npc_state_type::NpcState; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `npc_state`. -/// -/// Obtain a handle from the [`NpcStateTableAccess::npc_state`] method on [`super::RemoteTables`], -/// like `ctx.db.npc_state()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.npc_state().on_insert(...)`. -pub struct NpcStateTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `npc_state`. -pub struct NpcStateTableAccessor; - -impl __sdk::TableAccessor for NpcStateTableAccessor { - type Row = NpcState; - type Handle<'db> = NpcStateTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.npc_state() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `npc_state`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait NpcStateTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`NpcStateTableHandle`], which mediates access to the table `npc_state`. - fn npc_state(&self) -> NpcStateTableHandle<'_>; -} - -impl NpcStateTableAccess for super::RemoteTables { - fn npc_state(&self) -> NpcStateTableHandle<'_> { - NpcStateTableHandle { - imp: self.imp.get_table::("npc_state"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct NpcStateInsertCallbackId(__sdk::CallbackId); -pub struct NpcStateDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for NpcStateTableHandle<'ctx> { - type Row = NpcState; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for NpcStateTableHandle<'ctx> { - type Row = NpcState; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = NpcStateInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> NpcStateInsertCallbackId { - NpcStateInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: NpcStateInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = NpcStateDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> NpcStateDeleteCallbackId { - NpcStateDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: NpcStateDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for NpcStateTableHandle<'ctx> { - type InsertCallbackId = NpcStateInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> NpcStateInsertCallbackId { - NpcStateInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: NpcStateInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for NpcStateTableHandle<'ctx> { - type DeleteCallbackId = NpcStateDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> NpcStateDeleteCallbackId { - NpcStateDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: NpcStateDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct NpcStateUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for NpcStateTableHandle<'ctx> { - type UpdateCallbackId = NpcStateUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> NpcStateUpdateCallbackId { - NpcStateUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: NpcStateUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for NpcStateTableHandle<'ctx> { - type UpdateCallbackId = NpcStateUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> NpcStateUpdateCallbackId { - NpcStateUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: NpcStateUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `npc_state_id` unique index on the table `npc_state`, -/// which allows point queries on the field of the same name -/// via the [`NpcStateNpcStateIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.npc_state().npc_state_id().find(...)`. -pub struct NpcStateNpcStateIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> NpcStateTableHandle<'ctx> { - /// Get a handle on the `npc_state_id` unique index on the table `npc_state`. - pub fn npc_state_id(&self) -> NpcStateNpcStateIdUnique<'ctx> { - NpcStateNpcStateIdUnique { - imp: self.imp.get_unique_constraint::("npc_state_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> NpcStateNpcStateIdUnique<'ctx> { - /// Find the subscribed row whose `npc_state_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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("npc_state"); - _table.add_unique_constraint::("npc_state_id", |row| &row.npc_state_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `NpcState`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait npc_stateQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `NpcState`. - fn npc_state(&self) -> __sdk::__query_builder::Table; -} - -impl npc_stateQueryTableAccess for __sdk::QueryTableAccessor { - fn npc_state(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("npc_state") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_state_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_state_type.rs deleted file mode 100644 index 1ddeec426..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_state_type.rs +++ /dev/null @@ -1,122 +0,0 @@ -// 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::npc_relation_state_type::NpcRelationState; -use super::npc_stance_profile_type::NpcStanceProfile; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct NpcState { - pub npc_state_id: String, - pub runtime_session_id: String, - pub npc_id: String, - pub npc_name: String, - pub affinity: i32, - pub relation_state: NpcRelationState, - pub help_used: bool, - pub chatted_count: u32, - pub gifts_given: u32, - pub recruited: bool, - pub trade_stock_signature: Option, - pub revealed_facts: Vec, - pub known_attribute_rumors: Vec, - pub first_meaningful_contact_resolved: bool, - pub seen_backstory_chapter_ids: Vec, - pub stance_profile: NpcStanceProfile, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for NpcState { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `NpcState`. -/// -/// Provides typed access to columns for query building. -pub struct NpcStateCols { - pub npc_state_id: __sdk::__query_builder::Col, - pub runtime_session_id: __sdk::__query_builder::Col, - pub npc_id: __sdk::__query_builder::Col, - pub npc_name: __sdk::__query_builder::Col, - pub affinity: __sdk::__query_builder::Col, - pub relation_state: __sdk::__query_builder::Col, - pub help_used: __sdk::__query_builder::Col, - pub chatted_count: __sdk::__query_builder::Col, - pub gifts_given: __sdk::__query_builder::Col, - pub recruited: __sdk::__query_builder::Col, - pub trade_stock_signature: __sdk::__query_builder::Col>, - pub revealed_facts: __sdk::__query_builder::Col>, - pub known_attribute_rumors: __sdk::__query_builder::Col>, - pub first_meaningful_contact_resolved: __sdk::__query_builder::Col, - pub seen_backstory_chapter_ids: __sdk::__query_builder::Col>, - pub stance_profile: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for NpcState { - type Cols = NpcStateCols; - fn cols(table_name: &'static str) -> Self::Cols { - NpcStateCols { - npc_state_id: __sdk::__query_builder::Col::new(table_name, "npc_state_id"), - runtime_session_id: __sdk::__query_builder::Col::new(table_name, "runtime_session_id"), - npc_id: __sdk::__query_builder::Col::new(table_name, "npc_id"), - npc_name: __sdk::__query_builder::Col::new(table_name, "npc_name"), - affinity: __sdk::__query_builder::Col::new(table_name, "affinity"), - relation_state: __sdk::__query_builder::Col::new(table_name, "relation_state"), - help_used: __sdk::__query_builder::Col::new(table_name, "help_used"), - chatted_count: __sdk::__query_builder::Col::new(table_name, "chatted_count"), - gifts_given: __sdk::__query_builder::Col::new(table_name, "gifts_given"), - recruited: __sdk::__query_builder::Col::new(table_name, "recruited"), - trade_stock_signature: __sdk::__query_builder::Col::new( - table_name, - "trade_stock_signature", - ), - revealed_facts: __sdk::__query_builder::Col::new(table_name, "revealed_facts"), - known_attribute_rumors: __sdk::__query_builder::Col::new( - table_name, - "known_attribute_rumors", - ), - first_meaningful_contact_resolved: __sdk::__query_builder::Col::new( - table_name, - "first_meaningful_contact_resolved", - ), - seen_backstory_chapter_ids: __sdk::__query_builder::Col::new( - table_name, - "seen_backstory_chapter_ids", - ), - stance_profile: __sdk::__query_builder::Col::new(table_name, "stance_profile"), - 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 `NpcState`. -/// -/// Provides typed access to indexed columns for query building. -pub struct NpcStateIxCols { - pub npc_id: __sdk::__query_builder::IxCol, - pub npc_state_id: __sdk::__query_builder::IxCol, - pub runtime_session_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for NpcState { - type IxCols = NpcStateIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - NpcStateIxCols { - npc_id: __sdk::__query_builder::IxCol::new(table_name, "npc_id"), - npc_state_id: __sdk::__query_builder::IxCol::new(table_name, "npc_state_id"), - runtime_session_id: __sdk::__query_builder::IxCol::new( - table_name, - "runtime_session_id", - ), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for NpcState {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/persist_editor_generation_result_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/persist_editor_generation_result_and_return_procedure.rs index 6e05128b2..17c3468dc 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/persist_editor_generation_result_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/persist_editor_generation_result_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait persist_editor_generation_result_and_return { input: EditorGenerationResultPersistInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl persist_editor_generation_result_and_return for super::RemoteProcedures { input: EditorGenerationResultPersistInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorGenerationResultPersistResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/persist_editor_pixel_art_result_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/persist_editor_pixel_art_result_and_return_procedure.rs index c25ee2e1c..cdccf6f35 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/persist_editor_pixel_art_result_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/persist_editor_pixel_art_result_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait persist_editor_pixel_art_result_and_return { input: EditorPixelArtResultPersistInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl persist_editor_pixel_art_result_and_return for super::RemoteProcedures { input: EditorPixelArtResultPersistInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorPixelArtResultPersistResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/persist_editor_spritesheet_slice_batch_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/persist_editor_spritesheet_slice_batch_and_return_procedure.rs index bbf93f160..5789c1e76 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/persist_editor_spritesheet_slice_batch_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/persist_editor_spritesheet_slice_batch_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait persist_editor_spritesheet_slice_batch_and_return { input: EditorSpritesheetSliceBatchPersistInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl persist_editor_spritesheet_slice_batch_and_return for super::RemoteProcedur input: EditorSpritesheetSliceBatchPersistInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorSpritesheetSliceBatchPersistResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_grant_source_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/player_progression_grant_source_type.rs deleted file mode 100644 index bf3ae257f..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_grant_source_type.rs +++ /dev/null @@ -1,18 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum PlayerProgressionGrantSource { - Quest, - - HostileNpc, -} - -impl __sdk::InModule for PlayerProgressionGrantSource { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/player_progression_table.rs deleted file mode 100644 index 12f1cb0db..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_table.rs +++ /dev/null @@ -1,231 +0,0 @@ -// 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::player_progression_grant_source_type::PlayerProgressionGrantSource; -use super::player_progression_type::PlayerProgression; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `player_progression`. -/// -/// Obtain a handle from the [`PlayerProgressionTableAccess::player_progression`] method on [`super::RemoteTables`], -/// like `ctx.db.player_progression()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.player_progression().on_insert(...)`. -pub struct PlayerProgressionTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `player_progression`. -pub struct PlayerProgressionTableAccessor; - -impl __sdk::TableAccessor for PlayerProgressionTableAccessor { - type Row = PlayerProgression; - type Handle<'db> = PlayerProgressionTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.player_progression() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `player_progression`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait PlayerProgressionTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`PlayerProgressionTableHandle`], which mediates access to the table `player_progression`. - fn player_progression(&self) -> PlayerProgressionTableHandle<'_>; -} - -impl PlayerProgressionTableAccess for super::RemoteTables { - fn player_progression(&self) -> PlayerProgressionTableHandle<'_> { - PlayerProgressionTableHandle { - imp: self - .imp - .get_table::("player_progression"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct PlayerProgressionInsertCallbackId(__sdk::CallbackId); -pub struct PlayerProgressionDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for PlayerProgressionTableHandle<'ctx> { - type Row = PlayerProgression; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for PlayerProgressionTableHandle<'ctx> { - type Row = PlayerProgression; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = PlayerProgressionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PlayerProgressionInsertCallbackId { - PlayerProgressionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: PlayerProgressionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = PlayerProgressionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PlayerProgressionDeleteCallbackId { - PlayerProgressionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: PlayerProgressionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for PlayerProgressionTableHandle<'ctx> { - type InsertCallbackId = PlayerProgressionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PlayerProgressionInsertCallbackId { - PlayerProgressionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: PlayerProgressionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for PlayerProgressionTableHandle<'ctx> { - type DeleteCallbackId = PlayerProgressionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PlayerProgressionDeleteCallbackId { - PlayerProgressionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: PlayerProgressionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct PlayerProgressionUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for PlayerProgressionTableHandle<'ctx> { - type UpdateCallbackId = PlayerProgressionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> PlayerProgressionUpdateCallbackId { - PlayerProgressionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: PlayerProgressionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for PlayerProgressionTableHandle<'ctx> { - type UpdateCallbackId = PlayerProgressionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> PlayerProgressionUpdateCallbackId { - PlayerProgressionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: PlayerProgressionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `user_id` unique index on the table `player_progression`, -/// which allows point queries on the field of the same name -/// via the [`PlayerProgressionUserIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.player_progression().user_id().find(...)`. -pub struct PlayerProgressionUserIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> PlayerProgressionTableHandle<'ctx> { - /// Get a handle on the `user_id` unique index on the table `player_progression`. - pub fn user_id(&self) -> PlayerProgressionUserIdUnique<'ctx> { - PlayerProgressionUserIdUnique { - imp: self.imp.get_unique_constraint::("user_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> PlayerProgressionUserIdUnique<'ctx> { - /// Find the subscribed row whose `user_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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("player_progression"); - _table.add_unique_constraint::("user_id", |row| &row.user_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `PlayerProgression`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait player_progressionQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `PlayerProgression`. - fn player_progression(&self) -> __sdk::__query_builder::Table; -} - -impl player_progressionQueryTableAccess for __sdk::QueryTableAccessor { - fn player_progression(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("player_progression") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/player_progression_type.rs deleted file mode 100644 index c734d1c2f..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_type.rs +++ /dev/null @@ -1,79 +0,0 @@ -// 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::player_progression_grant_source_type::PlayerProgressionGrantSource; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct PlayerProgression { - pub user_id: String, - pub level: u32, - pub current_level_xp: u32, - pub total_xp: u32, - pub xp_to_next_level: u32, - pub pending_level_ups: u32, - pub last_granted_source: Option, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for PlayerProgression { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `PlayerProgression`. -/// -/// Provides typed access to columns for query building. -pub struct PlayerProgressionCols { - pub user_id: __sdk::__query_builder::Col, - pub level: __sdk::__query_builder::Col, - pub current_level_xp: __sdk::__query_builder::Col, - pub total_xp: __sdk::__query_builder::Col, - pub xp_to_next_level: __sdk::__query_builder::Col, - pub pending_level_ups: __sdk::__query_builder::Col, - pub last_granted_source: - __sdk::__query_builder::Col>, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for PlayerProgression { - type Cols = PlayerProgressionCols; - fn cols(table_name: &'static str) -> Self::Cols { - PlayerProgressionCols { - user_id: __sdk::__query_builder::Col::new(table_name, "user_id"), - level: __sdk::__query_builder::Col::new(table_name, "level"), - current_level_xp: __sdk::__query_builder::Col::new(table_name, "current_level_xp"), - total_xp: __sdk::__query_builder::Col::new(table_name, "total_xp"), - xp_to_next_level: __sdk::__query_builder::Col::new(table_name, "xp_to_next_level"), - pending_level_ups: __sdk::__query_builder::Col::new(table_name, "pending_level_ups"), - last_granted_source: __sdk::__query_builder::Col::new( - table_name, - "last_granted_source", - ), - 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 `PlayerProgression`. -/// -/// Provides typed access to indexed columns for query building. -pub struct PlayerProgressionIxCols { - pub user_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for PlayerProgression { - type IxCols = PlayerProgressionIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - PlayerProgressionIxCols { - user_id: __sdk::__query_builder::IxCol::new(table_name, "user_id"), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for PlayerProgression {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/preflight_editor_generation_target_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/preflight_editor_generation_target_and_return_procedure.rs index f2b701d1b..f734a0fdf 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/preflight_editor_generation_target_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/preflight_editor_generation_target_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait preflight_editor_generation_target_and_return { input: EditorGenerationTargetPreflightInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl preflight_editor_generation_target_and_return for super::RemoteProcedures { input: EditorGenerationTargetPreflightInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorGenerationTargetPreflightResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/preflight_editor_pixel_art_result_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/preflight_editor_pixel_art_result_and_return_procedure.rs index f38144b63..e2aa2624a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/preflight_editor_pixel_art_result_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/preflight_editor_pixel_art_result_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait preflight_editor_pixel_art_result_and_return { input: EditorPixelArtResultPreflightInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl preflight_editor_pixel_art_result_and_return for super::RemoteProcedures { input: EditorPixelArtResultPreflightInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorPixelArtResultPreflightResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/prepare_profile_recharge_refund_hold_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/prepare_profile_recharge_refund_hold_and_return_procedure.rs index 401e46c3b..e23c2e5c3 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/prepare_profile_recharge_refund_hold_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/prepare_profile_recharge_refund_hold_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait prepare_profile_recharge_refund_hold_and_return { input: RuntimeProfileRechargeRefundHoldPrepareInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl prepare_profile_recharge_refund_hold_and_return for super::RemoteProcedures input: RuntimeProfileRechargeRefundHoldPrepareInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileRechargeRefundHoldProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/preview_profile_recharge_refund_hold_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/preview_profile_recharge_refund_hold_and_return_procedure.rs index d89f4664c..ac8898bb6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/preview_profile_recharge_refund_hold_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/preview_profile_recharge_refund_hold_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait preview_profile_recharge_refund_hold_and_return { input: RuntimeProfileRechargeRefundHoldPreviewInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl preview_profile_recharge_refund_hold_and_return for super::RemoteProcedures input: RuntimeProfileRechargeRefundHoldPreviewInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileRechargeRefundHoldProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/process_profile_wallet_refund_outbox_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/process_profile_wallet_refund_outbox_and_return_procedure.rs index c7fb461ec..8b6f64ccd 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/process_profile_wallet_refund_outbox_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/process_profile_wallet_refund_outbox_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait process_profile_wallet_refund_outbox_and_return { input: RuntimeProfileWalletRefundOutboxProcessInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl process_profile_wallet_refund_outbox_and_return for super::RemoteProcedures input: RuntimeProfileWalletRefundOutboxProcessInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileWalletRefundOutboxProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/prune_external_generation_job_history_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/prune_external_generation_job_history_and_return_procedure.rs index 37a9d55d5..877d06380 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/prune_external_generation_job_history_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/prune_external_generation_job_history_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait prune_external_generation_job_history_and_return { input: ExternalGenerationJobRetentionInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl prune_external_generation_job_history_and_return for super::RemoteProcedure input: ExternalGenerationJobRetentionInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, ExternalGenerationJobRetentionProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/public_work_play_daily_stat_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/public_work_play_daily_stat_table.rs index 5b589fc7a..3117ed994 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/public_work_play_daily_stat_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/public_work_play_daily_stat_table.rs @@ -222,7 +222,7 @@ pub trait public_work_play_daily_statQueryTableAccess { #[allow(non_snake_case)] /// Get a query builder for the table `PublicWorkPlayDailyStat`. fn public_work_play_daily_stat(&self) - -> __sdk::__query_builder::Table; + -> __sdk::__query_builder::Table; } impl public_work_play_daily_statQueryTableAccess for __sdk::QueryTableAccessor { diff --git a/server-rs/crates/spacetime-client/src/module_bindings/put_database_migration_import_chunk_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/put_database_migration_import_chunk_procedure.rs index f3776bfdc..597b25119 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/put_database_migration_import_chunk_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/put_database_migration_import_chunk_procedure.rs @@ -31,10 +31,10 @@ pub trait put_database_migration_import_chunk { input: DatabaseMigrationImportChunkInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl put_database_migration_import_chunk for super::RemoteProcedures { input: DatabaseMigrationImportChunkInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, DatabaseMigrationProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_kind_type.rs deleted file mode 100644 index ca46edeba..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_kind_type.rs +++ /dev/null @@ -1,22 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum PuzzleAgentMessageKind { - Chat, - - Summary, - - ActionResult, - - Warning, -} - -impl __sdk::InModule for PuzzleAgentMessageKind { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_role_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_role_type.rs deleted file mode 100644 index 5dd7eb511..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_role_type.rs +++ /dev/null @@ -1,20 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum PuzzleAgentMessageRole { - User, - - Assistant, - - System, -} - -impl __sdk::InModule for PuzzleAgentMessageRole { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_row_type.rs deleted file mode 100644 index b0bb85f2d..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_row_type.rs +++ /dev/null @@ -1,69 +0,0 @@ -// 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::puzzle_agent_message_kind_type::PuzzleAgentMessageKind; -use super::puzzle_agent_message_role_type::PuzzleAgentMessageRole; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct PuzzleAgentMessageRow { - pub message_id: String, - pub session_id: String, - pub role: PuzzleAgentMessageRole, - pub kind: PuzzleAgentMessageKind, - pub text: String, - pub created_at: __sdk::Timestamp, -} - -impl __sdk::InModule for PuzzleAgentMessageRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `PuzzleAgentMessageRow`. -/// -/// Provides typed access to columns for query building. -pub struct PuzzleAgentMessageRowCols { - pub message_id: __sdk::__query_builder::Col, - pub session_id: __sdk::__query_builder::Col, - pub role: __sdk::__query_builder::Col, - pub kind: __sdk::__query_builder::Col, - pub text: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for PuzzleAgentMessageRow { - type Cols = PuzzleAgentMessageRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - PuzzleAgentMessageRowCols { - 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 `PuzzleAgentMessageRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct PuzzleAgentMessageRowIxCols { - pub message_id: __sdk::__query_builder::IxCol, - pub session_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for PuzzleAgentMessageRow { - type IxCols = PuzzleAgentMessageRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - PuzzleAgentMessageRowIxCols { - 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 PuzzleAgentMessageRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_table.rs deleted file mode 100644 index eb26ee22d..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_table.rs +++ /dev/null @@ -1,232 +0,0 @@ -// 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::puzzle_agent_message_kind_type::PuzzleAgentMessageKind; -use super::puzzle_agent_message_role_type::PuzzleAgentMessageRole; -use super::puzzle_agent_message_row_type::PuzzleAgentMessageRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `puzzle_agent_message`. -/// -/// Obtain a handle from the [`PuzzleAgentMessageTableAccess::puzzle_agent_message`] method on [`super::RemoteTables`], -/// like `ctx.db.puzzle_agent_message()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.puzzle_agent_message().on_insert(...)`. -pub struct PuzzleAgentMessageTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `puzzle_agent_message`. -pub struct PuzzleAgentMessageTableAccessor; - -impl __sdk::TableAccessor for PuzzleAgentMessageTableAccessor { - type Row = PuzzleAgentMessageRow; - type Handle<'db> = PuzzleAgentMessageTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.puzzle_agent_message() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `puzzle_agent_message`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait PuzzleAgentMessageTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`PuzzleAgentMessageTableHandle`], which mediates access to the table `puzzle_agent_message`. - fn puzzle_agent_message(&self) -> PuzzleAgentMessageTableHandle<'_>; -} - -impl PuzzleAgentMessageTableAccess for super::RemoteTables { - fn puzzle_agent_message(&self) -> PuzzleAgentMessageTableHandle<'_> { - PuzzleAgentMessageTableHandle { - imp: self - .imp - .get_table::("puzzle_agent_message"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct PuzzleAgentMessageInsertCallbackId(__sdk::CallbackId); -pub struct PuzzleAgentMessageDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for PuzzleAgentMessageTableHandle<'ctx> { - type Row = PuzzleAgentMessageRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for PuzzleAgentMessageTableHandle<'ctx> { - type Row = PuzzleAgentMessageRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = PuzzleAgentMessageInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleAgentMessageInsertCallbackId { - PuzzleAgentMessageInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: PuzzleAgentMessageInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = PuzzleAgentMessageDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleAgentMessageDeleteCallbackId { - PuzzleAgentMessageDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: PuzzleAgentMessageDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for PuzzleAgentMessageTableHandle<'ctx> { - type InsertCallbackId = PuzzleAgentMessageInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleAgentMessageInsertCallbackId { - PuzzleAgentMessageInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: PuzzleAgentMessageInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for PuzzleAgentMessageTableHandle<'ctx> { - type DeleteCallbackId = PuzzleAgentMessageDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleAgentMessageDeleteCallbackId { - PuzzleAgentMessageDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: PuzzleAgentMessageDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct PuzzleAgentMessageUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for PuzzleAgentMessageTableHandle<'ctx> { - type UpdateCallbackId = PuzzleAgentMessageUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> PuzzleAgentMessageUpdateCallbackId { - PuzzleAgentMessageUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: PuzzleAgentMessageUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for PuzzleAgentMessageTableHandle<'ctx> { - type UpdateCallbackId = PuzzleAgentMessageUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> PuzzleAgentMessageUpdateCallbackId { - PuzzleAgentMessageUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: PuzzleAgentMessageUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `message_id` unique index on the table `puzzle_agent_message`, -/// which allows point queries on the field of the same name -/// via the [`PuzzleAgentMessageMessageIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.puzzle_agent_message().message_id().find(...)`. -pub struct PuzzleAgentMessageMessageIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> PuzzleAgentMessageTableHandle<'ctx> { - /// Get a handle on the `message_id` unique index on the table `puzzle_agent_message`. - pub fn message_id(&self) -> PuzzleAgentMessageMessageIdUnique<'ctx> { - PuzzleAgentMessageMessageIdUnique { - imp: self.imp.get_unique_constraint::("message_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> PuzzleAgentMessageMessageIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("puzzle_agent_message"); - _table.add_unique_constraint::("message_id", |row| &row.message_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `PuzzleAgentMessageRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait puzzle_agent_messageQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `PuzzleAgentMessageRow`. - fn puzzle_agent_message(&self) -> __sdk::__query_builder::Table; -} - -impl puzzle_agent_messageQueryTableAccess for __sdk::QueryTableAccessor { - fn puzzle_agent_message(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("puzzle_agent_message") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_row_type.rs deleted file mode 100644 index e056ada1a..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_row_type.rs +++ /dev/null @@ -1,92 +0,0 @@ -// 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::puzzle_agent_stage_type::PuzzleAgentStage; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct PuzzleAgentSessionRow { - pub session_id: String, - pub owner_user_id: String, - pub seed_text: String, - pub current_turn: u32, - pub progress_percent: u32, - pub stage: PuzzleAgentStage, - pub anchor_pack_json: String, - pub draft_json: Option, - pub last_assistant_reply: Option, - pub published_profile_id: Option, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for PuzzleAgentSessionRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `PuzzleAgentSessionRow`. -/// -/// Provides typed access to columns for query building. -pub struct PuzzleAgentSessionRowCols { - pub session_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub seed_text: __sdk::__query_builder::Col, - pub current_turn: __sdk::__query_builder::Col, - pub progress_percent: __sdk::__query_builder::Col, - pub stage: __sdk::__query_builder::Col, - pub anchor_pack_json: __sdk::__query_builder::Col, - pub draft_json: __sdk::__query_builder::Col>, - pub last_assistant_reply: __sdk::__query_builder::Col>, - pub published_profile_id: __sdk::__query_builder::Col>, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for PuzzleAgentSessionRow { - type Cols = PuzzleAgentSessionRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - PuzzleAgentSessionRowCols { - session_id: __sdk::__query_builder::Col::new(table_name, "session_id"), - owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"), - seed_text: __sdk::__query_builder::Col::new(table_name, "seed_text"), - current_turn: __sdk::__query_builder::Col::new(table_name, "current_turn"), - progress_percent: __sdk::__query_builder::Col::new(table_name, "progress_percent"), - stage: __sdk::__query_builder::Col::new(table_name, "stage"), - anchor_pack_json: __sdk::__query_builder::Col::new(table_name, "anchor_pack_json"), - draft_json: __sdk::__query_builder::Col::new(table_name, "draft_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 `PuzzleAgentSessionRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct PuzzleAgentSessionRowIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub session_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for PuzzleAgentSessionRow { - type IxCols = PuzzleAgentSessionRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - PuzzleAgentSessionRowIxCols { - 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 PuzzleAgentSessionRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_table.rs deleted file mode 100644 index a4072181c..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_table.rs +++ /dev/null @@ -1,231 +0,0 @@ -// 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::puzzle_agent_session_row_type::PuzzleAgentSessionRow; -use super::puzzle_agent_stage_type::PuzzleAgentStage; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `puzzle_agent_session`. -/// -/// Obtain a handle from the [`PuzzleAgentSessionTableAccess::puzzle_agent_session`] method on [`super::RemoteTables`], -/// like `ctx.db.puzzle_agent_session()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.puzzle_agent_session().on_insert(...)`. -pub struct PuzzleAgentSessionTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `puzzle_agent_session`. -pub struct PuzzleAgentSessionTableAccessor; - -impl __sdk::TableAccessor for PuzzleAgentSessionTableAccessor { - type Row = PuzzleAgentSessionRow; - type Handle<'db> = PuzzleAgentSessionTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.puzzle_agent_session() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `puzzle_agent_session`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait PuzzleAgentSessionTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`PuzzleAgentSessionTableHandle`], which mediates access to the table `puzzle_agent_session`. - fn puzzle_agent_session(&self) -> PuzzleAgentSessionTableHandle<'_>; -} - -impl PuzzleAgentSessionTableAccess for super::RemoteTables { - fn puzzle_agent_session(&self) -> PuzzleAgentSessionTableHandle<'_> { - PuzzleAgentSessionTableHandle { - imp: self - .imp - .get_table::("puzzle_agent_session"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct PuzzleAgentSessionInsertCallbackId(__sdk::CallbackId); -pub struct PuzzleAgentSessionDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for PuzzleAgentSessionTableHandle<'ctx> { - type Row = PuzzleAgentSessionRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for PuzzleAgentSessionTableHandle<'ctx> { - type Row = PuzzleAgentSessionRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = PuzzleAgentSessionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleAgentSessionInsertCallbackId { - PuzzleAgentSessionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: PuzzleAgentSessionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = PuzzleAgentSessionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleAgentSessionDeleteCallbackId { - PuzzleAgentSessionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: PuzzleAgentSessionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for PuzzleAgentSessionTableHandle<'ctx> { - type InsertCallbackId = PuzzleAgentSessionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleAgentSessionInsertCallbackId { - PuzzleAgentSessionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: PuzzleAgentSessionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for PuzzleAgentSessionTableHandle<'ctx> { - type DeleteCallbackId = PuzzleAgentSessionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleAgentSessionDeleteCallbackId { - PuzzleAgentSessionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: PuzzleAgentSessionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct PuzzleAgentSessionUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for PuzzleAgentSessionTableHandle<'ctx> { - type UpdateCallbackId = PuzzleAgentSessionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> PuzzleAgentSessionUpdateCallbackId { - PuzzleAgentSessionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: PuzzleAgentSessionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for PuzzleAgentSessionTableHandle<'ctx> { - type UpdateCallbackId = PuzzleAgentSessionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> PuzzleAgentSessionUpdateCallbackId { - PuzzleAgentSessionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: PuzzleAgentSessionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `session_id` unique index on the table `puzzle_agent_session`, -/// which allows point queries on the field of the same name -/// via the [`PuzzleAgentSessionSessionIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.puzzle_agent_session().session_id().find(...)`. -pub struct PuzzleAgentSessionSessionIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> PuzzleAgentSessionTableHandle<'ctx> { - /// Get a handle on the `session_id` unique index on the table `puzzle_agent_session`. - pub fn session_id(&self) -> PuzzleAgentSessionSessionIdUnique<'ctx> { - PuzzleAgentSessionSessionIdUnique { - imp: self.imp.get_unique_constraint::("session_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> PuzzleAgentSessionSessionIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("puzzle_agent_session"); - _table.add_unique_constraint::("session_id", |row| &row.session_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `PuzzleAgentSessionRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait puzzle_agent_sessionQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `PuzzleAgentSessionRow`. - fn puzzle_agent_session(&self) -> __sdk::__query_builder::Table; -} - -impl puzzle_agent_sessionQueryTableAccess for __sdk::QueryTableAccessor { - fn puzzle_agent_session(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("puzzle_agent_session") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_stage_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_stage_type.rs deleted file mode 100644 index 9d41ea54d..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_stage_type.rs +++ /dev/null @@ -1,24 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum PuzzleAgentStage { - CollectingAnchors, - - DraftReady, - - ImageRefining, - - ReadyToPublish, - - Published, -} - -impl __sdk::InModule for PuzzleAgentStage { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_background_compile_task_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_background_compile_task_row_type.rs deleted file mode 100644 index 49e1bf07e..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_background_compile_task_row_type.rs +++ /dev/null @@ -1,66 +0,0 @@ -// 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 PuzzleBackgroundCompileTaskRow { - pub task_id: String, - pub claim_id: String, - pub session_id: String, - pub owner_user_id: String, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for PuzzleBackgroundCompileTaskRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `PuzzleBackgroundCompileTaskRow`. -/// -/// Provides typed access to columns for query building. -pub struct PuzzleBackgroundCompileTaskRowCols { - pub task_id: __sdk::__query_builder::Col, - pub claim_id: __sdk::__query_builder::Col, - pub session_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for PuzzleBackgroundCompileTaskRow { - type Cols = PuzzleBackgroundCompileTaskRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - PuzzleBackgroundCompileTaskRowCols { - task_id: __sdk::__query_builder::Col::new(table_name, "task_id"), - claim_id: __sdk::__query_builder::Col::new(table_name, "claim_id"), - session_id: __sdk::__query_builder::Col::new(table_name, "session_id"), - owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_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 `PuzzleBackgroundCompileTaskRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct PuzzleBackgroundCompileTaskRowIxCols { - pub session_id: __sdk::__query_builder::IxCol, - pub task_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for PuzzleBackgroundCompileTaskRow { - type IxCols = PuzzleBackgroundCompileTaskRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - PuzzleBackgroundCompileTaskRowIxCols { - session_id: __sdk::__query_builder::IxCol::new(table_name, "session_id"), - task_id: __sdk::__query_builder::IxCol::new(table_name, "task_id"), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for PuzzleBackgroundCompileTaskRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_background_compile_task_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_background_compile_task_table.rs deleted file mode 100644 index 4982944ad..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_background_compile_task_table.rs +++ /dev/null @@ -1,238 +0,0 @@ -// 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::puzzle_background_compile_task_row_type::PuzzleBackgroundCompileTaskRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `puzzle_background_compile_task`. -/// -/// Obtain a handle from the [`PuzzleBackgroundCompileTaskTableAccess::puzzle_background_compile_task`] method on [`super::RemoteTables`], -/// like `ctx.db.puzzle_background_compile_task()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.puzzle_background_compile_task().on_insert(...)`. -pub struct PuzzleBackgroundCompileTaskTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `puzzle_background_compile_task`. -pub struct PuzzleBackgroundCompileTaskTableAccessor; - -impl __sdk::TableAccessor for PuzzleBackgroundCompileTaskTableAccessor { - type Row = PuzzleBackgroundCompileTaskRow; - type Handle<'db> = PuzzleBackgroundCompileTaskTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.puzzle_background_compile_task() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `puzzle_background_compile_task`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait PuzzleBackgroundCompileTaskTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`PuzzleBackgroundCompileTaskTableHandle`], which mediates access to the table `puzzle_background_compile_task`. - fn puzzle_background_compile_task(&self) -> PuzzleBackgroundCompileTaskTableHandle<'_>; -} - -impl PuzzleBackgroundCompileTaskTableAccess for super::RemoteTables { - fn puzzle_background_compile_task(&self) -> PuzzleBackgroundCompileTaskTableHandle<'_> { - PuzzleBackgroundCompileTaskTableHandle { - imp: self - .imp - .get_table::("puzzle_background_compile_task"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct PuzzleBackgroundCompileTaskInsertCallbackId(__sdk::CallbackId); -pub struct PuzzleBackgroundCompileTaskDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for PuzzleBackgroundCompileTaskTableHandle<'ctx> { - type Row = PuzzleBackgroundCompileTaskRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for PuzzleBackgroundCompileTaskTableHandle<'ctx> { - type Row = PuzzleBackgroundCompileTaskRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = PuzzleBackgroundCompileTaskInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleBackgroundCompileTaskInsertCallbackId { - PuzzleBackgroundCompileTaskInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: PuzzleBackgroundCompileTaskInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = PuzzleBackgroundCompileTaskDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleBackgroundCompileTaskDeleteCallbackId { - PuzzleBackgroundCompileTaskDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: PuzzleBackgroundCompileTaskDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for PuzzleBackgroundCompileTaskTableHandle<'ctx> { - type InsertCallbackId = PuzzleBackgroundCompileTaskInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleBackgroundCompileTaskInsertCallbackId { - PuzzleBackgroundCompileTaskInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: PuzzleBackgroundCompileTaskInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for PuzzleBackgroundCompileTaskTableHandle<'ctx> { - type DeleteCallbackId = PuzzleBackgroundCompileTaskDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleBackgroundCompileTaskDeleteCallbackId { - PuzzleBackgroundCompileTaskDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: PuzzleBackgroundCompileTaskDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct PuzzleBackgroundCompileTaskUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for PuzzleBackgroundCompileTaskTableHandle<'ctx> { - type UpdateCallbackId = PuzzleBackgroundCompileTaskUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> PuzzleBackgroundCompileTaskUpdateCallbackId { - PuzzleBackgroundCompileTaskUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: PuzzleBackgroundCompileTaskUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for PuzzleBackgroundCompileTaskTableHandle<'ctx> { - type UpdateCallbackId = PuzzleBackgroundCompileTaskUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> PuzzleBackgroundCompileTaskUpdateCallbackId { - PuzzleBackgroundCompileTaskUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: PuzzleBackgroundCompileTaskUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `task_id` unique index on the table `puzzle_background_compile_task`, -/// which allows point queries on the field of the same name -/// via the [`PuzzleBackgroundCompileTaskTaskIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.puzzle_background_compile_task().task_id().find(...)`. -pub struct PuzzleBackgroundCompileTaskTaskIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> PuzzleBackgroundCompileTaskTableHandle<'ctx> { - /// Get a handle on the `task_id` unique index on the table `puzzle_background_compile_task`. - pub fn task_id(&self) -> PuzzleBackgroundCompileTaskTaskIdUnique<'ctx> { - PuzzleBackgroundCompileTaskTaskIdUnique { - imp: self.imp.get_unique_constraint::("task_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> PuzzleBackgroundCompileTaskTaskIdUnique<'ctx> { - /// Find the subscribed row whose `task_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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache - .get_or_make_table::("puzzle_background_compile_task"); - _table.add_unique_constraint::("task_id", |row| &row.task_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse( - "TableUpdate", - "TableUpdate", - ) - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `PuzzleBackgroundCompileTaskRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait puzzle_background_compile_taskQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `PuzzleBackgroundCompileTaskRow`. - fn puzzle_background_compile_task( - &self, - ) -> __sdk::__query_builder::Table; -} - -impl puzzle_background_compile_taskQueryTableAccess for __sdk::QueryTableAccessor { - fn puzzle_background_compile_task( - &self, - ) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("puzzle_background_compile_task") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_clear_agent_session_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_clear_agent_session_row_type.rs deleted file mode 100644 index 697bb9222..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_clear_agent_session_row_type.rs +++ /dev/null @@ -1,72 +0,0 @@ -// 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 PuzzleClearAgentSessionRow { - pub session_id: String, - pub owner_user_id: String, - pub status: String, - pub draft_json: String, - pub published_profile_id: String, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for PuzzleClearAgentSessionRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `PuzzleClearAgentSessionRow`. -/// -/// Provides typed access to columns for query building. -pub struct PuzzleClearAgentSessionRowCols { - pub session_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub status: __sdk::__query_builder::Col, - pub draft_json: __sdk::__query_builder::Col, - pub published_profile_id: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for PuzzleClearAgentSessionRow { - type Cols = PuzzleClearAgentSessionRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - PuzzleClearAgentSessionRowCols { - session_id: __sdk::__query_builder::Col::new(table_name, "session_id"), - owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"), - status: __sdk::__query_builder::Col::new(table_name, "status"), - draft_json: __sdk::__query_builder::Col::new(table_name, "draft_json"), - 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 `PuzzleClearAgentSessionRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct PuzzleClearAgentSessionRowIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub session_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for PuzzleClearAgentSessionRow { - type IxCols = PuzzleClearAgentSessionRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - PuzzleClearAgentSessionRowIxCols { - 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 PuzzleClearAgentSessionRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_clear_agent_session_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_clear_agent_session_table.rs deleted file mode 100644 index 68f508729..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_clear_agent_session_table.rs +++ /dev/null @@ -1,235 +0,0 @@ -// 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::puzzle_clear_agent_session_row_type::PuzzleClearAgentSessionRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `puzzle_clear_agent_session`. -/// -/// Obtain a handle from the [`PuzzleClearAgentSessionTableAccess::puzzle_clear_agent_session`] method on [`super::RemoteTables`], -/// like `ctx.db.puzzle_clear_agent_session()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.puzzle_clear_agent_session().on_insert(...)`. -pub struct PuzzleClearAgentSessionTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `puzzle_clear_agent_session`. -pub struct PuzzleClearAgentSessionTableAccessor; - -impl __sdk::TableAccessor for PuzzleClearAgentSessionTableAccessor { - type Row = PuzzleClearAgentSessionRow; - type Handle<'db> = PuzzleClearAgentSessionTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.puzzle_clear_agent_session() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `puzzle_clear_agent_session`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait PuzzleClearAgentSessionTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`PuzzleClearAgentSessionTableHandle`], which mediates access to the table `puzzle_clear_agent_session`. - fn puzzle_clear_agent_session(&self) -> PuzzleClearAgentSessionTableHandle<'_>; -} - -impl PuzzleClearAgentSessionTableAccess for super::RemoteTables { - fn puzzle_clear_agent_session(&self) -> PuzzleClearAgentSessionTableHandle<'_> { - PuzzleClearAgentSessionTableHandle { - imp: self - .imp - .get_table::("puzzle_clear_agent_session"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct PuzzleClearAgentSessionInsertCallbackId(__sdk::CallbackId); -pub struct PuzzleClearAgentSessionDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for PuzzleClearAgentSessionTableHandle<'ctx> { - type Row = PuzzleClearAgentSessionRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for PuzzleClearAgentSessionTableHandle<'ctx> { - type Row = PuzzleClearAgentSessionRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = PuzzleClearAgentSessionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleClearAgentSessionInsertCallbackId { - PuzzleClearAgentSessionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: PuzzleClearAgentSessionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = PuzzleClearAgentSessionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleClearAgentSessionDeleteCallbackId { - PuzzleClearAgentSessionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: PuzzleClearAgentSessionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for PuzzleClearAgentSessionTableHandle<'ctx> { - type InsertCallbackId = PuzzleClearAgentSessionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleClearAgentSessionInsertCallbackId { - PuzzleClearAgentSessionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: PuzzleClearAgentSessionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for PuzzleClearAgentSessionTableHandle<'ctx> { - type DeleteCallbackId = PuzzleClearAgentSessionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleClearAgentSessionDeleteCallbackId { - PuzzleClearAgentSessionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: PuzzleClearAgentSessionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct PuzzleClearAgentSessionUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for PuzzleClearAgentSessionTableHandle<'ctx> { - type UpdateCallbackId = PuzzleClearAgentSessionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> PuzzleClearAgentSessionUpdateCallbackId { - PuzzleClearAgentSessionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: PuzzleClearAgentSessionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for PuzzleClearAgentSessionTableHandle<'ctx> { - type UpdateCallbackId = PuzzleClearAgentSessionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> PuzzleClearAgentSessionUpdateCallbackId { - PuzzleClearAgentSessionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: PuzzleClearAgentSessionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `session_id` unique index on the table `puzzle_clear_agent_session`, -/// which allows point queries on the field of the same name -/// via the [`PuzzleClearAgentSessionSessionIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.puzzle_clear_agent_session().session_id().find(...)`. -pub struct PuzzleClearAgentSessionSessionIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> PuzzleClearAgentSessionTableHandle<'ctx> { - /// Get a handle on the `session_id` unique index on the table `puzzle_clear_agent_session`. - pub fn session_id(&self) -> PuzzleClearAgentSessionSessionIdUnique<'ctx> { - PuzzleClearAgentSessionSessionIdUnique { - imp: self.imp.get_unique_constraint::("session_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> PuzzleClearAgentSessionSessionIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("puzzle_clear_agent_session"); - _table.add_unique_constraint::("session_id", |row| &row.session_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `PuzzleClearAgentSessionRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait puzzle_clear_agent_sessionQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `PuzzleClearAgentSessionRow`. - fn puzzle_clear_agent_session( - &self, - ) -> __sdk::__query_builder::Table; -} - -impl puzzle_clear_agent_sessionQueryTableAccess for __sdk::QueryTableAccessor { - fn puzzle_clear_agent_session( - &self, - ) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("puzzle_clear_agent_session") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_clear_event_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_clear_event_row_type.rs deleted file mode 100644 index 00fcb66f9..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_clear_event_row_type.rs +++ /dev/null @@ -1,71 +0,0 @@ -// 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 PuzzleClearEventRow { - pub event_id: String, - pub owner_user_id: String, - pub profile_id: String, - pub run_id: String, - pub event_type: String, - pub result: String, - pub occurred_at: __sdk::Timestamp, -} - -impl __sdk::InModule for PuzzleClearEventRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `PuzzleClearEventRow`. -/// -/// Provides typed access to columns for query building. -pub struct PuzzleClearEventRowCols { - pub event_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub profile_id: __sdk::__query_builder::Col, - pub run_id: __sdk::__query_builder::Col, - pub event_type: __sdk::__query_builder::Col, - pub result: __sdk::__query_builder::Col, - pub occurred_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for PuzzleClearEventRow { - type Cols = PuzzleClearEventRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - PuzzleClearEventRowCols { - event_id: __sdk::__query_builder::Col::new(table_name, "event_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"), - run_id: __sdk::__query_builder::Col::new(table_name, "run_id"), - event_type: __sdk::__query_builder::Col::new(table_name, "event_type"), - result: __sdk::__query_builder::Col::new(table_name, "result"), - occurred_at: __sdk::__query_builder::Col::new(table_name, "occurred_at"), - } - } -} - -/// Indexed column accessor struct for the table `PuzzleClearEventRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct PuzzleClearEventRowIxCols { - pub event_id: __sdk::__query_builder::IxCol, - pub profile_id: __sdk::__query_builder::IxCol, - pub run_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for PuzzleClearEventRow { - type IxCols = PuzzleClearEventRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - PuzzleClearEventRowIxCols { - event_id: __sdk::__query_builder::IxCol::new(table_name, "event_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 PuzzleClearEventRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_clear_event_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_clear_event_table.rs deleted file mode 100644 index 4f506a433..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_clear_event_table.rs +++ /dev/null @@ -1,230 +0,0 @@ -// 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::puzzle_clear_event_row_type::PuzzleClearEventRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `puzzle_clear_event`. -/// -/// Obtain a handle from the [`PuzzleClearEventTableAccess::puzzle_clear_event`] method on [`super::RemoteTables`], -/// like `ctx.db.puzzle_clear_event()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.puzzle_clear_event().on_insert(...)`. -pub struct PuzzleClearEventTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `puzzle_clear_event`. -pub struct PuzzleClearEventTableAccessor; - -impl __sdk::TableAccessor for PuzzleClearEventTableAccessor { - type Row = PuzzleClearEventRow; - type Handle<'db> = PuzzleClearEventTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.puzzle_clear_event() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `puzzle_clear_event`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait PuzzleClearEventTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`PuzzleClearEventTableHandle`], which mediates access to the table `puzzle_clear_event`. - fn puzzle_clear_event(&self) -> PuzzleClearEventTableHandle<'_>; -} - -impl PuzzleClearEventTableAccess for super::RemoteTables { - fn puzzle_clear_event(&self) -> PuzzleClearEventTableHandle<'_> { - PuzzleClearEventTableHandle { - imp: self - .imp - .get_table::("puzzle_clear_event"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct PuzzleClearEventInsertCallbackId(__sdk::CallbackId); -pub struct PuzzleClearEventDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for PuzzleClearEventTableHandle<'ctx> { - type Row = PuzzleClearEventRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for PuzzleClearEventTableHandle<'ctx> { - type Row = PuzzleClearEventRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = PuzzleClearEventInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleClearEventInsertCallbackId { - PuzzleClearEventInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: PuzzleClearEventInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = PuzzleClearEventDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleClearEventDeleteCallbackId { - PuzzleClearEventDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: PuzzleClearEventDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for PuzzleClearEventTableHandle<'ctx> { - type InsertCallbackId = PuzzleClearEventInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleClearEventInsertCallbackId { - PuzzleClearEventInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: PuzzleClearEventInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for PuzzleClearEventTableHandle<'ctx> { - type DeleteCallbackId = PuzzleClearEventDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleClearEventDeleteCallbackId { - PuzzleClearEventDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: PuzzleClearEventDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct PuzzleClearEventUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for PuzzleClearEventTableHandle<'ctx> { - type UpdateCallbackId = PuzzleClearEventUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> PuzzleClearEventUpdateCallbackId { - PuzzleClearEventUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: PuzzleClearEventUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for PuzzleClearEventTableHandle<'ctx> { - type UpdateCallbackId = PuzzleClearEventUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> PuzzleClearEventUpdateCallbackId { - PuzzleClearEventUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: PuzzleClearEventUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `event_id` unique index on the table `puzzle_clear_event`, -/// which allows point queries on the field of the same name -/// via the [`PuzzleClearEventEventIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.puzzle_clear_event().event_id().find(...)`. -pub struct PuzzleClearEventEventIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> PuzzleClearEventTableHandle<'ctx> { - /// Get a handle on the `event_id` unique index on the table `puzzle_clear_event`. - pub fn event_id(&self) -> PuzzleClearEventEventIdUnique<'ctx> { - PuzzleClearEventEventIdUnique { - imp: self.imp.get_unique_constraint::("event_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> PuzzleClearEventEventIdUnique<'ctx> { - /// Find the subscribed row whose `event_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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("puzzle_clear_event"); - _table.add_unique_constraint::("event_id", |row| &row.event_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `PuzzleClearEventRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait puzzle_clear_eventQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `PuzzleClearEventRow`. - fn puzzle_clear_event(&self) -> __sdk::__query_builder::Table; -} - -impl puzzle_clear_eventQueryTableAccess for __sdk::QueryTableAccessor { - fn puzzle_clear_event(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("puzzle_clear_event") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_clear_runtime_run_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_clear_runtime_run_row_type.rs deleted file mode 100644 index fa99c892f..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_clear_runtime_run_row_type.rs +++ /dev/null @@ -1,83 +0,0 @@ -// 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 PuzzleClearRuntimeRunRow { - pub run_id: String, - pub owner_user_id: String, - pub profile_id: String, - pub status: String, - pub level_index: u32, - pub clears_done: u32, - pub snapshot_json: String, - pub started_at_ms: i64, - pub finished_at_ms: i64, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for PuzzleClearRuntimeRunRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `PuzzleClearRuntimeRunRow`. -/// -/// Provides typed access to columns for query building. -pub struct PuzzleClearRuntimeRunRowCols { - pub run_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub profile_id: __sdk::__query_builder::Col, - pub status: __sdk::__query_builder::Col, - pub level_index: __sdk::__query_builder::Col, - pub clears_done: __sdk::__query_builder::Col, - pub snapshot_json: __sdk::__query_builder::Col, - pub started_at_ms: __sdk::__query_builder::Col, - pub finished_at_ms: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for PuzzleClearRuntimeRunRow { - type Cols = PuzzleClearRuntimeRunRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - PuzzleClearRuntimeRunRowCols { - 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"), - status: __sdk::__query_builder::Col::new(table_name, "status"), - level_index: __sdk::__query_builder::Col::new(table_name, "level_index"), - clears_done: __sdk::__query_builder::Col::new(table_name, "clears_done"), - snapshot_json: __sdk::__query_builder::Col::new(table_name, "snapshot_json"), - started_at_ms: __sdk::__query_builder::Col::new(table_name, "started_at_ms"), - finished_at_ms: __sdk::__query_builder::Col::new(table_name, "finished_at_ms"), - 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 `PuzzleClearRuntimeRunRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct PuzzleClearRuntimeRunRowIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub profile_id: __sdk::__query_builder::IxCol, - pub run_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for PuzzleClearRuntimeRunRow { - type IxCols = PuzzleClearRuntimeRunRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - PuzzleClearRuntimeRunRowIxCols { - 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 PuzzleClearRuntimeRunRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_clear_runtime_run_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_clear_runtime_run_table.rs deleted file mode 100644 index dc7a1f89b..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_clear_runtime_run_table.rs +++ /dev/null @@ -1,231 +0,0 @@ -// 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::puzzle_clear_runtime_run_row_type::PuzzleClearRuntimeRunRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `puzzle_clear_runtime_run`. -/// -/// Obtain a handle from the [`PuzzleClearRuntimeRunTableAccess::puzzle_clear_runtime_run`] method on [`super::RemoteTables`], -/// like `ctx.db.puzzle_clear_runtime_run()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.puzzle_clear_runtime_run().on_insert(...)`. -pub struct PuzzleClearRuntimeRunTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `puzzle_clear_runtime_run`. -pub struct PuzzleClearRuntimeRunTableAccessor; - -impl __sdk::TableAccessor for PuzzleClearRuntimeRunTableAccessor { - type Row = PuzzleClearRuntimeRunRow; - type Handle<'db> = PuzzleClearRuntimeRunTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.puzzle_clear_runtime_run() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `puzzle_clear_runtime_run`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait PuzzleClearRuntimeRunTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`PuzzleClearRuntimeRunTableHandle`], which mediates access to the table `puzzle_clear_runtime_run`. - fn puzzle_clear_runtime_run(&self) -> PuzzleClearRuntimeRunTableHandle<'_>; -} - -impl PuzzleClearRuntimeRunTableAccess for super::RemoteTables { - fn puzzle_clear_runtime_run(&self) -> PuzzleClearRuntimeRunTableHandle<'_> { - PuzzleClearRuntimeRunTableHandle { - imp: self - .imp - .get_table::("puzzle_clear_runtime_run"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct PuzzleClearRuntimeRunInsertCallbackId(__sdk::CallbackId); -pub struct PuzzleClearRuntimeRunDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for PuzzleClearRuntimeRunTableHandle<'ctx> { - type Row = PuzzleClearRuntimeRunRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for PuzzleClearRuntimeRunTableHandle<'ctx> { - type Row = PuzzleClearRuntimeRunRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = PuzzleClearRuntimeRunInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleClearRuntimeRunInsertCallbackId { - PuzzleClearRuntimeRunInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: PuzzleClearRuntimeRunInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = PuzzleClearRuntimeRunDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleClearRuntimeRunDeleteCallbackId { - PuzzleClearRuntimeRunDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: PuzzleClearRuntimeRunDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for PuzzleClearRuntimeRunTableHandle<'ctx> { - type InsertCallbackId = PuzzleClearRuntimeRunInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleClearRuntimeRunInsertCallbackId { - PuzzleClearRuntimeRunInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: PuzzleClearRuntimeRunInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for PuzzleClearRuntimeRunTableHandle<'ctx> { - type DeleteCallbackId = PuzzleClearRuntimeRunDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleClearRuntimeRunDeleteCallbackId { - PuzzleClearRuntimeRunDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: PuzzleClearRuntimeRunDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct PuzzleClearRuntimeRunUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for PuzzleClearRuntimeRunTableHandle<'ctx> { - type UpdateCallbackId = PuzzleClearRuntimeRunUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> PuzzleClearRuntimeRunUpdateCallbackId { - PuzzleClearRuntimeRunUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: PuzzleClearRuntimeRunUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for PuzzleClearRuntimeRunTableHandle<'ctx> { - type UpdateCallbackId = PuzzleClearRuntimeRunUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> PuzzleClearRuntimeRunUpdateCallbackId { - PuzzleClearRuntimeRunUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: PuzzleClearRuntimeRunUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `run_id` unique index on the table `puzzle_clear_runtime_run`, -/// which allows point queries on the field of the same name -/// via the [`PuzzleClearRuntimeRunRunIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.puzzle_clear_runtime_run().run_id().find(...)`. -pub struct PuzzleClearRuntimeRunRunIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> PuzzleClearRuntimeRunTableHandle<'ctx> { - /// Get a handle on the `run_id` unique index on the table `puzzle_clear_runtime_run`. - pub fn run_id(&self) -> PuzzleClearRuntimeRunRunIdUnique<'ctx> { - PuzzleClearRuntimeRunRunIdUnique { - imp: self.imp.get_unique_constraint::("run_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> PuzzleClearRuntimeRunRunIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("puzzle_clear_runtime_run"); - _table.add_unique_constraint::("run_id", |row| &row.run_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `PuzzleClearRuntimeRunRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait puzzle_clear_runtime_runQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `PuzzleClearRuntimeRunRow`. - fn puzzle_clear_runtime_run(&self) -> __sdk::__query_builder::Table; -} - -impl puzzle_clear_runtime_runQueryTableAccess for __sdk::QueryTableAccessor { - fn puzzle_clear_runtime_run(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("puzzle_clear_runtime_run") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_clear_work_profile_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_clear_work_profile_row_type.rs deleted file mode 100644 index 601eb56a0..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_clear_work_profile_row_type.rs +++ /dev/null @@ -1,139 +0,0 @@ -// 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 PuzzleClearWorkProfileRow { - 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 theme_prompt: String, - pub generate_board_background: bool, - pub board_background_asset_json: String, - pub board_background_prompt: Option, - pub card_back_image_src: String, - pub atlas_asset_json: String, - pub pattern_groups_json: String, - pub card_assets_json: String, - pub cover_image_src: String, - pub generation_status: String, - pub publication_status: String, - pub play_count: u32, - pub updated_at: __sdk::Timestamp, - pub published_at: Option<__sdk::Timestamp>, - pub visible: bool, -} - -impl __sdk::InModule for PuzzleClearWorkProfileRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `PuzzleClearWorkProfileRow`. -/// -/// Provides typed access to columns for query building. -pub struct PuzzleClearWorkProfileRowCols { - pub profile_id: __sdk::__query_builder::Col, - pub work_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub source_session_id: __sdk::__query_builder::Col, - pub author_display_name: __sdk::__query_builder::Col, - pub work_title: __sdk::__query_builder::Col, - pub work_description: __sdk::__query_builder::Col, - pub theme_prompt: __sdk::__query_builder::Col, - pub generate_board_background: __sdk::__query_builder::Col, - pub board_background_asset_json: __sdk::__query_builder::Col, - pub board_background_prompt: - __sdk::__query_builder::Col>, - pub card_back_image_src: __sdk::__query_builder::Col, - pub atlas_asset_json: __sdk::__query_builder::Col, - pub pattern_groups_json: __sdk::__query_builder::Col, - pub card_assets_json: __sdk::__query_builder::Col, - pub cover_image_src: __sdk::__query_builder::Col, - pub generation_status: __sdk::__query_builder::Col, - pub publication_status: __sdk::__query_builder::Col, - pub play_count: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, - pub published_at: - __sdk::__query_builder::Col>, - pub visible: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for PuzzleClearWorkProfileRow { - type Cols = PuzzleClearWorkProfileRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - PuzzleClearWorkProfileRowCols { - 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"), - theme_prompt: __sdk::__query_builder::Col::new(table_name, "theme_prompt"), - generate_board_background: __sdk::__query_builder::Col::new( - table_name, - "generate_board_background", - ), - board_background_asset_json: __sdk::__query_builder::Col::new( - table_name, - "board_background_asset_json", - ), - board_background_prompt: __sdk::__query_builder::Col::new( - table_name, - "board_background_prompt", - ), - card_back_image_src: __sdk::__query_builder::Col::new( - table_name, - "card_back_image_src", - ), - atlas_asset_json: __sdk::__query_builder::Col::new(table_name, "atlas_asset_json"), - pattern_groups_json: __sdk::__query_builder::Col::new( - table_name, - "pattern_groups_json", - ), - card_assets_json: __sdk::__query_builder::Col::new(table_name, "card_assets_json"), - cover_image_src: __sdk::__query_builder::Col::new(table_name, "cover_image_src"), - generation_status: __sdk::__query_builder::Col::new(table_name, "generation_status"), - publication_status: __sdk::__query_builder::Col::new(table_name, "publication_status"), - play_count: __sdk::__query_builder::Col::new(table_name, "play_count"), - updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), - published_at: __sdk::__query_builder::Col::new(table_name, "published_at"), - visible: __sdk::__query_builder::Col::new(table_name, "visible"), - } - } -} - -/// Indexed column accessor struct for the table `PuzzleClearWorkProfileRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct PuzzleClearWorkProfileRowIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub profile_id: __sdk::__query_builder::IxCol, - pub publication_status: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for PuzzleClearWorkProfileRow { - type IxCols = PuzzleClearWorkProfileRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - PuzzleClearWorkProfileRowIxCols { - 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 PuzzleClearWorkProfileRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_clear_work_profile_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_clear_work_profile_table.rs deleted file mode 100644 index 71c5a5084..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_clear_work_profile_table.rs +++ /dev/null @@ -1,234 +0,0 @@ -// 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::puzzle_clear_work_profile_row_type::PuzzleClearWorkProfileRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `puzzle_clear_work_profile`. -/// -/// Obtain a handle from the [`PuzzleClearWorkProfileTableAccess::puzzle_clear_work_profile`] method on [`super::RemoteTables`], -/// like `ctx.db.puzzle_clear_work_profile()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.puzzle_clear_work_profile().on_insert(...)`. -pub struct PuzzleClearWorkProfileTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `puzzle_clear_work_profile`. -pub struct PuzzleClearWorkProfileTableAccessor; - -impl __sdk::TableAccessor for PuzzleClearWorkProfileTableAccessor { - type Row = PuzzleClearWorkProfileRow; - type Handle<'db> = PuzzleClearWorkProfileTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.puzzle_clear_work_profile() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `puzzle_clear_work_profile`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait PuzzleClearWorkProfileTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`PuzzleClearWorkProfileTableHandle`], which mediates access to the table `puzzle_clear_work_profile`. - fn puzzle_clear_work_profile(&self) -> PuzzleClearWorkProfileTableHandle<'_>; -} - -impl PuzzleClearWorkProfileTableAccess for super::RemoteTables { - fn puzzle_clear_work_profile(&self) -> PuzzleClearWorkProfileTableHandle<'_> { - PuzzleClearWorkProfileTableHandle { - imp: self - .imp - .get_table::("puzzle_clear_work_profile"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct PuzzleClearWorkProfileInsertCallbackId(__sdk::CallbackId); -pub struct PuzzleClearWorkProfileDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for PuzzleClearWorkProfileTableHandle<'ctx> { - type Row = PuzzleClearWorkProfileRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for PuzzleClearWorkProfileTableHandle<'ctx> { - type Row = PuzzleClearWorkProfileRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = PuzzleClearWorkProfileInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleClearWorkProfileInsertCallbackId { - PuzzleClearWorkProfileInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: PuzzleClearWorkProfileInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = PuzzleClearWorkProfileDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleClearWorkProfileDeleteCallbackId { - PuzzleClearWorkProfileDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: PuzzleClearWorkProfileDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for PuzzleClearWorkProfileTableHandle<'ctx> { - type InsertCallbackId = PuzzleClearWorkProfileInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleClearWorkProfileInsertCallbackId { - PuzzleClearWorkProfileInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: PuzzleClearWorkProfileInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for PuzzleClearWorkProfileTableHandle<'ctx> { - type DeleteCallbackId = PuzzleClearWorkProfileDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleClearWorkProfileDeleteCallbackId { - PuzzleClearWorkProfileDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: PuzzleClearWorkProfileDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct PuzzleClearWorkProfileUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for PuzzleClearWorkProfileTableHandle<'ctx> { - type UpdateCallbackId = PuzzleClearWorkProfileUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> PuzzleClearWorkProfileUpdateCallbackId { - PuzzleClearWorkProfileUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: PuzzleClearWorkProfileUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for PuzzleClearWorkProfileTableHandle<'ctx> { - type UpdateCallbackId = PuzzleClearWorkProfileUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> PuzzleClearWorkProfileUpdateCallbackId { - PuzzleClearWorkProfileUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: PuzzleClearWorkProfileUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `profile_id` unique index on the table `puzzle_clear_work_profile`, -/// which allows point queries on the field of the same name -/// via the [`PuzzleClearWorkProfileProfileIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.puzzle_clear_work_profile().profile_id().find(...)`. -pub struct PuzzleClearWorkProfileProfileIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> PuzzleClearWorkProfileTableHandle<'ctx> { - /// Get a handle on the `profile_id` unique index on the table `puzzle_clear_work_profile`. - pub fn profile_id(&self) -> PuzzleClearWorkProfileProfileIdUnique<'ctx> { - PuzzleClearWorkProfileProfileIdUnique { - imp: self.imp.get_unique_constraint::("profile_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> PuzzleClearWorkProfileProfileIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("puzzle_clear_work_profile"); - _table.add_unique_constraint::("profile_id", |row| &row.profile_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `PuzzleClearWorkProfileRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait puzzle_clear_work_profileQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `PuzzleClearWorkProfileRow`. - fn puzzle_clear_work_profile(&self) - -> __sdk::__query_builder::Table; -} - -impl puzzle_clear_work_profileQueryTableAccess for __sdk::QueryTableAccessor { - fn puzzle_clear_work_profile( - &self, - ) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("puzzle_clear_work_profile") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_event_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_event_kind_type.rs deleted file mode 100644 index 691ae326e..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_event_kind_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum PuzzleEventKind { - WorkPublished, -} - -impl __sdk::InModule for PuzzleEventKind { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_event_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_event_table.rs deleted file mode 100644 index 3610bb362..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_event_table.rs +++ /dev/null @@ -1,138 +0,0 @@ -// 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::puzzle_event_kind_type::PuzzleEventKind; -use super::puzzle_event_type::PuzzleEvent; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `puzzle_event`. -/// -/// Obtain a handle from the [`PuzzleEventTableAccess::puzzle_event`] method on [`super::RemoteTables`], -/// like `ctx.db.puzzle_event()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.puzzle_event().on_insert(...)`. -pub struct PuzzleEventTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `puzzle_event`. -pub struct PuzzleEventTableAccessor; - -impl __sdk::TableAccessor for PuzzleEventTableAccessor { - type Row = PuzzleEvent; - type Handle<'db> = PuzzleEventTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.puzzle_event() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `puzzle_event`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait PuzzleEventTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`PuzzleEventTableHandle`], which mediates access to the table `puzzle_event`. - fn puzzle_event(&self) -> PuzzleEventTableHandle<'_>; -} - -impl PuzzleEventTableAccess for super::RemoteTables { - fn puzzle_event(&self) -> PuzzleEventTableHandle<'_> { - PuzzleEventTableHandle { - imp: self.imp.get_table::("puzzle_event"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct PuzzleEventInsertCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for PuzzleEventTableHandle<'ctx> { - type Row = PuzzleEvent; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::EventTable for PuzzleEventTableHandle<'ctx> { - type Row = PuzzleEvent; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = PuzzleEventInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleEventInsertCallbackId { - PuzzleEventInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: PuzzleEventInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for PuzzleEventTableHandle<'ctx> { - type InsertCallbackId = PuzzleEventInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleEventInsertCallbackId { - PuzzleEventInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: PuzzleEventInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("puzzle_event"); - _table.add_unique_constraint::("event_id", |row| &row.event_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `PuzzleEvent`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait puzzle_eventQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `PuzzleEvent`. - fn puzzle_event(&self) -> __sdk::__query_builder::Table; -} - -impl puzzle_eventQueryTableAccess for __sdk::QueryTableAccessor { - fn puzzle_event(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("puzzle_event") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_event_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_event_type.rs deleted file mode 100644 index d4d14856a..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_event_type.rs +++ /dev/null @@ -1,71 +0,0 @@ -// 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::puzzle_event_kind_type::PuzzleEventKind; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct PuzzleEvent { - pub event_id: String, - pub profile_id: String, - pub work_id: String, - pub session_id: Option, - pub owner_user_id: String, - pub event_kind: PuzzleEventKind, - pub occurred_at: __sdk::Timestamp, -} - -impl __sdk::InModule for PuzzleEvent { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `PuzzleEvent`. -/// -/// Provides typed access to columns for query building. -pub struct PuzzleEventCols { - pub event_id: __sdk::__query_builder::Col, - pub profile_id: __sdk::__query_builder::Col, - pub work_id: __sdk::__query_builder::Col, - pub session_id: __sdk::__query_builder::Col>, - pub owner_user_id: __sdk::__query_builder::Col, - pub event_kind: __sdk::__query_builder::Col, - pub occurred_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for PuzzleEvent { - type Cols = PuzzleEventCols; - fn cols(table_name: &'static str) -> Self::Cols { - PuzzleEventCols { - event_id: __sdk::__query_builder::Col::new(table_name, "event_id"), - profile_id: __sdk::__query_builder::Col::new(table_name, "profile_id"), - work_id: __sdk::__query_builder::Col::new(table_name, "work_id"), - session_id: __sdk::__query_builder::Col::new(table_name, "session_id"), - owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"), - event_kind: __sdk::__query_builder::Col::new(table_name, "event_kind"), - occurred_at: __sdk::__query_builder::Col::new(table_name, "occurred_at"), - } - } -} - -/// Indexed column accessor struct for the table `PuzzleEvent`. -/// -/// Provides typed access to indexed columns for query building. -pub struct PuzzleEventIxCols { - pub event_id: __sdk::__query_builder::IxCol, - pub owner_user_id: __sdk::__query_builder::IxCol, - pub profile_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for PuzzleEvent { - type IxCols = PuzzleEventIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - PuzzleEventIxCols { - event_id: __sdk::__query_builder::IxCol::new(table_name, "event_id"), - owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"), - profile_id: __sdk::__query_builder::IxCol::new(table_name, "profile_id"), - } - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_leaderboard_entry_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_leaderboard_entry_row_type.rs deleted file mode 100644 index a9b1a782c..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_leaderboard_entry_row_type.rs +++ /dev/null @@ -1,70 +0,0 @@ -// 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 PuzzleLeaderboardEntryRow { - pub entry_id: String, - pub profile_id: String, - pub grid_size: u32, - pub user_id: String, - pub nickname: String, - pub best_elapsed_ms: u64, - pub last_run_id: String, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for PuzzleLeaderboardEntryRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `PuzzleLeaderboardEntryRow`. -/// -/// Provides typed access to columns for query building. -pub struct PuzzleLeaderboardEntryRowCols { - pub entry_id: __sdk::__query_builder::Col, - pub profile_id: __sdk::__query_builder::Col, - pub grid_size: __sdk::__query_builder::Col, - pub user_id: __sdk::__query_builder::Col, - pub nickname: __sdk::__query_builder::Col, - pub best_elapsed_ms: __sdk::__query_builder::Col, - pub last_run_id: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for PuzzleLeaderboardEntryRow { - type Cols = PuzzleLeaderboardEntryRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - PuzzleLeaderboardEntryRowCols { - entry_id: __sdk::__query_builder::Col::new(table_name, "entry_id"), - profile_id: __sdk::__query_builder::Col::new(table_name, "profile_id"), - grid_size: __sdk::__query_builder::Col::new(table_name, "grid_size"), - user_id: __sdk::__query_builder::Col::new(table_name, "user_id"), - nickname: __sdk::__query_builder::Col::new(table_name, "nickname"), - best_elapsed_ms: __sdk::__query_builder::Col::new(table_name, "best_elapsed_ms"), - last_run_id: __sdk::__query_builder::Col::new(table_name, "last_run_id"), - updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), - } - } -} - -/// Indexed column accessor struct for the table `PuzzleLeaderboardEntryRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct PuzzleLeaderboardEntryRowIxCols { - pub entry_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for PuzzleLeaderboardEntryRow { - type IxCols = PuzzleLeaderboardEntryRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - PuzzleLeaderboardEntryRowIxCols { - entry_id: __sdk::__query_builder::IxCol::new(table_name, "entry_id"), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for PuzzleLeaderboardEntryRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_leaderboard_entry_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_leaderboard_entry_table.rs deleted file mode 100644 index 45bb2eb2a..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_leaderboard_entry_table.rs +++ /dev/null @@ -1,231 +0,0 @@ -// 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::puzzle_leaderboard_entry_row_type::PuzzleLeaderboardEntryRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `puzzle_leaderboard_entry`. -/// -/// Obtain a handle from the [`PuzzleLeaderboardEntryTableAccess::puzzle_leaderboard_entry`] method on [`super::RemoteTables`], -/// like `ctx.db.puzzle_leaderboard_entry()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.puzzle_leaderboard_entry().on_insert(...)`. -pub struct PuzzleLeaderboardEntryTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `puzzle_leaderboard_entry`. -pub struct PuzzleLeaderboardEntryTableAccessor; - -impl __sdk::TableAccessor for PuzzleLeaderboardEntryTableAccessor { - type Row = PuzzleLeaderboardEntryRow; - type Handle<'db> = PuzzleLeaderboardEntryTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.puzzle_leaderboard_entry() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `puzzle_leaderboard_entry`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait PuzzleLeaderboardEntryTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`PuzzleLeaderboardEntryTableHandle`], which mediates access to the table `puzzle_leaderboard_entry`. - fn puzzle_leaderboard_entry(&self) -> PuzzleLeaderboardEntryTableHandle<'_>; -} - -impl PuzzleLeaderboardEntryTableAccess for super::RemoteTables { - fn puzzle_leaderboard_entry(&self) -> PuzzleLeaderboardEntryTableHandle<'_> { - PuzzleLeaderboardEntryTableHandle { - imp: self - .imp - .get_table::("puzzle_leaderboard_entry"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct PuzzleLeaderboardEntryInsertCallbackId(__sdk::CallbackId); -pub struct PuzzleLeaderboardEntryDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for PuzzleLeaderboardEntryTableHandle<'ctx> { - type Row = PuzzleLeaderboardEntryRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for PuzzleLeaderboardEntryTableHandle<'ctx> { - type Row = PuzzleLeaderboardEntryRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = PuzzleLeaderboardEntryInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleLeaderboardEntryInsertCallbackId { - PuzzleLeaderboardEntryInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: PuzzleLeaderboardEntryInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = PuzzleLeaderboardEntryDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleLeaderboardEntryDeleteCallbackId { - PuzzleLeaderboardEntryDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: PuzzleLeaderboardEntryDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for PuzzleLeaderboardEntryTableHandle<'ctx> { - type InsertCallbackId = PuzzleLeaderboardEntryInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleLeaderboardEntryInsertCallbackId { - PuzzleLeaderboardEntryInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: PuzzleLeaderboardEntryInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for PuzzleLeaderboardEntryTableHandle<'ctx> { - type DeleteCallbackId = PuzzleLeaderboardEntryDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleLeaderboardEntryDeleteCallbackId { - PuzzleLeaderboardEntryDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: PuzzleLeaderboardEntryDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct PuzzleLeaderboardEntryUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for PuzzleLeaderboardEntryTableHandle<'ctx> { - type UpdateCallbackId = PuzzleLeaderboardEntryUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> PuzzleLeaderboardEntryUpdateCallbackId { - PuzzleLeaderboardEntryUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: PuzzleLeaderboardEntryUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for PuzzleLeaderboardEntryTableHandle<'ctx> { - type UpdateCallbackId = PuzzleLeaderboardEntryUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> PuzzleLeaderboardEntryUpdateCallbackId { - PuzzleLeaderboardEntryUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: PuzzleLeaderboardEntryUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `entry_id` unique index on the table `puzzle_leaderboard_entry`, -/// which allows point queries on the field of the same name -/// via the [`PuzzleLeaderboardEntryEntryIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.puzzle_leaderboard_entry().entry_id().find(...)`. -pub struct PuzzleLeaderboardEntryEntryIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> PuzzleLeaderboardEntryTableHandle<'ctx> { - /// Get a handle on the `entry_id` unique index on the table `puzzle_leaderboard_entry`. - pub fn entry_id(&self) -> PuzzleLeaderboardEntryEntryIdUnique<'ctx> { - PuzzleLeaderboardEntryEntryIdUnique { - imp: self.imp.get_unique_constraint::("entry_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> PuzzleLeaderboardEntryEntryIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("puzzle_leaderboard_entry"); - _table.add_unique_constraint::("entry_id", |row| &row.entry_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `PuzzleLeaderboardEntryRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait puzzle_leaderboard_entryQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `PuzzleLeaderboardEntryRow`. - fn puzzle_leaderboard_entry(&self) -> __sdk::__query_builder::Table; -} - -impl puzzle_leaderboard_entryQueryTableAccess for __sdk::QueryTableAccessor { - fn puzzle_leaderboard_entry(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("puzzle_leaderboard_entry") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_publication_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_publication_status_type.rs deleted file mode 100644 index 38ece3cf5..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_publication_status_type.rs +++ /dev/null @@ -1,18 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum PuzzlePublicationStatus { - Draft, - - Published, -} - -impl __sdk::InModule for PuzzlePublicationStatus { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_runtime_run_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_runtime_run_row_type.rs deleted file mode 100644 index e610dfbf4..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_runtime_run_row_type.rs +++ /dev/null @@ -1,96 +0,0 @@ -// 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 PuzzleRuntimeRunRow { - pub run_id: String, - pub owner_user_id: String, - pub entry_profile_id: String, - pub current_profile_id: String, - pub cleared_level_count: u32, - pub current_level_index: u32, - pub current_grid_size: u32, - pub played_profile_ids_json: String, - pub previous_level_tags_json: String, - pub snapshot_json: String, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for PuzzleRuntimeRunRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `PuzzleRuntimeRunRow`. -/// -/// Provides typed access to columns for query building. -pub struct PuzzleRuntimeRunRowCols { - pub run_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub entry_profile_id: __sdk::__query_builder::Col, - pub current_profile_id: __sdk::__query_builder::Col, - pub cleared_level_count: __sdk::__query_builder::Col, - pub current_level_index: __sdk::__query_builder::Col, - pub current_grid_size: __sdk::__query_builder::Col, - pub played_profile_ids_json: __sdk::__query_builder::Col, - pub previous_level_tags_json: __sdk::__query_builder::Col, - pub snapshot_json: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for PuzzleRuntimeRunRow { - type Cols = PuzzleRuntimeRunRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - PuzzleRuntimeRunRowCols { - run_id: __sdk::__query_builder::Col::new(table_name, "run_id"), - owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"), - entry_profile_id: __sdk::__query_builder::Col::new(table_name, "entry_profile_id"), - current_profile_id: __sdk::__query_builder::Col::new(table_name, "current_profile_id"), - cleared_level_count: __sdk::__query_builder::Col::new( - table_name, - "cleared_level_count", - ), - current_level_index: __sdk::__query_builder::Col::new( - table_name, - "current_level_index", - ), - current_grid_size: __sdk::__query_builder::Col::new(table_name, "current_grid_size"), - played_profile_ids_json: __sdk::__query_builder::Col::new( - table_name, - "played_profile_ids_json", - ), - previous_level_tags_json: __sdk::__query_builder::Col::new( - table_name, - "previous_level_tags_json", - ), - 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 `PuzzleRuntimeRunRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct PuzzleRuntimeRunRowIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub run_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for PuzzleRuntimeRunRow { - type IxCols = PuzzleRuntimeRunRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - PuzzleRuntimeRunRowIxCols { - 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 PuzzleRuntimeRunRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_runtime_run_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_runtime_run_table.rs deleted file mode 100644 index d8772725a..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_runtime_run_table.rs +++ /dev/null @@ -1,230 +0,0 @@ -// 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::puzzle_runtime_run_row_type::PuzzleRuntimeRunRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `puzzle_runtime_run`. -/// -/// Obtain a handle from the [`PuzzleRuntimeRunTableAccess::puzzle_runtime_run`] method on [`super::RemoteTables`], -/// like `ctx.db.puzzle_runtime_run()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.puzzle_runtime_run().on_insert(...)`. -pub struct PuzzleRuntimeRunTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `puzzle_runtime_run`. -pub struct PuzzleRuntimeRunTableAccessor; - -impl __sdk::TableAccessor for PuzzleRuntimeRunTableAccessor { - type Row = PuzzleRuntimeRunRow; - type Handle<'db> = PuzzleRuntimeRunTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.puzzle_runtime_run() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `puzzle_runtime_run`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait PuzzleRuntimeRunTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`PuzzleRuntimeRunTableHandle`], which mediates access to the table `puzzle_runtime_run`. - fn puzzle_runtime_run(&self) -> PuzzleRuntimeRunTableHandle<'_>; -} - -impl PuzzleRuntimeRunTableAccess for super::RemoteTables { - fn puzzle_runtime_run(&self) -> PuzzleRuntimeRunTableHandle<'_> { - PuzzleRuntimeRunTableHandle { - imp: self - .imp - .get_table::("puzzle_runtime_run"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct PuzzleRuntimeRunInsertCallbackId(__sdk::CallbackId); -pub struct PuzzleRuntimeRunDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for PuzzleRuntimeRunTableHandle<'ctx> { - type Row = PuzzleRuntimeRunRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for PuzzleRuntimeRunTableHandle<'ctx> { - type Row = PuzzleRuntimeRunRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = PuzzleRuntimeRunInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleRuntimeRunInsertCallbackId { - PuzzleRuntimeRunInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: PuzzleRuntimeRunInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = PuzzleRuntimeRunDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleRuntimeRunDeleteCallbackId { - PuzzleRuntimeRunDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: PuzzleRuntimeRunDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for PuzzleRuntimeRunTableHandle<'ctx> { - type InsertCallbackId = PuzzleRuntimeRunInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleRuntimeRunInsertCallbackId { - PuzzleRuntimeRunInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: PuzzleRuntimeRunInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for PuzzleRuntimeRunTableHandle<'ctx> { - type DeleteCallbackId = PuzzleRuntimeRunDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleRuntimeRunDeleteCallbackId { - PuzzleRuntimeRunDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: PuzzleRuntimeRunDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct PuzzleRuntimeRunUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for PuzzleRuntimeRunTableHandle<'ctx> { - type UpdateCallbackId = PuzzleRuntimeRunUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> PuzzleRuntimeRunUpdateCallbackId { - PuzzleRuntimeRunUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: PuzzleRuntimeRunUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for PuzzleRuntimeRunTableHandle<'ctx> { - type UpdateCallbackId = PuzzleRuntimeRunUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> PuzzleRuntimeRunUpdateCallbackId { - PuzzleRuntimeRunUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: PuzzleRuntimeRunUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `run_id` unique index on the table `puzzle_runtime_run`, -/// which allows point queries on the field of the same name -/// via the [`PuzzleRuntimeRunRunIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.puzzle_runtime_run().run_id().find(...)`. -pub struct PuzzleRuntimeRunRunIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> PuzzleRuntimeRunTableHandle<'ctx> { - /// Get a handle on the `run_id` unique index on the table `puzzle_runtime_run`. - pub fn run_id(&self) -> PuzzleRuntimeRunRunIdUnique<'ctx> { - PuzzleRuntimeRunRunIdUnique { - imp: self.imp.get_unique_constraint::("run_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> PuzzleRuntimeRunRunIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("puzzle_runtime_run"); - _table.add_unique_constraint::("run_id", |row| &row.run_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `PuzzleRuntimeRunRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait puzzle_runtime_runQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `PuzzleRuntimeRunRow`. - fn puzzle_runtime_run(&self) -> __sdk::__query_builder::Table; -} - -impl puzzle_runtime_runQueryTableAccess for __sdk::QueryTableAccessor { - fn puzzle_runtime_run(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("puzzle_runtime_run") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_profile_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_profile_row_type.rs deleted file mode 100644 index db43f53a6..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_profile_row_type.rs +++ /dev/null @@ -1,141 +0,0 @@ -// 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::puzzle_publication_status_type::PuzzlePublicationStatus; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct PuzzleWorkProfileRow { - pub profile_id: String, - pub work_id: String, - pub owner_user_id: String, - pub source_session_id: Option, - pub author_display_name: String, - pub work_title: String, - pub work_description: String, - pub level_name: String, - pub summary: String, - pub theme_tags_json: String, - pub cover_image_src: Option, - pub cover_asset_id: Option, - pub levels_json: String, - pub publication_status: PuzzlePublicationStatus, - pub play_count: u32, - pub anchor_pack_json: String, - pub publish_ready: bool, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, - pub published_at: Option<__sdk::Timestamp>, - pub remix_count: u32, - pub like_count: u32, - pub point_incentive_total_half_points: u64, - pub point_incentive_claimed_points: u64, - pub visible: bool, -} - -impl __sdk::InModule for PuzzleWorkProfileRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `PuzzleWorkProfileRow`. -/// -/// Provides typed access to columns for query building. -pub struct PuzzleWorkProfileRowCols { - pub profile_id: __sdk::__query_builder::Col, - pub work_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub source_session_id: __sdk::__query_builder::Col>, - pub author_display_name: __sdk::__query_builder::Col, - pub work_title: __sdk::__query_builder::Col, - pub work_description: __sdk::__query_builder::Col, - pub level_name: __sdk::__query_builder::Col, - pub summary: __sdk::__query_builder::Col, - pub theme_tags_json: __sdk::__query_builder::Col, - pub cover_image_src: __sdk::__query_builder::Col>, - pub cover_asset_id: __sdk::__query_builder::Col>, - pub levels_json: __sdk::__query_builder::Col, - pub publication_status: - __sdk::__query_builder::Col, - pub play_count: __sdk::__query_builder::Col, - pub anchor_pack_json: __sdk::__query_builder::Col, - pub publish_ready: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, - pub published_at: __sdk::__query_builder::Col>, - pub remix_count: __sdk::__query_builder::Col, - pub like_count: __sdk::__query_builder::Col, - pub point_incentive_total_half_points: __sdk::__query_builder::Col, - pub point_incentive_claimed_points: __sdk::__query_builder::Col, - pub visible: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for PuzzleWorkProfileRow { - type Cols = PuzzleWorkProfileRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - PuzzleWorkProfileRowCols { - 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"), - level_name: __sdk::__query_builder::Col::new(table_name, "level_name"), - summary: __sdk::__query_builder::Col::new(table_name, "summary"), - theme_tags_json: __sdk::__query_builder::Col::new(table_name, "theme_tags_json"), - cover_image_src: __sdk::__query_builder::Col::new(table_name, "cover_image_src"), - cover_asset_id: __sdk::__query_builder::Col::new(table_name, "cover_asset_id"), - levels_json: __sdk::__query_builder::Col::new(table_name, "levels_json"), - publication_status: __sdk::__query_builder::Col::new(table_name, "publication_status"), - play_count: __sdk::__query_builder::Col::new(table_name, "play_count"), - anchor_pack_json: __sdk::__query_builder::Col::new(table_name, "anchor_pack_json"), - publish_ready: __sdk::__query_builder::Col::new(table_name, "publish_ready"), - 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"), - remix_count: __sdk::__query_builder::Col::new(table_name, "remix_count"), - like_count: __sdk::__query_builder::Col::new(table_name, "like_count"), - point_incentive_total_half_points: __sdk::__query_builder::Col::new( - table_name, - "point_incentive_total_half_points", - ), - point_incentive_claimed_points: __sdk::__query_builder::Col::new( - table_name, - "point_incentive_claimed_points", - ), - visible: __sdk::__query_builder::Col::new(table_name, "visible"), - } - } -} - -/// Indexed column accessor struct for the table `PuzzleWorkProfileRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct PuzzleWorkProfileRowIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub profile_id: __sdk::__query_builder::IxCol, - pub publication_status: - __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for PuzzleWorkProfileRow { - type IxCols = PuzzleWorkProfileRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - PuzzleWorkProfileRowIxCols { - 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 PuzzleWorkProfileRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_profile_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_profile_table.rs deleted file mode 100644 index d585413c0..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_profile_table.rs +++ /dev/null @@ -1,231 +0,0 @@ -// 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::puzzle_publication_status_type::PuzzlePublicationStatus; -use super::puzzle_work_profile_row_type::PuzzleWorkProfileRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `puzzle_work_profile`. -/// -/// Obtain a handle from the [`PuzzleWorkProfileTableAccess::puzzle_work_profile`] method on [`super::RemoteTables`], -/// like `ctx.db.puzzle_work_profile()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.puzzle_work_profile().on_insert(...)`. -pub struct PuzzleWorkProfileTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `puzzle_work_profile`. -pub struct PuzzleWorkProfileTableAccessor; - -impl __sdk::TableAccessor for PuzzleWorkProfileTableAccessor { - type Row = PuzzleWorkProfileRow; - type Handle<'db> = PuzzleWorkProfileTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.puzzle_work_profile() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `puzzle_work_profile`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait PuzzleWorkProfileTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`PuzzleWorkProfileTableHandle`], which mediates access to the table `puzzle_work_profile`. - fn puzzle_work_profile(&self) -> PuzzleWorkProfileTableHandle<'_>; -} - -impl PuzzleWorkProfileTableAccess for super::RemoteTables { - fn puzzle_work_profile(&self) -> PuzzleWorkProfileTableHandle<'_> { - PuzzleWorkProfileTableHandle { - imp: self - .imp - .get_table::("puzzle_work_profile"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct PuzzleWorkProfileInsertCallbackId(__sdk::CallbackId); -pub struct PuzzleWorkProfileDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for PuzzleWorkProfileTableHandle<'ctx> { - type Row = PuzzleWorkProfileRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for PuzzleWorkProfileTableHandle<'ctx> { - type Row = PuzzleWorkProfileRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = PuzzleWorkProfileInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleWorkProfileInsertCallbackId { - PuzzleWorkProfileInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: PuzzleWorkProfileInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = PuzzleWorkProfileDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleWorkProfileDeleteCallbackId { - PuzzleWorkProfileDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: PuzzleWorkProfileDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for PuzzleWorkProfileTableHandle<'ctx> { - type InsertCallbackId = PuzzleWorkProfileInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleWorkProfileInsertCallbackId { - PuzzleWorkProfileInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: PuzzleWorkProfileInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for PuzzleWorkProfileTableHandle<'ctx> { - type DeleteCallbackId = PuzzleWorkProfileDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> PuzzleWorkProfileDeleteCallbackId { - PuzzleWorkProfileDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: PuzzleWorkProfileDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct PuzzleWorkProfileUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for PuzzleWorkProfileTableHandle<'ctx> { - type UpdateCallbackId = PuzzleWorkProfileUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> PuzzleWorkProfileUpdateCallbackId { - PuzzleWorkProfileUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: PuzzleWorkProfileUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for PuzzleWorkProfileTableHandle<'ctx> { - type UpdateCallbackId = PuzzleWorkProfileUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> PuzzleWorkProfileUpdateCallbackId { - PuzzleWorkProfileUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: PuzzleWorkProfileUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `profile_id` unique index on the table `puzzle_work_profile`, -/// which allows point queries on the field of the same name -/// via the [`PuzzleWorkProfileProfileIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.puzzle_work_profile().profile_id().find(...)`. -pub struct PuzzleWorkProfileProfileIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> PuzzleWorkProfileTableHandle<'ctx> { - /// Get a handle on the `profile_id` unique index on the table `puzzle_work_profile`. - pub fn profile_id(&self) -> PuzzleWorkProfileProfileIdUnique<'ctx> { - PuzzleWorkProfileProfileIdUnique { - imp: self.imp.get_unique_constraint::("profile_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> PuzzleWorkProfileProfileIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("puzzle_work_profile"); - _table.add_unique_constraint::("profile_id", |row| &row.profile_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `PuzzleWorkProfileRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait puzzle_work_profileQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `PuzzleWorkProfileRow`. - fn puzzle_work_profile(&self) -> __sdk::__query_builder::Table; -} - -impl puzzle_work_profileQueryTableAccess for __sdk::QueryTableAccessor { - fn puzzle_work_profile(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("puzzle_work_profile") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/query_analytics_metric_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/query_analytics_metric_procedure.rs index 7973f5469..adc25bfaf 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/query_analytics_metric_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/query_analytics_metric_procedure.rs @@ -31,10 +31,10 @@ pub trait query_analytics_metric { input: AnalyticsMetricQueryInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl query_analytics_metric for super::RemoteProcedures { input: AnalyticsMetricQueryInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, AnalyticsMetricQueryProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_hostile_npc_defeated_signal_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_hostile_npc_defeated_signal_type.rs deleted file mode 100644 index d12363ff4..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_hostile_npc_defeated_signal_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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 QuestHostileNpcDefeatedSignal { - pub scene_id: Option, - pub hostile_npc_id: String, -} - -impl __sdk::InModule for QuestHostileNpcDefeatedSignal { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_item_delivered_signal_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_item_delivered_signal_type.rs deleted file mode 100644 index 4e1d0a5d3..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_item_delivered_signal_type.rs +++ /dev/null @@ -1,17 +0,0 @@ -// 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 QuestItemDeliveredSignal { - pub npc_id: String, - pub item_id: String, - pub quantity: u32, -} - -impl __sdk::InModule for QuestItemDeliveredSignal { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_log_event_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_log_event_kind_type.rs deleted file mode 100644 index c3176590d..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_log_event_kind_type.rs +++ /dev/null @@ -1,24 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum QuestLogEventKind { - Accepted, - - Progressed, - - Completed, - - CompletionAcknowledged, - - TurnedIn, -} - -impl __sdk::InModule for QuestLogEventKind { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_log_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_log_table.rs deleted file mode 100644 index 4f297bbf9..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_log_table.rs +++ /dev/null @@ -1,232 +0,0 @@ -// 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::quest_log_event_kind_type::QuestLogEventKind; -use super::quest_log_type::QuestLog; -use super::quest_progress_signal_type::QuestProgressSignal; -use super::quest_signal_kind_type::QuestSignalKind; -use super::quest_status_type::QuestStatus; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `quest_log`. -/// -/// Obtain a handle from the [`QuestLogTableAccess::quest_log`] method on [`super::RemoteTables`], -/// like `ctx.db.quest_log()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.quest_log().on_insert(...)`. -pub struct QuestLogTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `quest_log`. -pub struct QuestLogTableAccessor; - -impl __sdk::TableAccessor for QuestLogTableAccessor { - type Row = QuestLog; - type Handle<'db> = QuestLogTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.quest_log() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `quest_log`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait QuestLogTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`QuestLogTableHandle`], which mediates access to the table `quest_log`. - fn quest_log(&self) -> QuestLogTableHandle<'_>; -} - -impl QuestLogTableAccess for super::RemoteTables { - fn quest_log(&self) -> QuestLogTableHandle<'_> { - QuestLogTableHandle { - imp: self.imp.get_table::("quest_log"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct QuestLogInsertCallbackId(__sdk::CallbackId); -pub struct QuestLogDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for QuestLogTableHandle<'ctx> { - type Row = QuestLog; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for QuestLogTableHandle<'ctx> { - type Row = QuestLog; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = QuestLogInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> QuestLogInsertCallbackId { - QuestLogInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: QuestLogInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = QuestLogDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> QuestLogDeleteCallbackId { - QuestLogDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: QuestLogDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for QuestLogTableHandle<'ctx> { - type InsertCallbackId = QuestLogInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> QuestLogInsertCallbackId { - QuestLogInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: QuestLogInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for QuestLogTableHandle<'ctx> { - type DeleteCallbackId = QuestLogDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> QuestLogDeleteCallbackId { - QuestLogDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: QuestLogDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct QuestLogUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for QuestLogTableHandle<'ctx> { - type UpdateCallbackId = QuestLogUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> QuestLogUpdateCallbackId { - QuestLogUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: QuestLogUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for QuestLogTableHandle<'ctx> { - type UpdateCallbackId = QuestLogUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> QuestLogUpdateCallbackId { - QuestLogUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: QuestLogUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `log_id` unique index on the table `quest_log`, -/// which allows point queries on the field of the same name -/// via the [`QuestLogLogIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.quest_log().log_id().find(...)`. -pub struct QuestLogLogIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> QuestLogTableHandle<'ctx> { - /// Get a handle on the `log_id` unique index on the table `quest_log`. - pub fn log_id(&self) -> QuestLogLogIdUnique<'ctx> { - QuestLogLogIdUnique { - imp: self.imp.get_unique_constraint::("log_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> QuestLogLogIdUnique<'ctx> { - /// Find the subscribed row whose `log_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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("quest_log"); - _table.add_unique_constraint::("log_id", |row| &row.log_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `QuestLog`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait quest_logQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `QuestLog`. - fn quest_log(&self) -> __sdk::__query_builder::Table; -} - -impl quest_logQueryTableAccess for __sdk::QueryTableAccessor { - fn quest_log(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("quest_log") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_log_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_log_type.rs deleted file mode 100644 index d893857a9..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_log_type.rs +++ /dev/null @@ -1,93 +0,0 @@ -// 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::quest_log_event_kind_type::QuestLogEventKind; -use super::quest_progress_signal_type::QuestProgressSignal; -use super::quest_signal_kind_type::QuestSignalKind; -use super::quest_status_type::QuestStatus; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct QuestLog { - pub log_id: String, - pub quest_id: String, - pub runtime_session_id: String, - pub actor_user_id: String, - pub event_kind: QuestLogEventKind, - pub status_after: QuestStatus, - pub signal_kind: Option, - pub signal: Option, - pub step_id: Option, - pub step_progress: Option, - pub created_at: __sdk::Timestamp, -} - -impl __sdk::InModule for QuestLog { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `QuestLog`. -/// -/// Provides typed access to columns for query building. -pub struct QuestLogCols { - pub log_id: __sdk::__query_builder::Col, - pub quest_id: __sdk::__query_builder::Col, - pub runtime_session_id: __sdk::__query_builder::Col, - pub actor_user_id: __sdk::__query_builder::Col, - pub event_kind: __sdk::__query_builder::Col, - pub status_after: __sdk::__query_builder::Col, - pub signal_kind: __sdk::__query_builder::Col>, - pub signal: __sdk::__query_builder::Col>, - pub step_id: __sdk::__query_builder::Col>, - pub step_progress: __sdk::__query_builder::Col>, - pub created_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for QuestLog { - type Cols = QuestLogCols; - fn cols(table_name: &'static str) -> Self::Cols { - QuestLogCols { - log_id: __sdk::__query_builder::Col::new(table_name, "log_id"), - quest_id: __sdk::__query_builder::Col::new(table_name, "quest_id"), - runtime_session_id: __sdk::__query_builder::Col::new(table_name, "runtime_session_id"), - actor_user_id: __sdk::__query_builder::Col::new(table_name, "actor_user_id"), - event_kind: __sdk::__query_builder::Col::new(table_name, "event_kind"), - status_after: __sdk::__query_builder::Col::new(table_name, "status_after"), - signal_kind: __sdk::__query_builder::Col::new(table_name, "signal_kind"), - signal: __sdk::__query_builder::Col::new(table_name, "signal"), - step_id: __sdk::__query_builder::Col::new(table_name, "step_id"), - step_progress: __sdk::__query_builder::Col::new(table_name, "step_progress"), - created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), - } - } -} - -/// Indexed column accessor struct for the table `QuestLog`. -/// -/// Provides typed access to indexed columns for query building. -pub struct QuestLogIxCols { - pub actor_user_id: __sdk::__query_builder::IxCol, - pub log_id: __sdk::__query_builder::IxCol, - pub quest_id: __sdk::__query_builder::IxCol, - pub runtime_session_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for QuestLog { - type IxCols = QuestLogIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - QuestLogIxCols { - actor_user_id: __sdk::__query_builder::IxCol::new(table_name, "actor_user_id"), - log_id: __sdk::__query_builder::IxCol::new(table_name, "log_id"), - quest_id: __sdk::__query_builder::IxCol::new(table_name, "quest_id"), - runtime_session_id: __sdk::__query_builder::IxCol::new( - table_name, - "runtime_session_id", - ), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for QuestLog {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_narrative_binding_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_narrative_binding_snapshot_type.rs deleted file mode 100644 index 730e7565e..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_narrative_binding_snapshot_type.rs +++ /dev/null @@ -1,24 +0,0 @@ -// 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::quest_narrative_origin_type::QuestNarrativeOrigin; -use super::quest_narrative_type_type::QuestNarrativeType; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct QuestNarrativeBindingSnapshot { - pub origin: QuestNarrativeOrigin, - pub narrative_type: QuestNarrativeType, - pub dramatic_need: String, - pub issuer_goal: String, - pub player_hook: String, - pub world_reason: String, - pub followup_hooks: Vec, -} - -impl __sdk::InModule for QuestNarrativeBindingSnapshot { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_narrative_origin_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_narrative_origin_type.rs deleted file mode 100644 index 34ce63f34..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_narrative_origin_type.rs +++ /dev/null @@ -1,18 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum QuestNarrativeOrigin { - AiCompiled, - - FallbackBuilder, -} - -impl __sdk::InModule for QuestNarrativeOrigin { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_narrative_type_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_narrative_type_type.rs deleted file mode 100644 index ac5319cda..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_narrative_type_type.rs +++ /dev/null @@ -1,26 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum QuestNarrativeType { - Bounty, - - Escort, - - Investigation, - - Retrieval, - - Relationship, - - Trial, -} - -impl __sdk::InModule for QuestNarrativeType { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_npc_spar_completed_signal_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_npc_spar_completed_signal_type.rs deleted file mode 100644 index a0f1f8bbf..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_npc_spar_completed_signal_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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 QuestNpcSparCompletedSignal { - pub npc_id: String, -} - -impl __sdk::InModule for QuestNpcSparCompletedSignal { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_npc_talk_completed_signal_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_npc_talk_completed_signal_type.rs deleted file mode 100644 index 39042f374..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_npc_talk_completed_signal_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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 QuestNpcTalkCompletedSignal { - pub npc_id: String, -} - -impl __sdk::InModule for QuestNpcTalkCompletedSignal { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_objective_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_objective_kind_type.rs deleted file mode 100644 index 665faa305..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_objective_kind_type.rs +++ /dev/null @@ -1,26 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum QuestObjectiveKind { - DefeatHostileNpc, - - InspectTreasure, - - SparWithNpc, - - TalkToNpc, - - ReachScene, - - DeliverItem, -} - -impl __sdk::InModule for QuestObjectiveKind { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_objective_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_objective_snapshot_type.rs deleted file mode 100644 index 38682e687..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_objective_snapshot_type.rs +++ /dev/null @@ -1,22 +0,0 @@ -// 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::quest_objective_kind_type::QuestObjectiveKind; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct QuestObjectiveSnapshot { - pub kind: QuestObjectiveKind, - pub target_hostile_npc_id: Option, - pub target_npc_id: Option, - pub target_scene_id: Option, - pub target_item_id: Option, - pub required_count: u32, -} - -impl __sdk::InModule for QuestObjectiveSnapshot { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_progress_signal_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_progress_signal_type.rs deleted file mode 100644 index 5764d2733..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_progress_signal_type.rs +++ /dev/null @@ -1,32 +0,0 @@ -// 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::quest_hostile_npc_defeated_signal_type::QuestHostileNpcDefeatedSignal; -use super::quest_item_delivered_signal_type::QuestItemDeliveredSignal; -use super::quest_npc_spar_completed_signal_type::QuestNpcSparCompletedSignal; -use super::quest_npc_talk_completed_signal_type::QuestNpcTalkCompletedSignal; -use super::quest_scene_reached_signal_type::QuestSceneReachedSignal; -use super::quest_treasure_inspected_signal_type::QuestTreasureInspectedSignal; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub enum QuestProgressSignal { - HostileNpcDefeated(QuestHostileNpcDefeatedSignal), - - TreasureInspected(QuestTreasureInspectedSignal), - - NpcSparCompleted(QuestNpcSparCompletedSignal), - - NpcTalkCompleted(QuestNpcTalkCompletedSignal), - - SceneReached(QuestSceneReachedSignal), - - ItemDelivered(QuestItemDeliveredSignal), -} - -impl __sdk::InModule for QuestProgressSignal { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_record_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_record_table.rs deleted file mode 100644 index c7ba519e2..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_record_table.rs +++ /dev/null @@ -1,233 +0,0 @@ -// 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::quest_narrative_binding_snapshot_type::QuestNarrativeBindingSnapshot; -use super::quest_objective_snapshot_type::QuestObjectiveSnapshot; -use super::quest_record_type::QuestRecord; -use super::quest_reward_snapshot_type::QuestRewardSnapshot; -use super::quest_status_type::QuestStatus; -use super::quest_step_snapshot_type::QuestStepSnapshot; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `quest_record`. -/// -/// Obtain a handle from the [`QuestRecordTableAccess::quest_record`] method on [`super::RemoteTables`], -/// like `ctx.db.quest_record()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.quest_record().on_insert(...)`. -pub struct QuestRecordTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `quest_record`. -pub struct QuestRecordTableAccessor; - -impl __sdk::TableAccessor for QuestRecordTableAccessor { - type Row = QuestRecord; - type Handle<'db> = QuestRecordTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.quest_record() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `quest_record`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait QuestRecordTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`QuestRecordTableHandle`], which mediates access to the table `quest_record`. - fn quest_record(&self) -> QuestRecordTableHandle<'_>; -} - -impl QuestRecordTableAccess for super::RemoteTables { - fn quest_record(&self) -> QuestRecordTableHandle<'_> { - QuestRecordTableHandle { - imp: self.imp.get_table::("quest_record"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct QuestRecordInsertCallbackId(__sdk::CallbackId); -pub struct QuestRecordDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for QuestRecordTableHandle<'ctx> { - type Row = QuestRecord; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for QuestRecordTableHandle<'ctx> { - type Row = QuestRecord; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = QuestRecordInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> QuestRecordInsertCallbackId { - QuestRecordInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: QuestRecordInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = QuestRecordDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> QuestRecordDeleteCallbackId { - QuestRecordDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: QuestRecordDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for QuestRecordTableHandle<'ctx> { - type InsertCallbackId = QuestRecordInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> QuestRecordInsertCallbackId { - QuestRecordInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: QuestRecordInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for QuestRecordTableHandle<'ctx> { - type DeleteCallbackId = QuestRecordDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> QuestRecordDeleteCallbackId { - QuestRecordDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: QuestRecordDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct QuestRecordUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for QuestRecordTableHandle<'ctx> { - type UpdateCallbackId = QuestRecordUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> QuestRecordUpdateCallbackId { - QuestRecordUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: QuestRecordUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for QuestRecordTableHandle<'ctx> { - type UpdateCallbackId = QuestRecordUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> QuestRecordUpdateCallbackId { - QuestRecordUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: QuestRecordUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `quest_id` unique index on the table `quest_record`, -/// which allows point queries on the field of the same name -/// via the [`QuestRecordQuestIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.quest_record().quest_id().find(...)`. -pub struct QuestRecordQuestIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> QuestRecordTableHandle<'ctx> { - /// Get a handle on the `quest_id` unique index on the table `quest_record`. - pub fn quest_id(&self) -> QuestRecordQuestIdUnique<'ctx> { - QuestRecordQuestIdUnique { - imp: self.imp.get_unique_constraint::("quest_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> QuestRecordQuestIdUnique<'ctx> { - /// Find the subscribed row whose `quest_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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("quest_record"); - _table.add_unique_constraint::("quest_id", |row| &row.quest_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `QuestRecord`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait quest_recordQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `QuestRecord`. - fn quest_record(&self) -> __sdk::__query_builder::Table; -} - -impl quest_recordQueryTableAccess for __sdk::QueryTableAccessor { - fn quest_record(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("quest_record") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_record_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_record_type.rs deleted file mode 100644 index 4243e91c6..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_record_type.rs +++ /dev/null @@ -1,166 +0,0 @@ -// 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::quest_narrative_binding_snapshot_type::QuestNarrativeBindingSnapshot; -use super::quest_objective_snapshot_type::QuestObjectiveSnapshot; -use super::quest_reward_snapshot_type::QuestRewardSnapshot; -use super::quest_status_type::QuestStatus; -use super::quest_step_snapshot_type::QuestStepSnapshot; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct QuestRecord { - pub quest_id: String, - pub runtime_session_id: String, - pub story_session_id: Option, - pub actor_user_id: String, - pub issuer_npc_id: String, - pub issuer_npc_name: String, - pub scene_id: Option, - pub chapter_id: Option, - pub act_id: Option, - pub thread_id: Option, - pub contract_id: Option, - pub title: String, - pub description: String, - pub summary: String, - pub objective: QuestObjectiveSnapshot, - pub progress: u32, - pub status: QuestStatus, - pub completion_notified: bool, - pub reward: QuestRewardSnapshot, - pub reward_text: String, - pub narrative_binding: QuestNarrativeBindingSnapshot, - pub steps: Vec, - pub active_step_id: Option, - pub visible_stage: u32, - pub hidden_flags: Vec, - pub discovered_fact_ids: Vec, - pub related_carrier_ids: Vec, - pub consequence_ids: Vec, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, - pub completed_at: Option<__sdk::Timestamp>, - pub turned_in_at: Option<__sdk::Timestamp>, -} - -impl __sdk::InModule for QuestRecord { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `QuestRecord`. -/// -/// Provides typed access to columns for query building. -pub struct QuestRecordCols { - pub quest_id: __sdk::__query_builder::Col, - pub runtime_session_id: __sdk::__query_builder::Col, - pub story_session_id: __sdk::__query_builder::Col>, - pub actor_user_id: __sdk::__query_builder::Col, - pub issuer_npc_id: __sdk::__query_builder::Col, - pub issuer_npc_name: __sdk::__query_builder::Col, - pub scene_id: __sdk::__query_builder::Col>, - pub chapter_id: __sdk::__query_builder::Col>, - pub act_id: __sdk::__query_builder::Col>, - pub thread_id: __sdk::__query_builder::Col>, - pub contract_id: __sdk::__query_builder::Col>, - pub title: __sdk::__query_builder::Col, - pub description: __sdk::__query_builder::Col, - pub summary: __sdk::__query_builder::Col, - pub objective: __sdk::__query_builder::Col, - pub progress: __sdk::__query_builder::Col, - pub status: __sdk::__query_builder::Col, - pub completion_notified: __sdk::__query_builder::Col, - pub reward: __sdk::__query_builder::Col, - pub reward_text: __sdk::__query_builder::Col, - pub narrative_binding: __sdk::__query_builder::Col, - pub steps: __sdk::__query_builder::Col>, - pub active_step_id: __sdk::__query_builder::Col>, - pub visible_stage: __sdk::__query_builder::Col, - pub hidden_flags: __sdk::__query_builder::Col>, - pub discovered_fact_ids: __sdk::__query_builder::Col>, - pub related_carrier_ids: __sdk::__query_builder::Col>, - pub consequence_ids: __sdk::__query_builder::Col>, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, - pub completed_at: __sdk::__query_builder::Col>, - pub turned_in_at: __sdk::__query_builder::Col>, -} - -impl __sdk::__query_builder::HasCols for QuestRecord { - type Cols = QuestRecordCols; - fn cols(table_name: &'static str) -> Self::Cols { - QuestRecordCols { - quest_id: __sdk::__query_builder::Col::new(table_name, "quest_id"), - runtime_session_id: __sdk::__query_builder::Col::new(table_name, "runtime_session_id"), - story_session_id: __sdk::__query_builder::Col::new(table_name, "story_session_id"), - actor_user_id: __sdk::__query_builder::Col::new(table_name, "actor_user_id"), - issuer_npc_id: __sdk::__query_builder::Col::new(table_name, "issuer_npc_id"), - issuer_npc_name: __sdk::__query_builder::Col::new(table_name, "issuer_npc_name"), - scene_id: __sdk::__query_builder::Col::new(table_name, "scene_id"), - chapter_id: __sdk::__query_builder::Col::new(table_name, "chapter_id"), - act_id: __sdk::__query_builder::Col::new(table_name, "act_id"), - thread_id: __sdk::__query_builder::Col::new(table_name, "thread_id"), - contract_id: __sdk::__query_builder::Col::new(table_name, "contract_id"), - title: __sdk::__query_builder::Col::new(table_name, "title"), - description: __sdk::__query_builder::Col::new(table_name, "description"), - summary: __sdk::__query_builder::Col::new(table_name, "summary"), - objective: __sdk::__query_builder::Col::new(table_name, "objective"), - progress: __sdk::__query_builder::Col::new(table_name, "progress"), - status: __sdk::__query_builder::Col::new(table_name, "status"), - completion_notified: __sdk::__query_builder::Col::new( - table_name, - "completion_notified", - ), - reward: __sdk::__query_builder::Col::new(table_name, "reward"), - reward_text: __sdk::__query_builder::Col::new(table_name, "reward_text"), - narrative_binding: __sdk::__query_builder::Col::new(table_name, "narrative_binding"), - steps: __sdk::__query_builder::Col::new(table_name, "steps"), - active_step_id: __sdk::__query_builder::Col::new(table_name, "active_step_id"), - visible_stage: __sdk::__query_builder::Col::new(table_name, "visible_stage"), - hidden_flags: __sdk::__query_builder::Col::new(table_name, "hidden_flags"), - discovered_fact_ids: __sdk::__query_builder::Col::new( - table_name, - "discovered_fact_ids", - ), - related_carrier_ids: __sdk::__query_builder::Col::new( - table_name, - "related_carrier_ids", - ), - consequence_ids: __sdk::__query_builder::Col::new(table_name, "consequence_ids"), - created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), - updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), - completed_at: __sdk::__query_builder::Col::new(table_name, "completed_at"), - turned_in_at: __sdk::__query_builder::Col::new(table_name, "turned_in_at"), - } - } -} - -/// Indexed column accessor struct for the table `QuestRecord`. -/// -/// Provides typed access to indexed columns for query building. -pub struct QuestRecordIxCols { - pub actor_user_id: __sdk::__query_builder::IxCol, - pub issuer_npc_id: __sdk::__query_builder::IxCol, - pub quest_id: __sdk::__query_builder::IxCol, - pub runtime_session_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for QuestRecord { - type IxCols = QuestRecordIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - QuestRecordIxCols { - actor_user_id: __sdk::__query_builder::IxCol::new(table_name, "actor_user_id"), - issuer_npc_id: __sdk::__query_builder::IxCol::new(table_name, "issuer_npc_id"), - quest_id: __sdk::__query_builder::IxCol::new(table_name, "quest_id"), - runtime_session_id: __sdk::__query_builder::IxCol::new( - table_name, - "runtime_session_id", - ), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for QuestRecord {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_equipment_slot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_equipment_slot_type.rs deleted file mode 100644 index 43a942c4e..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_equipment_slot_type.rs +++ /dev/null @@ -1,20 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum QuestRewardEquipmentSlot { - Weapon, - - Armor, - - Relic, -} - -impl __sdk::InModule for QuestRewardEquipmentSlot { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_intel_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_intel_type.rs deleted file mode 100644 index 9938686aa..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_intel_type.rs +++ /dev/null @@ -1,16 +0,0 @@ -// 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 QuestRewardIntel { - pub rumor_text: String, - pub unlocked_scene_id: Option, -} - -impl __sdk::InModule for QuestRewardIntel { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_item_rarity_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_item_rarity_type.rs deleted file mode 100644 index 7fc4f7ec0..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_item_rarity_type.rs +++ /dev/null @@ -1,24 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum QuestRewardItemRarity { - Common, - - Uncommon, - - Rare, - - Epic, - - Legendary, -} - -impl __sdk::InModule for QuestRewardItemRarity { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_item_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_item_type.rs deleted file mode 100644 index a62f9d933..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_item_type.rs +++ /dev/null @@ -1,27 +0,0 @@ -// 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::quest_reward_equipment_slot_type::QuestRewardEquipmentSlot; -use super::quest_reward_item_rarity_type::QuestRewardItemRarity; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct QuestRewardItem { - pub item_id: String, - pub category: String, - pub name: String, - pub description: Option, - pub quantity: u32, - pub rarity: QuestRewardItemRarity, - pub tags: Vec, - pub stackable: bool, - pub stack_key: String, - pub equipment_slot_id: Option, -} - -impl __sdk::InModule for QuestRewardItem { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_snapshot_type.rs deleted file mode 100644 index 995e84ad8..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_snapshot_type.rs +++ /dev/null @@ -1,23 +0,0 @@ -// 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::quest_reward_intel_type::QuestRewardIntel; -use super::quest_reward_item_type::QuestRewardItem; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct QuestRewardSnapshot { - pub affinity_bonus: i32, - pub currency: i64, - pub experience: Option, - pub items: Vec, - pub intel: Option, - pub story_hint: Option, -} - -impl __sdk::InModule for QuestRewardSnapshot { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_scene_reached_signal_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_scene_reached_signal_type.rs deleted file mode 100644 index 723d9325b..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_scene_reached_signal_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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 QuestSceneReachedSignal { - pub scene_id: String, -} - -impl __sdk::InModule for QuestSceneReachedSignal { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_signal_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_signal_kind_type.rs deleted file mode 100644 index 04ea66614..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_signal_kind_type.rs +++ /dev/null @@ -1,26 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum QuestSignalKind { - HostileNpcDefeated, - - TreasureInspected, - - NpcSparCompleted, - - NpcTalkCompleted, - - SceneReached, - - ItemDelivered, -} - -impl __sdk::InModule for QuestSignalKind { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_status_type.rs deleted file mode 100644 index f5defbb7a..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_status_type.rs +++ /dev/null @@ -1,26 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum QuestStatus { - Active, - - ReadyToTurnIn, - - Completed, - - TurnedIn, - - Failed, - - Expired, -} - -impl __sdk::InModule for QuestStatus { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_step_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_step_snapshot_type.rs deleted file mode 100644 index 0f27cb9ed..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_step_snapshot_type.rs +++ /dev/null @@ -1,27 +0,0 @@ -// 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::quest_objective_kind_type::QuestObjectiveKind; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct QuestStepSnapshot { - pub step_id: String, - pub kind: QuestObjectiveKind, - pub target_hostile_npc_id: Option, - pub target_npc_id: Option, - pub target_scene_id: Option, - pub target_item_id: Option, - pub required_count: u32, - pub progress: u32, - pub title: String, - pub reveal_text: String, - pub complete_text: String, -} - -impl __sdk::InModule for QuestStepSnapshot { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_treasure_inspected_signal_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_treasure_inspected_signal_type.rs deleted file mode 100644 index 51caed77c..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_treasure_inspected_signal_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -// 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 QuestTreasureInspectedSignal { - pub scene_id: Option, -} - -impl __sdk::InModule for QuestTreasureInspectedSignal { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/record_daily_login_tracking_event_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/record_daily_login_tracking_event_and_return_procedure.rs index c131f3bab..9365d3359 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/record_daily_login_tracking_event_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/record_daily_login_tracking_event_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait record_daily_login_tracking_event_and_return { input: RuntimeProfileTaskCenterGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl record_daily_login_tracking_event_and_return for super::RemoteProcedures { input: RuntimeProfileTaskCenterGetInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeTrackingEventProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/record_profile_recharge_refund_observation_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/record_profile_recharge_refund_observation_and_return_procedure.rs index 5c450a579..2ee1c67a6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/record_profile_recharge_refund_observation_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/record_profile_recharge_refund_observation_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait record_profile_recharge_refund_observation_and_return { input: RuntimeProfileRechargeRefundObservationInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl record_profile_recharge_refund_observation_and_return for super::RemoteProc input: RuntimeProfileRechargeRefundObservationInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileRechargeRefundProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/record_tracking_event_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/record_tracking_event_and_return_procedure.rs index c09132c01..01361ec79 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/record_tracking_event_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/record_tracking_event_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait record_tracking_event_and_return { input: RuntimeTrackingEventInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl record_tracking_event_and_return for super::RemoteProcedures { input: RuntimeTrackingEventInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeTrackingEventProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/record_tracking_events_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/record_tracking_events_and_return_procedure.rs index 428e378f6..ba28d1a80 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/record_tracking_events_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/record_tracking_events_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait record_tracking_events_and_return { inputs: Vec, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl record_tracking_events_and_return for super::RemoteProcedures { inputs: Vec, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeTrackingEventBatchProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/redeem_profile_referral_invite_code_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/redeem_profile_referral_invite_code_procedure.rs index efebd26a0..44354acdf 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/redeem_profile_referral_invite_code_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/redeem_profile_referral_invite_code_procedure.rs @@ -31,10 +31,10 @@ pub trait redeem_profile_referral_invite_code { input: RuntimeReferralRedeemInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl redeem_profile_referral_invite_code for super::RemoteProcedures { input: RuntimeReferralRedeemInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeReferralRedeemProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/redeem_profile_reward_code_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/redeem_profile_reward_code_procedure.rs index 38fc64f51..4d048a49b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/redeem_profile_reward_code_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/redeem_profile_reward_code_procedure.rs @@ -31,10 +31,10 @@ pub trait redeem_profile_reward_code { input: RuntimeProfileRewardCodeRedeemInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl redeem_profile_reward_code for super::RemoteProcedures { input: RuntimeProfileRewardCodeRedeemInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileRewardCodeRedeemProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/refund_profile_wallet_points_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/refund_profile_wallet_points_and_return_procedure.rs index a4bbd3787..fb86172c0 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/refund_profile_wallet_points_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/refund_profile_wallet_points_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait refund_profile_wallet_points_and_return { input: RuntimeProfileWalletAdjustmentInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl refund_profile_wallet_points_and_return for super::RemoteProcedures { input: RuntimeProfileWalletAdjustmentInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileWalletAdjustmentProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/release_profile_recharge_refund_hold_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/release_profile_recharge_refund_hold_and_return_procedure.rs index 74e5ecadb..8697385ea 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/release_profile_recharge_refund_hold_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/release_profile_recharge_refund_hold_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait release_profile_recharge_refund_hold_and_return { input: RuntimeProfileRechargeRefundHoldReleaseInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl release_profile_recharge_refund_hold_and_return for super::RemoteProcedures input: RuntimeProfileRechargeRefundHoldReleaseInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileRechargeRefundHoldProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/rename_editor_project_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/rename_editor_project_and_return_procedure.rs index 923337242..408122981 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/rename_editor_project_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/rename_editor_project_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait rename_editor_project_and_return { input: EditorProjectRenameInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl rename_editor_project_and_return for super::RemoteProcedures { input: EditorProjectRenameInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorProjectProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/renew_external_generation_job_lease_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/renew_external_generation_job_lease_and_return_procedure.rs index 0b31241b0..4cbd45fc1 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/renew_external_generation_job_lease_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/renew_external_generation_job_lease_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait renew_external_generation_job_lease_and_return { input: ExternalGenerationJobRenewLeaseInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl renew_external_generation_job_lease_and_return for super::RemoteProcedures input: ExternalGenerationJobRenewLeaseInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, ExternalGenerationJobProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/repair_editor_asset_media_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/repair_editor_asset_media_and_return_procedure.rs index 63499dde6..1b035028b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/repair_editor_asset_media_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/repair_editor_asset_media_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait repair_editor_asset_media_and_return { input: EditorAssetMediaRepairInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl repair_editor_asset_media_and_return for super::RemoteProcedures { input: EditorAssetMediaRepairInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorAssetProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/repair_editor_canvas_resources_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/repair_editor_canvas_resources_and_return_procedure.rs index 1960b07fe..a45b084b1 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/repair_editor_canvas_resources_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/repair_editor_canvas_resources_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait repair_editor_canvas_resources_and_return { input: EditorCanvasResourceRepairInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl repair_editor_canvas_resources_and_return for super::RemoteProcedures { input: EditorCanvasResourceRepairInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorCanvasResourceRepairProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/repair_editor_project_resource_media_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/repair_editor_project_resource_media_and_return_procedure.rs index 47b5c9178..7e521cd37 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/repair_editor_project_resource_media_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/repair_editor_project_resource_media_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait repair_editor_project_resource_media_and_return { input: EditorProjectResourceMediaRepairInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl repair_editor_project_resource_media_and_return for super::RemoteProcedures input: EditorProjectResourceMediaRepairInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorProjectResourceProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_editor_reference_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_editor_reference_and_return_procedure.rs index f25481dbf..e57f5cfb9 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_editor_reference_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_editor_reference_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait resolve_editor_reference_and_return { input: EditorReferenceResolveInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl resolve_editor_reference_and_return for super::RemoteProcedures { input: EditorReferenceResolveInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorReferenceProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_profile_recharge_refund_manual_review_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_profile_recharge_refund_manual_review_and_return_procedure.rs index ceb9383a9..96f8eb1fe 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_profile_recharge_refund_manual_review_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_profile_recharge_refund_manual_review_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait resolve_profile_recharge_refund_manual_review_and_return { input: RuntimeProfileRechargeRefundManualReviewResolveInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl resolve_profile_recharge_refund_manual_review_and_return for super::RemoteP input: RuntimeProfileRechargeRefundManualReviewResolveInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileRechargeRefundProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/revoke_database_migration_operator_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/revoke_database_migration_operator_procedure.rs index fe0329266..feb5086ed 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/revoke_database_migration_operator_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/revoke_database_migration_operator_procedure.rs @@ -31,10 +31,10 @@ pub trait revoke_database_migration_operator { input: DatabaseMigrationRevokeOperatorInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl revoke_database_migration_operator for super::RemoteProcedures { input: DatabaseMigrationRevokeOperatorInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, DatabaseMigrationOperatorProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/revoke_external_api_key_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/revoke_external_api_key_and_return_procedure.rs index 9faef438c..d893b2180 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/revoke_external_api_key_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/revoke_external_api_key_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait revoke_external_api_key_and_return { input: ExternalApiKeyRevokeInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl revoke_external_api_key_and_return for super::RemoteProcedures { input: ExternalApiKeyRevokeInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, ExternalApiKeyProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/rollback_editor_canvas_layout_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/rollback_editor_canvas_layout_and_return_procedure.rs index 0c43310f5..ef6918cf8 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/rollback_editor_canvas_layout_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/rollback_editor_canvas_layout_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait rollback_editor_canvas_layout_and_return { input: EditorCanvasLayoutMigrationInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl rollback_editor_canvas_layout_and_return for super::RemoteProcedures { input: EditorCanvasLayoutMigrationInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorCanvasLayoutMigrationProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/rotate_editor_generation_runtime_service_identity_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/rotate_editor_generation_runtime_service_identity_and_return_procedure.rs index 25abb2448..5c4593116 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/rotate_editor_generation_runtime_service_identity_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/rotate_editor_generation_runtime_service_identity_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait rotate_editor_generation_runtime_service_identity_and_return { input: EditorGenerationRuntimeIdentityRotateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl rotate_editor_generation_runtime_service_identity_and_return for super::Rem input: EditorGenerationRuntimeIdentityRotateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorGenerationPricingConfigProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_draft_card_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_draft_card_kind_type.rs deleted file mode 100644 index e082dc367..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_draft_card_kind_type.rs +++ /dev/null @@ -1,34 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum RpgAgentDraftCardKind { - World, - - Camp, - - Faction, - - Character, - - Landmark, - - Thread, - - Chapter, - - SceneChapter, - - Carrier, - - SidequestSeed, -} - -impl __sdk::InModule for RpgAgentDraftCardKind { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_draft_card_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_draft_card_status_type.rs deleted file mode 100644 index 391625f52..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_draft_card_status_type.rs +++ /dev/null @@ -1,22 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum RpgAgentDraftCardStatus { - Suggested, - - Confirmed, - - Locked, - - Warning, -} - -impl __sdk::InModule for RpgAgentDraftCardStatus { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_message_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_message_kind_type.rs deleted file mode 100644 index fc54a7b19..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_message_kind_type.rs +++ /dev/null @@ -1,26 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum RpgAgentMessageKind { - Chat, - - Clarification, - - Summary, - - Checkpoint, - - Warning, - - ActionResult, -} - -impl __sdk::InModule for RpgAgentMessageKind { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_message_role_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_message_role_type.rs deleted file mode 100644 index 67e383f20..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_message_role_type.rs +++ /dev/null @@ -1,20 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum RpgAgentMessageRole { - User, - - Assistant, - - System, -} - -impl __sdk::InModule for RpgAgentMessageRole { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_operation_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_operation_status_type.rs deleted file mode 100644 index 555c04391..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_operation_status_type.rs +++ /dev/null @@ -1,22 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum RpgAgentOperationStatus { - Queued, - - Running, - - Completed, - - Failed, -} - -impl __sdk::InModule for RpgAgentOperationStatus { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_operation_type_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_operation_type_type.rs deleted file mode 100644 index 8ae1d00e3..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_operation_type_type.rs +++ /dev/null @@ -1,44 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum RpgAgentOperationType { - ProcessMessage, - - DraftFoundation, - - UpdateDraftCard, - - SyncResultProfile, - - GenerateCharacters, - - GenerateLandmarks, - - DeleteCharacters, - - DeleteLandmarks, - - GenerateRoleAssets, - - SyncRoleAssets, - - GenerateSceneAssets, - - SyncSceneAssets, - - ExpandLongTail, - - PublishWorld, - - RevertCheckpoint, -} - -impl __sdk::InModule for RpgAgentOperationType { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_stage_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_stage_type.rs deleted file mode 100644 index 1a94e20f0..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_stage_type.rs +++ /dev/null @@ -1,32 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum RpgAgentStage { - CollectingIntent, - - Clarifying, - - FoundationReview, - - ObjectRefining, - - VisualRefining, - - LongTailReview, - - ReadyToPublish, - - Published, - - Error, -} - -impl __sdk::InModule for RpgAgentStage { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_item_equipment_slot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_item_equipment_slot_type.rs deleted file mode 100644 index b539d4f3f..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_item_equipment_slot_type.rs +++ /dev/null @@ -1,20 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum RuntimeItemEquipmentSlot { - Weapon, - - Armor, - - Relic, -} - -impl __sdk::InModule for RuntimeItemEquipmentSlot { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_item_reward_item_rarity_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_item_reward_item_rarity_type.rs deleted file mode 100644 index dc4250abc..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_item_reward_item_rarity_type.rs +++ /dev/null @@ -1,24 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum RuntimeItemRewardItemRarity { - Common, - - Uncommon, - - Rare, - - Epic, - - Legendary, -} - -impl __sdk::InModule for RuntimeItemRewardItemRarity { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_item_reward_item_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_item_reward_item_snapshot_type.rs deleted file mode 100644 index 4df1f2488..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_item_reward_item_snapshot_type.rs +++ /dev/null @@ -1,27 +0,0 @@ -// 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::runtime_item_equipment_slot_type::RuntimeItemEquipmentSlot; -use super::runtime_item_reward_item_rarity_type::RuntimeItemRewardItemRarity; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct RuntimeItemRewardItemSnapshot { - pub item_id: String, - pub category: String, - pub item_name: String, - pub description: Option, - pub quantity: u32, - pub rarity: RuntimeItemRewardItemRarity, - pub tags: Vec, - pub stackable: bool, - pub stack_key: String, - pub equipment_slot_id: Option, -} - -impl __sdk::InModule for RuntimeItemRewardItemSnapshot { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/save_editor_project_layout_ack_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/save_editor_project_layout_ack_procedure.rs index d2e864785..a564b72be 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/save_editor_project_layout_ack_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/save_editor_project_layout_ack_procedure.rs @@ -31,10 +31,10 @@ pub trait save_editor_project_layout_ack { input: EditorProjectLayoutSaveInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl save_editor_project_layout_ack for super::RemoteProcedures { input: EditorProjectLayoutSaveInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorProjectLayoutSaveProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/save_editor_project_layout_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/save_editor_project_layout_and_return_procedure.rs index e4eb529dc..17585bdf2 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/save_editor_project_layout_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/save_editor_project_layout_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait save_editor_project_layout_and_return { input: EditorProjectLayoutSaveInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl save_editor_project_layout_and_return for super::RemoteProcedures { input: EditorProjectLayoutSaveInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorProjectProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/save_editor_project_layout_v_2_ack_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/save_editor_project_layout_v_2_ack_procedure.rs index 144a5fc12..457b4a069 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/save_editor_project_layout_v_2_ack_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/save_editor_project_layout_v_2_ack_procedure.rs @@ -31,10 +31,10 @@ pub trait save_editor_project_layout_v_2_ack { input: EditorProjectLayoutSaveV2Input, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl save_editor_project_layout_v_2_ack for super::RemoteProcedures { input: EditorProjectLayoutSaveV2Input, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorProjectLayoutSaveV2ProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/save_editor_project_layout_v_2_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/save_editor_project_layout_v_2_and_return_procedure.rs index f53a28da4..4d5eabf86 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/save_editor_project_layout_v_2_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/save_editor_project_layout_v_2_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait save_editor_project_layout_v_2_and_return { input: EditorProjectLayoutSaveV2Input, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl save_editor_project_layout_v_2_and_return for super::RemoteProcedures { input: EditorProjectLayoutSaveV2Input, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorProjectProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/seed_analytics_date_dimensions_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/seed_analytics_date_dimensions_reducer.rs index 29d3b91d9..6e2ac3ad9 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/seed_analytics_date_dimensions_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/seed_analytics_date_dimensions_reducer.rs @@ -50,11 +50,9 @@ pub trait seed_analytics_date_dimensions { &self, input: AnalyticsDateDimensionSeedInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -63,11 +61,9 @@ impl seed_analytics_date_dimensions for super::RemoteReducers { &self, input: AnalyticsDateDimensionSeedInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { self.imp .invoke_reducer_with_callback(SeedAnalyticsDateDimensionsArgs { input }, callback) diff --git a/server-rs/crates/spacetime-client/src/module_bindings/set_editor_showcase_asset_like_for_viewer_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/set_editor_showcase_asset_like_for_viewer_and_return_procedure.rs index cca99f26e..ffe419e01 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/set_editor_showcase_asset_like_for_viewer_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/set_editor_showcase_asset_like_for_viewer_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait set_editor_showcase_asset_like_for_viewer_and_return { input: EditorShowcaseAssetLikeToggleInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl set_editor_showcase_asset_like_for_viewer_and_return for super::RemoteProce input: EditorShowcaseAssetLikeToggleInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorShowcaseAssetViewerProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/square_hole_agent_message_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/square_hole_agent_message_row_type.rs deleted file mode 100644 index 5455e365f..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/square_hole_agent_message_row_type.rs +++ /dev/null @@ -1,66 +0,0 @@ -// 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 SquareHoleAgentMessageRow { - 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 SquareHoleAgentMessageRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `SquareHoleAgentMessageRow`. -/// -/// Provides typed access to columns for query building. -pub struct SquareHoleAgentMessageRowCols { - pub message_id: __sdk::__query_builder::Col, - pub session_id: __sdk::__query_builder::Col, - pub role: __sdk::__query_builder::Col, - pub kind: __sdk::__query_builder::Col, - pub text: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for SquareHoleAgentMessageRow { - type Cols = SquareHoleAgentMessageRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - SquareHoleAgentMessageRowCols { - 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 `SquareHoleAgentMessageRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct SquareHoleAgentMessageRowIxCols { - pub message_id: __sdk::__query_builder::IxCol, - pub session_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for SquareHoleAgentMessageRow { - type IxCols = SquareHoleAgentMessageRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - SquareHoleAgentMessageRowIxCols { - 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 SquareHoleAgentMessageRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/square_hole_agent_message_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/square_hole_agent_message_table.rs deleted file mode 100644 index 41991f0c1..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/square_hole_agent_message_table.rs +++ /dev/null @@ -1,234 +0,0 @@ -// 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::square_hole_agent_message_row_type::SquareHoleAgentMessageRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `square_hole_agent_message`. -/// -/// Obtain a handle from the [`SquareHoleAgentMessageTableAccess::square_hole_agent_message`] method on [`super::RemoteTables`], -/// like `ctx.db.square_hole_agent_message()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.square_hole_agent_message().on_insert(...)`. -pub struct SquareHoleAgentMessageTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `square_hole_agent_message`. -pub struct SquareHoleAgentMessageTableAccessor; - -impl __sdk::TableAccessor for SquareHoleAgentMessageTableAccessor { - type Row = SquareHoleAgentMessageRow; - type Handle<'db> = SquareHoleAgentMessageTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.square_hole_agent_message() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `square_hole_agent_message`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait SquareHoleAgentMessageTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`SquareHoleAgentMessageTableHandle`], which mediates access to the table `square_hole_agent_message`. - fn square_hole_agent_message(&self) -> SquareHoleAgentMessageTableHandle<'_>; -} - -impl SquareHoleAgentMessageTableAccess for super::RemoteTables { - fn square_hole_agent_message(&self) -> SquareHoleAgentMessageTableHandle<'_> { - SquareHoleAgentMessageTableHandle { - imp: self - .imp - .get_table::("square_hole_agent_message"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct SquareHoleAgentMessageInsertCallbackId(__sdk::CallbackId); -pub struct SquareHoleAgentMessageDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for SquareHoleAgentMessageTableHandle<'ctx> { - type Row = SquareHoleAgentMessageRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for SquareHoleAgentMessageTableHandle<'ctx> { - type Row = SquareHoleAgentMessageRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = SquareHoleAgentMessageInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> SquareHoleAgentMessageInsertCallbackId { - SquareHoleAgentMessageInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: SquareHoleAgentMessageInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = SquareHoleAgentMessageDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> SquareHoleAgentMessageDeleteCallbackId { - SquareHoleAgentMessageDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: SquareHoleAgentMessageDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for SquareHoleAgentMessageTableHandle<'ctx> { - type InsertCallbackId = SquareHoleAgentMessageInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> SquareHoleAgentMessageInsertCallbackId { - SquareHoleAgentMessageInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: SquareHoleAgentMessageInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for SquareHoleAgentMessageTableHandle<'ctx> { - type DeleteCallbackId = SquareHoleAgentMessageDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> SquareHoleAgentMessageDeleteCallbackId { - SquareHoleAgentMessageDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: SquareHoleAgentMessageDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct SquareHoleAgentMessageUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for SquareHoleAgentMessageTableHandle<'ctx> { - type UpdateCallbackId = SquareHoleAgentMessageUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> SquareHoleAgentMessageUpdateCallbackId { - SquareHoleAgentMessageUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: SquareHoleAgentMessageUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for SquareHoleAgentMessageTableHandle<'ctx> { - type UpdateCallbackId = SquareHoleAgentMessageUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> SquareHoleAgentMessageUpdateCallbackId { - SquareHoleAgentMessageUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: SquareHoleAgentMessageUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `message_id` unique index on the table `square_hole_agent_message`, -/// which allows point queries on the field of the same name -/// via the [`SquareHoleAgentMessageMessageIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.square_hole_agent_message().message_id().find(...)`. -pub struct SquareHoleAgentMessageMessageIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> SquareHoleAgentMessageTableHandle<'ctx> { - /// Get a handle on the `message_id` unique index on the table `square_hole_agent_message`. - pub fn message_id(&self) -> SquareHoleAgentMessageMessageIdUnique<'ctx> { - SquareHoleAgentMessageMessageIdUnique { - imp: self.imp.get_unique_constraint::("message_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> SquareHoleAgentMessageMessageIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("square_hole_agent_message"); - _table.add_unique_constraint::("message_id", |row| &row.message_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `SquareHoleAgentMessageRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait square_hole_agent_messageQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `SquareHoleAgentMessageRow`. - fn square_hole_agent_message(&self) - -> __sdk::__query_builder::Table; -} - -impl square_hole_agent_messageQueryTableAccess for __sdk::QueryTableAccessor { - fn square_hole_agent_message( - &self, - ) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("square_hole_agent_message") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/square_hole_agent_session_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/square_hole_agent_session_row_type.rs deleted file mode 100644 index 3f30cd52f..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/square_hole_agent_session_row_type.rs +++ /dev/null @@ -1,90 +0,0 @@ -// 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 SquareHoleAgentSessionRow { - pub session_id: String, - pub owner_user_id: String, - pub seed_text: String, - pub current_turn: u32, - pub progress_percent: u32, - pub stage: String, - pub config_json: String, - pub draft_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 SquareHoleAgentSessionRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `SquareHoleAgentSessionRow`. -/// -/// Provides typed access to columns for query building. -pub struct SquareHoleAgentSessionRowCols { - pub session_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub seed_text: __sdk::__query_builder::Col, - pub current_turn: __sdk::__query_builder::Col, - pub progress_percent: __sdk::__query_builder::Col, - pub stage: __sdk::__query_builder::Col, - pub config_json: __sdk::__query_builder::Col, - pub draft_json: __sdk::__query_builder::Col, - pub last_assistant_reply: __sdk::__query_builder::Col, - pub published_profile_id: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for SquareHoleAgentSessionRow { - type Cols = SquareHoleAgentSessionRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - SquareHoleAgentSessionRowCols { - session_id: __sdk::__query_builder::Col::new(table_name, "session_id"), - owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"), - seed_text: __sdk::__query_builder::Col::new(table_name, "seed_text"), - current_turn: __sdk::__query_builder::Col::new(table_name, "current_turn"), - progress_percent: __sdk::__query_builder::Col::new(table_name, "progress_percent"), - stage: __sdk::__query_builder::Col::new(table_name, "stage"), - config_json: __sdk::__query_builder::Col::new(table_name, "config_json"), - draft_json: __sdk::__query_builder::Col::new(table_name, "draft_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 `SquareHoleAgentSessionRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct SquareHoleAgentSessionRowIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub session_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for SquareHoleAgentSessionRow { - type IxCols = SquareHoleAgentSessionRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - SquareHoleAgentSessionRowIxCols { - 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 SquareHoleAgentSessionRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/square_hole_agent_session_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/square_hole_agent_session_table.rs deleted file mode 100644 index ca8b8737f..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/square_hole_agent_session_table.rs +++ /dev/null @@ -1,234 +0,0 @@ -// 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::square_hole_agent_session_row_type::SquareHoleAgentSessionRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `square_hole_agent_session`. -/// -/// Obtain a handle from the [`SquareHoleAgentSessionTableAccess::square_hole_agent_session`] method on [`super::RemoteTables`], -/// like `ctx.db.square_hole_agent_session()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.square_hole_agent_session().on_insert(...)`. -pub struct SquareHoleAgentSessionTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `square_hole_agent_session`. -pub struct SquareHoleAgentSessionTableAccessor; - -impl __sdk::TableAccessor for SquareHoleAgentSessionTableAccessor { - type Row = SquareHoleAgentSessionRow; - type Handle<'db> = SquareHoleAgentSessionTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.square_hole_agent_session() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `square_hole_agent_session`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait SquareHoleAgentSessionTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`SquareHoleAgentSessionTableHandle`], which mediates access to the table `square_hole_agent_session`. - fn square_hole_agent_session(&self) -> SquareHoleAgentSessionTableHandle<'_>; -} - -impl SquareHoleAgentSessionTableAccess for super::RemoteTables { - fn square_hole_agent_session(&self) -> SquareHoleAgentSessionTableHandle<'_> { - SquareHoleAgentSessionTableHandle { - imp: self - .imp - .get_table::("square_hole_agent_session"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct SquareHoleAgentSessionInsertCallbackId(__sdk::CallbackId); -pub struct SquareHoleAgentSessionDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for SquareHoleAgentSessionTableHandle<'ctx> { - type Row = SquareHoleAgentSessionRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for SquareHoleAgentSessionTableHandle<'ctx> { - type Row = SquareHoleAgentSessionRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = SquareHoleAgentSessionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> SquareHoleAgentSessionInsertCallbackId { - SquareHoleAgentSessionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: SquareHoleAgentSessionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = SquareHoleAgentSessionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> SquareHoleAgentSessionDeleteCallbackId { - SquareHoleAgentSessionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: SquareHoleAgentSessionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for SquareHoleAgentSessionTableHandle<'ctx> { - type InsertCallbackId = SquareHoleAgentSessionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> SquareHoleAgentSessionInsertCallbackId { - SquareHoleAgentSessionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: SquareHoleAgentSessionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for SquareHoleAgentSessionTableHandle<'ctx> { - type DeleteCallbackId = SquareHoleAgentSessionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> SquareHoleAgentSessionDeleteCallbackId { - SquareHoleAgentSessionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: SquareHoleAgentSessionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct SquareHoleAgentSessionUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for SquareHoleAgentSessionTableHandle<'ctx> { - type UpdateCallbackId = SquareHoleAgentSessionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> SquareHoleAgentSessionUpdateCallbackId { - SquareHoleAgentSessionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: SquareHoleAgentSessionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for SquareHoleAgentSessionTableHandle<'ctx> { - type UpdateCallbackId = SquareHoleAgentSessionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> SquareHoleAgentSessionUpdateCallbackId { - SquareHoleAgentSessionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: SquareHoleAgentSessionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `session_id` unique index on the table `square_hole_agent_session`, -/// which allows point queries on the field of the same name -/// via the [`SquareHoleAgentSessionSessionIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.square_hole_agent_session().session_id().find(...)`. -pub struct SquareHoleAgentSessionSessionIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> SquareHoleAgentSessionTableHandle<'ctx> { - /// Get a handle on the `session_id` unique index on the table `square_hole_agent_session`. - pub fn session_id(&self) -> SquareHoleAgentSessionSessionIdUnique<'ctx> { - SquareHoleAgentSessionSessionIdUnique { - imp: self.imp.get_unique_constraint::("session_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> SquareHoleAgentSessionSessionIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("square_hole_agent_session"); - _table.add_unique_constraint::("session_id", |row| &row.session_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `SquareHoleAgentSessionRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait square_hole_agent_sessionQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `SquareHoleAgentSessionRow`. - fn square_hole_agent_session(&self) - -> __sdk::__query_builder::Table; -} - -impl square_hole_agent_sessionQueryTableAccess for __sdk::QueryTableAccessor { - fn square_hole_agent_session( - &self, - ) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("square_hole_agent_session") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/square_hole_runtime_run_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/square_hole_runtime_run_row_type.rs deleted file mode 100644 index 3acc901f9..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/square_hole_runtime_run_row_type.rs +++ /dev/null @@ -1,98 +0,0 @@ -// 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 SquareHoleRuntimeRunRow { - pub run_id: String, - pub owner_user_id: String, - pub profile_id: String, - pub status: String, - pub snapshot_version: u64, - pub started_at_ms: i64, - pub duration_limit_ms: i64, - pub finished_at_ms: i64, - pub elapsed_ms: i64, - pub total_shape_count: u32, - pub completed_shape_count: u32, - pub score: u32, - pub snapshot_json: String, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for SquareHoleRuntimeRunRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `SquareHoleRuntimeRunRow`. -/// -/// Provides typed access to columns for query building. -pub struct SquareHoleRuntimeRunRowCols { - pub run_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub profile_id: __sdk::__query_builder::Col, - pub status: __sdk::__query_builder::Col, - pub snapshot_version: __sdk::__query_builder::Col, - pub started_at_ms: __sdk::__query_builder::Col, - pub duration_limit_ms: __sdk::__query_builder::Col, - pub finished_at_ms: __sdk::__query_builder::Col, - pub elapsed_ms: __sdk::__query_builder::Col, - pub total_shape_count: __sdk::__query_builder::Col, - pub completed_shape_count: __sdk::__query_builder::Col, - pub score: __sdk::__query_builder::Col, - pub snapshot_json: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for SquareHoleRuntimeRunRow { - type Cols = SquareHoleRuntimeRunRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - SquareHoleRuntimeRunRowCols { - 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"), - status: __sdk::__query_builder::Col::new(table_name, "status"), - snapshot_version: __sdk::__query_builder::Col::new(table_name, "snapshot_version"), - started_at_ms: __sdk::__query_builder::Col::new(table_name, "started_at_ms"), - duration_limit_ms: __sdk::__query_builder::Col::new(table_name, "duration_limit_ms"), - finished_at_ms: __sdk::__query_builder::Col::new(table_name, "finished_at_ms"), - elapsed_ms: __sdk::__query_builder::Col::new(table_name, "elapsed_ms"), - total_shape_count: __sdk::__query_builder::Col::new(table_name, "total_shape_count"), - completed_shape_count: __sdk::__query_builder::Col::new( - table_name, - "completed_shape_count", - ), - score: __sdk::__query_builder::Col::new(table_name, "score"), - 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 `SquareHoleRuntimeRunRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct SquareHoleRuntimeRunRowIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub profile_id: __sdk::__query_builder::IxCol, - pub run_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for SquareHoleRuntimeRunRow { - type IxCols = SquareHoleRuntimeRunRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - SquareHoleRuntimeRunRowIxCols { - 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 SquareHoleRuntimeRunRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/square_hole_runtime_run_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/square_hole_runtime_run_table.rs deleted file mode 100644 index 01cc05452..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/square_hole_runtime_run_table.rs +++ /dev/null @@ -1,231 +0,0 @@ -// 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::square_hole_runtime_run_row_type::SquareHoleRuntimeRunRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `square_hole_runtime_run`. -/// -/// Obtain a handle from the [`SquareHoleRuntimeRunTableAccess::square_hole_runtime_run`] method on [`super::RemoteTables`], -/// like `ctx.db.square_hole_runtime_run()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.square_hole_runtime_run().on_insert(...)`. -pub struct SquareHoleRuntimeRunTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `square_hole_runtime_run`. -pub struct SquareHoleRuntimeRunTableAccessor; - -impl __sdk::TableAccessor for SquareHoleRuntimeRunTableAccessor { - type Row = SquareHoleRuntimeRunRow; - type Handle<'db> = SquareHoleRuntimeRunTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.square_hole_runtime_run() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `square_hole_runtime_run`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait SquareHoleRuntimeRunTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`SquareHoleRuntimeRunTableHandle`], which mediates access to the table `square_hole_runtime_run`. - fn square_hole_runtime_run(&self) -> SquareHoleRuntimeRunTableHandle<'_>; -} - -impl SquareHoleRuntimeRunTableAccess for super::RemoteTables { - fn square_hole_runtime_run(&self) -> SquareHoleRuntimeRunTableHandle<'_> { - SquareHoleRuntimeRunTableHandle { - imp: self - .imp - .get_table::("square_hole_runtime_run"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct SquareHoleRuntimeRunInsertCallbackId(__sdk::CallbackId); -pub struct SquareHoleRuntimeRunDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for SquareHoleRuntimeRunTableHandle<'ctx> { - type Row = SquareHoleRuntimeRunRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for SquareHoleRuntimeRunTableHandle<'ctx> { - type Row = SquareHoleRuntimeRunRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = SquareHoleRuntimeRunInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> SquareHoleRuntimeRunInsertCallbackId { - SquareHoleRuntimeRunInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: SquareHoleRuntimeRunInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = SquareHoleRuntimeRunDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> SquareHoleRuntimeRunDeleteCallbackId { - SquareHoleRuntimeRunDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: SquareHoleRuntimeRunDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for SquareHoleRuntimeRunTableHandle<'ctx> { - type InsertCallbackId = SquareHoleRuntimeRunInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> SquareHoleRuntimeRunInsertCallbackId { - SquareHoleRuntimeRunInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: SquareHoleRuntimeRunInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for SquareHoleRuntimeRunTableHandle<'ctx> { - type DeleteCallbackId = SquareHoleRuntimeRunDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> SquareHoleRuntimeRunDeleteCallbackId { - SquareHoleRuntimeRunDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: SquareHoleRuntimeRunDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct SquareHoleRuntimeRunUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for SquareHoleRuntimeRunTableHandle<'ctx> { - type UpdateCallbackId = SquareHoleRuntimeRunUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> SquareHoleRuntimeRunUpdateCallbackId { - SquareHoleRuntimeRunUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: SquareHoleRuntimeRunUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for SquareHoleRuntimeRunTableHandle<'ctx> { - type UpdateCallbackId = SquareHoleRuntimeRunUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> SquareHoleRuntimeRunUpdateCallbackId { - SquareHoleRuntimeRunUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: SquareHoleRuntimeRunUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `run_id` unique index on the table `square_hole_runtime_run`, -/// which allows point queries on the field of the same name -/// via the [`SquareHoleRuntimeRunRunIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.square_hole_runtime_run().run_id().find(...)`. -pub struct SquareHoleRuntimeRunRunIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> SquareHoleRuntimeRunTableHandle<'ctx> { - /// Get a handle on the `run_id` unique index on the table `square_hole_runtime_run`. - pub fn run_id(&self) -> SquareHoleRuntimeRunRunIdUnique<'ctx> { - SquareHoleRuntimeRunRunIdUnique { - imp: self.imp.get_unique_constraint::("run_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> SquareHoleRuntimeRunRunIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("square_hole_runtime_run"); - _table.add_unique_constraint::("run_id", |row| &row.run_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `SquareHoleRuntimeRunRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait square_hole_runtime_runQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `SquareHoleRuntimeRunRow`. - fn square_hole_runtime_run(&self) -> __sdk::__query_builder::Table; -} - -impl square_hole_runtime_runQueryTableAccess for __sdk::QueryTableAccessor { - fn square_hole_runtime_run(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("square_hole_runtime_run") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/square_hole_work_profile_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/square_hole_work_profile_row_type.rs deleted file mode 100644 index 9798d7da1..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/square_hole_work_profile_row_type.rs +++ /dev/null @@ -1,114 +0,0 @@ -// 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 SquareHoleWorkProfileRow { - pub profile_id: String, - pub work_id: String, - pub owner_user_id: String, - pub source_session_id: String, - pub author_display_name: String, - pub game_name: String, - pub theme_text: String, - pub twist_rule: String, - pub summary_text: String, - pub tags_json: String, - pub cover_image_src: String, - pub shape_count: u32, - pub difficulty: u32, - pub config_json: String, - pub publication_status: String, - pub play_count: u32, - pub updated_at: __sdk::Timestamp, - pub published_at: Option<__sdk::Timestamp>, - pub visible: bool, -} - -impl __sdk::InModule for SquareHoleWorkProfileRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `SquareHoleWorkProfileRow`. -/// -/// Provides typed access to columns for query building. -pub struct SquareHoleWorkProfileRowCols { - pub profile_id: __sdk::__query_builder::Col, - pub work_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub source_session_id: __sdk::__query_builder::Col, - pub author_display_name: __sdk::__query_builder::Col, - pub game_name: __sdk::__query_builder::Col, - pub theme_text: __sdk::__query_builder::Col, - pub twist_rule: __sdk::__query_builder::Col, - pub summary_text: __sdk::__query_builder::Col, - pub tags_json: __sdk::__query_builder::Col, - pub cover_image_src: __sdk::__query_builder::Col, - pub shape_count: __sdk::__query_builder::Col, - pub difficulty: __sdk::__query_builder::Col, - pub config_json: __sdk::__query_builder::Col, - pub publication_status: __sdk::__query_builder::Col, - pub play_count: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, - pub published_at: - __sdk::__query_builder::Col>, - pub visible: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for SquareHoleWorkProfileRow { - type Cols = SquareHoleWorkProfileRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - SquareHoleWorkProfileRowCols { - 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", - ), - game_name: __sdk::__query_builder::Col::new(table_name, "game_name"), - theme_text: __sdk::__query_builder::Col::new(table_name, "theme_text"), - twist_rule: __sdk::__query_builder::Col::new(table_name, "twist_rule"), - summary_text: __sdk::__query_builder::Col::new(table_name, "summary_text"), - tags_json: __sdk::__query_builder::Col::new(table_name, "tags_json"), - cover_image_src: __sdk::__query_builder::Col::new(table_name, "cover_image_src"), - shape_count: __sdk::__query_builder::Col::new(table_name, "shape_count"), - difficulty: __sdk::__query_builder::Col::new(table_name, "difficulty"), - config_json: __sdk::__query_builder::Col::new(table_name, "config_json"), - publication_status: __sdk::__query_builder::Col::new(table_name, "publication_status"), - play_count: __sdk::__query_builder::Col::new(table_name, "play_count"), - updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), - published_at: __sdk::__query_builder::Col::new(table_name, "published_at"), - visible: __sdk::__query_builder::Col::new(table_name, "visible"), - } - } -} - -/// Indexed column accessor struct for the table `SquareHoleWorkProfileRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct SquareHoleWorkProfileRowIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub profile_id: __sdk::__query_builder::IxCol, - pub publication_status: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for SquareHoleWorkProfileRow { - type IxCols = SquareHoleWorkProfileRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - SquareHoleWorkProfileRowIxCols { - 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 SquareHoleWorkProfileRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/square_hole_work_profile_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/square_hole_work_profile_table.rs deleted file mode 100644 index 923fe6c92..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/square_hole_work_profile_table.rs +++ /dev/null @@ -1,231 +0,0 @@ -// 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::square_hole_work_profile_row_type::SquareHoleWorkProfileRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `square_hole_work_profile`. -/// -/// Obtain a handle from the [`SquareHoleWorkProfileTableAccess::square_hole_work_profile`] method on [`super::RemoteTables`], -/// like `ctx.db.square_hole_work_profile()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.square_hole_work_profile().on_insert(...)`. -pub struct SquareHoleWorkProfileTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `square_hole_work_profile`. -pub struct SquareHoleWorkProfileTableAccessor; - -impl __sdk::TableAccessor for SquareHoleWorkProfileTableAccessor { - type Row = SquareHoleWorkProfileRow; - type Handle<'db> = SquareHoleWorkProfileTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.square_hole_work_profile() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `square_hole_work_profile`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait SquareHoleWorkProfileTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`SquareHoleWorkProfileTableHandle`], which mediates access to the table `square_hole_work_profile`. - fn square_hole_work_profile(&self) -> SquareHoleWorkProfileTableHandle<'_>; -} - -impl SquareHoleWorkProfileTableAccess for super::RemoteTables { - fn square_hole_work_profile(&self) -> SquareHoleWorkProfileTableHandle<'_> { - SquareHoleWorkProfileTableHandle { - imp: self - .imp - .get_table::("square_hole_work_profile"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct SquareHoleWorkProfileInsertCallbackId(__sdk::CallbackId); -pub struct SquareHoleWorkProfileDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for SquareHoleWorkProfileTableHandle<'ctx> { - type Row = SquareHoleWorkProfileRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for SquareHoleWorkProfileTableHandle<'ctx> { - type Row = SquareHoleWorkProfileRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = SquareHoleWorkProfileInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> SquareHoleWorkProfileInsertCallbackId { - SquareHoleWorkProfileInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: SquareHoleWorkProfileInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = SquareHoleWorkProfileDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> SquareHoleWorkProfileDeleteCallbackId { - SquareHoleWorkProfileDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: SquareHoleWorkProfileDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for SquareHoleWorkProfileTableHandle<'ctx> { - type InsertCallbackId = SquareHoleWorkProfileInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> SquareHoleWorkProfileInsertCallbackId { - SquareHoleWorkProfileInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: SquareHoleWorkProfileInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for SquareHoleWorkProfileTableHandle<'ctx> { - type DeleteCallbackId = SquareHoleWorkProfileDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> SquareHoleWorkProfileDeleteCallbackId { - SquareHoleWorkProfileDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: SquareHoleWorkProfileDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct SquareHoleWorkProfileUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for SquareHoleWorkProfileTableHandle<'ctx> { - type UpdateCallbackId = SquareHoleWorkProfileUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> SquareHoleWorkProfileUpdateCallbackId { - SquareHoleWorkProfileUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: SquareHoleWorkProfileUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for SquareHoleWorkProfileTableHandle<'ctx> { - type UpdateCallbackId = SquareHoleWorkProfileUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> SquareHoleWorkProfileUpdateCallbackId { - SquareHoleWorkProfileUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: SquareHoleWorkProfileUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `profile_id` unique index on the table `square_hole_work_profile`, -/// which allows point queries on the field of the same name -/// via the [`SquareHoleWorkProfileProfileIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.square_hole_work_profile().profile_id().find(...)`. -pub struct SquareHoleWorkProfileProfileIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> SquareHoleWorkProfileTableHandle<'ctx> { - /// Get a handle on the `profile_id` unique index on the table `square_hole_work_profile`. - pub fn profile_id(&self) -> SquareHoleWorkProfileProfileIdUnique<'ctx> { - SquareHoleWorkProfileProfileIdUnique { - imp: self.imp.get_unique_constraint::("profile_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> SquareHoleWorkProfileProfileIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("square_hole_work_profile"); - _table.add_unique_constraint::("profile_id", |row| &row.profile_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `SquareHoleWorkProfileRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait square_hole_work_profileQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `SquareHoleWorkProfileRow`. - fn square_hole_work_profile(&self) -> __sdk::__query_builder::Table; -} - -impl square_hole_work_profileQueryTableAccess for __sdk::QueryTableAccessor { - fn square_hole_work_profile(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("square_hole_work_profile") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/start_ai_task_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/start_ai_task_reducer.rs index c5cc52567..5809736bd 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/start_ai_task_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/start_ai_task_reducer.rs @@ -47,11 +47,9 @@ pub trait start_ai_task { &self, input: AiTaskStartInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -60,11 +58,9 @@ impl start_ai_task for super::RemoteReducers { &self, input: AiTaskStartInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { self.imp .invoke_reducer_with_callback(StartAiTaskArgs { input }, callback) diff --git a/server-rs/crates/spacetime-client/src/module_bindings/start_ai_task_stage_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/start_ai_task_stage_reducer.rs index 24ed5b3fa..1d7b7582a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/start_ai_task_stage_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/start_ai_task_stage_reducer.rs @@ -47,11 +47,9 @@ pub trait start_ai_task_stage { &self, input: AiTaskStageStartInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -60,11 +58,9 @@ impl start_ai_task_stage for super::RemoteReducers { &self, input: AiTaskStageStartInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { self.imp .invoke_reducer_with_callback(StartAiTaskStageArgs { input }, callback) diff --git a/server-rs/crates/spacetime-client/src/module_bindings/story_event_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_event_kind_type.rs deleted file mode 100644 index 29836b4a7..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_event_kind_type.rs +++ /dev/null @@ -1,18 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum StoryEventKind { - SessionStarted, - - StoryContinued, -} - -impl __sdk::InModule for StoryEventKind { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/story_event_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_event_table.rs deleted file mode 100644 index a02f01b11..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_event_table.rs +++ /dev/null @@ -1,229 +0,0 @@ -// 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::story_event_kind_type::StoryEventKind; -use super::story_event_type::StoryEvent; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `story_event`. -/// -/// Obtain a handle from the [`StoryEventTableAccess::story_event`] method on [`super::RemoteTables`], -/// like `ctx.db.story_event()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.story_event().on_insert(...)`. -pub struct StoryEventTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `story_event`. -pub struct StoryEventTableAccessor; - -impl __sdk::TableAccessor for StoryEventTableAccessor { - type Row = StoryEvent; - type Handle<'db> = StoryEventTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.story_event() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `story_event`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait StoryEventTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`StoryEventTableHandle`], which mediates access to the table `story_event`. - fn story_event(&self) -> StoryEventTableHandle<'_>; -} - -impl StoryEventTableAccess for super::RemoteTables { - fn story_event(&self) -> StoryEventTableHandle<'_> { - StoryEventTableHandle { - imp: self.imp.get_table::("story_event"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct StoryEventInsertCallbackId(__sdk::CallbackId); -pub struct StoryEventDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for StoryEventTableHandle<'ctx> { - type Row = StoryEvent; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for StoryEventTableHandle<'ctx> { - type Row = StoryEvent; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = StoryEventInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> StoryEventInsertCallbackId { - StoryEventInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: StoryEventInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = StoryEventDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> StoryEventDeleteCallbackId { - StoryEventDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: StoryEventDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for StoryEventTableHandle<'ctx> { - type InsertCallbackId = StoryEventInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> StoryEventInsertCallbackId { - StoryEventInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: StoryEventInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for StoryEventTableHandle<'ctx> { - type DeleteCallbackId = StoryEventDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> StoryEventDeleteCallbackId { - StoryEventDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: StoryEventDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct StoryEventUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for StoryEventTableHandle<'ctx> { - type UpdateCallbackId = StoryEventUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> StoryEventUpdateCallbackId { - StoryEventUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: StoryEventUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for StoryEventTableHandle<'ctx> { - type UpdateCallbackId = StoryEventUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> StoryEventUpdateCallbackId { - StoryEventUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: StoryEventUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `event_id` unique index on the table `story_event`, -/// which allows point queries on the field of the same name -/// via the [`StoryEventEventIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.story_event().event_id().find(...)`. -pub struct StoryEventEventIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> StoryEventTableHandle<'ctx> { - /// Get a handle on the `event_id` unique index on the table `story_event`. - pub fn event_id(&self) -> StoryEventEventIdUnique<'ctx> { - StoryEventEventIdUnique { - imp: self.imp.get_unique_constraint::("event_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> StoryEventEventIdUnique<'ctx> { - /// Find the subscribed row whose `event_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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("story_event"); - _table.add_unique_constraint::("event_id", |row| &row.event_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `StoryEvent`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait story_eventQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `StoryEvent`. - fn story_event(&self) -> __sdk::__query_builder::Table; -} - -impl story_eventQueryTableAccess for __sdk::QueryTableAccessor { - fn story_event(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("story_event") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/story_event_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_event_type.rs deleted file mode 100644 index 4d3bdd9f2..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_event_type.rs +++ /dev/null @@ -1,68 +0,0 @@ -// 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::story_event_kind_type::StoryEventKind; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct StoryEvent { - pub event_id: String, - pub story_session_id: String, - pub event_kind: StoryEventKind, - pub narrative_text: String, - pub choice_function_id: Option, - pub created_at: __sdk::Timestamp, -} - -impl __sdk::InModule for StoryEvent { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `StoryEvent`. -/// -/// Provides typed access to columns for query building. -pub struct StoryEventCols { - pub event_id: __sdk::__query_builder::Col, - pub story_session_id: __sdk::__query_builder::Col, - pub event_kind: __sdk::__query_builder::Col, - pub narrative_text: __sdk::__query_builder::Col, - pub choice_function_id: __sdk::__query_builder::Col>, - pub created_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for StoryEvent { - type Cols = StoryEventCols; - fn cols(table_name: &'static str) -> Self::Cols { - StoryEventCols { - event_id: __sdk::__query_builder::Col::new(table_name, "event_id"), - story_session_id: __sdk::__query_builder::Col::new(table_name, "story_session_id"), - event_kind: __sdk::__query_builder::Col::new(table_name, "event_kind"), - narrative_text: __sdk::__query_builder::Col::new(table_name, "narrative_text"), - choice_function_id: __sdk::__query_builder::Col::new(table_name, "choice_function_id"), - created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), - } - } -} - -/// Indexed column accessor struct for the table `StoryEvent`. -/// -/// Provides typed access to indexed columns for query building. -pub struct StoryEventIxCols { - pub event_id: __sdk::__query_builder::IxCol, - pub story_session_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for StoryEvent { - type IxCols = StoryEventIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - StoryEventIxCols { - event_id: __sdk::__query_builder::IxCol::new(table_name, "event_id"), - story_session_id: __sdk::__query_builder::IxCol::new(table_name, "story_session_id"), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for StoryEvent {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/story_session_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_session_status_type.rs deleted file mode 100644 index f04aae19a..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_session_status_type.rs +++ /dev/null @@ -1,20 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum StorySessionStatus { - Active, - - Completed, - - Archived, -} - -impl __sdk::InModule for StorySessionStatus { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/story_session_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_session_table.rs deleted file mode 100644 index c7f0b8e02..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_session_table.rs +++ /dev/null @@ -1,229 +0,0 @@ -// 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::story_session_status_type::StorySessionStatus; -use super::story_session_type::StorySession; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `story_session`. -/// -/// Obtain a handle from the [`StorySessionTableAccess::story_session`] method on [`super::RemoteTables`], -/// like `ctx.db.story_session()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.story_session().on_insert(...)`. -pub struct StorySessionTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `story_session`. -pub struct StorySessionTableAccessor; - -impl __sdk::TableAccessor for StorySessionTableAccessor { - type Row = StorySession; - type Handle<'db> = StorySessionTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.story_session() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `story_session`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait StorySessionTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`StorySessionTableHandle`], which mediates access to the table `story_session`. - fn story_session(&self) -> StorySessionTableHandle<'_>; -} - -impl StorySessionTableAccess for super::RemoteTables { - fn story_session(&self) -> StorySessionTableHandle<'_> { - StorySessionTableHandle { - imp: self.imp.get_table::("story_session"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct StorySessionInsertCallbackId(__sdk::CallbackId); -pub struct StorySessionDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for StorySessionTableHandle<'ctx> { - type Row = StorySession; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for StorySessionTableHandle<'ctx> { - type Row = StorySession; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = StorySessionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> StorySessionInsertCallbackId { - StorySessionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: StorySessionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = StorySessionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> StorySessionDeleteCallbackId { - StorySessionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: StorySessionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for StorySessionTableHandle<'ctx> { - type InsertCallbackId = StorySessionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> StorySessionInsertCallbackId { - StorySessionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: StorySessionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for StorySessionTableHandle<'ctx> { - type DeleteCallbackId = StorySessionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> StorySessionDeleteCallbackId { - StorySessionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: StorySessionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct StorySessionUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for StorySessionTableHandle<'ctx> { - type UpdateCallbackId = StorySessionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> StorySessionUpdateCallbackId { - StorySessionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: StorySessionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for StorySessionTableHandle<'ctx> { - type UpdateCallbackId = StorySessionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> StorySessionUpdateCallbackId { - StorySessionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: StorySessionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `story_session_id` unique index on the table `story_session`, -/// which allows point queries on the field of the same name -/// via the [`StorySessionStorySessionIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.story_session().story_session_id().find(...)`. -pub struct StorySessionStorySessionIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> StorySessionTableHandle<'ctx> { - /// Get a handle on the `story_session_id` unique index on the table `story_session`. - pub fn story_session_id(&self) -> StorySessionStorySessionIdUnique<'ctx> { - StorySessionStorySessionIdUnique { - imp: self.imp.get_unique_constraint::("story_session_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> StorySessionStorySessionIdUnique<'ctx> { - /// Find the subscribed row whose `story_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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("story_session"); - _table.add_unique_constraint::("story_session_id", |row| &row.story_session_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `StorySession`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait story_sessionQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `StorySession`. - fn story_session(&self) -> __sdk::__query_builder::Table; -} - -impl story_sessionQueryTableAccess for __sdk::QueryTableAccessor { - fn story_session(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("story_session") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/story_session_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_session_type.rs deleted file mode 100644 index f95341792..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_session_type.rs +++ /dev/null @@ -1,97 +0,0 @@ -// 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::story_session_status_type::StorySessionStatus; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct StorySession { - pub story_session_id: String, - pub runtime_session_id: String, - pub actor_user_id: String, - pub world_profile_id: String, - pub initial_prompt: String, - pub opening_summary: Option, - pub latest_narrative_text: String, - pub latest_choice_function_id: Option, - pub status: StorySessionStatus, - pub version: u32, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for StorySession { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `StorySession`. -/// -/// Provides typed access to columns for query building. -pub struct StorySessionCols { - pub story_session_id: __sdk::__query_builder::Col, - pub runtime_session_id: __sdk::__query_builder::Col, - pub actor_user_id: __sdk::__query_builder::Col, - pub world_profile_id: __sdk::__query_builder::Col, - pub initial_prompt: __sdk::__query_builder::Col, - pub opening_summary: __sdk::__query_builder::Col>, - pub latest_narrative_text: __sdk::__query_builder::Col, - pub latest_choice_function_id: __sdk::__query_builder::Col>, - pub status: __sdk::__query_builder::Col, - pub version: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for StorySession { - type Cols = StorySessionCols; - fn cols(table_name: &'static str) -> Self::Cols { - StorySessionCols { - story_session_id: __sdk::__query_builder::Col::new(table_name, "story_session_id"), - runtime_session_id: __sdk::__query_builder::Col::new(table_name, "runtime_session_id"), - actor_user_id: __sdk::__query_builder::Col::new(table_name, "actor_user_id"), - world_profile_id: __sdk::__query_builder::Col::new(table_name, "world_profile_id"), - initial_prompt: __sdk::__query_builder::Col::new(table_name, "initial_prompt"), - opening_summary: __sdk::__query_builder::Col::new(table_name, "opening_summary"), - latest_narrative_text: __sdk::__query_builder::Col::new( - table_name, - "latest_narrative_text", - ), - latest_choice_function_id: __sdk::__query_builder::Col::new( - table_name, - "latest_choice_function_id", - ), - status: __sdk::__query_builder::Col::new(table_name, "status"), - version: __sdk::__query_builder::Col::new(table_name, "version"), - 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 `StorySession`. -/// -/// Provides typed access to indexed columns for query building. -pub struct StorySessionIxCols { - pub actor_user_id: __sdk::__query_builder::IxCol, - pub runtime_session_id: __sdk::__query_builder::IxCol, - pub story_session_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for StorySession { - type IxCols = StorySessionIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - StorySessionIxCols { - actor_user_id: __sdk::__query_builder::IxCol::new(table_name, "actor_user_id"), - runtime_session_id: __sdk::__query_builder::IxCol::new( - table_name, - "runtime_session_id", - ), - story_session_id: __sdk::__query_builder::IxCol::new(table_name, "story_session_id"), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for StorySession {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/submit_editor_showcase_asset_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/submit_editor_showcase_asset_and_return_procedure.rs index 367fd0fdb..7002e581b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/submit_editor_showcase_asset_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/submit_editor_showcase_asset_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait submit_editor_showcase_asset_and_return { input: EditorShowcaseAssetSubmitInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl submit_editor_showcase_asset_and_return for super::RemoteProcedures { input: EditorShowcaseAssetSubmitInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorShowcaseAssetProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/submit_profile_feedback_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/submit_profile_feedback_and_return_procedure.rs index 208a35a95..3534df7d3 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/submit_profile_feedback_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/submit_profile_feedback_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait submit_profile_feedback_and_return { input: RuntimeProfileFeedbackSubmissionInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl submit_profile_feedback_and_return for super::RemoteProcedures { input: RuntimeProfileFeedbackSubmissionInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeProfileFeedbackSubmissionProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/sync_auth_store_projection_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/sync_auth_store_projection_procedure.rs index d9f1ca3e3..7d4803e27 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/sync_auth_store_projection_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/sync_auth_store_projection_procedure.rs @@ -31,10 +31,10 @@ pub trait sync_auth_store_projection { input: AuthStoreProjectionView, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl sync_auth_store_projection for super::RemoteProcedures { input: AuthStoreProjectionView, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, AuthStoreProjectionSyncProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/touch_editor_agent_conversation_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/touch_editor_agent_conversation_and_return_procedure.rs index e331ab348..89741e92c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/touch_editor_agent_conversation_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/touch_editor_agent_conversation_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait touch_editor_agent_conversation_and_return { input: EditorAgentConversationTouchInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl touch_editor_agent_conversation_and_return for super::RemoteProcedures { input: EditorAgentConversationTouchInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorAgentConversationProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/treasure_interaction_action_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/treasure_interaction_action_type.rs deleted file mode 100644 index a9b61b0e5..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/treasure_interaction_action_type.rs +++ /dev/null @@ -1,20 +0,0 @@ -// 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)] -#[derive(Copy, Eq, Hash)] -pub enum TreasureInteractionAction { - Inspect, - - Leave, - - Secure, -} - -impl __sdk::InModule for TreasureInteractionAction { - type Module = super::RemoteModule; -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_table.rs deleted file mode 100644 index 090bcae75..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_table.rs +++ /dev/null @@ -1,232 +0,0 @@ -// 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::runtime_item_reward_item_snapshot_type::RuntimeItemRewardItemSnapshot; -use super::treasure_interaction_action_type::TreasureInteractionAction; -use super::treasure_record_type::TreasureRecord; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `treasure_record`. -/// -/// Obtain a handle from the [`TreasureRecordTableAccess::treasure_record`] method on [`super::RemoteTables`], -/// like `ctx.db.treasure_record()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.treasure_record().on_insert(...)`. -pub struct TreasureRecordTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `treasure_record`. -pub struct TreasureRecordTableAccessor; - -impl __sdk::TableAccessor for TreasureRecordTableAccessor { - type Row = TreasureRecord; - type Handle<'db> = TreasureRecordTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.treasure_record() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `treasure_record`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait TreasureRecordTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`TreasureRecordTableHandle`], which mediates access to the table `treasure_record`. - fn treasure_record(&self) -> TreasureRecordTableHandle<'_>; -} - -impl TreasureRecordTableAccess for super::RemoteTables { - fn treasure_record(&self) -> TreasureRecordTableHandle<'_> { - TreasureRecordTableHandle { - imp: self.imp.get_table::("treasure_record"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct TreasureRecordInsertCallbackId(__sdk::CallbackId); -pub struct TreasureRecordDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for TreasureRecordTableHandle<'ctx> { - type Row = TreasureRecord; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for TreasureRecordTableHandle<'ctx> { - type Row = TreasureRecord; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = TreasureRecordInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> TreasureRecordInsertCallbackId { - TreasureRecordInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: TreasureRecordInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = TreasureRecordDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> TreasureRecordDeleteCallbackId { - TreasureRecordDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: TreasureRecordDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for TreasureRecordTableHandle<'ctx> { - type InsertCallbackId = TreasureRecordInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> TreasureRecordInsertCallbackId { - TreasureRecordInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: TreasureRecordInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for TreasureRecordTableHandle<'ctx> { - type DeleteCallbackId = TreasureRecordDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> TreasureRecordDeleteCallbackId { - TreasureRecordDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: TreasureRecordDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct TreasureRecordUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for TreasureRecordTableHandle<'ctx> { - type UpdateCallbackId = TreasureRecordUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> TreasureRecordUpdateCallbackId { - TreasureRecordUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: TreasureRecordUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for TreasureRecordTableHandle<'ctx> { - type UpdateCallbackId = TreasureRecordUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> TreasureRecordUpdateCallbackId { - TreasureRecordUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: TreasureRecordUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `treasure_record_id` unique index on the table `treasure_record`, -/// which allows point queries on the field of the same name -/// via the [`TreasureRecordTreasureRecordIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.treasure_record().treasure_record_id().find(...)`. -pub struct TreasureRecordTreasureRecordIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> TreasureRecordTableHandle<'ctx> { - /// Get a handle on the `treasure_record_id` unique index on the table `treasure_record`. - pub fn treasure_record_id(&self) -> TreasureRecordTreasureRecordIdUnique<'ctx> { - TreasureRecordTreasureRecordIdUnique { - imp: self - .imp - .get_unique_constraint::("treasure_record_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> TreasureRecordTreasureRecordIdUnique<'ctx> { - /// Find the subscribed row whose `treasure_record_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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("treasure_record"); - _table.add_unique_constraint::("treasure_record_id", |row| &row.treasure_record_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `TreasureRecord`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait treasure_recordQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `TreasureRecord`. - fn treasure_record(&self) -> __sdk::__query_builder::Table; -} - -impl treasure_recordQueryTableAccess for __sdk::QueryTableAccessor { - fn treasure_record(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("treasure_record") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_type.rs deleted file mode 100644 index 9bcd8f6da..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_type.rs +++ /dev/null @@ -1,112 +0,0 @@ -// 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::runtime_item_reward_item_snapshot_type::RuntimeItemRewardItemSnapshot; -use super::treasure_interaction_action_type::TreasureInteractionAction; - -#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] -#[sats(crate = __lib)] -pub struct TreasureRecord { - pub treasure_record_id: String, - pub runtime_session_id: String, - pub story_session_id: String, - pub actor_user_id: String, - pub encounter_id: String, - pub encounter_name: String, - pub scene_id: Option, - pub scene_name: Option, - pub action: TreasureInteractionAction, - pub reward_items: Vec, - pub reward_hp: u32, - pub reward_mana: u32, - pub reward_currency: u32, - pub story_hint: Option, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for TreasureRecord { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `TreasureRecord`. -/// -/// Provides typed access to columns for query building. -pub struct TreasureRecordCols { - pub treasure_record_id: __sdk::__query_builder::Col, - pub runtime_session_id: __sdk::__query_builder::Col, - pub story_session_id: __sdk::__query_builder::Col, - pub actor_user_id: __sdk::__query_builder::Col, - pub encounter_id: __sdk::__query_builder::Col, - pub encounter_name: __sdk::__query_builder::Col, - pub scene_id: __sdk::__query_builder::Col>, - pub scene_name: __sdk::__query_builder::Col>, - pub action: __sdk::__query_builder::Col, - pub reward_items: - __sdk::__query_builder::Col>, - pub reward_hp: __sdk::__query_builder::Col, - pub reward_mana: __sdk::__query_builder::Col, - pub reward_currency: __sdk::__query_builder::Col, - pub story_hint: __sdk::__query_builder::Col>, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for TreasureRecord { - type Cols = TreasureRecordCols; - fn cols(table_name: &'static str) -> Self::Cols { - TreasureRecordCols { - treasure_record_id: __sdk::__query_builder::Col::new(table_name, "treasure_record_id"), - runtime_session_id: __sdk::__query_builder::Col::new(table_name, "runtime_session_id"), - story_session_id: __sdk::__query_builder::Col::new(table_name, "story_session_id"), - actor_user_id: __sdk::__query_builder::Col::new(table_name, "actor_user_id"), - encounter_id: __sdk::__query_builder::Col::new(table_name, "encounter_id"), - encounter_name: __sdk::__query_builder::Col::new(table_name, "encounter_name"), - scene_id: __sdk::__query_builder::Col::new(table_name, "scene_id"), - scene_name: __sdk::__query_builder::Col::new(table_name, "scene_name"), - action: __sdk::__query_builder::Col::new(table_name, "action"), - reward_items: __sdk::__query_builder::Col::new(table_name, "reward_items"), - reward_hp: __sdk::__query_builder::Col::new(table_name, "reward_hp"), - reward_mana: __sdk::__query_builder::Col::new(table_name, "reward_mana"), - reward_currency: __sdk::__query_builder::Col::new(table_name, "reward_currency"), - story_hint: __sdk::__query_builder::Col::new(table_name, "story_hint"), - 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 `TreasureRecord`. -/// -/// Provides typed access to indexed columns for query building. -pub struct TreasureRecordIxCols { - pub actor_user_id: __sdk::__query_builder::IxCol, - pub encounter_id: __sdk::__query_builder::IxCol, - pub runtime_session_id: __sdk::__query_builder::IxCol, - pub story_session_id: __sdk::__query_builder::IxCol, - pub treasure_record_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for TreasureRecord { - type IxCols = TreasureRecordIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - TreasureRecordIxCols { - actor_user_id: __sdk::__query_builder::IxCol::new(table_name, "actor_user_id"), - encounter_id: __sdk::__query_builder::IxCol::new(table_name, "encounter_id"), - runtime_session_id: __sdk::__query_builder::IxCol::new( - table_name, - "runtime_session_id", - ), - story_session_id: __sdk::__query_builder::IxCol::new(table_name, "story_session_id"), - treasure_record_id: __sdk::__query_builder::IxCol::new( - table_name, - "treasure_record_id", - ), - } - } -} - -impl __sdk::__query_builder::CanBeLookupTable for TreasureRecord {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/update_admin_account_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/update_admin_account_and_return_procedure.rs index e1d2deba0..1eb839663 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/update_admin_account_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/update_admin_account_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait update_admin_account_and_return { input: AdminAccountUpdateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl update_admin_account_and_return for super::RemoteProcedures { input: AdminAccountUpdateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, AdminAccountProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/update_editor_asset_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/update_editor_asset_and_return_procedure.rs index 4e0cfd34e..1ec662919 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/update_editor_asset_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/update_editor_asset_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait update_editor_asset_and_return { input: EditorAssetUpdateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl update_editor_asset_and_return for super::RemoteProcedures { input: EditorAssetUpdateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorAssetProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/update_editor_asset_folder_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/update_editor_asset_folder_and_return_procedure.rs index 91ca31fc5..a5ec71437 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/update_editor_asset_folder_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/update_editor_asset_folder_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait update_editor_asset_folder_and_return { input: EditorAssetFolderUpdateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl update_editor_asset_folder_and_return for super::RemoteProcedures { input: EditorAssetFolderUpdateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorAssetFolderProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/update_editor_project_resource_showcase_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/update_editor_project_resource_showcase_and_return_procedure.rs index c49ab8d9d..200432a78 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/update_editor_project_resource_showcase_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/update_editor_project_resource_showcase_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait update_editor_project_resource_showcase_and_return { input: EditorProjectResourceShowcaseUpdateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl update_editor_project_resource_showcase_and_return for super::RemoteProcedu input: EditorProjectResourceShowcaseUpdateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorProjectResourceProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/update_editor_showcase_asset_display_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/update_editor_showcase_asset_display_and_return_procedure.rs index 85db684da..40b912558 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/update_editor_showcase_asset_display_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/update_editor_showcase_asset_display_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait update_editor_showcase_asset_display_and_return { input: EditorShowcaseAssetDisplayUpdateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl update_editor_showcase_asset_display_and_return for super::RemoteProcedures input: EditorShowcaseAssetDisplayUpdateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorShowcaseAssetProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/update_external_generation_job_phase_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/update_external_generation_job_phase_and_return_procedure.rs index a6cc1b841..890d5b4d6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/update_external_generation_job_phase_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/update_external_generation_job_phase_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait update_external_generation_job_phase_and_return { input: ExternalGenerationJobPhaseUpdateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl update_external_generation_job_phase_and_return for super::RemoteProcedures input: ExternalGenerationJobPhaseUpdateInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, ExternalGenerationJobPhaseUpdateProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/upsert_editor_generation_pricing_config_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/upsert_editor_generation_pricing_config_and_return_procedure.rs index 9cb7c1e77..e822ed9df 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/upsert_editor_generation_pricing_config_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/upsert_editor_generation_pricing_config_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait upsert_editor_generation_pricing_config_and_return { input: EditorGenerationPricingConfigUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl upsert_editor_generation_pricing_config_and_return for super::RemoteProcedu input: EditorGenerationPricingConfigUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorGenerationPricingConfigProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/upsert_editor_showcase_campaign_config_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/upsert_editor_showcase_campaign_config_and_return_procedure.rs index ae0bb7a6c..490d65d5d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/upsert_editor_showcase_campaign_config_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/upsert_editor_showcase_campaign_config_and_return_procedure.rs @@ -34,10 +34,10 @@ pub trait upsert_editor_showcase_campaign_config_and_return { input: EditorShowcaseCampaignConfigUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -47,10 +47,10 @@ impl upsert_editor_showcase_campaign_config_and_return for super::RemoteProcedur input: EditorShowcaseCampaignConfigUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, EditorShowcaseCampaignConfigProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/upsert_feature_gate_config_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/upsert_feature_gate_config_procedure.rs index ece1afe07..3e7c3cfcb 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/upsert_feature_gate_config_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/upsert_feature_gate_config_procedure.rs @@ -31,10 +31,10 @@ pub trait upsert_feature_gate_config { input: FeatureGateConfigAdminUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl upsert_feature_gate_config for super::RemoteProcedures { input: FeatureGateConfigAdminUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, FeatureGateConfigProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/upsert_llm_router_account_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/upsert_llm_router_account_and_return_procedure.rs index db8e81711..c1881f3ce 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/upsert_llm_router_account_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/upsert_llm_router_account_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait upsert_llm_router_account_and_return { input: LlmRouterAccountUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl upsert_llm_router_account_and_return for super::RemoteProcedures { input: LlmRouterAccountUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, LlmRouterAccountProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/upsert_runtime_setting_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/upsert_runtime_setting_and_return_procedure.rs index f8fa0351a..119eab703 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/upsert_runtime_setting_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/upsert_runtime_setting_and_return_procedure.rs @@ -31,10 +31,10 @@ pub trait upsert_runtime_setting_and_return { input: RuntimeSettingUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl upsert_runtime_setting_and_return for super::RemoteProcedures { input: RuntimeSettingUpsertInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, RuntimeSettingProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/validate_auth_session_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/validate_auth_session_procedure.rs index 26af4bb8f..e96904972 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/validate_auth_session_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/validate_auth_session_procedure.rs @@ -31,10 +31,10 @@ pub trait validate_auth_session { input: AuthSessionValidationInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -44,10 +44,10 @@ impl validate_auth_session for super::RemoteProcedures { input: AuthSessionValidationInput, __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { self.imp .invoke_procedure_with_callback::<_, AuthSessionValidationProcedureResult>( diff --git a/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_agent_message_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_agent_message_row_type.rs deleted file mode 100644 index 184705061..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_agent_message_row_type.rs +++ /dev/null @@ -1,66 +0,0 @@ -// 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, - pub session_id: __sdk::__query_builder::Col, - pub role: __sdk::__query_builder::Col, - pub kind: __sdk::__query_builder::Col, - pub text: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, -} - -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, - pub session_id: __sdk::__query_builder::IxCol, -} - -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 {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_agent_message_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_agent_message_table.rs deleted file mode 100644 index 5de1de62d..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_agent_message_table.rs +++ /dev/null @@ -1,235 +0,0 @@ -// 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, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `visual_novel_agent_message`. -pub struct VisualNovelAgentMessageTableAccessor; - -impl __sdk::TableAccessor for VisualNovelAgentMessageTableAccessor { - type Row = VisualNovelAgentMessageRow; - type Handle<'db> = VisualNovelAgentMessageTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.visual_novel_agent_message() - } -} - -#[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::("visual_novel_agent_message"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct VisualNovelAgentMessageInsertCallbackId(__sdk::CallbackId); -pub struct VisualNovelAgentMessageDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for VisualNovelAgentMessageTableHandle<'ctx> { - type Row = VisualNovelAgentMessageRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -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 + '_ { - 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) - } -} - -impl<'ctx> __sdk::WithInsert for VisualNovelAgentMessageTableHandle<'ctx> { - 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) - } -} - -impl<'ctx> __sdk::WithDelete for VisualNovelAgentMessageTableHandle<'ctx> { - 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) - } -} - -impl<'ctx> __sdk::WithUpdate 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, - 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::("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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("visual_novel_agent_message"); - _table.add_unique_constraint::("message_id", |row| &row.message_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "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; -} - -impl visual_novel_agent_messageQueryTableAccess for __sdk::QueryTableAccessor { - fn visual_novel_agent_message( - &self, - ) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("visual_novel_agent_message") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_agent_session_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_agent_session_row_type.rs deleted file mode 100644 index 6d00cc9a0..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_agent_session_row_type.rs +++ /dev/null @@ -1,102 +0,0 @@ -// 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, - pub owner_user_id: __sdk::__query_builder::Col, - pub source_mode: __sdk::__query_builder::Col, - pub status: __sdk::__query_builder::Col, - pub seed_text: __sdk::__query_builder::Col, - pub source_asset_ids_json: __sdk::__query_builder::Col, - pub current_turn: __sdk::__query_builder::Col, - pub progress_percent: __sdk::__query_builder::Col, - pub draft_json: __sdk::__query_builder::Col, - pub pending_action_json: __sdk::__query_builder::Col, - pub last_assistant_reply: __sdk::__query_builder::Col, - pub published_profile_id: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -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, - pub session_id: __sdk::__query_builder::IxCol, -} - -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 {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_agent_session_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_agent_session_table.rs deleted file mode 100644 index a2ce33cd7..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_agent_session_table.rs +++ /dev/null @@ -1,235 +0,0 @@ -// 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, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `visual_novel_agent_session`. -pub struct VisualNovelAgentSessionTableAccessor; - -impl __sdk::TableAccessor for VisualNovelAgentSessionTableAccessor { - type Row = VisualNovelAgentSessionRow; - type Handle<'db> = VisualNovelAgentSessionTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.visual_novel_agent_session() - } -} - -#[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::("visual_novel_agent_session"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct VisualNovelAgentSessionInsertCallbackId(__sdk::CallbackId); -pub struct VisualNovelAgentSessionDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for VisualNovelAgentSessionTableHandle<'ctx> { - type Row = VisualNovelAgentSessionRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -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 + '_ { - 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) - } -} - -impl<'ctx> __sdk::WithInsert for VisualNovelAgentSessionTableHandle<'ctx> { - 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) - } -} - -impl<'ctx> __sdk::WithDelete for VisualNovelAgentSessionTableHandle<'ctx> { - 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) - } -} - -impl<'ctx> __sdk::WithUpdate 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, - 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::("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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("visual_novel_agent_session"); - _table.add_unique_constraint::("session_id", |row| &row.session_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "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; -} - -impl visual_novel_agent_sessionQueryTableAccess for __sdk::QueryTableAccessor { - fn visual_novel_agent_session( - &self, - ) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("visual_novel_agent_session") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_runtime_event_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_runtime_event_table.rs deleted file mode 100644 index 83457c6d7..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_runtime_event_table.rs +++ /dev/null @@ -1,140 +0,0 @@ -// 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, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `visual_novel_runtime_event`. -pub struct VisualNovelRuntimeEventTableAccessor; - -impl __sdk::TableAccessor for VisualNovelRuntimeEventTableAccessor { - type Row = VisualNovelRuntimeEvent; - type Handle<'db> = VisualNovelRuntimeEventTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.visual_novel_runtime_event() - } -} - -#[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::("visual_novel_runtime_event"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct VisualNovelRuntimeEventInsertCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for VisualNovelRuntimeEventTableHandle<'ctx> { - type Row = VisualNovelRuntimeEvent; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -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 + '_ { - 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) - } -} - -impl<'ctx> __sdk::WithInsert for VisualNovelRuntimeEventTableHandle<'ctx> { - 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) { - let _table = - client_cache.get_or_make_table::("visual_novel_runtime_event"); - _table.add_unique_constraint::("event_id", |row| &row.event_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "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; -} - -impl visual_novel_runtime_eventQueryTableAccess for __sdk::QueryTableAccessor { - fn visual_novel_runtime_event(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("visual_novel_runtime_event") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_runtime_event_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_runtime_event_type.rs deleted file mode 100644 index 9bb480726..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_runtime_event_type.rs +++ /dev/null @@ -1,75 +0,0 @@ -// 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, - pub run_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub profile_id: __sdk::__query_builder::Col, - pub event_kind: __sdk::__query_builder::Col, - pub client_event_id: __sdk::__query_builder::Col, - pub history_entry_id: __sdk::__query_builder::Col, - pub payload_json: __sdk::__query_builder::Col, - pub occurred_at: __sdk::__query_builder::Col, -} - -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, - pub owner_user_id: __sdk::__query_builder::IxCol, - pub run_id: __sdk::__query_builder::IxCol, -} - -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"), - } - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_runtime_history_entry_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_runtime_history_entry_row_type.rs deleted file mode 100644 index 15eb7e2bb..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_runtime_history_entry_row_type.rs +++ /dev/null @@ -1,91 +0,0 @@ -// 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, - pub run_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub profile_id: __sdk::__query_builder::Col, - pub turn_index: __sdk::__query_builder::Col, - pub source: __sdk::__query_builder::Col, - pub action_text: __sdk::__query_builder::Col, - pub steps_json: __sdk::__query_builder::Col, - pub snapshot_before_hash: - __sdk::__query_builder::Col, - pub snapshot_after_hash: __sdk::__query_builder::Col, - pub created_at: - __sdk::__query_builder::Col, -} - -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, - pub owner_user_id: __sdk::__query_builder::IxCol, - pub run_id: __sdk::__query_builder::IxCol, -} - -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 {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_runtime_history_entry_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_runtime_history_entry_table.rs deleted file mode 100644 index 7936d334d..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_runtime_history_entry_table.rs +++ /dev/null @@ -1,239 +0,0 @@ -// 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, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `visual_novel_runtime_history_entry`. -pub struct VisualNovelRuntimeHistoryEntryTableAccessor; - -impl __sdk::TableAccessor for VisualNovelRuntimeHistoryEntryTableAccessor { - type Row = VisualNovelRuntimeHistoryEntryRow; - type Handle<'db> = VisualNovelRuntimeHistoryEntryTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.visual_novel_runtime_history_entry() - } -} - -#[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::( - "visual_novel_runtime_history_entry", - ), - ctx: std::marker::PhantomData, - } - } -} - -pub struct VisualNovelRuntimeHistoryEntryInsertCallbackId(__sdk::CallbackId); -pub struct VisualNovelRuntimeHistoryEntryDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for VisualNovelRuntimeHistoryEntryTableHandle<'ctx> { - type Row = VisualNovelRuntimeHistoryEntryRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -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 + '_ { - 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) - } -} - -impl<'ctx> __sdk::WithInsert for VisualNovelRuntimeHistoryEntryTableHandle<'ctx> { - 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) - } -} - -impl<'ctx> __sdk::WithDelete for VisualNovelRuntimeHistoryEntryTableHandle<'ctx> { - 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) - } -} - -impl<'ctx> __sdk::WithUpdate 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, - 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::("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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::( - "visual_novel_runtime_history_entry", - ); - _table.add_unique_constraint::("entry_id", |row| &row.entry_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse( - "TableUpdate", - "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; -} - -impl visual_novel_runtime_history_entryQueryTableAccess for __sdk::QueryTableAccessor { - fn visual_novel_runtime_history_entry( - &self, - ) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("visual_novel_runtime_history_entry") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_runtime_run_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_runtime_run_row_type.rs deleted file mode 100644 index a431fd5eb..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_runtime_run_row_type.rs +++ /dev/null @@ -1,101 +0,0 @@ -// 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, - pub owner_user_id: __sdk::__query_builder::Col, - pub profile_id: __sdk::__query_builder::Col, - pub mode: __sdk::__query_builder::Col, - pub status: __sdk::__query_builder::Col, - pub current_scene_id: __sdk::__query_builder::Col, - pub current_phase_id: __sdk::__query_builder::Col, - pub visible_character_ids_json: __sdk::__query_builder::Col, - pub flags_json: __sdk::__query_builder::Col, - pub metrics_json: __sdk::__query_builder::Col, - pub available_choices_json: __sdk::__query_builder::Col, - pub text_mode_enabled: __sdk::__query_builder::Col, - pub snapshot_json: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -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, - pub profile_id: __sdk::__query_builder::IxCol, - pub run_id: __sdk::__query_builder::IxCol, -} - -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 {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_runtime_run_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_runtime_run_table.rs deleted file mode 100644 index 2578c1e6f..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_runtime_run_table.rs +++ /dev/null @@ -1,231 +0,0 @@ -// 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, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `visual_novel_runtime_run`. -pub struct VisualNovelRuntimeRunTableAccessor; - -impl __sdk::TableAccessor for VisualNovelRuntimeRunTableAccessor { - type Row = VisualNovelRuntimeRunRow; - type Handle<'db> = VisualNovelRuntimeRunTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.visual_novel_runtime_run() - } -} - -#[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::("visual_novel_runtime_run"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct VisualNovelRuntimeRunInsertCallbackId(__sdk::CallbackId); -pub struct VisualNovelRuntimeRunDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for VisualNovelRuntimeRunTableHandle<'ctx> { - type Row = VisualNovelRuntimeRunRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -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 + '_ { - 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) - } -} - -impl<'ctx> __sdk::WithInsert for VisualNovelRuntimeRunTableHandle<'ctx> { - 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) - } -} - -impl<'ctx> __sdk::WithDelete for VisualNovelRuntimeRunTableHandle<'ctx> { - 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) - } -} - -impl<'ctx> __sdk::WithUpdate 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, - 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::("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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("visual_novel_runtime_run"); - _table.add_unique_constraint::("run_id", |row| &row.run_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "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; -} - -impl visual_novel_runtime_runQueryTableAccess for __sdk::QueryTableAccessor { - fn visual_novel_runtime_run(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("visual_novel_runtime_run") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_work_profile_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_work_profile_row_type.rs deleted file mode 100644 index d4556acb1..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_work_profile_row_type.rs +++ /dev/null @@ -1,114 +0,0 @@ -// 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>, - pub visible: bool, -} - -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, - pub work_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub source_session_id: __sdk::__query_builder::Col, - pub author_display_name: __sdk::__query_builder::Col, - pub work_title: __sdk::__query_builder::Col, - pub work_description: __sdk::__query_builder::Col, - pub tags_json: __sdk::__query_builder::Col, - pub cover_image_src: __sdk::__query_builder::Col, - pub source_asset_ids_json: __sdk::__query_builder::Col, - pub draft_json: __sdk::__query_builder::Col, - pub publication_status: __sdk::__query_builder::Col, - pub publish_ready: __sdk::__query_builder::Col, - pub play_count: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, - pub published_at: - __sdk::__query_builder::Col>, - pub visible: __sdk::__query_builder::Col, -} - -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"), - visible: __sdk::__query_builder::Col::new(table_name, "visible"), - } - } -} - -/// 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, - pub profile_id: __sdk::__query_builder::IxCol, - pub publication_status: __sdk::__query_builder::IxCol, -} - -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 {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_work_profile_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_work_profile_table.rs deleted file mode 100644 index b41c7f144..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/visual_novel_work_profile_table.rs +++ /dev/null @@ -1,234 +0,0 @@ -// 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, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `visual_novel_work_profile`. -pub struct VisualNovelWorkProfileTableAccessor; - -impl __sdk::TableAccessor for VisualNovelWorkProfileTableAccessor { - type Row = VisualNovelWorkProfileRow; - type Handle<'db> = VisualNovelWorkProfileTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.visual_novel_work_profile() - } -} - -#[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::("visual_novel_work_profile"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct VisualNovelWorkProfileInsertCallbackId(__sdk::CallbackId); -pub struct VisualNovelWorkProfileDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for VisualNovelWorkProfileTableHandle<'ctx> { - type Row = VisualNovelWorkProfileRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -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 + '_ { - 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) - } -} - -impl<'ctx> __sdk::WithInsert for VisualNovelWorkProfileTableHandle<'ctx> { - 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) - } -} - -impl<'ctx> __sdk::WithDelete for VisualNovelWorkProfileTableHandle<'ctx> { - 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) - } -} - -impl<'ctx> __sdk::WithUpdate 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, - 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::("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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("visual_novel_work_profile"); - _table.add_unique_constraint::("profile_id", |row| &row.profile_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "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; -} - -impl visual_novel_work_profileQueryTableAccess for __sdk::QueryTableAccessor { - fn visual_novel_work_profile( - &self, - ) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("visual_novel_work_profile") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/wooden_fish_agent_session_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/wooden_fish_agent_session_row_type.rs deleted file mode 100644 index 8f918cdf2..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/wooden_fish_agent_session_row_type.rs +++ /dev/null @@ -1,81 +0,0 @@ -// 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 WoodenFishAgentSessionRow { - pub session_id: String, - pub owner_user_id: String, - pub current_turn: u32, - pub progress_percent: u32, - pub stage: String, - pub config_json: String, - pub draft_json: String, - pub published_profile_id: String, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for WoodenFishAgentSessionRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `WoodenFishAgentSessionRow`. -/// -/// Provides typed access to columns for query building. -pub struct WoodenFishAgentSessionRowCols { - pub session_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub current_turn: __sdk::__query_builder::Col, - pub progress_percent: __sdk::__query_builder::Col, - pub stage: __sdk::__query_builder::Col, - pub config_json: __sdk::__query_builder::Col, - pub draft_json: __sdk::__query_builder::Col, - pub published_profile_id: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for WoodenFishAgentSessionRow { - type Cols = WoodenFishAgentSessionRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - WoodenFishAgentSessionRowCols { - session_id: __sdk::__query_builder::Col::new(table_name, "session_id"), - owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"), - current_turn: __sdk::__query_builder::Col::new(table_name, "current_turn"), - progress_percent: __sdk::__query_builder::Col::new(table_name, "progress_percent"), - stage: __sdk::__query_builder::Col::new(table_name, "stage"), - config_json: __sdk::__query_builder::Col::new(table_name, "config_json"), - draft_json: __sdk::__query_builder::Col::new(table_name, "draft_json"), - 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 `WoodenFishAgentSessionRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct WoodenFishAgentSessionRowIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub session_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for WoodenFishAgentSessionRow { - type IxCols = WoodenFishAgentSessionRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - WoodenFishAgentSessionRowIxCols { - 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 WoodenFishAgentSessionRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/wooden_fish_agent_session_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/wooden_fish_agent_session_table.rs deleted file mode 100644 index 53b91c879..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/wooden_fish_agent_session_table.rs +++ /dev/null @@ -1,234 +0,0 @@ -// 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::wooden_fish_agent_session_row_type::WoodenFishAgentSessionRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `wooden_fish_agent_session`. -/// -/// Obtain a handle from the [`WoodenFishAgentSessionTableAccess::wooden_fish_agent_session`] method on [`super::RemoteTables`], -/// like `ctx.db.wooden_fish_agent_session()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.wooden_fish_agent_session().on_insert(...)`. -pub struct WoodenFishAgentSessionTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `wooden_fish_agent_session`. -pub struct WoodenFishAgentSessionTableAccessor; - -impl __sdk::TableAccessor for WoodenFishAgentSessionTableAccessor { - type Row = WoodenFishAgentSessionRow; - type Handle<'db> = WoodenFishAgentSessionTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.wooden_fish_agent_session() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `wooden_fish_agent_session`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait WoodenFishAgentSessionTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`WoodenFishAgentSessionTableHandle`], which mediates access to the table `wooden_fish_agent_session`. - fn wooden_fish_agent_session(&self) -> WoodenFishAgentSessionTableHandle<'_>; -} - -impl WoodenFishAgentSessionTableAccess for super::RemoteTables { - fn wooden_fish_agent_session(&self) -> WoodenFishAgentSessionTableHandle<'_> { - WoodenFishAgentSessionTableHandle { - imp: self - .imp - .get_table::("wooden_fish_agent_session"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct WoodenFishAgentSessionInsertCallbackId(__sdk::CallbackId); -pub struct WoodenFishAgentSessionDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for WoodenFishAgentSessionTableHandle<'ctx> { - type Row = WoodenFishAgentSessionRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for WoodenFishAgentSessionTableHandle<'ctx> { - type Row = WoodenFishAgentSessionRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = WoodenFishAgentSessionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> WoodenFishAgentSessionInsertCallbackId { - WoodenFishAgentSessionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: WoodenFishAgentSessionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = WoodenFishAgentSessionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> WoodenFishAgentSessionDeleteCallbackId { - WoodenFishAgentSessionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: WoodenFishAgentSessionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for WoodenFishAgentSessionTableHandle<'ctx> { - type InsertCallbackId = WoodenFishAgentSessionInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> WoodenFishAgentSessionInsertCallbackId { - WoodenFishAgentSessionInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: WoodenFishAgentSessionInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for WoodenFishAgentSessionTableHandle<'ctx> { - type DeleteCallbackId = WoodenFishAgentSessionDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> WoodenFishAgentSessionDeleteCallbackId { - WoodenFishAgentSessionDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: WoodenFishAgentSessionDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct WoodenFishAgentSessionUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for WoodenFishAgentSessionTableHandle<'ctx> { - type UpdateCallbackId = WoodenFishAgentSessionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> WoodenFishAgentSessionUpdateCallbackId { - WoodenFishAgentSessionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: WoodenFishAgentSessionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for WoodenFishAgentSessionTableHandle<'ctx> { - type UpdateCallbackId = WoodenFishAgentSessionUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> WoodenFishAgentSessionUpdateCallbackId { - WoodenFishAgentSessionUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: WoodenFishAgentSessionUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `session_id` unique index on the table `wooden_fish_agent_session`, -/// which allows point queries on the field of the same name -/// via the [`WoodenFishAgentSessionSessionIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.wooden_fish_agent_session().session_id().find(...)`. -pub struct WoodenFishAgentSessionSessionIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> WoodenFishAgentSessionTableHandle<'ctx> { - /// Get a handle on the `session_id` unique index on the table `wooden_fish_agent_session`. - pub fn session_id(&self) -> WoodenFishAgentSessionSessionIdUnique<'ctx> { - WoodenFishAgentSessionSessionIdUnique { - imp: self.imp.get_unique_constraint::("session_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> WoodenFishAgentSessionSessionIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("wooden_fish_agent_session"); - _table.add_unique_constraint::("session_id", |row| &row.session_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `WoodenFishAgentSessionRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait wooden_fish_agent_sessionQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `WoodenFishAgentSessionRow`. - fn wooden_fish_agent_session(&self) - -> __sdk::__query_builder::Table; -} - -impl wooden_fish_agent_sessionQueryTableAccess for __sdk::QueryTableAccessor { - fn wooden_fish_agent_session( - &self, - ) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("wooden_fish_agent_session") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/wooden_fish_event_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/wooden_fish_event_row_type.rs deleted file mode 100644 index 9b000003e..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/wooden_fish_event_row_type.rs +++ /dev/null @@ -1,71 +0,0 @@ -// 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 WoodenFishEventRow { - pub event_id: String, - pub owner_user_id: String, - pub profile_id: String, - pub run_id: String, - pub event_type: String, - pub result: String, - pub occurred_at: __sdk::Timestamp, -} - -impl __sdk::InModule for WoodenFishEventRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `WoodenFishEventRow`. -/// -/// Provides typed access to columns for query building. -pub struct WoodenFishEventRowCols { - pub event_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub profile_id: __sdk::__query_builder::Col, - pub run_id: __sdk::__query_builder::Col, - pub event_type: __sdk::__query_builder::Col, - pub result: __sdk::__query_builder::Col, - pub occurred_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for WoodenFishEventRow { - type Cols = WoodenFishEventRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - WoodenFishEventRowCols { - event_id: __sdk::__query_builder::Col::new(table_name, "event_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"), - run_id: __sdk::__query_builder::Col::new(table_name, "run_id"), - event_type: __sdk::__query_builder::Col::new(table_name, "event_type"), - result: __sdk::__query_builder::Col::new(table_name, "result"), - occurred_at: __sdk::__query_builder::Col::new(table_name, "occurred_at"), - } - } -} - -/// Indexed column accessor struct for the table `WoodenFishEventRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct WoodenFishEventRowIxCols { - pub event_id: __sdk::__query_builder::IxCol, - pub profile_id: __sdk::__query_builder::IxCol, - pub run_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for WoodenFishEventRow { - type IxCols = WoodenFishEventRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - WoodenFishEventRowIxCols { - event_id: __sdk::__query_builder::IxCol::new(table_name, "event_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 WoodenFishEventRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/wooden_fish_event_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/wooden_fish_event_table.rs deleted file mode 100644 index 6a1c9fc8d..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/wooden_fish_event_table.rs +++ /dev/null @@ -1,230 +0,0 @@ -// 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::wooden_fish_event_row_type::WoodenFishEventRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `wooden_fish_event`. -/// -/// Obtain a handle from the [`WoodenFishEventTableAccess::wooden_fish_event`] method on [`super::RemoteTables`], -/// like `ctx.db.wooden_fish_event()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.wooden_fish_event().on_insert(...)`. -pub struct WoodenFishEventTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `wooden_fish_event`. -pub struct WoodenFishEventTableAccessor; - -impl __sdk::TableAccessor for WoodenFishEventTableAccessor { - type Row = WoodenFishEventRow; - type Handle<'db> = WoodenFishEventTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.wooden_fish_event() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `wooden_fish_event`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait WoodenFishEventTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`WoodenFishEventTableHandle`], which mediates access to the table `wooden_fish_event`. - fn wooden_fish_event(&self) -> WoodenFishEventTableHandle<'_>; -} - -impl WoodenFishEventTableAccess for super::RemoteTables { - fn wooden_fish_event(&self) -> WoodenFishEventTableHandle<'_> { - WoodenFishEventTableHandle { - imp: self - .imp - .get_table::("wooden_fish_event"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct WoodenFishEventInsertCallbackId(__sdk::CallbackId); -pub struct WoodenFishEventDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for WoodenFishEventTableHandle<'ctx> { - type Row = WoodenFishEventRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for WoodenFishEventTableHandle<'ctx> { - type Row = WoodenFishEventRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = WoodenFishEventInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> WoodenFishEventInsertCallbackId { - WoodenFishEventInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: WoodenFishEventInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = WoodenFishEventDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> WoodenFishEventDeleteCallbackId { - WoodenFishEventDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: WoodenFishEventDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for WoodenFishEventTableHandle<'ctx> { - type InsertCallbackId = WoodenFishEventInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> WoodenFishEventInsertCallbackId { - WoodenFishEventInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: WoodenFishEventInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for WoodenFishEventTableHandle<'ctx> { - type DeleteCallbackId = WoodenFishEventDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> WoodenFishEventDeleteCallbackId { - WoodenFishEventDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: WoodenFishEventDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct WoodenFishEventUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for WoodenFishEventTableHandle<'ctx> { - type UpdateCallbackId = WoodenFishEventUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> WoodenFishEventUpdateCallbackId { - WoodenFishEventUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: WoodenFishEventUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for WoodenFishEventTableHandle<'ctx> { - type UpdateCallbackId = WoodenFishEventUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> WoodenFishEventUpdateCallbackId { - WoodenFishEventUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: WoodenFishEventUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `event_id` unique index on the table `wooden_fish_event`, -/// which allows point queries on the field of the same name -/// via the [`WoodenFishEventEventIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.wooden_fish_event().event_id().find(...)`. -pub struct WoodenFishEventEventIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> WoodenFishEventTableHandle<'ctx> { - /// Get a handle on the `event_id` unique index on the table `wooden_fish_event`. - pub fn event_id(&self) -> WoodenFishEventEventIdUnique<'ctx> { - WoodenFishEventEventIdUnique { - imp: self.imp.get_unique_constraint::("event_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> WoodenFishEventEventIdUnique<'ctx> { - /// Find the subscribed row whose `event_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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = client_cache.get_or_make_table::("wooden_fish_event"); - _table.add_unique_constraint::("event_id", |row| &row.event_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `WoodenFishEventRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait wooden_fish_eventQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `WoodenFishEventRow`. - fn wooden_fish_event(&self) -> __sdk::__query_builder::Table; -} - -impl wooden_fish_eventQueryTableAccess for __sdk::QueryTableAccessor { - fn wooden_fish_event(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("wooden_fish_event") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/wooden_fish_runtime_run_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/wooden_fish_runtime_run_row_type.rs deleted file mode 100644 index 8c12c1e53..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/wooden_fish_runtime_run_row_type.rs +++ /dev/null @@ -1,86 +0,0 @@ -// 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 WoodenFishRuntimeRunRow { - pub run_id: String, - pub owner_user_id: String, - pub profile_id: String, - pub status: String, - pub total_tap_count: u32, - pub word_counters_json: String, - pub started_at_ms: i64, - pub updated_at_ms: i64, - pub finished_at_ms: i64, - pub snapshot_json: String, - pub created_at: __sdk::Timestamp, - pub updated_at: __sdk::Timestamp, -} - -impl __sdk::InModule for WoodenFishRuntimeRunRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `WoodenFishRuntimeRunRow`. -/// -/// Provides typed access to columns for query building. -pub struct WoodenFishRuntimeRunRowCols { - pub run_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub profile_id: __sdk::__query_builder::Col, - pub status: __sdk::__query_builder::Col, - pub total_tap_count: __sdk::__query_builder::Col, - pub word_counters_json: __sdk::__query_builder::Col, - pub started_at_ms: __sdk::__query_builder::Col, - pub updated_at_ms: __sdk::__query_builder::Col, - pub finished_at_ms: __sdk::__query_builder::Col, - pub snapshot_json: __sdk::__query_builder::Col, - pub created_at: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for WoodenFishRuntimeRunRow { - type Cols = WoodenFishRuntimeRunRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - WoodenFishRuntimeRunRowCols { - 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"), - status: __sdk::__query_builder::Col::new(table_name, "status"), - total_tap_count: __sdk::__query_builder::Col::new(table_name, "total_tap_count"), - word_counters_json: __sdk::__query_builder::Col::new(table_name, "word_counters_json"), - started_at_ms: __sdk::__query_builder::Col::new(table_name, "started_at_ms"), - updated_at_ms: __sdk::__query_builder::Col::new(table_name, "updated_at_ms"), - finished_at_ms: __sdk::__query_builder::Col::new(table_name, "finished_at_ms"), - 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 `WoodenFishRuntimeRunRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct WoodenFishRuntimeRunRowIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub profile_id: __sdk::__query_builder::IxCol, - pub run_id: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for WoodenFishRuntimeRunRow { - type IxCols = WoodenFishRuntimeRunRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - WoodenFishRuntimeRunRowIxCols { - 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 WoodenFishRuntimeRunRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/wooden_fish_runtime_run_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/wooden_fish_runtime_run_table.rs deleted file mode 100644 index c762aadd3..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/wooden_fish_runtime_run_table.rs +++ /dev/null @@ -1,231 +0,0 @@ -// 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::wooden_fish_runtime_run_row_type::WoodenFishRuntimeRunRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `wooden_fish_runtime_run`. -/// -/// Obtain a handle from the [`WoodenFishRuntimeRunTableAccess::wooden_fish_runtime_run`] method on [`super::RemoteTables`], -/// like `ctx.db.wooden_fish_runtime_run()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.wooden_fish_runtime_run().on_insert(...)`. -pub struct WoodenFishRuntimeRunTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `wooden_fish_runtime_run`. -pub struct WoodenFishRuntimeRunTableAccessor; - -impl __sdk::TableAccessor for WoodenFishRuntimeRunTableAccessor { - type Row = WoodenFishRuntimeRunRow; - type Handle<'db> = WoodenFishRuntimeRunTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.wooden_fish_runtime_run() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `wooden_fish_runtime_run`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait WoodenFishRuntimeRunTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`WoodenFishRuntimeRunTableHandle`], which mediates access to the table `wooden_fish_runtime_run`. - fn wooden_fish_runtime_run(&self) -> WoodenFishRuntimeRunTableHandle<'_>; -} - -impl WoodenFishRuntimeRunTableAccess for super::RemoteTables { - fn wooden_fish_runtime_run(&self) -> WoodenFishRuntimeRunTableHandle<'_> { - WoodenFishRuntimeRunTableHandle { - imp: self - .imp - .get_table::("wooden_fish_runtime_run"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct WoodenFishRuntimeRunInsertCallbackId(__sdk::CallbackId); -pub struct WoodenFishRuntimeRunDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for WoodenFishRuntimeRunTableHandle<'ctx> { - type Row = WoodenFishRuntimeRunRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for WoodenFishRuntimeRunTableHandle<'ctx> { - type Row = WoodenFishRuntimeRunRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = WoodenFishRuntimeRunInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> WoodenFishRuntimeRunInsertCallbackId { - WoodenFishRuntimeRunInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: WoodenFishRuntimeRunInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = WoodenFishRuntimeRunDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> WoodenFishRuntimeRunDeleteCallbackId { - WoodenFishRuntimeRunDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: WoodenFishRuntimeRunDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for WoodenFishRuntimeRunTableHandle<'ctx> { - type InsertCallbackId = WoodenFishRuntimeRunInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> WoodenFishRuntimeRunInsertCallbackId { - WoodenFishRuntimeRunInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: WoodenFishRuntimeRunInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for WoodenFishRuntimeRunTableHandle<'ctx> { - type DeleteCallbackId = WoodenFishRuntimeRunDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> WoodenFishRuntimeRunDeleteCallbackId { - WoodenFishRuntimeRunDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: WoodenFishRuntimeRunDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct WoodenFishRuntimeRunUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for WoodenFishRuntimeRunTableHandle<'ctx> { - type UpdateCallbackId = WoodenFishRuntimeRunUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> WoodenFishRuntimeRunUpdateCallbackId { - WoodenFishRuntimeRunUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: WoodenFishRuntimeRunUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for WoodenFishRuntimeRunTableHandle<'ctx> { - type UpdateCallbackId = WoodenFishRuntimeRunUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> WoodenFishRuntimeRunUpdateCallbackId { - WoodenFishRuntimeRunUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: WoodenFishRuntimeRunUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `run_id` unique index on the table `wooden_fish_runtime_run`, -/// which allows point queries on the field of the same name -/// via the [`WoodenFishRuntimeRunRunIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.wooden_fish_runtime_run().run_id().find(...)`. -pub struct WoodenFishRuntimeRunRunIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> WoodenFishRuntimeRunTableHandle<'ctx> { - /// Get a handle on the `run_id` unique index on the table `wooden_fish_runtime_run`. - pub fn run_id(&self) -> WoodenFishRuntimeRunRunIdUnique<'ctx> { - WoodenFishRuntimeRunRunIdUnique { - imp: self.imp.get_unique_constraint::("run_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> WoodenFishRuntimeRunRunIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("wooden_fish_runtime_run"); - _table.add_unique_constraint::("run_id", |row| &row.run_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `WoodenFishRuntimeRunRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait wooden_fish_runtime_runQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `WoodenFishRuntimeRunRow`. - fn wooden_fish_runtime_run(&self) -> __sdk::__query_builder::Table; -} - -impl wooden_fish_runtime_runQueryTableAccess for __sdk::QueryTableAccessor { - fn wooden_fish_runtime_run(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("wooden_fish_runtime_run") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/wooden_fish_work_profile_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/wooden_fish_work_profile_row_type.rs deleted file mode 100644 index 5803a5988..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/wooden_fish_work_profile_row_type.rs +++ /dev/null @@ -1,147 +0,0 @@ -// 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 WoodenFishWorkProfileRow { - 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 theme_tags_json: String, - pub hit_object_prompt: String, - pub hit_object_reference_image_src: String, - pub hit_sound_prompt: String, - pub hit_object_asset_json: String, - pub hit_sound_asset_json: String, - pub floating_words_json: String, - pub cover_image_src: String, - pub generation_status: String, - pub publication_status: String, - pub play_count: u32, - pub updated_at: __sdk::Timestamp, - pub published_at: Option<__sdk::Timestamp>, - pub background_asset_json: Option, - pub back_button_asset_json: Option, - pub visible: bool, -} - -impl __sdk::InModule for WoodenFishWorkProfileRow { - type Module = super::RemoteModule; -} - -/// Column accessor struct for the table `WoodenFishWorkProfileRow`. -/// -/// Provides typed access to columns for query building. -pub struct WoodenFishWorkProfileRowCols { - pub profile_id: __sdk::__query_builder::Col, - pub work_id: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col, - pub source_session_id: __sdk::__query_builder::Col, - pub author_display_name: __sdk::__query_builder::Col, - pub work_title: __sdk::__query_builder::Col, - pub work_description: __sdk::__query_builder::Col, - pub theme_tags_json: __sdk::__query_builder::Col, - pub hit_object_prompt: __sdk::__query_builder::Col, - pub hit_object_reference_image_src: - __sdk::__query_builder::Col, - pub hit_sound_prompt: __sdk::__query_builder::Col, - pub hit_object_asset_json: __sdk::__query_builder::Col, - pub hit_sound_asset_json: __sdk::__query_builder::Col, - pub floating_words_json: __sdk::__query_builder::Col, - pub cover_image_src: __sdk::__query_builder::Col, - pub generation_status: __sdk::__query_builder::Col, - pub publication_status: __sdk::__query_builder::Col, - pub play_count: __sdk::__query_builder::Col, - pub updated_at: __sdk::__query_builder::Col, - pub published_at: - __sdk::__query_builder::Col>, - pub background_asset_json: - __sdk::__query_builder::Col>, - pub back_button_asset_json: - __sdk::__query_builder::Col>, - pub visible: __sdk::__query_builder::Col, -} - -impl __sdk::__query_builder::HasCols for WoodenFishWorkProfileRow { - type Cols = WoodenFishWorkProfileRowCols; - fn cols(table_name: &'static str) -> Self::Cols { - WoodenFishWorkProfileRowCols { - 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"), - theme_tags_json: __sdk::__query_builder::Col::new(table_name, "theme_tags_json"), - hit_object_prompt: __sdk::__query_builder::Col::new(table_name, "hit_object_prompt"), - hit_object_reference_image_src: __sdk::__query_builder::Col::new( - table_name, - "hit_object_reference_image_src", - ), - hit_sound_prompt: __sdk::__query_builder::Col::new(table_name, "hit_sound_prompt"), - hit_object_asset_json: __sdk::__query_builder::Col::new( - table_name, - "hit_object_asset_json", - ), - hit_sound_asset_json: __sdk::__query_builder::Col::new( - table_name, - "hit_sound_asset_json", - ), - floating_words_json: __sdk::__query_builder::Col::new( - table_name, - "floating_words_json", - ), - cover_image_src: __sdk::__query_builder::Col::new(table_name, "cover_image_src"), - generation_status: __sdk::__query_builder::Col::new(table_name, "generation_status"), - publication_status: __sdk::__query_builder::Col::new(table_name, "publication_status"), - play_count: __sdk::__query_builder::Col::new(table_name, "play_count"), - updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), - published_at: __sdk::__query_builder::Col::new(table_name, "published_at"), - background_asset_json: __sdk::__query_builder::Col::new( - table_name, - "background_asset_json", - ), - back_button_asset_json: __sdk::__query_builder::Col::new( - table_name, - "back_button_asset_json", - ), - visible: __sdk::__query_builder::Col::new(table_name, "visible"), - } - } -} - -/// Indexed column accessor struct for the table `WoodenFishWorkProfileRow`. -/// -/// Provides typed access to indexed columns for query building. -pub struct WoodenFishWorkProfileRowIxCols { - pub owner_user_id: __sdk::__query_builder::IxCol, - pub profile_id: __sdk::__query_builder::IxCol, - pub publication_status: __sdk::__query_builder::IxCol, -} - -impl __sdk::__query_builder::HasIxCols for WoodenFishWorkProfileRow { - type IxCols = WoodenFishWorkProfileRowIxCols; - fn ix_cols(table_name: &'static str) -> Self::IxCols { - WoodenFishWorkProfileRowIxCols { - 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 WoodenFishWorkProfileRow {} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/wooden_fish_work_profile_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/wooden_fish_work_profile_table.rs deleted file mode 100644 index aa9904114..000000000 --- a/server-rs/crates/spacetime-client/src/module_bindings/wooden_fish_work_profile_table.rs +++ /dev/null @@ -1,231 +0,0 @@ -// 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::wooden_fish_work_profile_row_type::WoodenFishWorkProfileRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; - -/// Table handle for the table `wooden_fish_work_profile`. -/// -/// Obtain a handle from the [`WoodenFishWorkProfileTableAccess::wooden_fish_work_profile`] method on [`super::RemoteTables`], -/// like `ctx.db.wooden_fish_work_profile()`. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.wooden_fish_work_profile().on_insert(...)`. -pub struct WoodenFishWorkProfileTableHandle<'ctx> { - imp: __sdk::TableHandle, - ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -/// Lifetime-aware accessor marker for the table `wooden_fish_work_profile`. -pub struct WoodenFishWorkProfileTableAccessor; - -impl __sdk::TableAccessor for WoodenFishWorkProfileTableAccessor { - type Row = WoodenFishWorkProfileRow; - type Handle<'db> = WoodenFishWorkProfileTableHandle<'db>; - - fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { - db.wooden_fish_work_profile() - } -} - -#[allow(non_camel_case_types)] -/// Extension trait for access to the table `wooden_fish_work_profile`. -/// -/// Implemented for [`super::RemoteTables`]. -pub trait WoodenFishWorkProfileTableAccess { - #[allow(non_snake_case)] - /// Obtain a [`WoodenFishWorkProfileTableHandle`], which mediates access to the table `wooden_fish_work_profile`. - fn wooden_fish_work_profile(&self) -> WoodenFishWorkProfileTableHandle<'_>; -} - -impl WoodenFishWorkProfileTableAccess for super::RemoteTables { - fn wooden_fish_work_profile(&self) -> WoodenFishWorkProfileTableHandle<'_> { - WoodenFishWorkProfileTableHandle { - imp: self - .imp - .get_table::("wooden_fish_work_profile"), - ctx: std::marker::PhantomData, - } - } -} - -pub struct WoodenFishWorkProfileInsertCallbackId(__sdk::CallbackId); -pub struct WoodenFishWorkProfileDeleteCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableLike for WoodenFishWorkProfileTableHandle<'ctx> { - type Row = WoodenFishWorkProfileRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } -} - -impl<'ctx> __sdk::Table for WoodenFishWorkProfileTableHandle<'ctx> { - type Row = WoodenFishWorkProfileRow; - type EventContext = super::EventContext; - - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } - - type InsertCallbackId = WoodenFishWorkProfileInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> WoodenFishWorkProfileInsertCallbackId { - WoodenFishWorkProfileInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: WoodenFishWorkProfileInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } - - type DeleteCallbackId = WoodenFishWorkProfileDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> WoodenFishWorkProfileDeleteCallbackId { - WoodenFishWorkProfileDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: WoodenFishWorkProfileDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -impl<'ctx> __sdk::WithInsert for WoodenFishWorkProfileTableHandle<'ctx> { - type InsertCallbackId = WoodenFishWorkProfileInsertCallbackId; - - fn on_insert( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> WoodenFishWorkProfileInsertCallbackId { - WoodenFishWorkProfileInsertCallbackId(self.imp.on_insert(Box::new(callback))) - } - - fn remove_on_insert(&self, callback: WoodenFishWorkProfileInsertCallbackId) { - self.imp.remove_on_insert(callback.0) - } -} - -impl<'ctx> __sdk::WithDelete for WoodenFishWorkProfileTableHandle<'ctx> { - type DeleteCallbackId = WoodenFishWorkProfileDeleteCallbackId; - - fn on_delete( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, - ) -> WoodenFishWorkProfileDeleteCallbackId { - WoodenFishWorkProfileDeleteCallbackId(self.imp.on_delete(Box::new(callback))) - } - - fn remove_on_delete(&self, callback: WoodenFishWorkProfileDeleteCallbackId) { - self.imp.remove_on_delete(callback.0) - } -} - -pub struct WoodenFishWorkProfileUpdateCallbackId(__sdk::CallbackId); - -impl<'ctx> __sdk::TableWithPrimaryKey for WoodenFishWorkProfileTableHandle<'ctx> { - type UpdateCallbackId = WoodenFishWorkProfileUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> WoodenFishWorkProfileUpdateCallbackId { - WoodenFishWorkProfileUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: WoodenFishWorkProfileUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -impl<'ctx> __sdk::WithUpdate for WoodenFishWorkProfileTableHandle<'ctx> { - type UpdateCallbackId = WoodenFishWorkProfileUpdateCallbackId; - - fn on_update( - &self, - callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, - ) -> WoodenFishWorkProfileUpdateCallbackId { - WoodenFishWorkProfileUpdateCallbackId(self.imp.on_update(Box::new(callback))) - } - - fn remove_on_update(&self, callback: WoodenFishWorkProfileUpdateCallbackId) { - self.imp.remove_on_update(callback.0) - } -} - -/// Access to the `profile_id` unique index on the table `wooden_fish_work_profile`, -/// which allows point queries on the field of the same name -/// via the [`WoodenFishWorkProfileProfileIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.wooden_fish_work_profile().profile_id().find(...)`. -pub struct WoodenFishWorkProfileProfileIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> WoodenFishWorkProfileTableHandle<'ctx> { - /// Get a handle on the `profile_id` unique index on the table `wooden_fish_work_profile`. - pub fn profile_id(&self) -> WoodenFishWorkProfileProfileIdUnique<'ctx> { - WoodenFishWorkProfileProfileIdUnique { - imp: self.imp.get_unique_constraint::("profile_id"), - phantom: std::marker::PhantomData, - } - } -} - -impl<'ctx> WoodenFishWorkProfileProfileIdUnique<'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 { - self.imp.find(col_val) - } -} - -#[doc(hidden)] -pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("wooden_fish_work_profile"); - _table.add_unique_constraint::("profile_id", |row| &row.profile_id); -} - -#[doc(hidden)] -pub(super) fn parse_table_update( - raw_updates: __ws::v2::TableUpdate, -) -> __sdk::Result<__sdk::TableUpdate> { - __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() - }) -} - -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `WoodenFishWorkProfileRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait wooden_fish_work_profileQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `WoodenFishWorkProfileRow`. - fn wooden_fish_work_profile(&self) -> __sdk::__query_builder::Table; -} - -impl wooden_fish_work_profileQueryTableAccess for __sdk::QueryTableAccessor { - fn wooden_fish_work_profile(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("wooden_fish_work_profile") - } -} diff --git a/server-rs/crates/spacetime-module/README.md b/server-rs/crates/spacetime-module/README.md index 8a645a68b..0b8b9230c 100644 --- a/server-rs/crates/spacetime-module/README.md +++ b/server-rs/crates/spacetime-module/README.md @@ -1,6 +1,6 @@ # spacetime-module 主工程 crate 说明 -日期:`2026-04-21` +日期:`2026-09-22` ## 1. crate 职责 @@ -14,81 +14,42 @@ ## 2. 当前阶段说明 -当前阶段已落下第一批真实 schema 骨架,并已补齐本地 standalone 启动脚本,先把 SpacetimeDB 进程入口、M3/M4 基础表以及 `M5 custom world / agent` 首批表骨架固定下来。 +当前阶段以 `src/active.rs` 的现役聚合入口为准,已覆盖资产管理、认证、AI 任务、runtime / profile、编辑器工程与精选、外部生成、游戏分发、后台存储和数据库迁移能力。 后续与本 crate 直接相关的任务包括: 1. 继续扩充模块聚合入口 -2. 继续设计表、reducer、view 的聚合方式 +2. 保持 table / reducer / view / procedure、迁移白名单和生成 bindings 同步 3. 接入身份 claims 透传 4. 在当前 scaffold 基础上接入 publish / dev 循环 -5. 在 `M7` 收口阶段拆分过大的 `src/lib.rs`,按 `runtime`、`gameplay/*`、`custom_world`、`asset_metadata`、`ai` 等业务与 SpacetimeDB 聚合层次重组目录,避免主工程 crate 回退成单大包 +5. 新增业务域时按 `src/active.rs` 的现役声明落位,禁止恢复已退役的 gameplay / custom_world / 逐玩法目录 当前已落地: 1. `spacetime-module` 真实 `cdylib` crate scaffold -2. `asset_object` 首版表骨架 -3. `bucket + object_key` 双列对象定位索引 -4. `module-assets` 的访问策略与字段校验类型接入 -5. 面向 Axum 的 `asset_object` 确认持久化入口 -6. `asset_entity_binding` 通用绑定表 -7. 面向 Axum 的 `bind_asset_object_to_entity_and_return` 绑定 procedure -8. `runtime_setting` 表与 procedure -9. `npc_state`、`story_session`、`story_event` -10. `battle_state`、`treasure_record` -11. `quest_record`、`quest_log` -12. `M5` 首批 `custom_world_profile / session / agent / gallery` 表骨架 -13. `custom world library / publish / gallery` Stage 2 procedures -14. `published profile compile` Stage 3 procedure -15. `publish_world` Stage 4 串联 procedure -16. `ai_task / ai_task_stage / ai_text_chunk / ai_result_reference` 首版 AI 真相表 -17. AI 任务最小 procedure / reducer: +2. `asset_object`、`asset_entity_binding` 与资产绑定 procedure +3. `runtime_setting`、`runtime_snapshot`、`user_browse_history` +4. `creation_entry_config`、`creation_entry_type_config`、`feature_gate_config` +5. 账号、身份、refresh session 与认证 procedure +6. profile / 钱包 / 充值 / 任务 / 邀请码 / 兑换码 / 埋点投影 +7. `ai_task`、`ai_task_stage`、`ai_text_chunk`、`ai_result_reference` 与任务事件 +8. 编辑器工程、画布、资源、素材、精选和编辑器 Agent 会话 +9. 外部生成任务、游戏分发、LLM Router、AGC 模型、外部 API Key、后台与错误报告存储 +10. 数据库导出 / 导入 / 分片导入 / operator 授权等通用迁移 procedure -- `create_ai_task` -- `create_ai_task_and_return` -- `start_ai_task` -- `start_ai_task_stage` -- `append_ai_text_chunk_and_return` -- `complete_ai_stage_and_return` -- `attach_ai_result_reference_and_return` -- `complete_ai_task_and_return` -- `fail_ai_task_and_return` -- `cancel_ai_task_and_return` +### 2.0.1 `runtime` 域落位 -18. `turn_in_quest` 与 `resolve_combat_action(Victory)` 到 `player_progression / chapter_progression` 的最小经验联动 +`src/runtime.rs` 只承担聚合职责,现役入口如下: -### 2.0.1 `runtime` 域拆分进度 +1. 表结构壳:`src/runtime/legacy_schema/{settings,snapshots,browse_history}.rs`、`src/legacy_schema/creation_entry_config.rs` +2. 现役 procedure / helper:`src/runtime/active/{settings,profile}.rs` +3. 独立配置与投影:`src/runtime/feature_gate_config.rs`、`src/runtime/analytics_date_dimension.rs` -截至 `2026-04-23`,`runtime` 域已完成第一轮真实内容拆分,根入口不再保留该域的业务 helper 实现。 - -当前 `src/runtime/` 的实际落位如下: - -1. `src/runtime/settings.rs` - - `runtime_setting` 表 - - setting 读取 / upsert procedure 与快照 helper -2. `src/runtime/snapshots.rs` - - `runtime_snapshot` 表 - - snapshot 读取 / upsert / delete helper -3. `src/runtime/browse_history.rs` - - `user_browse_history` 表 - - 浏览历史 list / upsert / clear procedure 与行转换 helper -4. `src/runtime/profile.rs` - - `profile_dashboard_state` - - `profile_wallet_ledger` - - `profile_played_world` - - `profile_save_archive` - - profile dashboard / ledger / play stats / save archive 投影与同步 helper - -`src/runtime/mod.rs` 当前只承担聚合职责: - -1. 声明 `settings / snapshots / browse_history / profile` -2. 对外统一使用 `pub use xxx::*;` 重新导出 - -后续新增 runtime 相关 table / reducer / procedure / helper 时,必须直接落到上述二级文件,禁止回写到 `src/lib.rs`。 +后续新增 runtime 相关 table / reducer / procedure / helper 时,必须直接落到对应二级文件,禁止回写到 `src/active.rs`;不得把同名旧根文件重新加入 `runtime.rs`。 ### 2.0.2 `ai` 域拆分进度 -截至 `2026-04-23`,`ai` 域也已完成第一轮真实内容拆分,根入口不再保留 `ai_task / ai_task_stage / ai_text_chunk / ai_result_reference` 的业务实现。 +截至 `2026-04-23`,`ai` 域也已完成第一轮真实内容拆分,根入口不再保留 `ai_task / ai_task_stage / ai_text_chunk / ai_result_reference / ai_task_event` 的业务实现。 当前 `src/ai/` 的实际落位如下: @@ -104,19 +65,19 @@ 3. `src/ai/snapshots.rs` - AI 任务、阶段、chunk、reference 的 row / snapshot 转换 helper -`src/ai/mod.rs` 当前只承担聚合职责: +`src/ai.rs` 当前只承担聚合职责: -1. 声明 `tasks / stages / snapshots` +1. 声明 `tasks / stages / snapshots / events` 2. 对外统一使用 `pub use xxx::*;` 3. 对内部共享的 row / snapshot helper 使用 `pub(crate) use snapshots::*;` -后续新增 AI 相关 table / reducer / procedure / helper 时,必须直接落到上述二级文件,禁止回写到 `src/lib.rs`。 +后续新增 AI 相关 table / reducer / procedure / helper 时,必须直接落到上述二级文件,禁止回写到 `src/active.rs`。 -## 2.1 `src/lib.rs` 拆分路由规则 +## 2.1 `src/active.rs` 聚合路由规则 -从 `2026-04-23` 起,`src/lib.rs` 不再允许继续承载具体业务域的 table / reducer / procedure / tx helper。 +从 `2026-04-23` 起,`src/active.rs` 不再承载具体业务域的 table / reducer / procedure / tx helper。 -根入口后续只允许保留: +根入口只允许保留: 1. `use` 聚合 2. `mod` 声明 @@ -125,62 +86,48 @@ 根入口与子模块的导入导出规则同步冻结为: -1. `src/lib.rs` 对外统一优先使用 `pub use xxx::*;` 重新导出模块内容 +1. `src/active.rs` 对外统一优先使用 `pub use xxx::*;` 重新导出模块内容 2. 已拆业务模块内部统一优先使用 `use crate::*;` 复用主入口已聚合的类型与函数 -3. 只有当 `use crate::*;` 无法覆盖或会引入明显歧义时,才补局部显式 `use` -4. 新增业务域内容禁止为了堆 `use` 列表再回写到 `src/lib.rs` +3. 只有 `use crate::*;` 无法覆盖或会引入明显歧义时,才补局部显式 `use` +4. 新增业务域内容禁止为了堆 `use` 列表再回写到 `src/active.rs` -具体内容必须落到下面的模块: +当前业务内容按以下入口落位: -1. `src/entry.rs` - - SpacetimeDB `init` 入口 -2. `src/domain_types.rs` - - 跨域共享的 SpacetimeDB 类型 -3. `src/asset_metadata/` +1. `src/asset_metadata/` - 资产对象与资产绑定真相表 -4. `src/big_fish/` - - Big Fish 创作与运行态 -5. `src/runtime/` - - runtime setting / snapshot / browse history / profile 投影 -6. `src/gameplay/` - - `story / combat / inventory / npc / quest / runtime_item / progression` -7. `src/custom_world/` - - custom world profile / session / agent / publishing / gallery / works -8. `src/ai/` - - ai task / stage / chunk / result reference -9. `src/puzzle.rs` - - 拼图玩法当前仍为单文件域模块 +2. `src/auth/` + - 登录身份、账号、refresh session 和认证 procedure +3. `src/ai/` + - AI task / stage / chunk / result reference / event +4. `src/runtime/` + - runtime setting / snapshot / browse history / profile / 入口配置 / 功能灰度 / 日期维度 +5. `src/editor_project_storage.rs` + - 编辑器工程、画布、资源、素材、精选和生成幂等 +6. `src/editor_agent_storage.rs` + - 编辑器 Agent 会话存储 +7. 其它单一领域存储入口 + - `admin_account_storage.rs`、`admin_dashboard.rs`、`agc_models.rs`、`error_report.rs`、`external_api_key_storage.rs`、`external_generation.rs`、`game_distribution.rs`、`llm_router_account.rs`、`migration.rs` ### 已冻结的二级模块落位点 1. `src/asset_metadata/objects.rs` 2. `src/asset_metadata/bindings.rs` -3. `src/big_fish/tables.rs` -4. `src/big_fish/session.rs` -5. `src/big_fish/assets.rs` -6. `src/big_fish/runtime.rs` -7. `src/runtime/settings.rs` -8. `src/runtime/snapshots.rs` -9. `src/runtime/browse_history.rs` -10. `src/runtime/profile.rs` -11. `src/gameplay/combat.rs` -12. `src/gameplay/inventory.rs` -13. `src/gameplay/npc.rs` -14. `src/gameplay/progression.rs` -15. `src/gameplay/quest.rs` -16. `src/gameplay/runtime_item.rs` -17. `src/gameplay/story.rs` -18. `src/custom_world/profile.rs` -19. `src/custom_world/session.rs` -20. `src/custom_world/agent.rs` -21. `src/custom_world/publishing.rs` -22. `src/custom_world/gallery.rs` -23. `src/custom_world/works.rs` -24. `src/ai/tasks.rs` -25. `src/ai/stages.rs` -26. `src/ai/snapshots.rs` +3. `src/auth/tables.rs` +4. `src/auth/procedures.rs` +5. `src/ai/tasks.rs` +6. `src/ai/stages.rs` +7. `src/ai/snapshots.rs` +8. `src/ai/events.rs` +9. `src/runtime/active/settings.rs` +10. `src/runtime/active/profile.rs` +11. `src/runtime/legacy_schema/settings.rs` +12. `src/runtime/legacy_schema/snapshots.rs` +13. `src/runtime/legacy_schema/browse_history.rs` +14. `src/legacy_schema/creation_entry_config.rs` +15. `src/runtime/feature_gate_config.rs` +16. `src/runtime/analytics_date_dimension.rs` -后续如果新增 SpacetimeDB 表、reducer、procedure 或同域 helper,必须先判断属于哪个一级模块与二级落位点,再写入对应文件;禁止直接追加到 `src/lib.rs`。 +后续如果新增 SpacetimeDB 表、reducer、procedure 或同域 helper,必须先判断属于哪个一级模块与二级落位点,再写入对应文件;禁止直接追加到 `src/active.rs`,也禁止恢复已删除的旧创作模板域目录。 ## 当前文档入口 @@ -197,4 +144,4 @@ 1. `spacetime-module` 只聚合状态模型,不直接承接 HTTP、Cookie、Header、OSS、短信、微信、LLM 等外部副作用。 2. 每个业务模块优先在自己的 `crates/module-*` 中定义状态与规则,再由主工程聚合。 3. 主工程不重新吞并各模块实现细节,避免回到单大包结构。 -4. `custom_world_asset_link` 仍等待 `M6 assets / OSS` 的对象槽位规则冻结后再补,不在本轮首批表骨架内提前硬落。 +4. 新增跨域状态必须先在对应 `module-*` 定义领域规则,再由 `spacetime-module` 聚合;不得从历史源码恢复已退役模块。 diff --git a/server-rs/crates/spacetime-module/src/active.rs b/server-rs/crates/spacetime-module/src/active.rs index cde34cbe6..04ebe6dfc 100644 --- a/server-rs/crates/spacetime-module/src/active.rs +++ b/server-rs/crates/spacetime-module/src/active.rs @@ -17,12 +17,6 @@ mod agc_models; mod ai; mod asset_metadata; mod auth; -#[path = "legacy_schema/bark_battle.rs"] -mod bark_battle; -#[path = "legacy_schema/big_fish.rs"] -mod big_fish; -#[path = "legacy_schema/custom_world.rs"] -mod custom_world; mod editor_agent_storage; mod editor_project_storage; #[path = "error_report.rs"] @@ -30,52 +24,26 @@ mod error_reports_schema; mod external_api_key_storage; mod external_generation; mod game_distribution; -#[path = "legacy_schema/gameplay.rs"] -mod gameplay; -#[path = "legacy_schema/jump_hop.rs"] -mod jump_hop; #[path = "llm_router_account.rs"] mod llm_router_account_storage; pub use agc_models::*; -#[path = "legacy_schema/match3d.rs"] -mod match3d; mod migration; -#[path = "legacy_schema/puzzle.rs"] -mod puzzle; -#[path = "legacy_schema/puzzle_clear.rs"] -mod puzzle_clear; mod runtime; -#[path = "legacy_schema/square_hole.rs"] -mod square_hole; -#[path = "legacy_schema/visual_novel.rs"] -mod visual_novel; -#[path = "legacy_schema/wooden_fish.rs"] -mod wooden_fish; pub use admin_account_storage::*; pub use admin_dashboard::*; pub use ai::*; pub use asset_metadata::*; pub use auth::*; -pub use bark_battle::*; -pub use big_fish::*; -pub use custom_world::*; pub use editor_agent_storage::*; pub use editor_project_storage::*; pub use error_reports_schema::*; pub use external_api_key_storage::*; pub use external_generation::*; pub use game_distribution::*; -pub use gameplay::*; -pub use jump_hop::*; pub use llm_router_account_storage::*; -pub use match3d::*; pub use migration::*; -pub use puzzle_clear::*; pub use runtime::*; -pub use square_hole::*; -pub use visual_novel::*; -pub use wooden_fish::*; // Host-side unit tests need to link the module crate as a normal test binary. // SpacetimeDB's raw ABI imports only exist in the WASM host, so provide diff --git a/server-rs/crates/spacetime-module/src/bark_battle/tables.rs b/server-rs/crates/spacetime-module/src/bark_battle/tables.rs deleted file mode 100644 index bb9398eb5..000000000 --- a/server-rs/crates/spacetime-module/src/bark_battle/tables.rs +++ /dev/null @@ -1,177 +0,0 @@ -use crate::*; - -pub(super) const WORK_VISIBLE_DEFAULT: bool = false; - -#[spacetimedb::table( - accessor = bark_battle_draft_config, - index(accessor = by_bark_battle_draft_owner_user_id, btree(columns = [owner_user_id])), - index(accessor = by_bark_battle_draft_work_id, btree(columns = [work_id])) -)] -#[derive(Clone)] -pub struct BarkBattleDraftConfigRow { - #[primary_key] - pub(crate) draft_id: String, - pub(crate) owner_user_id: String, - pub(crate) work_id: String, - pub(crate) config_version: u64, - pub(crate) ruleset_version: String, - pub(crate) difficulty_preset: String, - pub(crate) leaderboard_enabled: bool, - pub(crate) config_json: String, - pub(crate) editor_state_json: String, - pub(crate) created_at: Timestamp, - pub(crate) updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = bark_battle_published_config, - index(accessor = by_bark_battle_published_owner_user_id, btree(columns = [owner_user_id])) -)] -#[derive(Clone)] -pub struct BarkBattlePublishedConfigRow { - #[primary_key] - pub(crate) work_id: String, - pub(crate) owner_user_id: String, - pub(crate) source_draft_id: Option, - pub(crate) config_version: u64, - pub(crate) ruleset_version: String, - pub(crate) difficulty_preset: String, - pub(crate) leaderboard_enabled: bool, - pub(crate) config_json: String, - pub(crate) published_snapshot_json: String, - pub(crate) created_at: Timestamp, - pub(crate) updated_at: Timestamp, - pub(crate) published_at: Timestamp, - // 后台可见性开关;新作品默认不公开,开启后才进入公开列表。 - #[default(WORK_VISIBLE_DEFAULT)] - pub(crate) visible: bool, -} - -#[spacetimedb::table( - accessor = bark_battle_runtime_run, - index(accessor = by_bark_battle_run_owner_user_id, btree(columns = [owner_user_id])), - index(accessor = by_bark_battle_run_work_id, btree(columns = [work_id])) -)] -#[derive(Clone)] -pub struct BarkBattleRuntimeRunRow { - #[primary_key] - pub(crate) run_id: String, - pub(crate) run_token_hash: String, - pub(crate) owner_user_id: String, - pub(crate) work_id: String, - pub(crate) config_version: u64, - pub(crate) ruleset_version: String, - pub(crate) difficulty_preset: String, - pub(crate) leaderboard_enabled: bool, - pub(crate) status: String, - pub(crate) client_started_at_micros: i64, - pub(crate) server_started_at: Timestamp, - pub(crate) client_finished_at_micros: Option, - pub(crate) server_finished_at: Option, - pub(crate) metrics_json: String, - pub(crate) server_result: Option, - pub(crate) validation_status: String, - pub(crate) anti_cheat_flags_json: String, - pub(crate) leaderboard_score: Option, - pub(crate) score_id: Option, - pub(crate) created_at: Timestamp, - pub(crate) updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = bark_battle_score_record, - index(accessor = by_bark_battle_score_owner_user_id, btree(columns = [owner_user_id])), - index(accessor = by_bark_battle_score_work_id, btree(columns = [work_id])), - index(accessor = by_bark_battle_score_run_id, btree(columns = [run_id])) -)] -#[derive(Clone)] -pub struct BarkBattleScoreRecordRow { - #[primary_key] - pub(crate) score_id: String, - pub(crate) owner_user_id: String, - pub(crate) work_id: String, - pub(crate) run_id: String, - pub(crate) config_version: u64, - pub(crate) ruleset_version: String, - pub(crate) difficulty_preset: String, - pub(crate) leaderboard_enabled: bool, - pub(crate) metrics_json: String, - pub(crate) derived_metrics_json: String, - pub(crate) server_result: String, - pub(crate) validation_status: String, - pub(crate) anti_cheat_flags_json: String, - pub(crate) leaderboard_score: Option, - pub(crate) recorded_at: Timestamp, -} - -#[spacetimedb::table( - accessor = bark_battle_leaderboard_entry, - index(accessor = by_bark_battle_leaderboard_work_score, btree(columns = [work_id, leaderboard_score])), - index(accessor = by_bark_battle_leaderboard_owner_work, btree(columns = [owner_user_id, work_id])) -)] -#[derive(Clone)] -pub struct BarkBattleLeaderboardEntryRow { - #[primary_key] - pub(crate) leaderboard_entry_id: String, - pub(crate) work_id: String, - pub(crate) owner_user_id: String, - pub(crate) run_id: String, - pub(crate) score_id: String, - pub(crate) leaderboard_score: u64, - pub(crate) final_energy: f32, - pub(crate) trigger_count: u64, - pub(crate) max_volume: f32, - pub(crate) duration_closeness_ms: u64, - pub(crate) finished_at_micros: i64, - pub(crate) created_at: Timestamp, - pub(crate) updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = bark_battle_work_stats_projection, - index(accessor = by_bark_battle_work_stats_owner_user_id, btree(columns = [owner_user_id])) -)] -#[derive(Clone)] -pub struct BarkBattleWorkStatsProjectionRow { - #[primary_key] - pub(crate) work_id: String, - pub(crate) owner_user_id: String, - pub(crate) play_count: u64, - pub(crate) finished_count: u64, - pub(crate) accepted_score_count: u64, - pub(crate) leaderboard_entry_count: u64, - pub(crate) best_leaderboard_score: Option, - pub(crate) best_score_id: Option, - pub(crate) best_run_id: Option, - pub(crate) average_final_energy: f32, - pub(crate) average_trigger_count: f32, - pub(crate) last_finished_at_micros: Option, - pub(crate) stats_json: String, - pub(crate) updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = bark_battle_personal_best_projection, - index(accessor = by_bark_battle_personal_best_work_id, btree(columns = [work_id])), - index(accessor = by_bark_battle_personal_best_owner_work, btree(columns = [owner_user_id, work_id])) -)] -#[derive(Clone)] -pub struct BarkBattlePersonalBestProjectionRow { - #[primary_key] - pub(crate) personal_best_id: String, - pub(crate) owner_user_id: String, - pub(crate) work_id: String, - pub(crate) run_id: String, - pub(crate) score_id: String, - pub(crate) leaderboard_entry_id: Option, - pub(crate) leaderboard_score: Option, - pub(crate) final_energy: f32, - pub(crate) trigger_count: u64, - pub(crate) max_volume: f32, - pub(crate) duration_closeness_ms: u64, - pub(crate) server_result: String, - pub(crate) validation_status: String, - pub(crate) finished_at_micros: i64, - pub(crate) summary_json: String, - pub(crate) updated_at: Timestamp, -} diff --git a/server-rs/crates/spacetime-module/src/big_fish/events.rs b/server-rs/crates/spacetime-module/src/big_fish/events.rs deleted file mode 100644 index cd2745e13..000000000 --- a/server-rs/crates/spacetime-module/src/big_fish/events.rs +++ /dev/null @@ -1,59 +0,0 @@ -use crate::*; - -/// Big Fish 创作事件类型。 -/// -/// 事件表只承接跨层订阅和审计所需的轻量事实,正式作品状态仍以 -/// `big_fish_creation_session` 和 `big_fish_asset_slot` 为准。 -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum BigFishEventKind { - PublishReadinessEvaluated, -} - -#[spacetimedb::table( - accessor = big_fish_event, - public, - event, - index(accessor = by_big_fish_event_session_id, btree(columns = [session_id])), - index(accessor = by_big_fish_event_owner_user_id, btree(columns = [owner_user_id])) -)] -pub struct BigFishEvent { - #[primary_key] - pub(crate) event_id: String, - pub(crate) session_id: String, - pub(crate) owner_user_id: String, - pub(crate) event_kind: BigFishEventKind, - pub(crate) publish_ready: bool, - pub(crate) blockers_json: String, - pub(crate) occurred_at: Timestamp, -} - -pub(crate) fn emit_big_fish_publish_readiness_event( - ctx: &ReducerContext, - event: BigFishDomainEvent, -) -> Result<(), String> { - let BigFishDomainEvent::PublishReadinessEvaluated { - session_id, - owner_user_id, - publish_ready, - blockers, - occurred_at_micros, - } = event - else { - return Ok(()); - }; - - let blockers_json = serde_json::to_string(&blockers) - .map_err(|error| format!("big_fish.publish_readiness.blockers 序列化失败: {error}"))?; - let state_slug = if publish_ready { "ready" } else { "blocked" }; - ctx.db.big_fish_event().insert(BigFishEvent { - event_id: format!("bfevt_{session_id}_{occurred_at_micros}_{state_slug}"), - session_id, - owner_user_id, - event_kind: BigFishEventKind::PublishReadinessEvaluated, - publish_ready, - blockers_json, - occurred_at: Timestamp::from_micros_since_unix_epoch(occurred_at_micros), - }); - - Ok(()) -} diff --git a/server-rs/crates/spacetime-module/src/big_fish/tables.rs b/server-rs/crates/spacetime-module/src/big_fish/tables.rs deleted file mode 100644 index fe0acb0ca..000000000 --- a/server-rs/crates/spacetime-module/src/big_fish/tables.rs +++ /dev/null @@ -1,86 +0,0 @@ -use crate::*; - -pub(super) const WORK_VISIBLE_DEFAULT: bool = false; - -#[spacetimedb::table( - accessor = big_fish_creation_session, - index(accessor = by_big_fish_session_owner_user_id, btree(columns = [owner_user_id])), - index(accessor = by_big_fish_session_stage, btree(columns = [stage])) -)] -pub struct BigFishCreationSession { - #[primary_key] - pub(crate) session_id: String, - pub(crate) owner_user_id: String, - pub(crate) seed_text: String, - pub(crate) current_turn: u32, - pub(crate) progress_percent: u32, - pub(crate) stage: BigFishCreationStage, - pub(crate) anchor_pack_json: String, - pub(crate) draft_json: Option, - pub(crate) asset_coverage_json: String, - pub(crate) last_assistant_reply: Option, - pub(crate) publish_ready: bool, - pub(crate) created_at: Timestamp, - pub(crate) updated_at: Timestamp, - #[default(0)] - pub(crate) play_count: u32, - #[default(0)] - pub(crate) remix_count: u32, - #[default(0)] - pub(crate) like_count: u32, - #[default(None::)] - pub(crate) published_at: Option, - // 后台可见性开关;新作品默认不公开,开启后才进入公开列表。 - #[default(WORK_VISIBLE_DEFAULT)] - pub(crate) visible: bool, -} - -#[spacetimedb::table( - accessor = big_fish_agent_message, - index(accessor = by_big_fish_message_session_id, btree(columns = [session_id])) -)] -pub struct BigFishAgentMessage { - #[primary_key] - pub(crate) message_id: String, - pub(crate) session_id: String, - pub(crate) role: BigFishAgentMessageRole, - pub(crate) kind: BigFishAgentMessageKind, - pub(crate) text: String, - pub(crate) created_at: Timestamp, -} - -#[spacetimedb::table( - accessor = big_fish_asset_slot, - index(accessor = by_big_fish_asset_session_id, btree(columns = [session_id])) -)] -pub struct BigFishAssetSlot { - #[primary_key] - pub(crate) slot_id: String, - pub(crate) session_id: String, - pub(crate) asset_kind: BigFishAssetKind, - pub(crate) level: Option, - pub(crate) motion_key: Option, - pub(crate) status: BigFishAssetStatus, - pub(crate) asset_url: Option, - pub(crate) prompt_snapshot: String, - pub(crate) updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = big_fish_runtime_run, - index(accessor = by_big_fish_run_owner_user_id, btree(columns = [owner_user_id])), - index(accessor = by_big_fish_run_session_id, btree(columns = [session_id])) -)] -pub struct BigFishRuntimeRun { - #[primary_key] - pub(crate) run_id: String, - pub(crate) session_id: String, - pub(crate) owner_user_id: String, - pub(crate) status: BigFishRunStatus, - pub(crate) snapshot_json: String, - pub(crate) last_input_x: f32, - pub(crate) last_input_y: f32, - pub(crate) tick: u64, - pub(crate) created_at: Timestamp, - pub(crate) updated_at: Timestamp, -} diff --git a/server-rs/crates/spacetime-module/src/jump_hop/tables.rs b/server-rs/crates/spacetime-module/src/jump_hop/tables.rs deleted file mode 100644 index 38611c169..000000000 --- a/server-rs/crates/spacetime-module/src/jump_hop/tables.rs +++ /dev/null @@ -1,121 +0,0 @@ -use crate::*; - -pub(super) const WORK_VISIBLE_DEFAULT: bool = false; - -#[spacetimedb::table( - accessor = jump_hop_agent_session, - index(accessor = by_jump_hop_agent_session_owner_user_id, btree(columns = [owner_user_id])) -)] -pub struct JumpHopAgentSessionRow { - #[primary_key] - pub(crate) session_id: String, - pub(crate) owner_user_id: String, - pub(crate) seed_text: String, - pub(crate) current_turn: u32, - pub(crate) progress_percent: u32, - pub(crate) stage: String, - pub(crate) config_json: String, - pub(crate) draft_json: String, - pub(crate) last_assistant_reply: String, - pub(crate) published_profile_id: String, - pub(crate) created_at: Timestamp, - pub(crate) updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = jump_hop_work_profile, - index(accessor = by_jump_hop_work_owner_user_id, btree(columns = [owner_user_id])), - index(accessor = by_jump_hop_work_publication_status, btree(columns = [publication_status])) -)] -pub struct JumpHopWorkProfileRow { - #[primary_key] - pub(crate) profile_id: String, - pub(crate) work_id: String, - pub(crate) owner_user_id: String, - pub(crate) source_session_id: String, - pub(crate) author_display_name: String, - pub(crate) work_title: String, - pub(crate) work_description: String, - pub(crate) theme_tags_json: String, - pub(crate) difficulty: String, - pub(crate) style_preset: String, - pub(crate) character_prompt: String, - pub(crate) tile_prompt: String, - pub(crate) end_mood_prompt: String, - pub(crate) character_asset_json: String, - pub(crate) tile_atlas_asset_json: String, - pub(crate) tile_assets_json: String, - pub(crate) path_json: String, - pub(crate) cover_image_src: String, - pub(crate) cover_composite: String, - pub(crate) generation_status: String, - pub(crate) publication_status: String, - pub(crate) play_count: u32, - pub(crate) updated_at: Timestamp, - pub(crate) published_at: Option, - // 后台可见性开关;新作品默认不公开,开启后才进入公开列表。 - #[default(WORK_VISIBLE_DEFAULT)] - pub(crate) visible: bool, - // 跳一跳生成主题独立于作品标题;旧行按 work_title 兜底。 - #[default(None::)] - pub(crate) theme_text: Option, - // 跳一跳左上角真实可点击返回按钮的独立透明资产快照;旧行为空时运行态使用样式兜底。 - #[default(None::)] - pub(crate) back_button_asset_json: Option, -} - -#[spacetimedb::table( - accessor = jump_hop_runtime_run, - index(accessor = by_jump_hop_run_owner_user_id, btree(columns = [owner_user_id])), - index(accessor = by_jump_hop_run_profile_id, btree(columns = [profile_id])) -)] -pub struct JumpHopRuntimeRunRow { - #[primary_key] - pub(crate) run_id: String, - pub(crate) owner_user_id: String, - pub(crate) profile_id: String, - pub(crate) status: String, - pub(crate) started_at_ms: i64, - pub(crate) finished_at_ms: i64, - pub(crate) current_platform_index: u32, - pub(crate) score: u32, - pub(crate) combo: u32, - pub(crate) snapshot_json: String, - pub(crate) created_at: Timestamp, - pub(crate) updated_at: Timestamp, - // draft / published,用于隔离试玩统计和公开排行榜;旧行按 published 兜底。 - #[default(None::)] - pub(crate) runtime_mode: Option, -} - -#[spacetimedb::table( - accessor = jump_hop_event, - index(accessor = by_jump_hop_event_profile_id, btree(columns = [profile_id])), - index(accessor = by_jump_hop_event_run_id, btree(columns = [run_id])) -)] -pub struct JumpHopEventRow { - #[primary_key] - pub(crate) event_id: String, - pub(crate) owner_user_id: String, - pub(crate) profile_id: String, - pub(crate) run_id: String, - pub(crate) event_type: String, - pub(crate) result: String, - pub(crate) occurred_at: Timestamp, -} - -#[spacetimedb::table( - accessor = jump_hop_leaderboard_entry, - index(accessor = by_jump_hop_leaderboard_profile_id, btree(columns = [profile_id])), - index(accessor = by_jump_hop_leaderboard_player_profile, btree(columns = [player_id, profile_id])) -)] -pub struct JumpHopLeaderboardEntryRow { - #[primary_key] - pub(crate) entry_id: String, - pub(crate) profile_id: String, - pub(crate) player_id: String, - pub(crate) successful_jump_count: u32, - pub(crate) duration_ms: u64, - pub(crate) run_id: String, - pub(crate) updated_at: Timestamp, -} diff --git a/server-rs/crates/spacetime-module/src/legacy_schema/bark_battle.rs b/server-rs/crates/spacetime-module/src/legacy_schema/bark_battle.rs deleted file mode 100644 index a52234292..000000000 --- a/server-rs/crates/spacetime-module/src/legacy_schema/bark_battle.rs +++ /dev/null @@ -1,4 +0,0 @@ -#[path = "../bark_battle/tables.rs"] -pub(crate) mod tables; - -pub use tables::*; diff --git a/server-rs/crates/spacetime-module/src/legacy_schema/big_fish.rs b/server-rs/crates/spacetime-module/src/legacy_schema/big_fish.rs deleted file mode 100644 index 2b2ead424..000000000 --- a/server-rs/crates/spacetime-module/src/legacy_schema/big_fish.rs +++ /dev/null @@ -1,53 +0,0 @@ -#[path = "big_fish/events.rs"] -mod events; -#[path = "../big_fish/tables.rs"] -mod tables; - -pub(crate) use events::*; -pub use tables::*; - -use crate::SpacetimeType; - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum BigFishCreationStage { - CollectingAnchors, - DraftReady, - AssetRefining, - ReadyToPublish, - Published, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum BigFishAgentMessageRole { - User, - Assistant, - System, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum BigFishAgentMessageKind { - Chat, - Summary, - ActionResult, - Warning, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum BigFishAssetKind { - LevelMainImage, - LevelMotion, - StageBackground, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum BigFishAssetStatus { - Missing, - Ready, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum BigFishRunStatus { - Running, - Won, - Failed, -} diff --git a/server-rs/crates/spacetime-module/src/legacy_schema/big_fish/events.rs b/server-rs/crates/spacetime-module/src/legacy_schema/big_fish/events.rs deleted file mode 100644 index 93042bdd4..000000000 --- a/server-rs/crates/spacetime-module/src/legacy_schema/big_fish/events.rs +++ /dev/null @@ -1,24 +0,0 @@ -use crate::*; - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum BigFishEventKind { - PublishReadinessEvaluated, -} - -#[spacetimedb::table( - accessor = big_fish_event, - public, - event, - index(accessor = by_big_fish_event_session_id, btree(columns = [session_id])), - index(accessor = by_big_fish_event_owner_user_id, btree(columns = [owner_user_id])) -)] -pub struct BigFishEvent { - #[primary_key] - pub(crate) event_id: String, - pub(crate) session_id: String, - pub(crate) owner_user_id: String, - pub(crate) event_kind: BigFishEventKind, - pub(crate) publish_ready: bool, - pub(crate) blockers_json: String, - pub(crate) occurred_at: Timestamp, -} diff --git a/server-rs/crates/spacetime-module/src/legacy_schema/custom_world.rs b/server-rs/crates/spacetime-module/src/legacy_schema/custom_world.rs deleted file mode 100644 index e200feec6..000000000 --- a/server-rs/crates/spacetime-module/src/legacy_schema/custom_world.rs +++ /dev/null @@ -1,305 +0,0 @@ -use crate::*; - -const WORK_VISIBLE_DEFAULT: bool = false; - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum CustomWorldPublicationStatus { - Draft, - Published, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum CustomWorldThemeMode { - Martial, - Arcane, - Machina, - Tide, - Rift, - Mythic, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum CustomWorldGenerationMode { - Fast, - Full, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum CustomWorldSessionStatus { - Clarifying, - ReadyToGenerate, - Generating, - Completed, - GenerationError, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum RpgAgentStage { - CollectingIntent, - Clarifying, - FoundationReview, - ObjectRefining, - VisualRefining, - LongTailReview, - ReadyToPublish, - Published, - Error, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum RpgAgentMessageRole { - User, - Assistant, - System, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum RpgAgentMessageKind { - Chat, - Clarification, - Summary, - Checkpoint, - Warning, - ActionResult, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum RpgAgentOperationType { - ProcessMessage, - DraftFoundation, - UpdateDraftCard, - SyncResultProfile, - GenerateCharacters, - GenerateLandmarks, - DeleteCharacters, - DeleteLandmarks, - GenerateRoleAssets, - SyncRoleAssets, - GenerateSceneAssets, - SyncSceneAssets, - ExpandLongTail, - PublishWorld, - RevertCheckpoint, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum RpgAgentOperationStatus { - Queued, - Running, - Completed, - Failed, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum RpgAgentDraftCardKind { - World, - Camp, - Faction, - Character, - Landmark, - Thread, - Chapter, - SceneChapter, - Carrier, - SidequestSeed, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum RpgAgentDraftCardStatus { - Suggested, - Confirmed, - Locked, - Warning, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum CustomWorldRoleAssetStatus { - Missing, - VisualReady, - AnimationsReady, - Complete, -} - -#[spacetimedb::table( - accessor = custom_world_profile, - index(accessor = by_custom_world_profile_owner_user_id, btree(columns = [owner_user_id])), - index( - accessor = by_custom_world_profile_publication_status, - btree(columns = [publication_status]) - ) -)] -pub struct CustomWorldProfile { - #[primary_key] - pub(crate) profile_id: String, - pub(crate) owner_user_id: String, - pub(crate) public_work_code: Option, - pub(crate) author_public_user_code: Option, - pub(crate) source_agent_session_id: Option, - pub(crate) publication_status: CustomWorldPublicationStatus, - pub(crate) world_name: String, - pub(crate) subtitle: String, - pub(crate) summary_text: String, - pub(crate) theme_mode: CustomWorldThemeMode, - pub(crate) cover_image_src: Option, - pub(crate) profile_payload_json: String, - pub(crate) playable_npc_count: u32, - pub(crate) landmark_count: u32, - #[default(0)] - pub(crate) play_count: u32, - #[default(0)] - pub(crate) remix_count: u32, - #[default(0)] - pub(crate) like_count: u32, - pub(crate) author_display_name: String, - pub(crate) published_at: Option, - pub(crate) deleted_at: Option, - pub(crate) created_at: Timestamp, - pub(crate) updated_at: Timestamp, - #[default(WORK_VISIBLE_DEFAULT)] - pub(crate) visible: bool, -} - -#[spacetimedb::table( - accessor = custom_world_session, - index(accessor = by_custom_world_session_owner_user_id, btree(columns = [owner_user_id])) -)] -pub struct CustomWorldSession { - #[primary_key] - session_id: String, - owner_user_id: String, - generation_mode: CustomWorldGenerationMode, - status: CustomWorldSessionStatus, - setting_text: String, - creator_intent_json: Option, - question_snapshot_json: String, - result_payload_json: Option, - last_error_message: Option, - created_at: Timestamp, - updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = custom_world_agent_session, - index( - accessor = by_custom_world_agent_session_owner_user_id, - btree(columns = [owner_user_id]) - ), - index(accessor = by_custom_world_agent_session_stage, btree(columns = [stage])) -)] -pub struct CustomWorldAgentSession { - #[primary_key] - session_id: String, - owner_user_id: String, - seed_text: String, - current_turn: u32, - progress_percent: u32, - stage: RpgAgentStage, - focus_card_id: Option, - anchor_content_json: String, - creator_intent_json: Option, - creator_intent_readiness_json: String, - anchor_pack_json: Option, - lock_state_json: Option, - draft_profile_json: Option, - last_assistant_reply: Option, - publish_gate_json: Option, - result_preview_json: Option, - pending_clarifications_json: String, - quality_findings_json: String, - suggested_actions_json: String, - recommended_replies_json: String, - asset_coverage_json: String, - checkpoints_json: String, - created_at: Timestamp, - updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = custom_world_agent_message, - index(accessor = by_custom_world_agent_message_session_id, btree(columns = [session_id])) -)] -pub struct CustomWorldAgentMessage { - #[primary_key] - message_id: String, - session_id: String, - role: RpgAgentMessageRole, - kind: RpgAgentMessageKind, - text: String, - related_operation_id: Option, - created_at: Timestamp, -} - -#[derive(Clone)] -#[spacetimedb::table( - accessor = custom_world_agent_operation, - index(accessor = by_custom_world_agent_operation_session_id, btree(columns = [session_id])) -)] -pub struct CustomWorldAgentOperation { - #[primary_key] - operation_id: String, - session_id: String, - operation_type: RpgAgentOperationType, - status: RpgAgentOperationStatus, - phase_label: String, - phase_detail: String, - progress: u32, - error_message: Option, - created_at: Timestamp, - updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = custom_world_draft_card, - index(accessor = by_custom_world_draft_card_session_id, btree(columns = [session_id])), - index(accessor = by_custom_world_draft_card_kind, btree(columns = [kind])) -)] -pub struct CustomWorldDraftCard { - #[primary_key] - card_id: String, - session_id: String, - kind: RpgAgentDraftCardKind, - status: RpgAgentDraftCardStatus, - title: String, - subtitle: String, - summary: String, - linked_ids_json: String, - warning_count: u32, - asset_status: Option, - asset_status_label: Option, - detail_payload_json: Option, - created_at: Timestamp, - updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = custom_world_gallery_entry, - public, - index(accessor = by_custom_world_gallery_owner_user_id, btree(columns = [owner_user_id])), - index(accessor = by_custom_world_gallery_theme_mode, btree(columns = [theme_mode])), - index(accessor = by_custom_world_gallery_public_work_code, btree(columns = [public_work_code])) -)] -pub struct CustomWorldGalleryEntry { - #[primary_key] - pub(crate) profile_id: String, - pub(crate) owner_user_id: String, - pub(crate) public_work_code: String, - pub(crate) author_public_user_code: String, - pub(crate) author_display_name: String, - pub(crate) world_name: String, - pub(crate) subtitle: String, - pub(crate) summary_text: String, - pub(crate) cover_image_src: Option, - pub(crate) theme_mode: CustomWorldThemeMode, - pub(crate) playable_npc_count: u32, - pub(crate) landmark_count: u32, - #[default(0)] - pub(crate) play_count: u32, - #[default(0)] - pub(crate) remix_count: u32, - #[default(0)] - pub(crate) like_count: u32, - pub(crate) published_at: Timestamp, - pub(crate) updated_at: Timestamp, - #[default(WORK_VISIBLE_DEFAULT)] - pub(crate) visible: bool, -} diff --git a/server-rs/crates/spacetime-module/src/legacy_schema/gameplay.rs b/server-rs/crates/spacetime-module/src/legacy_schema/gameplay.rs deleted file mode 100644 index 06abf1d6b..000000000 --- a/server-rs/crates/spacetime-module/src/legacy_schema/gameplay.rs +++ /dev/null @@ -1,271 +0,0 @@ -#[path = "gameplay/schema_types.rs"] -mod schema_types; - -use crate::*; -pub use schema_types::*; - -#[spacetimedb::table(accessor = player_progression)] -pub struct PlayerProgression { - #[primary_key] - user_id: String, - level: u32, - current_level_xp: u32, - total_xp: u32, - xp_to_next_level: u32, - pending_level_ups: u32, - last_granted_source: Option, - created_at: Timestamp, - updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = chapter_progression, - index(accessor = by_chapter_progression_user_id, btree(columns = [user_id])), - index(accessor = by_chapter_progression_chapter_id, btree(columns = [chapter_id])), - index(accessor = by_chapter_progression_user_chapter, btree(columns = [user_id, chapter_id])) -)] -pub struct ChapterProgression { - #[primary_key] - chapter_progression_id: String, - user_id: String, - chapter_id: String, - chapter_index: u32, - total_chapters: u32, - entry_pseudo_level_millis: u32, - exit_pseudo_level_millis: u32, - entry_level: u32, - exit_level: u32, - planned_total_xp: u32, - planned_quest_xp: u32, - planned_hostile_xp: u32, - actual_quest_xp: u32, - actual_hostile_xp: u32, - expected_hostile_defeat_count: u32, - actual_hostile_defeat_count: u32, - level_at_entry: u32, - level_at_exit: Option, - pace_band: ChapterPaceBand, - created_at: Timestamp, - updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = npc_state, - index(accessor = by_runtime_session_id, btree(columns = [runtime_session_id])), - index(accessor = by_npc_id, btree(columns = [npc_id])), - index(accessor = by_runtime_session_npc, btree(columns = [runtime_session_id, npc_id])) -)] -pub struct NpcState { - #[primary_key] - npc_state_id: String, - runtime_session_id: String, - npc_id: String, - npc_name: String, - affinity: i32, - relation_state: NpcRelationState, - help_used: bool, - chatted_count: u32, - gifts_given: u32, - recruited: bool, - trade_stock_signature: Option, - revealed_facts: Vec, - known_attribute_rumors: Vec, - first_meaningful_contact_resolved: bool, - seen_backstory_chapter_ids: Vec, - stance_profile: NpcStanceProfile, - created_at: Timestamp, - updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = story_session, - index(accessor = by_runtime_session_id, btree(columns = [runtime_session_id])), - index(accessor = by_actor_user_id, btree(columns = [actor_user_id])) -)] -pub struct StorySession { - #[primary_key] - story_session_id: String, - runtime_session_id: String, - actor_user_id: String, - world_profile_id: String, - initial_prompt: String, - opening_summary: Option, - latest_narrative_text: String, - latest_choice_function_id: Option, - status: StorySessionStatus, - version: u32, - created_at: Timestamp, - updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = story_event, - index(accessor = by_story_session_id, btree(columns = [story_session_id])) -)] -pub struct StoryEvent { - #[primary_key] - event_id: String, - story_session_id: String, - event_kind: StoryEventKind, - narrative_text: String, - choice_function_id: Option, - created_at: Timestamp, -} - -#[spacetimedb::table( - accessor = inventory_slot, - index(accessor = by_inventory_runtime_session_id, btree(columns = [runtime_session_id])), - index(accessor = by_inventory_actor_user_id, btree(columns = [actor_user_id])), - index(accessor = by_inventory_container_slot, btree(columns = [container_kind, slot_key])), - index(accessor = by_inventory_item_id, btree(columns = [item_id])) -)] -pub struct InventorySlot { - #[primary_key] - slot_id: String, - runtime_session_id: String, - story_session_id: Option, - actor_user_id: String, - container_kind: InventoryContainerKind, - slot_key: String, - item_id: String, - category: String, - name: String, - description: Option, - quantity: u32, - rarity: InventoryItemRarity, - tags: Vec, - stackable: bool, - stack_key: String, - equipment_slot_id: Option, - source_kind: InventoryItemSourceKind, - source_reference_id: Option, - created_at: Timestamp, - updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = battle_state, - index(accessor = by_battle_story_session_id, btree(columns = [story_session_id])), - index(accessor = by_battle_runtime_session_id, btree(columns = [runtime_session_id])), - index(accessor = by_battle_actor_user_id, btree(columns = [actor_user_id])) -)] -pub struct BattleState { - #[primary_key] - battle_state_id: String, - story_session_id: String, - runtime_session_id: String, - actor_user_id: String, - chapter_id: Option, - target_npc_id: String, - target_name: String, - battle_mode: BattleMode, - status: BattleStatus, - player_hp: i32, - player_max_hp: i32, - player_mana: i32, - player_max_mana: i32, - target_hp: i32, - target_max_hp: i32, - experience_reward: u32, - reward_items: Vec, - turn_index: u32, - last_action_function_id: Option, - last_action_text: Option, - last_result_text: Option, - last_damage_dealt: i32, - last_damage_taken: i32, - last_outcome: CombatOutcome, - version: u32, - created_at: Timestamp, - updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = treasure_record, - index(accessor = by_treasure_story_session_id, btree(columns = [story_session_id])), - index(accessor = by_treasure_runtime_session_id, btree(columns = [runtime_session_id])), - index(accessor = by_treasure_actor_user_id, btree(columns = [actor_user_id])), - index(accessor = by_treasure_encounter_id, btree(columns = [encounter_id])) -)] -pub struct TreasureRecord { - #[primary_key] - treasure_record_id: String, - runtime_session_id: String, - story_session_id: String, - actor_user_id: String, - encounter_id: String, - encounter_name: String, - scene_id: Option, - scene_name: Option, - action: TreasureInteractionAction, - reward_items: Vec, - reward_hp: u32, - reward_mana: u32, - reward_currency: u32, - story_hint: Option, - created_at: Timestamp, - updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = quest_record, - index(accessor = by_runtime_session_id, btree(columns = [runtime_session_id])), - index(accessor = by_actor_user_id, btree(columns = [actor_user_id])), - index(accessor = by_issuer_npc_id, btree(columns = [issuer_npc_id])) -)] -pub struct QuestRecord { - #[primary_key] - quest_id: String, - runtime_session_id: String, - story_session_id: Option, - actor_user_id: String, - issuer_npc_id: String, - issuer_npc_name: String, - scene_id: Option, - chapter_id: Option, - act_id: Option, - thread_id: Option, - contract_id: Option, - title: String, - description: String, - summary: String, - objective: QuestObjectiveSnapshot, - progress: u32, - status: QuestStatus, - completion_notified: bool, - reward: QuestRewardSnapshot, - reward_text: String, - narrative_binding: QuestNarrativeBindingSnapshot, - steps: Vec, - active_step_id: Option, - visible_stage: u32, - hidden_flags: Vec, - discovered_fact_ids: Vec, - related_carrier_ids: Vec, - consequence_ids: Vec, - created_at: Timestamp, - updated_at: Timestamp, - completed_at: Option, - turned_in_at: Option, -} - -#[spacetimedb::table( - accessor = quest_log, - index(accessor = by_quest_id, btree(columns = [quest_id])), - index(accessor = by_runtime_session_id, btree(columns = [runtime_session_id])), - index(accessor = by_actor_user_id, btree(columns = [actor_user_id])) -)] -pub struct QuestLog { - #[primary_key] - log_id: String, - quest_id: String, - runtime_session_id: String, - actor_user_id: String, - event_kind: QuestLogEventKind, - status_after: QuestStatus, - signal_kind: Option, - signal: Option, - step_id: Option, - step_progress: Option, - created_at: Timestamp, -} diff --git a/server-rs/crates/spacetime-module/src/legacy_schema/gameplay/schema_types.rs b/server-rs/crates/spacetime-module/src/legacy_schema/gameplay/schema_types.rs deleted file mode 100644 index 37e35fd27..000000000 --- a/server-rs/crates/spacetime-module/src/legacy_schema/gameplay/schema_types.rs +++ /dev/null @@ -1,328 +0,0 @@ -use crate::SpacetimeType; - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum PlayerProgressionGrantSource { - Quest, - HostileNpc, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum ChapterPaceBand { - OpeningFast, - Steady, - Pressure, - FinaleDense, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum NpcRelationStance { - Hostile, - Guarded, - Neutral, - Cooperative, - Bonded, -} - -#[derive(Clone, Debug, PartialEq, Eq, SpacetimeType)] -pub struct NpcRelationState { - pub affinity: i32, - pub stance: NpcRelationStance, -} - -#[derive(Clone, Debug, PartialEq, Eq, SpacetimeType)] -pub struct NpcStanceProfile { - pub trust: u8, - pub warmth: u8, - pub ideological_fit: u8, - pub fear_or_guard: u8, - pub loyalty: u8, - pub current_conflict_tag: Option, - pub recent_approvals: Vec, - pub recent_disapprovals: Vec, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum StorySessionStatus { - Active, - Completed, - Archived, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum StoryEventKind { - SessionStarted, - StoryContinued, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum InventoryContainerKind { - Backpack, - Equipment, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum InventoryItemRarity { - Common, - Uncommon, - Rare, - Epic, - Legendary, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum InventoryEquipmentSlot { - Weapon, - Armor, - Relic, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum InventoryItemSourceKind { - StoryReward, - QuestReward, - TreasureReward, - NpcGift, - NpcTrade, - CombatDrop, - ForgeCraft, - ForgeReforge, - ManualPatch, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum BattleMode { - Fight, - Spar, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum BattleStatus { - Ongoing, - Resolved, - Aborted, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum CombatOutcome { - Ongoing, - Victory, - SparComplete, - Escaped, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum RuntimeItemRewardItemRarity { - Common, - Uncommon, - Rare, - Epic, - Legendary, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum RuntimeItemEquipmentSlot { - Weapon, - Armor, - Relic, -} - -#[derive(Clone, Debug, PartialEq, Eq, SpacetimeType)] -pub struct RuntimeItemRewardItemSnapshot { - pub item_id: String, - pub category: String, - pub item_name: String, - pub description: Option, - pub quantity: u32, - pub rarity: RuntimeItemRewardItemRarity, - pub tags: Vec, - pub stackable: bool, - pub stack_key: String, - pub equipment_slot_id: Option, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum TreasureInteractionAction { - Inspect, - Leave, - Secure, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum QuestStatus { - Active, - ReadyToTurnIn, - Completed, - TurnedIn, - Failed, - Expired, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum QuestNarrativeType { - Bounty, - Escort, - Investigation, - Retrieval, - Relationship, - Trial, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum QuestObjectiveKind { - DefeatHostileNpc, - InspectTreasure, - SparWithNpc, - TalkToNpc, - ReachScene, - DeliverItem, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum QuestRewardItemRarity { - Common, - Uncommon, - Rare, - Epic, - Legendary, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum QuestRewardEquipmentSlot { - Weapon, - Armor, - Relic, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum QuestNarrativeOrigin { - AiCompiled, - FallbackBuilder, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum QuestLogEventKind { - Accepted, - Progressed, - Completed, - CompletionAcknowledged, - TurnedIn, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum QuestSignalKind { - HostileNpcDefeated, - TreasureInspected, - NpcSparCompleted, - NpcTalkCompleted, - SceneReached, - ItemDelivered, -} - -#[derive(Clone, Debug, PartialEq, Eq, SpacetimeType)] -pub struct QuestRewardItem { - pub item_id: String, - pub category: String, - pub name: String, - pub description: Option, - pub quantity: u32, - pub rarity: QuestRewardItemRarity, - pub tags: Vec, - pub stackable: bool, - pub stack_key: String, - pub equipment_slot_id: Option, -} - -#[derive(Clone, Debug, PartialEq, Eq, SpacetimeType)] -pub struct QuestRewardIntel { - pub rumor_text: String, - pub unlocked_scene_id: Option, -} - -#[derive(Clone, Debug, PartialEq, Eq, SpacetimeType)] -pub struct QuestRewardSnapshot { - pub affinity_bonus: i32, - pub currency: i64, - pub experience: Option, - pub items: Vec, - pub intel: Option, - pub story_hint: Option, -} - -#[derive(Clone, Debug, PartialEq, Eq, SpacetimeType)] -pub struct QuestNarrativeBindingSnapshot { - pub origin: QuestNarrativeOrigin, - pub narrative_type: QuestNarrativeType, - pub dramatic_need: String, - pub issuer_goal: String, - pub player_hook: String, - pub world_reason: String, - pub followup_hooks: Vec, -} - -#[derive(Clone, Debug, PartialEq, Eq, SpacetimeType)] -pub struct QuestObjectiveSnapshot { - pub kind: QuestObjectiveKind, - pub target_hostile_npc_id: Option, - pub target_npc_id: Option, - pub target_scene_id: Option, - pub target_item_id: Option, - pub required_count: u32, -} - -#[derive(Clone, Debug, PartialEq, Eq, SpacetimeType)] -pub struct QuestStepSnapshot { - pub step_id: String, - pub kind: QuestObjectiveKind, - pub target_hostile_npc_id: Option, - pub target_npc_id: Option, - pub target_scene_id: Option, - pub target_item_id: Option, - pub required_count: u32, - pub progress: u32, - pub title: String, - pub reveal_text: String, - pub complete_text: String, -} - -#[derive(Clone, Debug, PartialEq, Eq, SpacetimeType)] -pub struct QuestHostileNpcDefeatedSignal { - pub scene_id: Option, - pub hostile_npc_id: String, -} - -#[derive(Clone, Debug, PartialEq, Eq, SpacetimeType)] -pub struct QuestTreasureInspectedSignal { - pub scene_id: Option, -} - -#[derive(Clone, Debug, PartialEq, Eq, SpacetimeType)] -pub struct QuestNpcSparCompletedSignal { - pub npc_id: String, -} - -#[derive(Clone, Debug, PartialEq, Eq, SpacetimeType)] -pub struct QuestNpcTalkCompletedSignal { - pub npc_id: String, -} - -#[derive(Clone, Debug, PartialEq, Eq, SpacetimeType)] -pub struct QuestSceneReachedSignal { - pub scene_id: String, -} - -#[derive(Clone, Debug, PartialEq, Eq, SpacetimeType)] -pub struct QuestItemDeliveredSignal { - pub npc_id: String, - pub item_id: String, - pub quantity: u32, -} - -#[derive(Clone, Debug, PartialEq, Eq, SpacetimeType)] -pub enum QuestProgressSignal { - HostileNpcDefeated(QuestHostileNpcDefeatedSignal), - TreasureInspected(QuestTreasureInspectedSignal), - NpcSparCompleted(QuestNpcSparCompletedSignal), - NpcTalkCompleted(QuestNpcTalkCompletedSignal), - SceneReached(QuestSceneReachedSignal), - ItemDelivered(QuestItemDeliveredSignal), -} diff --git a/server-rs/crates/spacetime-module/src/legacy_schema/jump_hop.rs b/server-rs/crates/spacetime-module/src/legacy_schema/jump_hop.rs deleted file mode 100644 index 4c0c9d82f..000000000 --- a/server-rs/crates/spacetime-module/src/legacy_schema/jump_hop.rs +++ /dev/null @@ -1,4 +0,0 @@ -#[path = "../jump_hop/tables.rs"] -pub(crate) mod tables; - -pub use tables::*; diff --git a/server-rs/crates/spacetime-module/src/legacy_schema/match3d.rs b/server-rs/crates/spacetime-module/src/legacy_schema/match3d.rs deleted file mode 100644 index cf9b65ad1..000000000 --- a/server-rs/crates/spacetime-module/src/legacy_schema/match3d.rs +++ /dev/null @@ -1,4 +0,0 @@ -#[path = "../match3d/tables.rs"] -pub(crate) mod tables; - -pub use tables::*; diff --git a/server-rs/crates/spacetime-module/src/legacy_schema/puzzle.rs b/server-rs/crates/spacetime-module/src/legacy_schema/puzzle.rs deleted file mode 100644 index de1a22217..000000000 --- a/server-rs/crates/spacetime-module/src/legacy_schema/puzzle.rs +++ /dev/null @@ -1,181 +0,0 @@ -use crate::*; - -const PUZZLE_POINT_INCENTIVE_DEFAULT_U64: u64 = 0; -const WORK_VISIBLE_DEFAULT: bool = false; - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum PuzzleAgentStage { - CollectingAnchors, - DraftReady, - ImageRefining, - ReadyToPublish, - Published, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum PuzzleAgentMessageRole { - User, - Assistant, - System, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum PuzzleAgentMessageKind { - Chat, - Summary, - ActionResult, - Warning, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum PuzzlePublicationStatus { - Draft, - Published, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq, SpacetimeType)] -pub enum PuzzleEventKind { - WorkPublished, -} - -#[spacetimedb::table( - accessor = puzzle_agent_session, - index(accessor = by_puzzle_agent_session_owner_user_id, btree(columns = [owner_user_id])) -)] -pub struct PuzzleAgentSessionRow { - #[primary_key] - session_id: String, - owner_user_id: String, - seed_text: String, - current_turn: u32, - progress_percent: u32, - stage: PuzzleAgentStage, - anchor_pack_json: String, - draft_json: Option, - last_assistant_reply: Option, - published_profile_id: Option, - created_at: Timestamp, - updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = puzzle_background_compile_task, - index(accessor = by_puzzle_background_compile_task_session_id, btree(columns = [session_id])) -)] -pub struct PuzzleBackgroundCompileTaskRow { - #[primary_key] - task_id: String, - claim_id: String, - session_id: String, - owner_user_id: String, - created_at: Timestamp, - updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = puzzle_agent_message, - index(accessor = by_puzzle_agent_message_session_id, btree(columns = [session_id])) -)] -pub struct PuzzleAgentMessageRow { - #[primary_key] - message_id: String, - session_id: String, - role: PuzzleAgentMessageRole, - kind: PuzzleAgentMessageKind, - text: String, - created_at: Timestamp, -} - -#[spacetimedb::table( - accessor = puzzle_work_profile, - index(accessor = by_puzzle_work_owner_user_id, btree(columns = [owner_user_id])), - index(accessor = by_puzzle_work_publication_status, btree(columns = [publication_status])) -)] -pub struct PuzzleWorkProfileRow { - #[primary_key] - pub(crate) profile_id: String, - pub(crate) work_id: String, - pub(crate) owner_user_id: String, - pub(crate) source_session_id: Option, - pub(crate) author_display_name: String, - pub(crate) work_title: String, - pub(crate) work_description: String, - pub(crate) level_name: String, - pub(crate) summary: String, - pub(crate) theme_tags_json: String, - pub(crate) cover_image_src: Option, - pub(crate) cover_asset_id: Option, - pub(crate) levels_json: String, - pub(crate) publication_status: PuzzlePublicationStatus, - pub(crate) play_count: u32, - pub(crate) anchor_pack_json: String, - pub(crate) publish_ready: bool, - pub(crate) created_at: Timestamp, - pub(crate) updated_at: Timestamp, - pub(crate) published_at: Option, - #[default(0)] - pub(crate) remix_count: u32, - #[default(0)] - pub(crate) like_count: u32, - #[default(PUZZLE_POINT_INCENTIVE_DEFAULT_U64)] - pub(crate) point_incentive_total_half_points: u64, - #[default(PUZZLE_POINT_INCENTIVE_DEFAULT_U64)] - pub(crate) point_incentive_claimed_points: u64, - #[default(WORK_VISIBLE_DEFAULT)] - pub(crate) visible: bool, -} - -#[spacetimedb::table( - accessor = puzzle_event, - public, - event, - index(accessor = by_puzzle_event_profile_id, btree(columns = [profile_id])), - index(accessor = by_puzzle_event_owner_user_id, btree(columns = [owner_user_id])) -)] -pub struct PuzzleEvent { - #[primary_key] - event_id: String, - profile_id: String, - work_id: String, - session_id: Option, - owner_user_id: String, - event_kind: PuzzleEventKind, - occurred_at: Timestamp, -} - -#[spacetimedb::table( - accessor = puzzle_runtime_run, - index(accessor = by_puzzle_runtime_run_owner_user_id, btree(columns = [owner_user_id])) -)] -pub struct PuzzleRuntimeRunRow { - #[primary_key] - run_id: String, - owner_user_id: String, - entry_profile_id: String, - current_profile_id: String, - cleared_level_count: u32, - current_level_index: u32, - current_grid_size: u32, - played_profile_ids_json: String, - previous_level_tags_json: String, - snapshot_json: String, - created_at: Timestamp, - updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = puzzle_leaderboard_entry, - index(accessor = by_puzzle_leaderboard_profile_grid, btree(columns = [profile_id, grid_size])), - index(accessor = by_puzzle_leaderboard_user_profile_grid, btree(columns = [user_id, profile_id, grid_size])) -)] -pub struct PuzzleLeaderboardEntryRow { - #[primary_key] - entry_id: String, - profile_id: String, - grid_size: u32, - user_id: String, - nickname: String, - best_elapsed_ms: u64, - last_run_id: String, - updated_at: Timestamp, -} diff --git a/server-rs/crates/spacetime-module/src/legacy_schema/puzzle_clear.rs b/server-rs/crates/spacetime-module/src/legacy_schema/puzzle_clear.rs deleted file mode 100644 index ea0da1995..000000000 --- a/server-rs/crates/spacetime-module/src/legacy_schema/puzzle_clear.rs +++ /dev/null @@ -1,4 +0,0 @@ -#[path = "../puzzle_clear/tables.rs"] -pub(crate) mod tables; - -pub use tables::*; diff --git a/server-rs/crates/spacetime-module/src/legacy_schema/square_hole.rs b/server-rs/crates/spacetime-module/src/legacy_schema/square_hole.rs deleted file mode 100644 index afc8c131b..000000000 --- a/server-rs/crates/spacetime-module/src/legacy_schema/square_hole.rs +++ /dev/null @@ -1,4 +0,0 @@ -#[path = "../square_hole/tables.rs"] -pub(crate) mod tables; - -pub use tables::*; diff --git a/server-rs/crates/spacetime-module/src/legacy_schema/visual_novel.rs b/server-rs/crates/spacetime-module/src/legacy_schema/visual_novel.rs deleted file mode 100644 index 9f4faa0f4..000000000 --- a/server-rs/crates/spacetime-module/src/legacy_schema/visual_novel.rs +++ /dev/null @@ -1,132 +0,0 @@ -use crate::*; - -const WORK_VISIBLE_DEFAULT: bool = false; -pub const VISUAL_NOVEL_PUBLICATION_PUBLISHED: &str = "published"; - -#[spacetimedb::table( - accessor = visual_novel_agent_session, - index(accessor = by_visual_novel_agent_session_owner_user_id, btree(columns = [owner_user_id])) -)] -pub struct VisualNovelAgentSessionRow { - #[primary_key] - pub(crate) session_id: String, - pub(crate) owner_user_id: String, - pub(crate) source_mode: String, - pub(crate) status: String, - pub(crate) seed_text: String, - pub(crate) source_asset_ids_json: String, - pub(crate) current_turn: u32, - pub(crate) progress_percent: u32, - pub(crate) draft_json: String, - pub(crate) pending_action_json: String, - pub(crate) last_assistant_reply: String, - pub(crate) published_profile_id: String, - pub(crate) created_at: Timestamp, - pub(crate) updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = visual_novel_agent_message, - index(accessor = by_visual_novel_agent_message_session_id, btree(columns = [session_id])) -)] -pub struct VisualNovelAgentMessageRow { - #[primary_key] - pub(crate) message_id: String, - pub(crate) session_id: String, - pub(crate) role: String, - pub(crate) kind: String, - pub(crate) text: String, - pub(crate) created_at: Timestamp, -} - -#[spacetimedb::table( - accessor = visual_novel_work_profile, - index(accessor = by_visual_novel_work_owner_user_id, btree(columns = [owner_user_id])), - index(accessor = by_visual_novel_work_publication_status, btree(columns = [publication_status])) -)] -pub struct VisualNovelWorkProfileRow { - #[primary_key] - pub(crate) profile_id: String, - pub(crate) work_id: String, - pub(crate) owner_user_id: String, - pub(crate) source_session_id: String, - pub(crate) author_display_name: String, - pub(crate) work_title: String, - pub(crate) work_description: String, - pub(crate) tags_json: String, - pub(crate) cover_image_src: String, - pub(crate) source_asset_ids_json: String, - pub(crate) draft_json: String, - pub(crate) publication_status: String, - pub(crate) publish_ready: bool, - pub(crate) play_count: u32, - pub(crate) created_at: Timestamp, - pub(crate) updated_at: Timestamp, - pub(crate) published_at: Option, - #[default(WORK_VISIBLE_DEFAULT)] - pub(crate) visible: bool, -} - -#[spacetimedb::table( - accessor = visual_novel_runtime_run, - index(accessor = by_visual_novel_run_owner_user_id, btree(columns = [owner_user_id])), - index(accessor = by_visual_novel_run_profile_id, btree(columns = [profile_id])) -)] -pub struct VisualNovelRuntimeRunRow { - #[primary_key] - pub(crate) run_id: String, - pub(crate) owner_user_id: String, - pub(crate) profile_id: String, - pub(crate) mode: String, - pub(crate) status: String, - pub(crate) current_scene_id: String, - pub(crate) current_phase_id: String, - pub(crate) visible_character_ids_json: String, - pub(crate) flags_json: String, - pub(crate) metrics_json: String, - pub(crate) available_choices_json: String, - pub(crate) text_mode_enabled: bool, - pub(crate) snapshot_json: String, - pub(crate) created_at: Timestamp, - pub(crate) updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = visual_novel_runtime_history_entry, - index(accessor = by_visual_novel_history_run_id, btree(columns = [run_id])), - index(accessor = by_visual_novel_history_owner_user_id, btree(columns = [owner_user_id])) -)] -pub struct VisualNovelRuntimeHistoryEntryRow { - #[primary_key] - pub(crate) entry_id: String, - pub(crate) run_id: String, - pub(crate) owner_user_id: String, - pub(crate) profile_id: String, - pub(crate) turn_index: u32, - pub(crate) source: String, - pub(crate) action_text: String, - pub(crate) steps_json: String, - pub(crate) snapshot_before_hash: String, - pub(crate) snapshot_after_hash: String, - pub(crate) created_at: Timestamp, -} - -#[spacetimedb::table( - accessor = visual_novel_runtime_event, - public, - event, - index(accessor = by_visual_novel_runtime_event_run_id, btree(columns = [run_id])), - index(accessor = by_visual_novel_runtime_event_owner_user_id, btree(columns = [owner_user_id])) -)] -pub struct VisualNovelRuntimeEvent { - #[primary_key] - pub(crate) event_id: String, - pub(crate) run_id: String, - pub(crate) owner_user_id: String, - pub(crate) profile_id: String, - pub(crate) event_kind: String, - pub(crate) client_event_id: String, - pub(crate) history_entry_id: String, - pub(crate) payload_json: String, - pub(crate) occurred_at: Timestamp, -} diff --git a/server-rs/crates/spacetime-module/src/legacy_schema/wooden_fish.rs b/server-rs/crates/spacetime-module/src/legacy_schema/wooden_fish.rs deleted file mode 100644 index 94746e1b9..000000000 --- a/server-rs/crates/spacetime-module/src/legacy_schema/wooden_fish.rs +++ /dev/null @@ -1,4 +0,0 @@ -#[path = "../wooden_fish/tables.rs"] -pub(crate) mod tables; - -pub use tables::*; diff --git a/server-rs/crates/spacetime-module/src/match3d/tables.rs b/server-rs/crates/spacetime-module/src/match3d/tables.rs deleted file mode 100644 index 00f89afe3..000000000 --- a/server-rs/crates/spacetime-module/src/match3d/tables.rs +++ /dev/null @@ -1,93 +0,0 @@ -use crate::*; - -pub(super) const WORK_VISIBLE_DEFAULT: bool = false; - -#[spacetimedb::table( - accessor = match3d_agent_session, - index(accessor = by_match3d_agent_session_owner_user_id, btree(columns = [owner_user_id])) -)] -pub struct Match3DAgentSessionRow { - #[primary_key] - pub(crate) session_id: String, - pub(crate) owner_user_id: String, - pub(crate) seed_text: String, - pub(crate) current_turn: u32, - pub(crate) progress_percent: u32, - pub(crate) stage: String, - pub(crate) config_json: String, - pub(crate) draft_json: String, - pub(crate) last_assistant_reply: String, - pub(crate) published_profile_id: String, - pub(crate) created_at: Timestamp, - pub(crate) updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = match3d_agent_message, - index(accessor = by_match3d_agent_message_session_id, btree(columns = [session_id])) -)] -pub struct Match3DAgentMessageRow { - #[primary_key] - pub(crate) message_id: String, - pub(crate) session_id: String, - pub(crate) role: String, - pub(crate) kind: String, - pub(crate) text: String, - pub(crate) created_at: Timestamp, -} - -#[spacetimedb::table( - accessor = match_3_d_work_profile, - index(accessor = by_match3d_work_owner_user_id, btree(columns = [owner_user_id])), - index(accessor = by_match3d_work_publication_status, btree(columns = [publication_status])) -)] -pub struct Match3DWorkProfileRow { - #[primary_key] - pub(crate) profile_id: String, - pub(crate) owner_user_id: String, - pub(crate) source_session_id: String, - pub(crate) author_display_name: String, - pub(crate) game_name: String, - pub(crate) theme_text: String, - pub(crate) summary_text: String, - pub(crate) tags_json: String, - pub(crate) cover_image_src: String, - pub(crate) cover_asset_id: String, - pub(crate) clear_count: u32, - pub(crate) difficulty: u32, - pub(crate) config_json: String, - pub(crate) publication_status: String, - pub(crate) play_count: u32, - pub(crate) updated_at: Timestamp, - pub(crate) published_at: Option, - #[default(None::)] - pub(crate) generated_item_assets_json: Option, - // 后台可见性开关;新作品默认不公开,开启后才进入公开列表。 - #[default(WORK_VISIBLE_DEFAULT)] - pub(crate) visible: bool, -} - -#[spacetimedb::table( - accessor = match3d_runtime_run, - index(accessor = by_match3d_run_owner_user_id, btree(columns = [owner_user_id])), - index(accessor = by_match3d_run_profile_id, btree(columns = [profile_id])) -)] -pub struct Match3DRuntimeRunRow { - #[primary_key] - pub(crate) run_id: String, - pub(crate) owner_user_id: String, - pub(crate) profile_id: String, - pub(crate) status: String, - pub(crate) snapshot_version: u32, - pub(crate) started_at_ms: i64, - pub(crate) duration_limit_ms: i64, - pub(crate) finished_at_ms: i64, - pub(crate) elapsed_ms: i64, - pub(crate) clear_count: u32, - pub(crate) total_item_count: u32, - pub(crate) cleared_item_count: u32, - pub(crate) failure_reason: String, - pub(crate) snapshot_json: String, - pub(crate) created_at: Timestamp, - pub(crate) updated_at: Timestamp, -} diff --git a/server-rs/crates/spacetime-module/src/migration.rs b/server-rs/crates/spacetime-module/src/migration.rs index f45c5776d..2086c0775 100644 --- a/server-rs/crates/spacetime-module/src/migration.rs +++ b/server-rs/crates/spacetime-module/src/migration.rs @@ -9,39 +9,7 @@ use spacetimedb::sats::ser::serde::SerializeWrapper; use std::collections::HashSet; use crate::agc_models::agc_model_catalog; -use crate::bark_battle::tables::{ - bark_battle_draft_config, bark_battle_leaderboard_entry, bark_battle_personal_best_projection, - bark_battle_published_config, bark_battle_runtime_run, bark_battle_score_record, - bark_battle_work_stats_projection, -}; -use crate::big_fish::big_fish_runtime_run; -use crate::jump_hop::tables::{ - jump_hop_agent_session, jump_hop_event, jump_hop_leaderboard_entry, jump_hop_runtime_run, - jump_hop_work_profile, -}; use crate::llm_router_account_storage::llm_router_account; -use crate::match3d::tables::{ - match_3_d_work_profile, match3d_agent_message, match3d_agent_session, match3d_runtime_run, -}; -use crate::puzzle::{ - puzzle_agent_message, puzzle_agent_session, puzzle_background_compile_task, puzzle_event, - puzzle_leaderboard_entry, puzzle_runtime_run, puzzle_work_profile, -}; -use crate::puzzle_clear::tables::{ - puzzle_clear_agent_session, puzzle_clear_event, puzzle_clear_runtime_run, - puzzle_clear_work_profile, -}; -use crate::square_hole::tables::{ - square_hole_agent_message, square_hole_agent_session, square_hole_runtime_run, - square_hole_work_profile, -}; -use crate::wooden_fish::tables::{ - wooden_fish_agent_session, wooden_fish_event, wooden_fish_runtime_run, wooden_fish_work_profile, -}; -use crate::{ - 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, -}; const MIGRATION_SCHEMA_VERSION: u32 = 1; const MIGRATION_MAX_TABLE_NAME_LEN: usize = 96; @@ -231,23 +199,6 @@ macro_rules! migration_tables { profile_recharge_order_expiration_timer, profile_feedback_submission, profile_save_archive, - player_progression, - chapter_progression, - npc_state, - story_session, - story_event, - inventory_slot, - battle_state, - treasure_record, - quest_record, - quest_log, - custom_world_profile, - custom_world_session, - custom_world_agent_session, - custom_world_agent_message, - custom_world_agent_operation, - custom_world_draft_card, - custom_world_gallery_entry, asset_object, asset_entity_binding, asset_event, @@ -281,52 +232,7 @@ macro_rules! migration_tables { editor_generation_runtime_identity_rotation, editor_generation_operation, editor_idempotent_create_receipt, - puzzle_agent_session, - puzzle_background_compile_task, - puzzle_agent_message, - puzzle_work_profile, - puzzle_event, - puzzle_runtime_run, - puzzle_leaderboard_entry, - puzzle_clear_agent_session, - puzzle_clear_work_profile, - puzzle_clear_runtime_run, - puzzle_clear_event, - bark_battle_draft_config, - bark_battle_published_config, - bark_battle_runtime_run, - bark_battle_score_record, - bark_battle_leaderboard_entry, - bark_battle_work_stats_projection, - bark_battle_personal_best_projection, - match3d_agent_session, - match3d_agent_message, - match_3_d_work_profile, - match3d_runtime_run, - jump_hop_agent_session, - jump_hop_work_profile, - jump_hop_runtime_run, - jump_hop_event, - jump_hop_leaderboard_entry, - wooden_fish_agent_session, - wooden_fish_work_profile, - wooden_fish_runtime_run, - wooden_fish_event, - square_hole_agent_session, - square_hole_agent_message, - square_hole_work_profile, - square_hole_runtime_run, - visual_novel_agent_session, - visual_novel_agent_message, - visual_novel_work_profile, - visual_novel_runtime_run, - visual_novel_runtime_history_entry, - visual_novel_runtime_event, - big_fish_creation_session, - big_fish_agent_message, - big_fish_asset_slot, - big_fish_runtime_run, - big_fish_event + // 旧创作模板历史表已从 schema 与迁移白名单中删除;新增可迁移表必须在此显式登记。 } }; } @@ -374,163 +280,6 @@ macro_rules! clear_migration_table { }; } -// 阶段一固定清空清单:只覆盖已经退役的玩法表,不接受调用方动态指定表名。 -// TODO(phase 2): 完成数据备份、客户端兼容性和运行态确认后,再从 active.rs、legacy_schema、 -// migration 白名单和生成绑定中移除这些表定义;本阶段只清空行,不改变 schema。 -macro_rules! retired_migration_tables { - ($macro_name:ident $(, $arg:expr)*) => { - $macro_name! { - $($arg,)* - player_progression, - chapter_progression, - npc_state, - story_session, - story_event, - inventory_slot, - battle_state, - treasure_record, - quest_record, - quest_log, - custom_world_profile, - custom_world_session, - custom_world_agent_session, - custom_world_agent_message, - custom_world_agent_operation, - custom_world_draft_card, - custom_world_gallery_entry, - puzzle_agent_session, - puzzle_background_compile_task, - puzzle_agent_message, - puzzle_work_profile, - puzzle_event, - puzzle_runtime_run, - puzzle_leaderboard_entry, - puzzle_clear_agent_session, - puzzle_clear_work_profile, - puzzle_clear_runtime_run, - puzzle_clear_event, - bark_battle_draft_config, - bark_battle_published_config, - bark_battle_runtime_run, - bark_battle_score_record, - bark_battle_leaderboard_entry, - bark_battle_work_stats_projection, - bark_battle_personal_best_projection, - match3d_agent_session, - match3d_agent_message, - match_3_d_work_profile, - match3d_runtime_run, - jump_hop_agent_session, - jump_hop_work_profile, - jump_hop_runtime_run, - jump_hop_event, - jump_hop_leaderboard_entry, - wooden_fish_agent_session, - wooden_fish_work_profile, - wooden_fish_runtime_run, - wooden_fish_event, - square_hole_agent_session, - square_hole_agent_message, - square_hole_work_profile, - square_hole_runtime_run, - visual_novel_agent_session, - visual_novel_agent_message, - visual_novel_work_profile, - visual_novel_runtime_run, - visual_novel_runtime_history_entry, - visual_novel_runtime_event, - big_fish_creation_session, - big_fish_agent_message, - big_fish_asset_slot, - big_fish_runtime_run, - big_fish_event, - } - }; -} - -macro_rules! retired_migration_table_name_list { - ($($table:ident),+ $(,)?) => { - &[$(stringify!($table)),+] - }; -} - -const RETIRED_MIGRATION_TABLE_NAMES: &[&str] = - retired_migration_tables!(retired_migration_table_name_list); - -macro_rules! clear_retired_migration_table { - ($ctx:expr, $dry_run:expr, $stats:expr, $($table:ident),+ $(,)?) => { - $( - let rows = $ctx.db.$table().iter().collect::>(); - let row_count_before = rows.len() as u64; - if !$dry_run { - for row in rows { - $ctx.db.$table().delete(row); - } - } - $stats.push(DatabaseMigrationClearTableStat { - table_name: stringify!($table).to_string(), - row_count_before, - cleared_row_count: if $dry_run { 0 } else { row_count_before }, - }); - )+ - }; -} - -fn clear_retired_database_tables_tx( - ctx: &ReducerContext, - dry_run: bool, -) -> Vec { - let mut stats = Vec::with_capacity(RETIRED_MIGRATION_TABLE_NAMES.len()); - retired_migration_tables!(clear_retired_migration_table, ctx, dry_run, stats); - stats -} - -#[derive(Clone, Debug, PartialEq, Eq, SpacetimeType)] -pub struct DatabaseMigrationClearRetiredTablesInput { - pub dry_run: bool, -} - -#[derive(Clone, Debug, PartialEq, Eq, SpacetimeType)] -pub struct DatabaseMigrationClearTableStat { - pub table_name: String, - pub row_count_before: u64, - pub cleared_row_count: u64, -} - -#[derive(Clone, Debug, PartialEq, Eq, SpacetimeType)] -pub struct DatabaseMigrationClearRetiredTablesResult { - pub ok: bool, - pub dry_run: bool, - pub table_stats: Vec, - pub error_message: Option, -} - -#[spacetimedb::procedure] -pub fn clear_retired_database_tables( - ctx: &mut ProcedureContext, - input: DatabaseMigrationClearRetiredTablesInput, -) -> DatabaseMigrationClearRetiredTablesResult { - let dry_run = input.dry_run; - let caller = ctx.sender(); - match ctx.try_with_tx(|tx| { - require_migration_operator(tx, caller)?; - Ok::<_, String>(clear_retired_database_tables_tx(tx, dry_run)) - }) { - Ok(table_stats) => DatabaseMigrationClearRetiredTablesResult { - ok: true, - dry_run, - table_stats, - error_message: None, - }, - Err(error) => DatabaseMigrationClearRetiredTablesResult { - ok: false, - dry_run, - table_stats: Vec::new(), - error_message: Some(error), - }, - } -} - // 迁移权限独立存表,避免把 private 表导出能力开放给任意登录身份。 #[spacetimedb::procedure] pub fn authorize_database_migration_operator( @@ -1600,147 +1349,6 @@ fn normalize_migration_row(table_name: &str, value: &serde_json::Value) -> serde .or_insert(serde_json::Value::Null); } } - if table_name == "big_fish_creation_session" { - if let Some(object) = next_value.as_object_mut() { - // 中文注释:旧迁移包没有公开游玩次数字段,导入时按新建作品默认 0 兼容。 - object - .entry("play_count".to_string()) - .or_insert_with(|| serde_json::Value::from(0)); - object - .entry("remix_count".to_string()) - .or_insert_with(|| serde_json::Value::from(0)); - object - .entry("like_count".to_string()) - .or_insert_with(|| serde_json::Value::from(0)); - object - .entry("published_at".to_string()) - .or_insert(serde_json::Value::Null); - } - } - if table_name == "custom_world_profile" || table_name == "custom_world_gallery_entry" { - if let Some(object) = next_value.as_object_mut() { - // 中文注释:作品可见性字段晚于首版作品表加入,旧迁移包保留历史公开默认。 - object - .entry("visible".to_string()) - .or_insert_with(|| serde_json::Value::Bool(true)); - // 中文注释:自定义世界公开互动计数字段晚于基础作品表加入,旧迁移包按 0 兼容。 - object - .entry("play_count".to_string()) - .or_insert_with(|| serde_json::Value::from(0)); - object - .entry("remix_count".to_string()) - .or_insert_with(|| serde_json::Value::from(0)); - object - .entry("like_count".to_string()) - .or_insert_with(|| serde_json::Value::from(0)); - } - } - if table_name == "puzzle_work_profile" { - if let Some(object) = next_value.as_object_mut() { - // 中文注释:作品可见性字段晚于首版作品表加入,旧迁移包保留历史公开默认。 - object - .entry("visible".to_string()) - .or_insert_with(|| serde_json::Value::Bool(true)); - // 中文注释:拼图公开互动计数晚于基础作品表加入,旧迁移包按 0 兼容。 - object - .entry("play_count".to_string()) - .or_insert_with(|| serde_json::Value::from(0)); - object - .entry("remix_count".to_string()) - .or_insert_with(|| serde_json::Value::from(0)); - object - .entry("like_count".to_string()) - .or_insert_with(|| serde_json::Value::from(0)); - object - .entry("point_incentive_total_half_points".to_string()) - .or_insert_with(|| serde_json::Value::from(0)); - object - .entry("point_incentive_claimed_points".to_string()) - .or_insert_with(|| serde_json::Value::from(0)); - // 中文注释:拼图多关卡字段晚于旧作品表加入,旧迁移包留空并由读取层补出首关。 - object - .entry("levels_json".to_string()) - .or_insert_with(|| serde_json::Value::from("")); - // 中文注释:作品名称/描述从旧关卡名/画面摘要拆出,旧行保留旧值做兼容回填。 - let fallback_title = object - .get("level_name") - .cloned() - .unwrap_or_else(|| serde_json::Value::from("")); - object - .entry("work_title".to_string()) - .or_insert(fallback_title); - let fallback_description = object - .get("summary") - .cloned() - .unwrap_or_else(|| serde_json::Value::from("")); - object - .entry("work_description".to_string()) - .or_insert(fallback_description); - } - } - if table_name == "big_fish_creation_session" { - if let Some(object) = next_value.as_object_mut() { - // 中文注释:作品可见性字段晚于大鱼吃小鱼创作会话表加入,旧迁移包保留历史公开默认。 - object - .entry("visible".to_string()) - .or_insert_with(|| serde_json::Value::Bool(true)); - } - } - if matches!( - table_name, - "jump_hop_work_profile" - | "puzzle_clear_work_profile" - | "square_hole_work_profile" - | "visual_novel_work_profile" - | "bark_battle_published_config" - ) { - if let Some(object) = next_value.as_object_mut() { - // 中文注释:作品可见性字段晚于首版作品表加入,旧迁移包保留历史公开默认。 - object - .entry("visible".to_string()) - .or_insert_with(|| serde_json::Value::Bool(true)); - if table_name == "puzzle_clear_work_profile" { - // 中文注释:拼消消底图提示词字段晚于作品表加入,旧迁移包按空提示词兼容。 - object - .entry("board_background_prompt".to_string()) - .or_insert(serde_json::Value::Null); - } - if table_name == "jump_hop_work_profile" { - // 中文注释:跳一跳主题返回按钮资产晚于首版作品表加入,旧迁移包按未生成按钮兼容。 - object - .entry("back_button_asset_json".to_string()) - .or_insert(serde_json::Value::Null); - } - } - } - if table_name == "match_3_d_work_profile" || table_name == "match3d_work_profile" { - if let Some(object) = next_value.as_object_mut() { - // 中文注释:作品可见性字段晚于首版作品表加入,旧迁移包保留历史公开默认。 - object - .entry("visible".to_string()) - .or_insert_with(|| serde_json::Value::Bool(true)); - // 中文注释:抓大鹅生成素材字段晚于基础作品表加入,旧迁移包按未生成素材兼容。 - object - .entry("generated_item_assets_json".to_string()) - .or_insert(serde_json::Value::Null); - } - } - if table_name == "wooden_fish_work_profile" { - if let Some(object) = next_value.as_object_mut() { - // 中文注释:作品可见性字段晚于首版作品表加入,旧迁移包保留历史公开默认。 - object - .entry("visible".to_string()) - .or_insert_with(|| serde_json::Value::Bool(true)); - // 中文注释:敲木鱼背景环境图晚于首版作品表加入,旧迁移包按未生成背景兼容。 - object - .entry("background_asset_json".to_string()) - .or_insert(serde_json::Value::Null); - // 中文注释:敲木鱼返回按钮图晚于首版作品表加入,旧迁移包按未生成返回按钮兼容。 - object - .entry("back_button_asset_json".to_string()) - .or_insert(serde_json::Value::Null); - } - } if table_name == "editor_project_resource" { if let Some(object) = next_value.as_object_mut() { // 中文注释:精选公开开关晚于画布资源表加入,旧生成资源按默认公开兼容。 @@ -1883,23 +1491,6 @@ fn is_supported_migration_table(table_name: &str) -> bool { mod migration_bootstrap_secret_tests { use super::*; - #[test] - fn retired_migration_table_list_is_fixed_and_excludes_active_tables() { - assert_eq!(RETIRED_MIGRATION_TABLE_NAMES.len(), 63); - let mut unique_names = RETIRED_MIGRATION_TABLE_NAMES.to_vec(); - unique_names.sort_unstable(); - unique_names.dedup(); - assert_eq!(unique_names.len(), RETIRED_MIGRATION_TABLE_NAMES.len()); - for active_table in [ - "runtime_setting", - "runtime_snapshot", - "user_browse_history", - "creation_entry_config", - ] { - assert!(!RETIRED_MIGRATION_TABLE_NAMES.contains(&active_table)); - } - } - #[test] fn old_profile_redeem_code_rows_default_to_open_validity_window() { let normalized = normalize_migration_row( diff --git a/server-rs/crates/spacetime-module/src/puzzle_clear/tables.rs b/server-rs/crates/spacetime-module/src/puzzle_clear/tables.rs deleted file mode 100644 index 391ac787e..000000000 --- a/server-rs/crates/spacetime-module/src/puzzle_clear/tables.rs +++ /dev/null @@ -1,88 +0,0 @@ -use crate::*; - -pub(super) const WORK_VISIBLE_DEFAULT: bool = false; - -#[spacetimedb::table( - accessor = puzzle_clear_agent_session, - index(accessor = by_puzzle_clear_agent_session_owner_user_id, btree(columns = [owner_user_id])) -)] -pub struct PuzzleClearAgentSessionRow { - #[primary_key] - pub(crate) session_id: String, - pub(crate) owner_user_id: String, - pub(crate) status: String, - pub(crate) draft_json: String, - pub(crate) published_profile_id: String, - pub(crate) created_at: Timestamp, - pub(crate) updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = puzzle_clear_work_profile, - index(accessor = by_puzzle_clear_work_owner_user_id, btree(columns = [owner_user_id])), - index(accessor = by_puzzle_clear_work_publication_status, btree(columns = [publication_status])) -)] -pub struct PuzzleClearWorkProfileRow { - #[primary_key] - pub(crate) profile_id: String, - pub(crate) work_id: String, - pub(crate) owner_user_id: String, - pub(crate) source_session_id: String, - pub(crate) author_display_name: String, - pub(crate) work_title: String, - pub(crate) work_description: String, - pub(crate) theme_prompt: String, - pub(crate) generate_board_background: bool, - pub(crate) board_background_asset_json: String, - #[default(None::)] - pub(crate) board_background_prompt: Option, - pub(crate) card_back_image_src: String, - pub(crate) atlas_asset_json: String, - pub(crate) pattern_groups_json: String, - pub(crate) card_assets_json: String, - pub(crate) cover_image_src: String, - pub(crate) generation_status: String, - pub(crate) publication_status: String, - pub(crate) play_count: u32, - pub(crate) updated_at: Timestamp, - pub(crate) published_at: Option, - // 中文注释:后台可见性开关,新作品默认不公开,开启后才进入公开列表。 - #[default(WORK_VISIBLE_DEFAULT)] - pub(crate) visible: bool, -} - -#[spacetimedb::table( - accessor = puzzle_clear_runtime_run, - index(accessor = by_puzzle_clear_run_owner_user_id, btree(columns = [owner_user_id])), - index(accessor = by_puzzle_clear_run_profile_id, btree(columns = [profile_id])) -)] -pub struct PuzzleClearRuntimeRunRow { - #[primary_key] - pub(crate) run_id: String, - pub(crate) owner_user_id: String, - pub(crate) profile_id: String, - pub(crate) status: String, - pub(crate) level_index: u32, - pub(crate) clears_done: u32, - pub(crate) snapshot_json: String, - pub(crate) started_at_ms: i64, - pub(crate) finished_at_ms: i64, - pub(crate) created_at: Timestamp, - pub(crate) updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = puzzle_clear_event, - index(accessor = by_puzzle_clear_event_profile_id, btree(columns = [profile_id])), - index(accessor = by_puzzle_clear_event_run_id, btree(columns = [run_id])) -)] -pub struct PuzzleClearEventRow { - #[primary_key] - pub(crate) event_id: String, - pub(crate) owner_user_id: String, - pub(crate) profile_id: String, - pub(crate) run_id: String, - pub(crate) event_type: String, - pub(crate) result: String, - pub(crate) occurred_at: Timestamp, -} diff --git a/server-rs/crates/spacetime-module/src/square_hole/tables.rs b/server-rs/crates/spacetime-module/src/square_hole/tables.rs deleted file mode 100644 index f86e870b9..000000000 --- a/server-rs/crates/spacetime-module/src/square_hole/tables.rs +++ /dev/null @@ -1,91 +0,0 @@ -use crate::*; - -pub(super) const WORK_VISIBLE_DEFAULT: bool = false; - -#[spacetimedb::table( - accessor = square_hole_agent_session, - index(accessor = by_square_hole_agent_session_owner_user_id, btree(columns = [owner_user_id])) -)] -pub struct SquareHoleAgentSessionRow { - #[primary_key] - pub(crate) session_id: String, - pub(crate) owner_user_id: String, - pub(crate) seed_text: String, - pub(crate) current_turn: u32, - pub(crate) progress_percent: u32, - pub(crate) stage: String, - pub(crate) config_json: String, - pub(crate) draft_json: String, - pub(crate) last_assistant_reply: String, - pub(crate) published_profile_id: String, - pub(crate) created_at: Timestamp, - pub(crate) updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = square_hole_agent_message, - index(accessor = by_square_hole_agent_message_session_id, btree(columns = [session_id])) -)] -pub struct SquareHoleAgentMessageRow { - #[primary_key] - pub(crate) message_id: String, - pub(crate) session_id: String, - pub(crate) role: String, - pub(crate) kind: String, - pub(crate) text: String, - pub(crate) created_at: Timestamp, -} - -#[spacetimedb::table( - accessor = square_hole_work_profile, - index(accessor = by_square_hole_work_owner_user_id, btree(columns = [owner_user_id])), - index(accessor = by_square_hole_work_publication_status, btree(columns = [publication_status])) -)] -pub struct SquareHoleWorkProfileRow { - #[primary_key] - pub(crate) profile_id: String, - pub(crate) work_id: String, - pub(crate) owner_user_id: String, - pub(crate) source_session_id: String, - pub(crate) author_display_name: String, - pub(crate) game_name: String, - pub(crate) theme_text: String, - pub(crate) twist_rule: String, - pub(crate) summary_text: String, - pub(crate) tags_json: String, - pub(crate) cover_image_src: String, - pub(crate) shape_count: u32, - pub(crate) difficulty: u32, - pub(crate) config_json: String, - pub(crate) publication_status: String, - pub(crate) play_count: u32, - pub(crate) updated_at: Timestamp, - pub(crate) published_at: Option, - // 后台可见性开关;新作品默认不公开,开启后才进入公开列表。 - #[default(WORK_VISIBLE_DEFAULT)] - pub(crate) visible: bool, -} - -#[spacetimedb::table( - accessor = square_hole_runtime_run, - index(accessor = by_square_hole_run_owner_user_id, btree(columns = [owner_user_id])), - index(accessor = by_square_hole_run_profile_id, btree(columns = [profile_id])) -)] -pub struct SquareHoleRuntimeRunRow { - #[primary_key] - pub(crate) run_id: String, - pub(crate) owner_user_id: String, - pub(crate) profile_id: String, - pub(crate) status: String, - pub(crate) snapshot_version: u64, - pub(crate) started_at_ms: i64, - pub(crate) duration_limit_ms: i64, - pub(crate) finished_at_ms: i64, - pub(crate) elapsed_ms: i64, - pub(crate) total_shape_count: u32, - pub(crate) completed_shape_count: u32, - pub(crate) score: u32, - pub(crate) snapshot_json: String, - pub(crate) created_at: Timestamp, - pub(crate) updated_at: Timestamp, -} diff --git a/server-rs/crates/spacetime-module/src/wooden_fish/tables.rs b/server-rs/crates/spacetime-module/src/wooden_fish/tables.rs deleted file mode 100644 index bb911b4ce..000000000 --- a/server-rs/crates/spacetime-module/src/wooden_fish/tables.rs +++ /dev/null @@ -1,94 +0,0 @@ -use crate::*; - -pub(super) const WORK_VISIBLE_DEFAULT: bool = false; - -#[spacetimedb::table( - accessor = wooden_fish_agent_session, - index(accessor = by_wooden_fish_agent_session_owner_user_id, btree(columns = [owner_user_id])) -)] -pub struct WoodenFishAgentSessionRow { - #[primary_key] - pub(crate) session_id: String, - pub(crate) owner_user_id: String, - pub(crate) current_turn: u32, - pub(crate) progress_percent: u32, - pub(crate) stage: String, - pub(crate) config_json: String, - pub(crate) draft_json: String, - pub(crate) published_profile_id: String, - pub(crate) created_at: Timestamp, - pub(crate) updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = wooden_fish_work_profile, - index(accessor = by_wooden_fish_work_owner_user_id, btree(columns = [owner_user_id])), - index(accessor = by_wooden_fish_work_publication_status, btree(columns = [publication_status])) -)] -pub struct WoodenFishWorkProfileRow { - #[primary_key] - pub(crate) profile_id: String, - pub(crate) work_id: String, - pub(crate) owner_user_id: String, - pub(crate) source_session_id: String, - pub(crate) author_display_name: String, - pub(crate) work_title: String, - pub(crate) work_description: String, - pub(crate) theme_tags_json: String, - pub(crate) hit_object_prompt: String, - pub(crate) hit_object_reference_image_src: String, - pub(crate) hit_sound_prompt: String, - pub(crate) hit_object_asset_json: String, - pub(crate) hit_sound_asset_json: String, - pub(crate) floating_words_json: String, - pub(crate) cover_image_src: String, - pub(crate) generation_status: String, - pub(crate) publication_status: String, - pub(crate) play_count: u32, - pub(crate) updated_at: Timestamp, - pub(crate) published_at: Option, - #[default(None::)] - pub(crate) background_asset_json: Option, - #[default(None::)] - pub(crate) back_button_asset_json: Option, - // 后台可见性开关;新作品默认不公开,开启后才进入公开列表。 - #[default(WORK_VISIBLE_DEFAULT)] - pub(crate) visible: bool, -} - -#[spacetimedb::table( - accessor = wooden_fish_runtime_run, - index(accessor = by_wooden_fish_run_owner_user_id, btree(columns = [owner_user_id])), - index(accessor = by_wooden_fish_run_profile_id, btree(columns = [profile_id])) -)] -pub struct WoodenFishRuntimeRunRow { - #[primary_key] - pub(crate) run_id: String, - pub(crate) owner_user_id: String, - pub(crate) profile_id: String, - pub(crate) status: String, - pub(crate) total_tap_count: u32, - pub(crate) word_counters_json: String, - pub(crate) started_at_ms: i64, - pub(crate) updated_at_ms: i64, - pub(crate) finished_at_ms: i64, - pub(crate) snapshot_json: String, - pub(crate) created_at: Timestamp, - pub(crate) updated_at: Timestamp, -} - -#[spacetimedb::table( - accessor = wooden_fish_event, - index(accessor = by_wooden_fish_event_profile_id, btree(columns = [profile_id])), - index(accessor = by_wooden_fish_event_run_id, btree(columns = [run_id])) -)] -pub struct WoodenFishEventRow { - #[primary_key] - pub(crate) event_id: String, - pub(crate) owner_user_id: String, - pub(crate) profile_id: String, - pub(crate) run_id: String, - pub(crate) event_type: String, - pub(crate) result: String, - pub(crate) occurred_at: Timestamp, -}