diff --git a/docs/audits/engineering/ENGINEERING_DEAD_CODE_CLEANUP_BATCH_C_2026-04-21.md b/docs/audits/engineering/ENGINEERING_DEAD_CODE_CLEANUP_BATCH_C_2026-04-21.md index 9997b5f1..2bec5075 100644 --- a/docs/audits/engineering/ENGINEERING_DEAD_CODE_CLEANUP_BATCH_C_2026-04-21.md +++ b/docs/audits/engineering/ENGINEERING_DEAD_CODE_CLEANUP_BATCH_C_2026-04-21.md @@ -152,6 +152,45 @@ 2. 无会话时会正常落回未登录分支 3. 不会因为探测型 401 把自己重新唤醒并刷爆控制台 +## 4.2 2026-04-22 补充修正:公开认证入口误触发 refresh + +在登录弹窗链路继续联调时,又暴露出一条更细的请求边界问题: + +1. 用户处于未登录态,浏览器本地没有 access token +2. 点击“获取验证码”会调用 `sendPhoneLoginCode()` +3. `authService.ts` 复用了通用 `requestJson(...)` +4. `apiClient.ts` 在“无本地 token 且未显式关闭 refresh”时,会先尝试 `POST /api/auth/refresh` +5. 若当前浏览器本来也没有 refresh session cookie,就会先打出一条 `401 Unauthorized` +6. 最终表现成:验证码接口真正发送前,前端控制台先报一次 `/api/auth/refresh 401` + +这条链的问题不在“验证码接口失败”,而在: + +**登录前公开认证入口被错误当成了需要先补票的受保护请求。** + +因此这里再补一条明确约束: + +1. `sendPhoneLoginCode()` +2. `loginWithPhoneCode()` +3. `authEntry()` +4. `getAuthLoginOptions()` +5. `startWechatLogin()` + +以上这些“获取登录态之前”的公开认证入口,统一显式传入: + +1. `skipAuth: true` +2. `skipRefresh: true` + +这样修完后: + +1. 未登录用户点击“获取验证码”不会先打 `/api/auth/refresh` +2. 公开认证入口不会误带旧 token,也不会制造无意义的 401 噪音 +3. 真正需要 refresh 的仍然只有已拿到登录态后的受保护请求 + +本次补修的定向验证: + +1. `npx vitest run src/services/authService.test.ts` +2. `npm run check:encoding` + --- ## 5. 本批次完成后的实际收益 diff --git a/docs/design/PLATFORM_HOME_PUBLIC_BROWSE_AND_LOGIN_MODAL_GATING_DESIGN_2026-04-19.md b/docs/design/PLATFORM_HOME_PUBLIC_BROWSE_AND_LOGIN_MODAL_GATING_DESIGN_2026-04-19.md index fd557e2f..84606332 100644 --- a/docs/design/PLATFORM_HOME_PUBLIC_BROWSE_AND_LOGIN_MODAL_GATING_DESIGN_2026-04-19.md +++ b/docs/design/PLATFORM_HOME_PUBLIC_BROWSE_AND_LOGIN_MODAL_GATING_DESIGN_2026-04-19.md @@ -114,6 +114,11 @@ - `ready`:渲染平台内容和账号能力 - `pending_bind_phone`:继续保留当前绑定手机号流程,不在这次入口改造里拆散 +首屏之后的鉴权刷新补充约束: + +- 平台内容已经渲染后,后续 access token 刷新、401 后重试、账号状态后台重算不能再把整棵平台应用卸载成 `checking / recovering` 加载页。 +- 后台鉴权重算期间需要保持当前平台页与主 Tab 状态,避免用户手动切到“创作 / 存档 / 我的”后因为鉴权事件闪屏回到首页。 + 同时需要在 context 中提供: - 当前用户 diff --git a/docs/prd/PLATFORM_SAVE_TAB_PRD_2026-04-19.md b/docs/prd/PLATFORM_SAVE_TAB_PRD_2026-04-19.md index e51924d9..2c53acbd 100644 --- a/docs/prd/PLATFORM_SAVE_TAB_PRD_2026-04-19.md +++ b/docs/prd/PLATFORM_SAVE_TAB_PRD_2026-04-19.md @@ -163,6 +163,7 @@ 注意: - 这个默认进入逻辑只在平台首屏初始化时执行,不能覆盖用户手动切换后的选择。 +- 若平台首页的公开作品、个人数据、存档列表仍在异步加载中,用户已经手动切到“创作 / 存档 / 我的”时,请求完成后也不能把当前 Tab 回刷成默认 Tab。 --- diff --git a/docs/technical/CREATION_CATEGORY_OPENING_TIMEOUT_GUARD_FIX_2026-04-22.md b/docs/technical/CREATION_CATEGORY_OPENING_TIMEOUT_GUARD_FIX_2026-04-22.md new file mode 100644 index 00000000..44d1ccbf --- /dev/null +++ b/docs/technical/CREATION_CATEGORY_OPENING_TIMEOUT_GUARD_FIX_2026-04-22.md @@ -0,0 +1,89 @@ +# 创作类别开启超时兜底修复记录 + +日期:`2026-04-22` + +## 1. 问题现象 + +创作中心点击某个创作类别后,入口卡片会进入 `正在开启` 状态,但在后端创建会话迟迟不返回时,界面没有明确失败反馈,用户体感就是“卡死”。 + +本次定位覆盖入口: + +1. `角色扮演 RPG` +2. `大鱼吃小鱼` +3. `拼图玩法` + +## 2. 根因结论 + +这次问题不是前端少写了 `finally`。 + +真实根因是: + +1. 创作类别点击后会立即把入口置为 busy。 +2. 会话创建请求如果在运行时后端 / Rust 代理 / Spacetime client 这一段长时间无返回,前端 Promise 就不会及时结束。 +3. 旧实现缺少“创作入口启动阶段”的独立超时兜底,所以 busy 会持续停留在 `正在开启`。 + +## 3. 本次修复口径 + +本轮只修“类别开启阶段不能无限等待”,不改创作工作区内部消息流与生成流的超时策略。 + +冻结口径如下: + +1. 创作类别创建会话请求统一增加启动超时。 +2. 超时后必须退出 `正在开启` busy 状态。 +3. UI 必须展示中文可读错误,不能直接显示底层 `TimeoutError` 或毫秒数字。 +4. Node 代理转发 Rust 新玩法接口时也必须有上游超时,避免代理层持续悬挂。 + +## 4. 具体落地 + +### 4.1 前端请求层 + +在 `src/services/apiClient.ts` 增加 `timeoutMs` 能力: + +1. 请求可选传入超时毫秒数。 +2. 到达超时后通过 `AbortController` 中断请求。 +3. 向上抛出统一 `TimeoutError`。 + +### 4.2 创作类别入口 + +以下创建会话入口统一使用 `15000ms` 启动超时: + +1. `src/services/rpg-creation/rpgCreationAgentClient.ts` +2. `src/services/big-fish-creation/bigFishCreationClient.ts` +3. `src/services/puzzle-agent/puzzleAgentClient.ts` + +### 4.3 错误文案 + +在 `src/components/rpg-entry/rpgEntryShared.ts` 中统一把超时错误映射为中文提示: + +1. RPG:`开启创作工作台超时,请确认运行时后端已启动后重试。` +2. Big Fish:`开启大鱼吃小鱼创作工作台超时,请确认运行时后端已启动后重试。` +3. 拼图:`开启拼图创作工作台超时,请确认运行时后端已启动后重试。` + +### 4.4 Node 代理 + +以下代理路由新增上游超时: + +1. `server-node/src/routes/bigFishProxyRoutes.ts` +2. `server-node/src/routes/puzzleProxyRoutes.ts` + +超时后返回: + +1. `大鱼吃小鱼后端响应超时` +2. `拼图后端响应超时` + +## 5. 验收标准 + +修复后需要满足: + +1. 点击创作类别时,后端长时间无返回不会无限停留在 `正在开启`。 +2. 超时后入口按钮恢复可点击。 +3. 页面展示中文错误提示。 +4. Big Fish / 拼图的新玩法代理链同样不会无限挂起。 + +## 6. 本轮回归 + +本轮至少补以下回归: + +1. `apiClient` 请求超时回归。 +2. Big Fish 类别开启超时回归。 +3. 拼图类别开启超时回归。 diff --git a/docs/technical/CREATION_ENTRY_AUTH_ERROR_GUARD_FIX_2026-04-22.md b/docs/technical/CREATION_ENTRY_AUTH_ERROR_GUARD_FIX_2026-04-22.md new file mode 100644 index 00000000..c5f0ac0b --- /dev/null +++ b/docs/technical/CREATION_ENTRY_AUTH_ERROR_GUARD_FIX_2026-04-22.md @@ -0,0 +1,85 @@ +# 创作入口鉴权错误串味修复 + +日期:`2026-04-22` + +## 1. 问题现象 + +平台首页点击“创作”后,用户在创作入口浮层或创作中心起始卡片中会看到: + +- `缺少 Authorization Bearer Token` + +该文案直接暴露了后端鉴权实现细节,不符合平台入口的产品语义,也会让用户误以为“点击创作弹窗本身就失败了”。 + +## 2. 根因拆解 + +本次问题实际由两层叠加造成: + +1. `useRpgCreationSessionController` 把“恢复旧 Agent 会话失败”的错误写入 `creationTypeError`。 +2. `PlatformEntryFlowShellImpl` 又把 `creationTypeError` 同时透传给: + - 创作中心起始卡片 `createError` + - 创作类型浮窗 `error` + - 平台首页 `platformError` + +结果是: + +- 旧会话恢复失败 +- 未登录态残留会话恢复 +- 本地 access token 丢失但 refresh cookie 仍在 + +这些与“当前点击新建创作”并不完全等价的错误,被错误地展示到了新建创作入口上。 + +## 3. 修复策略 + +### 3.1 错误分层 + +在 `useRpgCreationSessionController` 中新增: + +- `agentWorkspaceRestoreError` + +约束: + +1. 旧 Agent 会话恢复失败只写入 `agentWorkspaceRestoreError` +2. 用户主动点击新建创作失败才写入 `creationTypeError` +3. 创作中心起始卡片和创作类型浮窗只展示“新建入口错误” +4. 平台页和工作区恢复占位文案展示“恢复态错误” + +### 3.2 鉴权兜底 + +在 `fetchWithApiAuth` 中补充规则: + +1. 受保护请求若本地没有 bearer token +2. 且请求未声明 `skipAuth / skipRefresh` +3. 先尝试 `ensureStoredAccessToken()` 静默补票 +4. 补票失败再继续原始请求 + +这样可以覆盖“refresh cookie 仍有效,但本地 access token 丢失”的场景,避免后端直接返回“缺少 Authorization Bearer Token”。 + +### 3.3 用户态错误文案收敛 + +`resolveRpgEntryErrorMessage` 对 `401 UNAUTHORIZED` 与 `缺少 Authorization Bearer Token` 统一映射为: + +- `当前登录状态已失效,请重新登录后继续。` + +目标是把后端实现细节收束成平台用户可理解的恢复动作。 + +## 4. 影响范围 + +本轮覆盖: + +1. RPG / Custom World 创作入口 +2. 平台创作中心起始卡片 +3. 平台创作类型浮窗 +4. 统一前端 API 鉴权请求层 + +本轮不改: + +1. 后端 `401` 契约 +2. 登录弹窗交互 +3. Big Fish / Puzzle 的后端路由鉴权策略 + +## 5. 验收 + +1. 点击“创作”后,不再出现原始 `Authorization Bearer Token` 报错文案 +2. 旧会话恢复失败时,错误只停留在恢复上下文,不污染新建创作入口 +3. 本地 token 丢失但 refresh 仍有效时,前端可自动补票后继续请求 +4. 相关测试与编码检查通过 diff --git a/docs/technical/CREATION_HUB_CARD_ACTIONS_2026-04-22.md b/docs/technical/CREATION_HUB_CARD_ACTIONS_2026-04-22.md new file mode 100644 index 00000000..415ab740 --- /dev/null +++ b/docs/technical/CREATION_HUB_CARD_ACTIONS_2026-04-22.md @@ -0,0 +1,58 @@ +# 创作中心作品卡操作入口落地说明 + +日期:`2026-04-22` + +## 1. 本次目标 + +创作中心作品卡需要补齐两个直接操作入口: + +1. **体验**:对已经满足运行条件的作品,直接从卡片启动对应玩法,不再必须先进详情页。 +2. **删除**:对已有正式删除契约的 RPG 已发布作品,直接从卡片删除并刷新创作中心。 + +## 2. 操作语义 + +| 作品类型 | 状态 | 主按钮 | 体验入口 | 删除入口 | +| --- | --- | --- | --- | --- | +| RPG Agent 草稿 | `draft` | `继续创作` / `继续完善` | 不展示,草稿需要先走发布链 | 不展示,本轮不新增 Agent session 物理删除 | +| RPG 已发布作品 | `published` 且 `canEnterWorld=true` | `查看详情` | 展示 `体验`,直接调用现有进入世界链 | 展示 `删除`,走 owner-only 软删除 | +| 拼图草稿 | `draft` | `查看详情` | 不展示 | 不展示,本轮不新增拼图删除契约 | +| 拼图已发布作品 | `published` | `查看详情` | 展示 `体验`,直接调用 `startPuzzleRun` | 不展示,本轮不新增拼图删除契约 | + +## 3. 后端边界 + +RPG 删除必须继续遵守后端治理里的软删除规则: + +1. `custom_world_profile` 增加 `deleted_at` 语义字段。 +2. 删除时不物理删除 profile,只设置 `deleted_at`、把发布态回退为 `draft`、清空 `published_at`,并删除公开 gallery projection。 +3. `library / gallery detail / works` 读取默认过滤 `deleted_at != null` 的作品。 +4. 重复删除同一 profile 保持幂等,返回当前可见作品列表。 + +## 4. 前端边界 + +1. 卡片只做表现和动作分发,不在前端拼删除逻辑。 +2. 删除前使用浏览器确认,避免移动端误触。 +3. 卡片按钮移动端优先换行铺开,避免小屏幕上三个按钮拥挤。 +4. 不在 UI 中默认展示大段规则说明,失败信息沿用创作中心现有错误 banner。 + +## 5. 本轮不做 + +1. 不新增 Agent session 草稿删除。 +2. 不新增拼图作品删除。 +3. 不新增独立删除面板。 +4. 不新建创作页或运行时页面,只复用现有 `CustomWorldCreationHub`、RPG 进入世界链和拼图运行时链。 + +## 6. 已落地结果 + +1. 创作中心 RPG 已发布作品卡主按钮统一调整为 `查看详情`,避免和直接进入玩法的动作混淆。 +2. RPG 与拼图已发布作品卡新增独立 `体验` 入口,直接复用各自现有运行时进入链路。 +3. RPG 已发布作品卡新增 `删除` 入口,调用 `/api/runtime/custom-world-library/{profile_id}` 的 `DELETE` 路由,按 owner-only 软删除规则刷新作品列表与公开广场。 +4. 创作中心详情页原有删除链路继续保留,和卡片删除共用同一后端删除契约。 + +## 7. 已验证 + +1. `corepack pnpm vitest run src/components/rpg-entry/RpgEntryFlowShell.agent.interaction.test.tsx` +2. 交互测试已覆盖: + - 创作卡点击 `查看详情` 进入详情页。 + - 创作卡点击 `体验` 直接进入世界选择链路。 + - 创作卡点击 `删除` 直接从作品列表移除。 + - 详情页删除入口在新卡片动作语义下仍然可用。 diff --git a/docs/technical/FOUNDATION_DRAFT_OPTIONAL_TEXT_FIELD_GUARD_FIX_2026-04-22.md b/docs/technical/FOUNDATION_DRAFT_OPTIONAL_TEXT_FIELD_GUARD_FIX_2026-04-22.md new file mode 100644 index 00000000..7e25680b --- /dev/null +++ b/docs/technical/FOUNDATION_DRAFT_OPTIONAL_TEXT_FIELD_GUARD_FIX_2026-04-22.md @@ -0,0 +1,62 @@ +# 世界底稿可选文本字段缺省防护修复 2026-04-22 + +更新时间:`2026-04-22` + +## 1. 问题背景 + +用户在生成世界底稿时,进度在“补全场景角色细节”前后暂停,最终 operation 进入失败态。 + +数据库中的失败记录为: + +```text +sessionId = custom-world-agent-session-c8fc39e07da4537cce75314bf4a5f92b +operation = draft_foundation +status = failed +phaseLabel = 编译世界底稿 +error = Cannot read properties of undefined (reading 'replace') +``` + +这说明模型分批生成链路已经推进到末端,失败点不是“补全场景角色细节”模型请求本身,而是后续把分批结果编译成 foundation draft / 兼容结果快照时遇到可选文本字段缺省。 + +## 2. 根因 + +`server-node/src/services/customWorldAgentFoundationDraftService.ts` 内部的 `clampText(value: string, maxLength: number)` 直接调用: + +```ts +value.replace(...) +``` + +但 `CustomWorldGenerationRoleOutline` 中以下字段是可选字段: + +1. `visualDescription` +2. `actionDescription` +3. `sceneVisualDescription` + +模型在“场景角色叙事基础 / 档案细节”批次中允许只补关键叙事字段,不保证每批都回传所有可选视觉字段。合并详情后,某些角色仍可能缺少这些字段。 + +当编译函数执行: + +```ts +clampText(role.visualDescription, 36) +``` + +如果 `role.visualDescription` 为 `undefined`,就会触发 `Cannot read properties of undefined (reading 'replace')`,导致整版世界底稿失败。 + +## 3. 修复原则 + +1. 可选文本字段缺省属于正常模型输出波动,不应阻断世界底稿主链。 +2. 编译层必须把 `undefined/null/非字符串` 统一归一为空文本,再进入裁剪逻辑。 +3. foundation draft 主链应继续保留中文 fallback,不能用英文占位替代中文内容。 +4. 回归测试需要覆盖“场景角色详情批次缺省可选视觉字段”的真实失败形态。 + +## 4. 本次落地范围 + +1. 加固 `customWorldAgentFoundationDraftService.ts` 的本地文本裁剪入口。 +2. 加固 `runtime-profile/normalizeShared.ts` 的公共文本裁剪入口,避免兼容 runtime profile 后续遇到同类缺省字段。 +3. 新增回归测试,模拟场景角色详情批次省略可选视觉字段时仍能成功生成世界底稿。 + +## 5. 验收标准 + +1. 同类模型输出缺省 `visualDescription/actionDescription/sceneVisualDescription` 时,底稿生成不再抛出 `.replace` undefined。 +2. operation 应继续推进到 `completed`,并进入结果页可浏览的草稿卡链路。 +3. 测试覆盖这次失败的核心路径。 diff --git a/docs/technical/PLATFORM_ENTRY_AUTH_GUARD_AND_ASSET_404_DEDUP_FIX_2026-04-22.md b/docs/technical/PLATFORM_ENTRY_AUTH_GUARD_AND_ASSET_404_DEDUP_FIX_2026-04-22.md new file mode 100644 index 00000000..162ba179 --- /dev/null +++ b/docs/technical/PLATFORM_ENTRY_AUTH_GUARD_AND_ASSET_404_DEDUP_FIX_2026-04-22.md @@ -0,0 +1,121 @@ +# 平台入口鉴权守卫与资源 404 去重修复 + +日期:`2026-04-22` + +## 1. 问题现象 + +平台入口当前存在两类前端噪音: + +1. 登录态正在 `checking / recovering` 时,首页内容为了避免闪烁会继续保留旧 `user`,但部分受保护请求直接以 `user.id` 作为触发条件,导致 `Puzzle works` 列表仍会提前请求并打出 `401 Unauthorized`。 +2. 卡面、封面和角色图命中旧 `/generated-*` 路径且后端确认对象不存在时,前端每次渲染都会重新请求 `/api/assets/read-url`,导致控制台重复刷 `404 Not Found`。 + +## 2. 根因拆解 + +### 2.1 受保护请求误判 + +`AuthGate` 当前为了保持平台内容稳定,会在鉴权自检阶段继续向子树暴露 `readyUser`。 +这本来只该影响展示层,但 `PlatformEntryFlowShellImpl` 与 `useRpgEntryBootstrap` 里部分逻辑直接用: + +1. `Boolean(user)` +2. `user?.id` + +来判断是否可以读取受保护数据,结果把“展示继续挂载”误当成“鉴权已经稳定”。 + +### 2.2 旧资源路径重复换签 + +`assetReadUrlService` 只缓存成功返回的签名 URL,没有缓存“对象不存在”这一失败结果。 +当 UI 多次渲染同一个缺失资源时,会持续对同一 legacy path 重复调用: + +1. `GET /api/assets/read-url?...` +2. 后端稳定返回 `404` +3. 前端再次重试同一路径 + +## 3. 修复策略 + +### 3.1 显式区分展示态与可读保护数据态 + +在 `AuthUiContext` 中新增: + +1. `canAccessProtectedData` + +约束: + +1. `user` 仍可在 `checking / recovering` 阶段用于保持 UI 挂载。 +2. 只有 `status === 'ready' && Boolean(user)` 时,`canAccessProtectedData` 才为 `true`。 +3. 平台入口 bootstrap 与拼图作品列表请求统一改为依赖 `canAccessProtectedData`,不再直接拿 `user.id` 当鉴权就绪条件。 + +### 3.2 为 404 旧资源增加短期失败缓存 + +在 `assetReadUrlService` 中新增失败缓存: + +1. 仅针对 `ApiClientError.status === 404` 的 legacy path 读取失败进行缓存。 +2. 默认缓存窗口为 `60s`。 +3. 同一路径在失败缓存有效期内直接短路,不再重复向 `/api/assets/read-url` 发请求。 +4. 成功读取后清理对应失败缓存。 + +说明: + +1. 本轮只做“404 去重”,不改原始图片回退逻辑。 +2. `ResolvedAssetImage` 仍会在换签失败时保留原路径回退,避免界面直接空白。 + +## 4. 影响范围 + +本轮覆盖: + +1. `AuthGate` 鉴权 UI 上下文 +2. 平台入口 bootstrap +3. 拼图作品列表预取 +4. 旧 generated 资源换签服务 +5. 相关交互测试与资源服务测试 + +本轮不改: + +1. 后端 `401 / 404` 契约 +2. 登录弹窗流程 +3. 旧 `/generated-*` 同源代理路由 + +## 5. 验收 + +1. 鉴权自检阶段平台内容可继续显示,但不会再误发 `Puzzle works` 受保护请求。 +2. `当前登录状态已失效,请重新登录后继续。` 仍是入口层统一错误文案。 +3. 同一条缺失的 legacy 资源路径在短时间内不会重复刷 `/api/assets/read-url` 的 `404`。 +4. 相关测试通过,编码检查通过。 + +## 6. 2026-04-22 补充修正:登录成功后拼图作品列表 401 循环 + +### 6.1 问题现象 + +用户已经完成登录,但平台入口进入创作区后,控制台仍持续出现: + +1. `GET /api/runtime/puzzle/works 401 (Unauthorized)` +2. `AuthGate` 被动收到全局鉴权变更事件 +3. 平台壳层重新 hydrate +4. 拼图作品列表再次自动请求 + +最终表现成“登录成功后仍循环刷 401”。 + +### 6.2 根因拆解 + +这次实际是前后端两层边界叠加: + +1. Node 代理路由 `server-node/src/routes/puzzleProxyRoutes.ts` 已经完成外层 JWT 校验,并把用户 id 通过内部转发头带给 Rust API。 +2. Rust API `server-rs/crates/api-server/src/auth.rs` 之前只允许 `big-fish` 路径信任这类内部转发头,没有把 `/api/runtime/puzzle/**` 纳入白名单。 +3. 因此拼图代理链路会在 Node 首层通过后,Rust 二跳再次因为“缺少 Bearer”返回 `401`。 +4. 前端 `fetchWithApiAuth(...)` 在“首个 401 -> refresh 成功 -> 重试后的业务请求仍 401”时,又会把刚刷新到的 token 清掉并广播一次全局鉴权变更。 +5. `AuthGate` 监听到事件后重新 hydrate,平台入口又重新预取拼图作品列表,于是形成循环。 + +### 6.3 修复策略 + +1. Rust `require_bearer_auth` 新增 `allows_internal_forwarded_auth(...)`,显式允许: + - `/api/runtime/big-fish/**` + - `/api/runtime/puzzle/**` +2. 前端 `fetchWithApiAuth(...)` 调整 401 后置处理: + - 只有“尚未尝试 refresh”的 401,才清 token 并广播鉴权变化 + - 若 refresh 已成功,但重试请求仍返回 401,则保留新 token,把失败收敛为当前业务请求自身错误 +3. 补充请求层回归测试,覆盖“refresh 成功但重试仍 401”的场景。 + +### 6.4 修后约束 + +1. 拼图运行时代理链路与大鱼链路统一使用同一套内部已鉴权转发约束。 +2. 单个业务接口的 401 不再自动放大成整个平台的登录态震荡。 +3. 平台首页和创作区仍保留原有 `canAccessProtectedData` 守卫,不会在未登录态预取拼图私有数据。 diff --git a/docs/technical/PLATFORM_MAIN_TAB_RENDER_STABILITY_FIX_2026-04-22.md b/docs/technical/PLATFORM_MAIN_TAB_RENDER_STABILITY_FIX_2026-04-22.md new file mode 100644 index 00000000..7fffd410 --- /dev/null +++ b/docs/technical/PLATFORM_MAIN_TAB_RENDER_STABILITY_FIX_2026-04-22.md @@ -0,0 +1,36 @@ +# 平台主 Tab 渲染稳定性修复 + +日期:`2026-04-22` + +## 问题现象 + +平台首页在“首页 / 创作 / 存档 / 我的”之间切换时,页面组件会出现短暂闪烁、错位或像是先渲染上一页元素再变成当前页的感觉。 + +## 根因拆解 + +本次问题集中在表现层: + +1. 四个主 Tab 共用同一个 `content` 根节点,React 在条件分支切换时会按位置复用上一页 DOM,图片卡片、面板和按钮容易在首帧被改造成新页面结构。 +2. 移动端和桌面端都共用一个滚动容器,切到新 Tab 时会继承上一页的 `scrollTop`,用户会先看到错位位置或短暂空白。 +3. 创作中心等重页面被卸载后再挂载,内部筛选状态、图片加载状态和布局测量会重新跑一遍,来回切换时会放大闪烁。 + +## 修复策略 + +1. 主 Tab 内容改为稳定面板栈,四个 Tab 各自拥有独立的内容根节点。 +2. 非当前 Tab 使用隐藏类保留挂载,不参与布局和交互,避免每次切换销毁再重建页面。 +3. 每个 Tab 面板自带独立滚动容器,切换时不再继承其他 Tab 的滚动位置。 +4. 桌面端首页保留控制台化布局,非首页 Tab 继续复用移动端内容结构,但放入桌面独立滚动面板中。 + +## 后续约束 + +1. 平台主 Tab 新增页面时,优先加入现有面板栈,不要恢复成单个 `content` 条件分支。 +2. Tab 切换只做可见性切换,不要默认触发页面级 `AnimatePresence` 进出场。 +3. 需要展示加载态时,优先在当前 Tab 内部局部展示骨架,不要把整页替换为空白加载页。 +4. UI 中不增加规则说明类文案,只保留入口、状态和业务信息。 + +## 验收要点 + +1. 手机端连续点击四个底部 Tab,不出现上一页元素先闪一下再变成当前页。 +2. 在首页滚动后切到“我的 / 存档”,新页面不继承首页滚动位置。 +3. 创作 Tab 来回切换后,创作中心内部筛选和已加载卡片保持稳定。 +4. 桌面端左侧导航切换时,顶部栏和左侧导航不重挂载,主内容不出现整页淡入闪烁。 diff --git a/docs/technical/README.md b/docs/technical/README.md index 3c8d7daa..fb2ff92b 100644 --- a/docs/technical/README.md +++ b/docs/technical/README.md @@ -4,6 +4,8 @@ ## 文档列表 +- [CREATION_HUB_CARD_ACTIONS_2026-04-22.md](./CREATION_HUB_CARD_ACTIONS_2026-04-22.md):冻结创作中心作品卡“体验 / 删除”入口的最小落地语义,明确 RPG 已发布作品软删除、卡片直达运行时,以及暂不扩草稿 / 拼图删除契约。 +- [CREATION_CATEGORY_OPENING_TIMEOUT_GUARD_FIX_2026-04-22.md](./CREATION_CATEGORY_OPENING_TIMEOUT_GUARD_FIX_2026-04-22.md):记录创作中心点击类别后长时间停留在“正在开启”的根因与修复口径,收口前端创建会话启动超时、中文错误提示以及 Big Fish / 拼图代理上游超时兜底。 - [RUST_LOCAL_AND_REMOTE_DEPLOYMENT_SCRIPTS_2026-04-22.md](./RUST_LOCAL_AND_REMOTE_DEPLOYMENT_SCRIPTS_2026-04-22.md):冻结 Rust 本地一键联调脚本与 Ubuntu 发布包构建脚本的执行口径,覆盖 `npm run dev:rust`、`npm run build:rust:ubuntu`、Vite release、Linux `api-server`、SpacetimeDB wasm、启动停止脚本、默认 scp 上传和安全清库开关。 - [RUST_API_SERVER_ROUTE_INDEX_2026-04-22.md](./RUST_API_SERVER_ROUTE_INDEX_2026-04-22.md):记录当前 Rust `api-server` 已挂载的 96 条 Axum 路由,按 auth、assets、runtime、custom world、story、generated path 等挂载面归类,用于对照 Node 能力基线与切流 smoke 清单。 - [BACKEND_REWRITE_CROSS_CUTTING_GOVERNANCE_2026-04-22.md](./BACKEND_REWRITE_CROSS_CUTTING_GOVERNANCE_2026-04-22.md):冻结后端重写收口阶段的横向治理规则,覆盖 TypeScript contract 到 Rust DTO 映射、SpacetimeDB schema 演进、大对象 / workflow cache 存储边界和文档维护门禁。 diff --git a/docs/technical/UNIFIED_CREATION_AGENT_CHAT_FRAMEWORK_2026-04-22.md b/docs/technical/UNIFIED_CREATION_AGENT_CHAT_FRAMEWORK_2026-04-22.md index 3dbb6e28..d78d90b1 100644 --- a/docs/technical/UNIFIED_CREATION_AGENT_CHAT_FRAMEWORK_2026-04-22.md +++ b/docs/technical/UNIFIED_CREATION_AGENT_CHAT_FRAMEWORK_2026-04-22.md @@ -6,7 +6,7 @@ 把平台内所有“先 Agent 聊天收束锚点,再生成结果页”的创作流程统一到一套前端框架: -1. UI 交互共用一套:标题区、返回、生成结果页按钮、锚点卡片、进度条、操作横幅、聊天气泡、推荐回复、输入框。 +1. UI 交互共用一套:标题区、返回、进度条、进度操作按钮、生成结果页按钮、操作横幅、聊天气泡、推荐回复、输入框。 2. 对话进度管理共用一套:进度归一化、忙碌态判断、SSE `reply_delta / session / error` 解析、操作状态展示。 3. 品类差异只允许落在配置和后端领域逻辑:锚点列表、提示词/占位文案、生成结果页 action、快捷补全/总结话术、结果页与运行态。 @@ -47,6 +47,13 @@ src/services/creation-agent/ 6. `streamingReplyText / isStreamingReply / isBusy / error` 7. `onBack / onSubmitText / onPrimaryAction / onQuickAction` +聊天页展示规则: + +1. Agent 聊天页不展示锚点内容卡片,锚点只作为进度与后端生成依据。 +2. 生成草稿 / 生成结果页主按钮只在 `progressPercent` 归一化后达到 `100%` 时显示。 +3. 进度条下方承载“总结当前设定”“补全剩余设定”等进度操作按钮。 +4. “补全剩余设定”必须配置 `minTurn: 2`,对话不足两轮时不显示。 + 组件内部只做表现,不读取任何 RPG、Big Fish、Puzzle 专属字段。 ### 3.2 会话 view model @@ -121,6 +128,6 @@ src/services/creation-agent/ ## 6. 验收 1. 三个创作流程的 Agent 聊天区都通过 `CreationAgentWorkspace` 渲染。 -2. Big Fish 与 Puzzle 不再各自复制聊天 UI、锚点卡片、输入框和进度条。 +2. Big Fish 与 Puzzle 不再各自复制聊天 UI、输入框和进度条。 3. RPG / Custom World 保留原有“总结当前设定 / 补全剩余设定 / 生成游戏设定草稿”交互。 4. 定向 TypeScript / ESLint / 编码检查通过。 diff --git a/server-node/src/modules/custom-world/runtime-profile/normalizeShared.ts b/server-node/src/modules/custom-world/runtime-profile/normalizeShared.ts index 9a18ef63..a67f613c 100644 --- a/server-node/src/modules/custom-world/runtime-profile/normalizeShared.ts +++ b/server-node/src/modules/custom-world/runtime-profile/normalizeShared.ts @@ -98,8 +98,8 @@ export function normalizeTags(value: unknown, fallbackTags: string[] = []) { ].slice(0, 5); } -export function clampText(value: string, maxLength: number) { - const normalized = value.trim().replace(/\s+/g, ' '); +export function clampText(value: unknown, maxLength: number) { + const normalized = toText(value).replace(/\s+/g, ' '); if (!normalized) { return ''; } diff --git a/server-node/src/routes/bigFishProxyRoutes.ts b/server-node/src/routes/bigFishProxyRoutes.ts index fe502aee..056ee721 100644 --- a/server-node/src/routes/bigFishProxyRoutes.ts +++ b/server-node/src/routes/bigFishProxyRoutes.ts @@ -18,6 +18,7 @@ import { routeMeta } from '../middleware/routeMeta.js'; const BIG_FISH_ROUTE_VERSION = '2026-04-22'; const DEFAULT_RUST_API_TARGET = 'http://127.0.0.1:3100'; const DEFAULT_INTERNAL_API_SECRET = 'genarrative-dev-internal-bridge'; +const BIG_FISH_UPSTREAM_TIMEOUT_MS = 15000; const INTERNAL_USER_HEADER = 'x-genarrative-authenticated-user-id'; const INTERNAL_SECRET_HEADER = 'x-genarrative-internal-api-secret'; @@ -106,12 +107,17 @@ async function proxyBigFishRequest(params: { : undefined; let upstreamResponse: globalThis.Response; + const controller = new AbortController(); + const timeoutId = setTimeout(() => { + controller.abort(); + }, BIG_FISH_UPSTREAM_TIMEOUT_MS); try { upstreamResponse = await fetch(upstreamUrl, { method, // 这里显式转发“已通过 Node 校验的用户身份”,让 Big Fish 继续由 Rust 真相后端处理。 headers: pickForwardHeaders(request, context, userId), body, + signal: controller.signal, }); } catch (error) { request.log?.error( @@ -122,7 +128,13 @@ async function proxyBigFishRequest(params: { }, 'big fish upstream request failed', ); - throw upstreamError('大鱼吃小鱼后端暂时不可用'); + throw upstreamError( + error instanceof Error && error.name === 'AbortError' + ? '大鱼吃小鱼后端响应超时' + : '大鱼吃小鱼后端暂时不可用', + ); + } finally { + clearTimeout(timeoutId); } prepareApiResponse(request, response, { diff --git a/server-node/src/routes/puzzleProxyRoutes.ts b/server-node/src/routes/puzzleProxyRoutes.ts index 6b92f2fa..2574028e 100644 --- a/server-node/src/routes/puzzleProxyRoutes.ts +++ b/server-node/src/routes/puzzleProxyRoutes.ts @@ -18,6 +18,7 @@ import { routeMeta } from '../middleware/routeMeta.js'; const PUZZLE_ROUTE_VERSION = '2026-04-22'; const DEFAULT_RUST_API_TARGET = 'http://127.0.0.1:3100'; const DEFAULT_INTERNAL_API_SECRET = 'genarrative-dev-internal-bridge'; +const PUZZLE_UPSTREAM_TIMEOUT_MS = 15000; const INTERNAL_USER_HEADER = 'x-genarrative-authenticated-user-id'; const INTERNAL_SECRET_HEADER = 'x-genarrative-internal-api-secret'; @@ -106,11 +107,16 @@ async function proxyPuzzleRequest(params: { : undefined; let upstreamResponse: globalThis.Response; + const controller = new AbortController(); + const timeoutId = setTimeout(() => { + controller.abort(); + }, PUZZLE_UPSTREAM_TIMEOUT_MS); try { upstreamResponse = await fetch(upstreamUrl, { method, headers: pickForwardHeaders(request, context, userId), body, + signal: controller.signal, }); } catch (error) { request.log?.error( @@ -121,7 +127,13 @@ async function proxyPuzzleRequest(params: { }, 'puzzle upstream request failed', ); - throw upstreamError('拼图后端暂时不可用'); + throw upstreamError( + error instanceof Error && error.name === 'AbortError' + ? '拼图后端响应超时' + : '拼图后端暂时不可用', + ); + } finally { + clearTimeout(timeoutId); } prepareApiResponse(request, response, { diff --git a/server-node/src/services/customWorldAgentFoundationDraftService.test.ts b/server-node/src/services/customWorldAgentFoundationDraftService.test.ts index 45674c11..d566871d 100644 --- a/server-node/src/services/customWorldAgentFoundationDraftService.test.ts +++ b/server-node/src/services/customWorldAgentFoundationDraftService.test.ts @@ -5,7 +5,11 @@ import type { UpstreamLlmClient } from './llmClient.js'; import { CustomWorldAgentFoundationDraftService } from './customWorldAgentFoundationDraftService.js'; import { normalizeFoundationDraftProfile } from './customWorldAgentDraftCompiler.js'; -function createFoundationDraftLlmClient(): UpstreamLlmClient { +function createFoundationDraftLlmClient( + options: { + omitStoryOptionalVisualFields?: boolean; + } = {}, +): UpstreamLlmClient { let roleOutlineBatch = 0; let landmarkSeedBatch = 0; let landmarkNetworkBatch = 0; @@ -68,9 +72,15 @@ function createFoundationDraftLlmClient(): UpstreamLlmClient { title: '旧友兼宿敌', role: '沉船商盟引路人', description: '他像旧友,也像最早知道假航灯秘密的人。', - visualDescription: '衣角总带着潮水味,像是刚从夜雾里走出来。', - actionDescription: '会不断试探玩家到底愿不愿意回到旧航路。', - sceneVisualDescription: '总在钟声停下后的空隙里现身。', + ...(options.omitStoryOptionalVisualFields + ? {} + : { + visualDescription: + '衣角总带着潮水味,像是刚从夜雾里走出来。', + actionDescription: + '会不断试探玩家到底愿不愿意回到旧航路。', + sceneVisualDescription: '总在钟声停下后的空隙里现身。', + }), initialAffinity: 6, relationshipHooks: ['和玩家共享一段无法翻篇的旧灯塔往事'], tags: ['旧友', '宿敌'], @@ -80,9 +90,14 @@ function createFoundationDraftLlmClient(): UpstreamLlmClient { title: '守灯会巡夜官', role: '守灯会前台接口人', description: '她负责把守灯会的怀疑与命令直接压到玩家面前。', - visualDescription: '披着潮湿斗篷,眼神总先看灯芯再看人。', - actionDescription: '要求玩家立刻证明自己还配站回灯塔。', - sceneVisualDescription: '总把巡夜灯举得很高,不给人躲闪空间。', + ...(options.omitStoryOptionalVisualFields + ? {} + : { + visualDescription: '披着潮湿斗篷,眼神总先看灯芯再看人。', + actionDescription: '要求玩家立刻证明自己还配站回灯塔。', + sceneVisualDescription: + '总把巡夜灯举得很高,不给人躲闪空间。', + }), initialAffinity: 6, relationshipHooks: ['会逼玩家更早站队'], tags: ['守灯会', '巡夜'], @@ -198,9 +213,15 @@ function createFoundationDraftLlmClient(): UpstreamLlmClient { title: '旧友兼宿敌', role: '沉船商盟引路人', description: '他像旧友,也像最早知道假航灯秘密的人。', - visualDescription: '衣角总带着潮水味,像是刚从夜雾里走出来。', - actionDescription: '会不断试探玩家到底愿不愿意回到旧航路。', - sceneVisualDescription: '总在钟声停下后的空隙里现身。', + ...(options.omitStoryOptionalVisualFields + ? {} + : { + visualDescription: + '衣角总带着潮水味,像是刚从夜雾里走出来。', + actionDescription: + '会不断试探玩家到底愿不愿意回到旧航路。', + sceneVisualDescription: '总在钟声停下后的空隙里现身。', + }), relationshipHooks: ['和玩家共享一段无法翻篇的旧灯塔往事'], tags: ['旧友', '宿敌'], }, @@ -209,9 +230,14 @@ function createFoundationDraftLlmClient(): UpstreamLlmClient { title: '守灯会巡夜官', role: '守灯会前台接口人', description: '她负责把守灯会的怀疑与命令直接压到玩家面前。', - visualDescription: '披着潮湿斗篷,眼神总先看灯芯再看人。', - actionDescription: '要求玩家立刻证明自己还配站回灯塔。', - sceneVisualDescription: '总把巡夜灯举得很高,不给人躲闪空间。', + ...(options.omitStoryOptionalVisualFields + ? {} + : { + visualDescription: '披着潮湿斗篷,眼神总先看灯芯再看人。', + actionDescription: '要求玩家立刻证明自己还配站回灯塔。', + sceneVisualDescription: + '总把巡夜灯举得很高,不给人躲闪空间。', + }), relationshipHooks: ['会逼玩家更早站队'], tags: ['守灯会', '巡夜'], }, @@ -228,9 +254,15 @@ function createFoundationDraftLlmClient(): UpstreamLlmClient { title: '旧友兼宿敌', role: '沉船商盟引路人', description: '他像旧友,也像最早知道假航灯秘密的人。', - visualDescription: '衣角总带着潮水味,像是刚从夜雾里走出来。', - actionDescription: '会不断试探玩家到底愿不愿意回到旧航路。', - sceneVisualDescription: '总在钟声停下后的空隙里现身。', + ...(options.omitStoryOptionalVisualFields + ? {} + : { + visualDescription: + '衣角总带着潮水味,像是刚从夜雾里走出来。', + actionDescription: + '会不断试探玩家到底愿不愿意回到旧航路。', + sceneVisualDescription: '总在钟声停下后的空隙里现身。', + }), relationshipHooks: ['和玩家共享一段无法翻篇的旧灯塔往事'], tags: ['旧友', '宿敌'], }, @@ -239,9 +271,14 @@ function createFoundationDraftLlmClient(): UpstreamLlmClient { title: '守灯会巡夜官', role: '守灯会前台接口人', description: '她负责把守灯会的怀疑与命令直接压到玩家面前。', - visualDescription: '披着潮湿斗篷,眼神总先看灯芯再看人。', - actionDescription: '要求玩家立刻证明自己还配站回灯塔。', - sceneVisualDescription: '总把巡夜灯举得很高,不给人躲闪空间。', + ...(options.omitStoryOptionalVisualFields + ? {} + : { + visualDescription: '披着潮湿斗篷,眼神总先看灯芯再看人。', + actionDescription: '要求玩家立刻证明自己还配站回灯塔。', + sceneVisualDescription: + '总把巡夜灯举得很高,不给人躲闪空间。', + }), relationshipHooks: ['会逼玩家更早站队'], tags: ['守灯会', '巡夜'], }, @@ -322,3 +359,49 @@ test('foundation draft service builds draft fields directly from framework inste assert.equal(legacyStoryNpcs[0]?.name, '沈砺'); assert.equal(legacyStoryNpcs[0]?.backstory, undefined); }); + +test('foundation draft service tolerates missing optional scene role visual fields', async () => { + const service = new CustomWorldAgentFoundationDraftService( + createFoundationDraftLlmClient({ + omitStoryOptionalVisualFields: true, + }), + ); + + const draft = await service.generate({ + creatorIntent: { + sourceMode: 'freeform', + rawSettingText: '被海雾反复切开的列岛世界。', + worldHook: '旧灯塔、假航灯与失控航路重新把列岛撕开。', + themeKeywords: ['海岛', '悬疑'], + toneDirectives: ['冷峻', '潮湿'], + playerPremise: '玩家是被迫返乡的失职守灯人', + openingSituation: '开局时正站在即将熄灭的旧灯塔上', + coreConflicts: ['守灯会与沉船商盟争夺旧航路解释权'], + keyFactions: [], + keyCharacters: [], + keyLandmarks: [], + iconicElements: ['潮雾钟声', '盐火灯塔'], + forbiddenDirectives: [], + }, + anchorPack: { + creatorIntentSummary: '潮雾、旧灯塔、假航灯和被迫返乡的守灯人。', + }, + }); + + const normalized = normalizeFoundationDraftProfile(draft); + const legacyResultProfile = (draft as Record) + .legacyResultProfile as Record | undefined; + const legacyStoryNpcs = Array.isArray(legacyResultProfile?.storyNpcs) + ? (legacyResultProfile?.storyNpcs as Array>) + : []; + + assert.ok(normalized); + assert.equal(normalized?.storyNpcs.length, 2); + assert.equal(normalized?.storyNpcs[0]?.name, '沈砺'); + assert.equal( + normalized?.storyNpcs[0]?.publicMask, + '他像旧友,也像最早知道假航灯秘密的人。', + ); + assert.ok((normalized?.storyNpcs[0]?.currentPressure ?? '').trim()); + assert.equal(legacyStoryNpcs[0]?.visualDescription, undefined); +}); diff --git a/server-node/src/services/customWorldAgentFoundationDraftService.ts b/server-node/src/services/customWorldAgentFoundationDraftService.ts index fe6b53b0..fbd79f88 100644 --- a/server-node/src/services/customWorldAgentFoundationDraftService.ts +++ b/server-node/src/services/customWorldAgentFoundationDraftService.ts @@ -61,8 +61,8 @@ function toRecord(value: unknown) { : null; } -function clampText(value: string, maxLength: number) { - const normalized = value.replace(/\s+/gu, ' ').trim(); +function clampText(value: unknown, maxLength: number) { + const normalized = toText(value).replace(/\s+/gu, ' ').trim(); if (!normalized) { return ''; } diff --git a/server-rs/crates/api-server/src/app.rs b/server-rs/crates/api-server/src/app.rs index 00261e40..af075a9b 100644 --- a/server-rs/crates/api-server/src/app.rs +++ b/server-rs/crates/api-server/src/app.rs @@ -41,13 +41,13 @@ use crate::{ generate_character_visual, get_character_visual_job, publish_character_visual, }, custom_world::{ - create_custom_world_agent_session, execute_custom_world_agent_action, - get_custom_world_agent_card_detail, get_custom_world_agent_operation, - get_custom_world_agent_session, get_custom_world_gallery_detail, get_custom_world_library, - get_custom_world_library_detail, get_custom_world_works, list_custom_world_gallery, - publish_custom_world_library_profile, put_custom_world_library_profile, - stream_custom_world_agent_message, submit_custom_world_agent_message, - unpublish_custom_world_library_profile, + create_custom_world_agent_session, delete_custom_world_library_profile, + execute_custom_world_agent_action, get_custom_world_agent_card_detail, + get_custom_world_agent_operation, get_custom_world_agent_session, + get_custom_world_gallery_detail, get_custom_world_library, get_custom_world_library_detail, + get_custom_world_works, list_custom_world_gallery, publish_custom_world_library_profile, + put_custom_world_library_profile, stream_custom_world_agent_message, + submit_custom_world_agent_message, unpublish_custom_world_library_profile, }, custom_world_ai::{ generate_custom_world_cover_image, generate_custom_world_entity, @@ -359,6 +359,7 @@ pub fn build_router(state: AppState) -> Router { "/api/runtime/custom-world-library/{profile_id}", get(get_custom_world_library_detail) .put(put_custom_world_library_profile) + .delete(delete_custom_world_library_profile) .route_layer(middleware::from_fn_with_state( state.clone(), require_bearer_auth, diff --git a/server-rs/crates/api-server/src/auth.rs b/server-rs/crates/api-server/src/auth.rs index fa44113e..6184ea85 100644 --- a/server-rs/crates/api-server/src/auth.rs +++ b/server-rs/crates/api-server/src/auth.rs @@ -59,7 +59,7 @@ pub async fn require_bearer_auth( mut request: Request, next: Next, ) -> Result { - if request.uri().path().starts_with("/api/runtime/big-fish/") + if allows_internal_forwarded_auth(request.uri().path()) && let Some(claims) = try_build_internal_forwarded_claims(&state, request.headers()) { request @@ -187,6 +187,11 @@ fn extract_bearer_token(headers: &HeaderMap) -> Result { Ok(token.to_string()) } +fn allows_internal_forwarded_auth(path: &str) -> bool { + // Node 代理已经完成平台账号 JWT 校验,Rust 运行时只信任这些明确的内部转发路径。 + path.starts_with("/api/runtime/big-fish/") || path.starts_with("/api/runtime/puzzle/") +} + fn try_build_internal_forwarded_claims( state: &AppState, headers: &HeaderMap, @@ -234,7 +239,7 @@ fn try_build_internal_forwarded_claims( mod tests { use super::{ INTERNAL_API_SECRET_HEADER, INTERNAL_AUTH_USER_ID_HEADER, RefreshSessionToken, - extract_bearer_token, try_build_internal_forwarded_claims, + allows_internal_forwarded_auth, extract_bearer_token, try_build_internal_forwarded_claims, }; use crate::{config::AppConfig, state::AppState}; use axum::{ @@ -272,6 +277,15 @@ mod tests { assert_eq!(token.token(), "refresh-token-01"); } + #[test] + fn internal_forwarded_auth_allows_node_proxy_runtime_paths() { + assert!(allows_internal_forwarded_auth( + "/api/runtime/big-fish/sessions" + )); + assert!(allows_internal_forwarded_auth("/api/runtime/puzzle/works")); + assert!(!allows_internal_forwarded_auth("/api/auth/me")); + } + #[test] fn internal_forwarded_claims_require_matching_secret() { let mut config = AppConfig::default(); diff --git a/server-rs/crates/api-server/src/custom_world.rs b/server-rs/crates/api-server/src/custom_world.rs index bf473ab8..8a8241f9 100644 --- a/server-rs/crates/api-server/src/custom_world.rs +++ b/server-rs/crates/api-server/src/custom_world.rs @@ -178,6 +178,42 @@ pub async fn put_custom_world_library_profile( )) } +pub async fn delete_custom_world_library_profile( + State(state): State, + Extension(request_context): Extension, + Extension(authenticated): Extension, + Path(profile_id): Path, +) -> Result, Response> { + let owner_user_id = authenticated.claims().user_id().to_string(); + if profile_id.trim().is_empty() { + return Err(custom_world_error_response( + &request_context, + AppError::from_status(StatusCode::BAD_REQUEST).with_details(json!({ + "provider": "custom-world-library", + "message": "profileId is required", + })), + )); + } + + let entries = state + .spacetime_client() + .delete_custom_world_profile(profile_id, owner_user_id, current_utc_micros()) + .await + .map_err(|error| { + custom_world_error_response(&request_context, map_custom_world_client_error(error)) + })?; + + Ok(json_success_body( + Some(&request_context), + CustomWorldLibraryResponse { + entries: entries + .into_iter() + .map(map_custom_world_library_entry_response) + .collect(), + }, + )) +} + pub async fn publish_custom_world_library_profile( State(state): State, Extension(request_context): Extension, diff --git a/server-rs/crates/module-custom-world/src/lib.rs b/server-rs/crates/module-custom-world/src/lib.rs index ee9ebd38..d617f6e1 100644 --- a/server-rs/crates/module-custom-world/src/lib.rs +++ b/server-rs/crates/module-custom-world/src/lib.rs @@ -182,6 +182,7 @@ pub struct CustomWorldProfileSnapshot { pub landmark_count: u32, pub author_display_name: String, pub published_at_micros: Option, + pub deleted_at_micros: Option, pub created_at_micros: i64, pub updated_at_micros: i64, } @@ -438,6 +439,14 @@ pub struct CustomWorldProfileUnpublishInput { pub updated_at_micros: i64, } +#[cfg_attr(feature = "spacetime-types", derive(SpacetimeType))] +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +pub struct CustomWorldProfileDeleteInput { + pub profile_id: String, + pub owner_user_id: String, + pub deleted_at_micros: i64, +} + #[cfg_attr(feature = "spacetime-types", derive(SpacetimeType))] #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] pub struct CustomWorldProfileListInput { @@ -887,6 +896,19 @@ pub fn validate_custom_world_profile_unpublish_input( Ok(()) } +pub fn validate_custom_world_profile_delete_input( + input: &CustomWorldProfileDeleteInput, +) -> Result<(), CustomWorldFieldError> { + if input.profile_id.trim().is_empty() { + return Err(CustomWorldFieldError::MissingProfileId); + } + if input.owner_user_id.trim().is_empty() { + return Err(CustomWorldFieldError::MissingOwnerUserId); + } + + Ok(()) +} + pub fn validate_custom_world_profile_list_input( input: &CustomWorldProfileListInput, ) -> Result<(), CustomWorldFieldError> { @@ -1622,6 +1644,18 @@ mod tests { assert_eq!(error, CustomWorldFieldError::MissingOwnerUserId); } + #[test] + fn profile_delete_input_requires_profile_and_owner() { + let error = validate_custom_world_profile_delete_input(&CustomWorldProfileDeleteInput { + profile_id: " ".to_string(), + owner_user_id: "user_001".to_string(), + deleted_at_micros: 1, + }) + .expect_err("blank profile id should fail"); + + assert_eq!(error, CustomWorldFieldError::MissingProfileId); + } + #[test] fn published_profile_compile_merges_legacy_theme_and_latest_assets() { let snapshot = build_custom_world_published_profile_compile_snapshot( diff --git a/server-rs/crates/spacetime-client/src/lib.rs b/server-rs/crates/spacetime-client/src/lib.rs index 717eb6db..222c6692 100644 --- a/server-rs/crates/spacetime-client/src/lib.rs +++ b/server-rs/crates/spacetime-client/src/lib.rs @@ -66,8 +66,7 @@ use module_puzzle::{ }; use module_runtime::{ RuntimeBrowseHistoryRecord, RuntimeBrowseHistoryThemeMode, RuntimePlatformTheme, - RuntimeProfileDashboardRecord, RuntimeProfilePlayStatsRecord, - RuntimeProfileSaveArchiveRecord, + RuntimeProfileDashboardRecord, RuntimeProfilePlayStatsRecord, RuntimeProfileSaveArchiveRecord, RuntimeProfileWalletLedgerEntryRecord, RuntimeProfileWalletLedgerSourceType, RuntimeSettingsRecord, RuntimeSnapshotRecord, build_runtime_browse_history_clear_input, build_runtime_browse_history_list_input, build_runtime_browse_history_record, @@ -125,8 +124,7 @@ use crate::module_bindings::{ BigFishAgentMessageKind as BindingBigFishAgentMessageKind, BigFishAgentMessageRole as BindingBigFishAgentMessageRole, BigFishAgentMessageSnapshot as BindingBigFishAgentMessageSnapshot, - BigFishAnchorItem as BindingBigFishAnchorItem, - BigFishAnchorPack as BindingBigFishAnchorPack, + BigFishAnchorItem as BindingBigFishAnchorItem, BigFishAnchorPack as BindingBigFishAnchorPack, BigFishAnchorStatus as BindingBigFishAnchorStatus, BigFishAssetCoverage as BindingBigFishAssetCoverage, BigFishAssetGenerateInput as BindingBigFishAssetGenerateInput, @@ -152,12 +150,11 @@ use crate::module_bindings::{ BigFishSessionGetInput as BindingBigFishSessionGetInput, BigFishSessionProcedureResult as BindingBigFishSessionProcedureResult, BigFishSessionSnapshot as BindingBigFishSessionSnapshot, - BigFishVector2 as BindingBigFishVector2, - CombatOutcome as BindingCombatOutcome, - CustomWorldAgentMessageSnapshot as BindingCustomWorldAgentMessageSnapshot, + BigFishVector2 as BindingBigFishVector2, CombatOutcome as BindingCombatOutcome, CustomWorldAgentActionExecuteInput as BindingCustomWorldAgentActionExecuteInput, CustomWorldAgentActionExecuteResult as BindingCustomWorldAgentActionExecuteResult, CustomWorldAgentCardDetailGetInput as BindingCustomWorldAgentCardDetailGetInput, + CustomWorldAgentMessageSnapshot as BindingCustomWorldAgentMessageSnapshot, CustomWorldAgentMessageSubmitInput as BindingCustomWorldAgentMessageSubmitInput, CustomWorldAgentOperationGetInput as BindingCustomWorldAgentOperationGetInput, CustomWorldAgentOperationProcedureResult as BindingCustomWorldAgentOperationProcedureResult, @@ -175,6 +172,7 @@ use crate::module_bindings::{ CustomWorldGalleryListResult as BindingCustomWorldGalleryListResult, CustomWorldLibraryDetailInput as BindingCustomWorldLibraryDetailInput, CustomWorldLibraryMutationResult as BindingCustomWorldLibraryMutationResult, + CustomWorldProfileDeleteInput as BindingCustomWorldProfileDeleteInput, CustomWorldProfileListInput as BindingCustomWorldProfileListInput, CustomWorldProfileListResult as BindingCustomWorldProfileListResult, CustomWorldProfilePublishInput as BindingCustomWorldProfilePublishInput, @@ -185,10 +183,10 @@ use crate::module_bindings::{ CustomWorldPublishWorldInput as BindingCustomWorldPublishWorldInput, CustomWorldPublishWorldResult as BindingCustomWorldPublishWorldResult, CustomWorldPublishedProfileCompileSnapshot as BindingCustomWorldPublishedProfileCompileSnapshot, + CustomWorldThemeMode as BindingCustomWorldThemeMode, CustomWorldWorkSummarySnapshot as BindingCustomWorldWorkSummarySnapshot, CustomWorldWorksListInput as BindingCustomWorldWorksListInput, - CustomWorldWorksListResult as BindingCustomWorldWorksListResult, - CustomWorldThemeMode as BindingCustomWorldThemeMode, DbConnection, + CustomWorldWorksListResult as BindingCustomWorldWorksListResult, DbConnection, InventoryContainerKind as BindingInventoryContainerKind, InventoryEquipmentSlot as BindingInventoryEquipmentSlot, InventoryItemRarity as BindingInventoryItemRarity, @@ -201,6 +199,24 @@ use crate::module_bindings::{ NpcInteractionStatus as BindingNpcInteractionStatus, NpcRelationStance as BindingNpcRelationStance, NpcRelationState as BindingNpcRelationState, NpcStanceProfile as BindingNpcStanceProfile, NpcStateSnapshot as BindingNpcStateSnapshot, + PuzzleAgentMessageSubmitInput as BindingPuzzleAgentMessageSubmitInput, + PuzzleAgentSessionCreateInput as BindingPuzzleAgentSessionCreateInput, + PuzzleAgentSessionGetInput as BindingPuzzleAgentSessionGetInput, + PuzzleAgentSessionProcedureResult as BindingPuzzleAgentSessionProcedureResult, + PuzzleDraftCompileInput as BindingPuzzleDraftCompileInput, + PuzzleGeneratedImagesSaveInput as BindingPuzzleGeneratedImagesSaveInput, + PuzzlePublishInput as BindingPuzzlePublishInput, + PuzzleRunDragInput as BindingPuzzleRunDragInput, PuzzleRunGetInput as BindingPuzzleRunGetInput, + PuzzleRunNextLevelInput as BindingPuzzleRunNextLevelInput, + PuzzleRunProcedureResult as BindingPuzzleRunProcedureResult, + PuzzleRunStartInput as BindingPuzzleRunStartInput, + PuzzleRunSwapInput as BindingPuzzleRunSwapInput, + PuzzleSelectCoverImageInput as BindingPuzzleSelectCoverImageInput, + PuzzleWorkGetInput as BindingPuzzleWorkGetInput, + PuzzleWorkProcedureResult as BindingPuzzleWorkProcedureResult, + PuzzleWorkUpsertInput as BindingPuzzleWorkUpsertInput, + PuzzleWorksListInput as BindingPuzzleWorksListInput, + PuzzleWorksProcedureResult as BindingPuzzleWorksProcedureResult, ResolveCombatActionInput as BindingResolveCombatActionInput, ResolveCombatActionProcedureResult as BindingResolveCombatActionProcedureResult, ResolveCombatActionResult as BindingResolveCombatActionResult, @@ -223,14 +239,14 @@ use crate::module_bindings::{ RuntimeProfileDashboardGetInput as BindingRuntimeProfileDashboardGetInput, RuntimeProfileDashboardProcedureResult as BindingRuntimeProfileDashboardProcedureResult, RuntimeProfileDashboardSnapshot as BindingRuntimeProfileDashboardSnapshot, - RuntimeProfileSaveArchiveListInput as BindingRuntimeProfileSaveArchiveListInput, - RuntimeProfileSaveArchiveProcedureResult as BindingRuntimeProfileSaveArchiveProcedureResult, - RuntimeProfileSaveArchiveResumeInput as BindingRuntimeProfileSaveArchiveResumeInput, - RuntimeProfileSaveArchiveSnapshot as BindingRuntimeProfileSaveArchiveSnapshot, RuntimeProfilePlayStatsGetInput as BindingRuntimeProfilePlayStatsGetInput, RuntimeProfilePlayStatsProcedureResult as BindingRuntimeProfilePlayStatsProcedureResult, RuntimeProfilePlayStatsSnapshot as BindingRuntimeProfilePlayStatsSnapshot, RuntimeProfilePlayedWorldSnapshot as BindingRuntimeProfilePlayedWorldSnapshot, + RuntimeProfileSaveArchiveListInput as BindingRuntimeProfileSaveArchiveListInput, + RuntimeProfileSaveArchiveProcedureResult as BindingRuntimeProfileSaveArchiveProcedureResult, + RuntimeProfileSaveArchiveResumeInput as BindingRuntimeProfileSaveArchiveResumeInput, + RuntimeProfileSaveArchiveSnapshot as BindingRuntimeProfileSaveArchiveSnapshot, RuntimeProfileWalletLedgerEntrySnapshot as BindingRuntimeProfileWalletLedgerEntrySnapshot, RuntimeProfileWalletLedgerListInput as BindingRuntimeProfileWalletLedgerListInput, RuntimeProfileWalletLedgerProcedureResult as BindingRuntimeProfileWalletLedgerProcedureResult, @@ -239,29 +255,10 @@ use crate::module_bindings::{ RuntimeSettingProcedureResult as BindingRuntimeSettingProcedureResult, RuntimeSettingSnapshot as BindingRuntimeSettingSnapshot, RuntimeSettingUpsertInput as BindingRuntimeSettingUpsertInput, + RuntimeSnapshot as BindingRuntimeSnapshot, RuntimeSnapshotDeleteInput as BindingRuntimeSnapshotDeleteInput, RuntimeSnapshotGetInput as BindingRuntimeSnapshotGetInput, RuntimeSnapshotProcedureResult as BindingRuntimeSnapshotProcedureResult, - PuzzleAgentMessageSubmitInput as BindingPuzzleAgentMessageSubmitInput, - PuzzleAgentSessionCreateInput as BindingPuzzleAgentSessionCreateInput, - PuzzleAgentSessionGetInput as BindingPuzzleAgentSessionGetInput, - PuzzleAgentSessionProcedureResult as BindingPuzzleAgentSessionProcedureResult, - PuzzleDraftCompileInput as BindingPuzzleDraftCompileInput, - PuzzleGeneratedImagesSaveInput as BindingPuzzleGeneratedImagesSaveInput, - PuzzlePublishInput as BindingPuzzlePublishInput, - PuzzleRunDragInput as BindingPuzzleRunDragInput, - PuzzleRunGetInput as BindingPuzzleRunGetInput, - PuzzleRunNextLevelInput as BindingPuzzleRunNextLevelInput, - PuzzleRunProcedureResult as BindingPuzzleRunProcedureResult, - PuzzleRunStartInput as BindingPuzzleRunStartInput, - PuzzleRunSwapInput as BindingPuzzleRunSwapInput, - PuzzleSelectCoverImageInput as BindingPuzzleSelectCoverImageInput, - PuzzleWorkGetInput as BindingPuzzleWorkGetInput, - PuzzleWorkProcedureResult as BindingPuzzleWorkProcedureResult, - PuzzleWorkUpsertInput as BindingPuzzleWorkUpsertInput, - PuzzleWorksListInput as BindingPuzzleWorksListInput, - PuzzleWorksProcedureResult as BindingPuzzleWorksProcedureResult, - RuntimeSnapshot as BindingRuntimeSnapshot, RuntimeSnapshotUpsertInput as BindingRuntimeSnapshotUpsertInput, StoryContinueInput as BindingStoryContinueInput, StoryEventKind as BindingStoryEventKind, StoryEventSnapshot as BindingStoryEventSnapshot, StorySessionInput as BindingStorySessionInput, @@ -270,8 +267,8 @@ use crate::module_bindings::{ StorySessionStateInput as BindingStorySessionStateInput, StorySessionStateProcedureResult as BindingStorySessionStateProcedureResult, StorySessionStatus as BindingStorySessionStatus, - append_ai_text_chunk_and_return_procedure::append_ai_text_chunk_and_return as _, advance_puzzle_next_level_procedure::advance_puzzle_next_level as _, + append_ai_text_chunk_and_return_procedure::append_ai_text_chunk_and_return as _, attach_ai_result_reference_and_return_procedure::attach_ai_result_reference_and_return as _, begin_story_session_and_return_procedure::begin_story_session_and_return as _, bind_asset_object_to_entity_and_return_procedure::bind_asset_object_to_entity_and_return as _, @@ -288,6 +285,7 @@ use crate::module_bindings::{ create_big_fish_session_procedure::create_big_fish_session as _, create_custom_world_agent_session_procedure::create_custom_world_agent_session as _, create_puzzle_agent_session_procedure::create_puzzle_agent_session as _, + delete_custom_world_profile_and_return_procedure::delete_custom_world_profile_and_return as _, delete_runtime_snapshot_and_return_procedure::delete_runtime_snapshot_and_return as _, drag_puzzle_piece_or_group_procedure::drag_puzzle_piece_or_group as _, execute_custom_world_agent_action_procedure::execute_custom_world_agent_action as _, @@ -328,10 +326,10 @@ use crate::module_bindings::{ resume_profile_save_archive_and_return_procedure::resume_profile_save_archive_and_return as _, save_puzzle_generated_images_procedure::save_puzzle_generated_images as _, select_puzzle_cover_image_procedure::select_puzzle_cover_image as _, - start_big_fish_run_procedure::start_big_fish_run as _, - start_puzzle_run_procedure::start_puzzle_run as _, start_ai_task_reducer::start_ai_task as _, start_ai_task_stage_reducer::start_ai_task_stage as _, + start_big_fish_run_procedure::start_big_fish_run as _, + start_puzzle_run_procedure::start_puzzle_run as _, submit_big_fish_input_procedure::submit_big_fish_input as _, submit_big_fish_message_procedure::submit_big_fish_message as _, submit_custom_world_agent_message_procedure::submit_custom_world_agent_message as _, @@ -749,6 +747,31 @@ impl SpacetimeClient { .await } + pub async fn delete_custom_world_profile( + &self, + profile_id: String, + owner_user_id: String, + deleted_at_micros: i64, + ) -> Result, SpacetimeClientError> { + let procedure_input = BindingCustomWorldProfileDeleteInput { + profile_id, + owner_user_id, + deleted_at_micros, + }; + + self.call_after_connect(move |connection, sender| { + connection + .procedures() + .delete_custom_world_profile_and_return_then(procedure_input, move |_, result| { + let mapped = result + .map_err(|error| SpacetimeClientError::Procedure(error.to_string())) + .and_then(map_custom_world_profile_list_result); + send_once(&sender, mapped); + }); + }) + .await + } + pub async fn list_custom_world_gallery_entries( &self, ) -> Result, SpacetimeClientError> { @@ -877,14 +900,15 @@ impl SpacetimeClient { let procedure_input = BindingCustomWorldWorksListInput { owner_user_id }; self.call_after_connect(move |connection, sender| { - connection - .procedures() - .list_custom_world_works_then(procedure_input, move |_, result| { + connection.procedures().list_custom_world_works_then( + procedure_input, + move |_, result| { let mapped = result .map_err(|error| SpacetimeClientError::Procedure(error.to_string())) .and_then(map_custom_world_works_list_result); send_once(&sender, mapped); - }); + }, + ); }) .await } @@ -954,14 +978,15 @@ impl SpacetimeClient { }; self.call_after_connect(move |connection, sender| { - connection - .procedures() - .create_puzzle_agent_session_then(procedure_input, move |_, result| { + connection.procedures().create_puzzle_agent_session_then( + procedure_input, + move |_, result| { let mapped = result .map_err(|error| SpacetimeClientError::Procedure(error.to_string())) .and_then(map_puzzle_agent_session_procedure_result); send_once(&sender, mapped); - }); + }, + ); }) .await } @@ -1109,15 +1134,14 @@ impl SpacetimeClient { }; self.call_after_connect(move |connection, sender| { - connection.procedures().publish_puzzle_work_then( - procedure_input, - move |_, result| { + connection + .procedures() + .publish_puzzle_work_then(procedure_input, move |_, result| { let mapped = result .map_err(|error| SpacetimeClientError::Procedure(error.to_string())) .and_then(map_puzzle_work_procedure_result); send_once(&sender, mapped); - }, - ); + }); }) .await } @@ -1129,15 +1153,14 @@ impl SpacetimeClient { let procedure_input = BindingPuzzleWorksListInput { owner_user_id }; self.call_after_connect(move |connection, sender| { - connection.procedures().list_puzzle_works_then( - procedure_input, - move |_, result| { + connection + .procedures() + .list_puzzle_works_then(procedure_input, move |_, result| { let mapped = result .map_err(|error| SpacetimeClientError::Procedure(error.to_string())) .and_then(map_puzzle_works_procedure_result); send_once(&sender, mapped); - }, - ); + }); }) .await } @@ -1178,15 +1201,14 @@ impl SpacetimeClient { }; self.call_after_connect(move |connection, sender| { - connection.procedures().update_puzzle_work_then( - procedure_input, - move |_, result| { + connection + .procedures() + .update_puzzle_work_then(procedure_input, move |_, result| { let mapped = result .map_err(|error| SpacetimeClientError::Procedure(error.to_string())) .and_then(map_puzzle_work_procedure_result); send_once(&sender, mapped); - }, - ); + }); }) .await } @@ -1195,12 +1217,14 @@ impl SpacetimeClient { &self, ) -> Result, SpacetimeClientError> { self.call_after_connect(move |connection, sender| { - connection.procedures().list_puzzle_gallery_then(move |_, result| { - let mapped = result - .map_err(|error| SpacetimeClientError::Procedure(error.to_string())) - .and_then(map_puzzle_works_procedure_result); - send_once(&sender, mapped); - }); + connection + .procedures() + .list_puzzle_gallery_then(move |_, result| { + let mapped = result + .map_err(|error| SpacetimeClientError::Procedure(error.to_string())) + .and_then(map_puzzle_works_procedure_result); + send_once(&sender, mapped); + }); }) .await } @@ -1237,15 +1261,14 @@ impl SpacetimeClient { }; self.call_after_connect(move |connection, sender| { - connection.procedures().start_puzzle_run_then( - procedure_input, - move |_, result| { + connection + .procedures() + .start_puzzle_run_then(procedure_input, move |_, result| { let mapped = result .map_err(|error| SpacetimeClientError::Procedure(error.to_string())) .and_then(map_puzzle_run_procedure_result); send_once(&sender, mapped); - }, - ); + }); }) .await } @@ -1261,15 +1284,14 @@ impl SpacetimeClient { }; self.call_after_connect(move |connection, sender| { - connection.procedures().get_puzzle_run_then( - procedure_input, - move |_, result| { + connection + .procedures() + .get_puzzle_run_then(procedure_input, move |_, result| { let mapped = result .map_err(|error| SpacetimeClientError::Procedure(error.to_string())) .and_then(map_puzzle_run_procedure_result); send_once(&sender, mapped); - }, - ); + }); }) .await } @@ -1287,15 +1309,14 @@ impl SpacetimeClient { }; self.call_after_connect(move |connection, sender| { - connection.procedures().swap_puzzle_pieces_then( - procedure_input, - move |_, result| { + connection + .procedures() + .swap_puzzle_pieces_then(procedure_input, move |_, result| { let mapped = result .map_err(|error| SpacetimeClientError::Procedure(error.to_string())) .and_then(map_puzzle_run_procedure_result); send_once(&sender, mapped); - }, - ); + }); }) .await } @@ -1365,14 +1386,15 @@ impl SpacetimeClient { }; self.call_after_connect(move |connection, sender| { - connection - .procedures() - .create_big_fish_session_then(procedure_input, move |_, result| { + connection.procedures().create_big_fish_session_then( + procedure_input, + move |_, result| { let mapped = result .map_err(|error| SpacetimeClientError::Procedure(error.to_string())) .and_then(map_big_fish_session_procedure_result); send_once(&sender, mapped); - }); + }, + ); }) .await } @@ -1388,15 +1410,14 @@ impl SpacetimeClient { }; self.call_after_connect(move |connection, sender| { - connection.procedures().get_big_fish_session_then( - procedure_input, - move |_, result| { + connection + .procedures() + .get_big_fish_session_then(procedure_input, move |_, result| { let mapped = result .map_err(|error| SpacetimeClientError::Procedure(error.to_string())) .and_then(map_big_fish_session_procedure_result); send_once(&sender, mapped); - }, - ); + }); }) .await } @@ -1519,15 +1540,14 @@ impl SpacetimeClient { }; self.call_after_connect(move |connection, sender| { - connection.procedures().start_big_fish_run_then( - procedure_input, - move |_, result| { + connection + .procedures() + .start_big_fish_run_then(procedure_input, move |_, result| { let mapped = result .map_err(|error| SpacetimeClientError::Procedure(error.to_string())) .and_then(map_big_fish_run_procedure_result); send_once(&sender, mapped); - }, - ); + }); }) .await } @@ -1734,15 +1754,14 @@ impl SpacetimeClient { ); self.call_after_connect(move |connection, sender| { - connection.procedures().get_runtime_snapshot_then( - procedure_input, - move |_, result| { + connection + .procedures() + .get_runtime_snapshot_then(procedure_input, move |_, result| { let mapped = result .map_err(|error| SpacetimeClientError::Procedure(error.to_string())) .and_then(map_runtime_snapshot_procedure_result); send_once(&sender, mapped); - }, - ); + }); }) .await } @@ -1769,15 +1788,14 @@ impl SpacetimeClient { ); self.call_after_connect(move |connection, sender| { - connection.procedures().upsert_runtime_snapshot_and_return_then( - procedure_input, - move |_, result| { + connection + .procedures() + .upsert_runtime_snapshot_and_return_then(procedure_input, move |_, result| { let mapped = result .map_err(|error| SpacetimeClientError::Procedure(error.to_string())) .and_then(map_runtime_snapshot_required_procedure_result); send_once(&sender, mapped); - }, - ); + }); }) .await } @@ -1792,15 +1810,14 @@ impl SpacetimeClient { ); self.call_after_connect(move |connection, sender| { - connection.procedures().delete_runtime_snapshot_and_return_then( - procedure_input, - move |_, result| { + connection + .procedures() + .delete_runtime_snapshot_and_return_then(procedure_input, move |_, result| { let mapped = result .map_err(|error| SpacetimeClientError::Procedure(error.to_string())) .and_then(map_runtime_snapshot_delete_procedure_result); send_once(&sender, mapped); - }, - ); + }); }) .await } @@ -1832,7 +1849,8 @@ impl SpacetimeClient { &self, user_id: String, world_key: String, - ) -> Result<(RuntimeProfileSaveArchiveRecord, RuntimeSnapshotRecord), SpacetimeClientError> { + ) -> Result<(RuntimeProfileSaveArchiveRecord, RuntimeSnapshotRecord), SpacetimeClientError> + { let procedure_input = map_runtime_profile_save_archive_resume_input( build_runtime_profile_save_archive_resume_input(user_id, world_key) .map_err(|error| SpacetimeClientError::Runtime(error.to_string()))?, @@ -1841,15 +1859,12 @@ impl SpacetimeClient { self.call_after_connect(move |connection, sender| { connection .procedures() - .resume_profile_save_archive_and_return_then( - procedure_input, - move |_, result| { - let mapped = result - .map_err(|error| SpacetimeClientError::Procedure(error.to_string())) - .and_then(map_runtime_profile_save_archive_resume_procedure_result); - send_once(&sender, mapped); - }, - ); + .resume_profile_save_archive_and_return_then(procedure_input, move |_, result| { + let mapped = result + .map_err(|error| SpacetimeClientError::Procedure(error.to_string())) + .and_then(map_runtime_profile_save_archive_resume_procedure_result); + send_once(&sender, mapped); + }); }) .await } @@ -2822,7 +2837,9 @@ fn map_runtime_snapshot_required_procedure_result( result: BindingRuntimeSnapshotProcedureResult, ) -> Result { map_runtime_snapshot_procedure_result(result)?.ok_or_else(|| { - SpacetimeClientError::Procedure("SpacetimeDB procedure 未返回 runtime snapshot 快照".to_string()) + SpacetimeClientError::Procedure( + "SpacetimeDB procedure 未返回 runtime snapshot 快照".to_string(), + ) }) } @@ -2847,9 +2864,9 @@ fn map_runtime_profile_save_archive_list_procedure_result( .entries .into_iter() .map(|snapshot| { - build_runtime_profile_save_archive_record( - map_runtime_profile_save_archive_snapshot(snapshot), - ) + build_runtime_profile_save_archive_record(map_runtime_profile_save_archive_snapshot( + snapshot, + )) .map_err(|error| SpacetimeClientError::Runtime(error.to_string())) }) .collect() @@ -2867,15 +2884,21 @@ fn map_runtime_profile_save_archive_resume_procedure_result( } let archive = result.record.ok_or_else(|| { - SpacetimeClientError::Procedure("SpacetimeDB procedure 未返回 save archive 快照".to_string()) + SpacetimeClientError::Procedure( + "SpacetimeDB procedure 未返回 save archive 快照".to_string(), + ) })?; let snapshot = result.current_snapshot.ok_or_else(|| { - SpacetimeClientError::Procedure("SpacetimeDB procedure 未返回恢复后的 runtime snapshot".to_string()) + SpacetimeClientError::Procedure( + "SpacetimeDB procedure 未返回恢复后的 runtime snapshot".to_string(), + ) })?; Ok(( - build_runtime_profile_save_archive_record(map_runtime_profile_save_archive_snapshot(archive)) - .map_err(|error| SpacetimeClientError::Runtime(error.to_string()))?, + build_runtime_profile_save_archive_record(map_runtime_profile_save_archive_snapshot( + archive, + )) + .map_err(|error| SpacetimeClientError::Runtime(error.to_string()))?, build_runtime_snapshot_record(map_runtime_snapshot_snapshot(snapshot)) .map_err(|error| SpacetimeClientError::Runtime(error.to_string()))?, )) @@ -3154,9 +3177,7 @@ fn map_puzzle_agent_session_procedure_result( })?; let session: DomainPuzzleAgentSessionSnapshot = serde_json::from_str(&session_json).map_err(|error| { - SpacetimeClientError::Runtime(format!( - "puzzle agent session_json 非法: {error}" - )) + SpacetimeClientError::Runtime(format!("puzzle agent session_json 非法: {error}")) })?; Ok(map_puzzle_agent_session_snapshot(session)) } @@ -3173,9 +3194,7 @@ fn map_puzzle_work_procedure_result( } let item_json = result.item_json.ok_or_else(|| { - SpacetimeClientError::Procedure( - "SpacetimeDB procedure 未返回 puzzle work 快照".to_string(), - ) + SpacetimeClientError::Procedure("SpacetimeDB procedure 未返回 puzzle work 快照".to_string()) })?; let item: DomainPuzzleWorkProfile = serde_json::from_str(&item_json).map_err(|error| { SpacetimeClientError::Runtime(format!("puzzle work item_json 非法: {error}")) @@ -3218,9 +3237,7 @@ fn map_puzzle_run_procedure_result( } let run_json = result.run_json.ok_or_else(|| { - SpacetimeClientError::Procedure( - "SpacetimeDB procedure 未返回 puzzle run 快照".to_string(), - ) + SpacetimeClientError::Procedure("SpacetimeDB procedure 未返回 puzzle run 快照".to_string()) })?; let run: DomainPuzzleRunSnapshot = serde_json::from_str(&run_json).map_err(|error| { SpacetimeClientError::Runtime(format!("puzzle run run_json 非法: {error}")) @@ -4103,7 +4120,9 @@ fn map_puzzle_run_snapshot(snapshot: DomainPuzzleRunSnapshot) -> PuzzleRunRecord current_grid_size: snapshot.current_grid_size, played_profile_ids: snapshot.played_profile_ids, previous_level_tags: snapshot.previous_level_tags, - current_level: snapshot.current_level.map(map_puzzle_runtime_level_snapshot), + current_level: snapshot + .current_level + .map(map_puzzle_runtime_level_snapshot), recommended_next_profile_id: snapshot.recommended_next_profile_id, } } @@ -4243,7 +4262,9 @@ fn map_big_fish_background_blueprint( } } -fn map_big_fish_runtime_params(snapshot: BindingBigFishRuntimeParams) -> BigFishRuntimeParamsRecord { +fn map_big_fish_runtime_params( + snapshot: BindingBigFishRuntimeParams, +) -> BigFishRuntimeParamsRecord { BigFishRuntimeParamsRecord { level_count: snapshot.level_count, merge_count_per_upgrade: snapshot.merge_count_per_upgrade, @@ -5283,17 +5304,13 @@ fn parse_custom_world_publish_gate_record( .map(str::trim) .filter(|value| !value.is_empty()) .ok_or_else(|| { - SpacetimeClientError::Runtime( - "custom world publish_gate.profileId 缺失".to_string(), - ) + SpacetimeClientError::Runtime("custom world publish_gate.profileId 缺失".to_string()) })?; let blockers = object .get("blockers") .and_then(serde_json::Value::as_array) .ok_or_else(|| { - SpacetimeClientError::Runtime( - "custom world publish_gate.blockers 缺失".to_string(), - ) + SpacetimeClientError::Runtime("custom world publish_gate.blockers 缺失".to_string()) })? .iter() .cloned() @@ -5346,17 +5363,13 @@ fn parse_custom_world_publish_gate_record( .and_then(serde_json::Value::as_u64) .and_then(|value| u32::try_from(value).ok()) .ok_or_else(|| { - SpacetimeClientError::Runtime( - "custom world publish_gate.blockerCount 缺失".to_string(), - ) + SpacetimeClientError::Runtime("custom world publish_gate.blockerCount 缺失".to_string()) })?; let publish_ready = object .get("publishReady") .and_then(serde_json::Value::as_bool) .ok_or_else(|| { - SpacetimeClientError::Runtime( - "custom world publish_gate.publishReady 缺失".to_string(), - ) + SpacetimeClientError::Runtime("custom world publish_gate.publishReady 缺失".to_string()) })?; let can_enter_world = object .get("canEnterWorld") diff --git a/server-rs/crates/spacetime-client/src/module_bindings/accept_quest_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/accept_quest_reducer.rs index b9e670d6..61e6b9c5 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/accept_quest_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/accept_quest_reducer.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::quest_record_input_type::QuestRecordInput; @@ -19,10 +14,8 @@ pub(super) struct AcceptQuestArgs { impl From for super::Reducer { fn from(args: AcceptQuestArgs) -> Self { - Self::AcceptQuest { - input: args.input, -} -} + Self::AcceptQuest { input: args.input } + } } impl __sdk::InModule for AcceptQuestArgs { @@ -40,9 +33,8 @@ pub trait accept_quest { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`accept_quest:accept_quest_then`] to run a callback after the reducer completes. - fn accept_quest(&self, input: QuestRecordInput, -) -> __sdk::Result<()> { - self.accept_quest_then(input, |_, _| {}) + fn accept_quest(&self, input: QuestRecordInput) -> __sdk::Result<()> { + self.accept_quest_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `accept_quest` to run as soon as possible, @@ -55,9 +47,11 @@ pub trait accept_quest { &self, input: QuestRecordInput, - callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) - + Send - + 'static, + callback: impl FnOnce( + &super::ReducerEventContext, + Result, __sdk::InternalError>, + ) + Send + + 'static, ) -> __sdk::Result<()>; } @@ -66,11 +60,13 @@ impl accept_quest for super::RemoteReducers { &self, input: QuestRecordInput, - 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(AcceptQuestArgs { input, }, callback) + self.imp + .invoke_reducer_with_callback(AcceptQuestArgs { input }, callback) } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/acknowledge_quest_completion_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/acknowledge_quest_completion_reducer.rs index 6027c9f6..b1419fb7 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/acknowledge_quest_completion_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/acknowledge_quest_completion_reducer.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::quest_completion_ack_input_type::QuestCompletionAckInput; @@ -19,10 +14,8 @@ pub(super) struct AcknowledgeQuestCompletionArgs { impl From for super::Reducer { fn from(args: AcknowledgeQuestCompletionArgs) -> Self { - Self::AcknowledgeQuestCompletion { - input: args.input, -} -} + Self::AcknowledgeQuestCompletion { input: args.input } + } } impl __sdk::InModule for AcknowledgeQuestCompletionArgs { @@ -40,9 +33,8 @@ pub trait acknowledge_quest_completion { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`acknowledge_quest_completion:acknowledge_quest_completion_then`] to run a callback after the reducer completes. - fn acknowledge_quest_completion(&self, input: QuestCompletionAckInput, -) -> __sdk::Result<()> { - self.acknowledge_quest_completion_then(input, |_, _| {}) + fn acknowledge_quest_completion(&self, input: QuestCompletionAckInput) -> __sdk::Result<()> { + self.acknowledge_quest_completion_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `acknowledge_quest_completion` to run as soon as possible, @@ -55,9 +47,11 @@ pub trait acknowledge_quest_completion { &self, input: QuestCompletionAckInput, - callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) - + Send - + 'static, + callback: impl FnOnce( + &super::ReducerEventContext, + Result, __sdk::InternalError>, + ) + Send + + 'static, ) -> __sdk::Result<()>; } @@ -66,11 +60,13 @@ impl acknowledge_quest_completion for super::RemoteReducers { &self, input: QuestCompletionAckInput, - 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(AcknowledgeQuestCompletionArgs { input, }, callback) + self.imp + .invoke_reducer_with_callback(AcknowledgeQuestCompletionArgs { input }, callback) } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/advance_puzzle_next_level_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/advance_puzzle_next_level_procedure.rs index 4a7804c7..7cb4f8f4 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/advance_puzzle_next_level_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/advance_puzzle_next_level_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::puzzle_run_next_level_input_type::PuzzleRunNextLevelInput; use super::puzzle_run_procedure_result_type::PuzzleRunProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct AdvancePuzzleNextLevelArgs { +struct AdvancePuzzleNextLevelArgs { pub input: PuzzleRunNextLevelInput, } - impl __sdk::InModule for AdvancePuzzleNextLevelArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for AdvancePuzzleNextLevelArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait advance_puzzle_next_level { - fn advance_puzzle_next_level(&self, input: PuzzleRunNextLevelInput, -) { - self.advance_puzzle_next_level_then(input, |_, _| {}); + fn advance_puzzle_next_level(&self, input: PuzzleRunNextLevelInput) { + self.advance_puzzle_next_level_then(input, |_, _| {}); } fn advance_puzzle_next_level_then( &self, input: PuzzleRunNextLevelInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl advance_puzzle_next_level for super::RemoteProcedures { &self, input: PuzzleRunNextLevelInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, PuzzleRunProcedureResult>( - "advance_puzzle_next_level", - AdvancePuzzleNextLevelArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, PuzzleRunProcedureResult>( + "advance_puzzle_next_level", + AdvancePuzzleNextLevelArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_input_type.rs index c22d39dd..b63aad41 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_input_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::ai_result_reference_kind_type::AiResultReferenceKind; @@ -17,12 +12,10 @@ pub struct AiResultReferenceInput { pub task_id: String, pub reference_kind: AiResultReferenceKind, pub reference_id: String, - pub label: Option::, + pub label: Option, pub created_at_micros: i64, } - impl __sdk::InModule for AiResultReferenceInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_kind_type.rs index 9b9a5a43..0e5f045b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_kind_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_kind_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -24,12 +19,8 @@ pub enum AiResultReferenceKind { RuntimeItemRecord, AssetObject, - } - - impl __sdk::InModule for AiResultReferenceKind { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_snapshot_type.rs index 7522ac4c..f949db7f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_snapshot_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::ai_result_reference_kind_type::AiResultReferenceKind; @@ -18,12 +13,10 @@ pub struct AiResultReferenceSnapshot { pub task_id: String, pub reference_kind: AiResultReferenceKind, pub reference_id: String, - pub label: Option::, + pub label: Option, pub created_at_micros: i64, } - impl __sdk::InModule for AiResultReferenceSnapshot { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_table.rs index 6a648b5b..09b7c492 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_table.rs @@ -2,14 +2,9 @@ // 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::ai_result_reference_type::AiResultReference; use super::ai_result_reference_kind_type::AiResultReferenceKind; +use super::ai_result_reference_type::AiResultReference; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `ai_result_reference`. /// @@ -37,7 +32,9 @@ pub trait AiResultReferenceTableAccess { impl AiResultReferenceTableAccess for super::RemoteTables { fn ai_result_reference(&self) -> AiResultReferenceTableHandle<'_> { AiResultReferenceTableHandle { - imp: self.imp.get_table::("ai_result_reference"), + imp: self + .imp + .get_table::("ai_result_reference"), ctx: std::marker::PhantomData, } } @@ -50,8 +47,12 @@ impl<'ctx> __sdk::Table for AiResultReferenceTableHandle<'ctx> { type Row = AiResultReference; type EventContext = super::EventContext; - fn count(&self) -> u64 { self.imp.count() } - fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = AiResultReferenceInsertCallbackId; @@ -97,41 +98,44 @@ impl<'ctx> __sdk::TableWithPrimaryKey for AiResultReferenceTableHandle<'ctx> { } } - /// Access to the `result_reference_row_id` unique index on the table `ai_result_reference`, - /// which allows point queries on the field of the same name - /// via the [`AiResultReferenceResultReferenceRowIdUnique::find`] method. - /// - /// Users are encouraged not to explicitly reference this type, - /// but to directly chain method calls, - /// like `ctx.db.ai_result_reference().result_reference_row_id().find(...)`. - pub struct AiResultReferenceResultReferenceRowIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, - } +/// Access to the `result_reference_row_id` unique index on the table `ai_result_reference`, +/// which allows point queries on the field of the same name +/// via the [`AiResultReferenceResultReferenceRowIdUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.ai_result_reference().result_reference_row_id().find(...)`. +pub struct AiResultReferenceResultReferenceRowIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} - impl<'ctx> AiResultReferenceTableHandle<'ctx> { - /// Get a handle on the `result_reference_row_id` unique index on the table `ai_result_reference`. - pub fn result_reference_row_id(&self) -> AiResultReferenceResultReferenceRowIdUnique<'ctx> { - AiResultReferenceResultReferenceRowIdUnique { - imp: self.imp.get_unique_constraint::("result_reference_row_id"), - phantom: std::marker::PhantomData, - } - } +impl<'ctx> AiResultReferenceTableHandle<'ctx> { + /// Get a handle on the `result_reference_row_id` unique index on the table `ai_result_reference`. + pub fn result_reference_row_id(&self) -> AiResultReferenceResultReferenceRowIdUnique<'ctx> { + AiResultReferenceResultReferenceRowIdUnique { + imp: self + .imp + .get_unique_constraint::("result_reference_row_id"), + phantom: std::marker::PhantomData, } + } +} + +impl<'ctx> AiResultReferenceResultReferenceRowIdUnique<'ctx> { + /// Find the subscribed row whose `result_reference_row_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) + } +} - impl<'ctx> AiResultReferenceResultReferenceRowIdUnique<'ctx> { - /// Find the subscribed row whose `result_reference_row_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::("ai_result_reference"); - _table.add_unique_constraint::("result_reference_row_id", |row| &row.result_reference_row_id); + _table.add_unique_constraint::("result_reference_row_id", |row| { + &row.result_reference_row_id + }); } #[doc(hidden)] @@ -139,26 +143,24 @@ 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() + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() }) } - #[allow(non_camel_case_types)] - /// Extension trait for query builder access to the table `AiResultReference`. - /// - /// Implemented for [`__sdk::QueryTableAccessor`]. - pub trait ai_result_referenceQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `AiResultReference`. - fn ai_result_reference(&self) -> __sdk::__query_builder::Table; - } - - impl ai_result_referenceQueryTableAccess for __sdk::QueryTableAccessor { - fn ai_result_reference(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("ai_result_reference") - } - } +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `AiResultReference`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait ai_result_referenceQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `AiResultReference`. + fn ai_result_reference(&self) -> __sdk::__query_builder::Table; +} +impl ai_result_referenceQueryTableAccess for __sdk::QueryTableAccessor { + fn ai_result_reference(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("ai_result_reference") + } +} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_type.rs index d9e32eaf..3b1121b0 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::ai_result_reference_kind_type::AiResultReferenceKind; @@ -19,16 +14,14 @@ pub struct AiResultReference { pub task_id: String, pub reference_kind: AiResultReferenceKind, pub reference_id: String, - pub label: Option::, + pub label: Option, pub created_at: __sdk::Timestamp, } - impl __sdk::InModule for AiResultReference { type Module = super::RemoteModule; } - /// Column accessor struct for the table `AiResultReference`. /// /// Provides typed access to columns for query building. @@ -38,7 +31,7 @@ pub struct AiResultReferenceCols { pub task_id: __sdk::__query_builder::Col, pub reference_kind: __sdk::__query_builder::Col, pub reference_id: __sdk::__query_builder::Col, - pub label: __sdk::__query_builder::Col>, + pub label: __sdk::__query_builder::Col>, pub created_at: __sdk::__query_builder::Col, } @@ -46,14 +39,16 @@ impl __sdk::__query_builder::HasCols for AiResultReference { type Cols = AiResultReferenceCols; fn cols(table_name: &'static str) -> Self::Cols { AiResultReferenceCols { - result_reference_row_id: __sdk::__query_builder::Col::new(table_name, "result_reference_row_id"), + result_reference_row_id: __sdk::__query_builder::Col::new( + table_name, + "result_reference_row_id", + ), result_ref_id: __sdk::__query_builder::Col::new(table_name, "result_ref_id"), task_id: __sdk::__query_builder::Col::new(table_name, "task_id"), reference_kind: __sdk::__query_builder::Col::new(table_name, "reference_kind"), reference_id: __sdk::__query_builder::Col::new(table_name, "reference_id"), label: __sdk::__query_builder::Col::new(table_name, "label"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), - } } } @@ -70,12 +65,13 @@ impl __sdk::__query_builder::HasIxCols for AiResultReference { type IxCols = AiResultReferenceIxCols; fn ix_cols(table_name: &'static str) -> Self::IxCols { AiResultReferenceIxCols { - result_reference_row_id: __sdk::__query_builder::IxCol::new(table_name, "result_reference_row_id"), + result_reference_row_id: __sdk::__query_builder::IxCol::new( + table_name, + "result_reference_row_id", + ), task_id: __sdk::__query_builder::IxCol::new(table_name, "task_id"), - } } } impl __sdk::__query_builder::CanBeLookupTable for AiResultReference {} - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_stage_completion_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_stage_completion_input_type.rs index c165fc55..7ce33006 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_stage_completion_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_stage_completion_input_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::ai_task_stage_kind_type::AiTaskStageKind; @@ -16,14 +11,12 @@ use super::ai_task_stage_kind_type::AiTaskStageKind; pub struct AiStageCompletionInput { pub task_id: String, pub stage_kind: AiTaskStageKind, - pub text_output: Option::, - pub structured_payload_json: Option::, - pub warning_messages: Vec::, + pub text_output: Option, + pub structured_payload_json: Option, + pub warning_messages: Vec, pub completed_at_micros: i64, } - impl __sdk::InModule for AiStageCompletionInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_cancel_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_cancel_input_type.rs index 1c5af5fa..93b697a6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_cancel_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_cancel_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +11,6 @@ pub struct AiTaskCancelInput { pub completed_at_micros: i64, } - impl __sdk::InModule for AiTaskCancelInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_create_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_create_input_type.rs index 2d53ad93..95b0506a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_create_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_create_input_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::ai_task_kind_type::AiTaskKind; use super::ai_task_stage_blueprint_type::AiTaskStageBlueprint; @@ -20,14 +15,12 @@ pub struct AiTaskCreateInput { pub owner_user_id: String, pub request_label: String, pub source_module: String, - pub source_entity_id: Option::, - pub request_payload_json: Option::, - pub stages: Vec::, + pub source_entity_id: Option, + pub request_payload_json: Option, + pub stages: Vec, pub created_at_micros: i64, } - impl __sdk::InModule for AiTaskCreateInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_failure_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_failure_input_type.rs index dfdd6ee6..91a87cf5 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_failure_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_failure_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,8 +12,6 @@ pub struct AiTaskFailureInput { pub completed_at_micros: i64, } - impl __sdk::InModule for AiTaskFailureInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_finish_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_finish_input_type.rs index f7bc9735..d8fe6713 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_finish_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_finish_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +11,6 @@ pub struct AiTaskFinishInput { pub completed_at_micros: i64, } - impl __sdk::InModule for AiTaskFinishInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_kind_type.rs index 7724e312..9468bc95 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_kind_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_kind_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -24,12 +19,8 @@ pub enum AiTaskKind { QuestIntent, RuntimeItemIntent, - } - - impl __sdk::InModule for AiTaskKind { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_procedure_result_type.rs index f0457945..57728f6e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_procedure_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::ai_task_snapshot_type::AiTaskSnapshot; use super::ai_text_chunk_snapshot_type::AiTextChunkSnapshot; @@ -16,13 +11,11 @@ use super::ai_text_chunk_snapshot_type::AiTextChunkSnapshot; #[sats(crate = __lib)] pub struct AiTaskProcedureResult { pub ok: bool, - pub task: Option::, - pub text_chunk: Option::, - pub error_message: Option::, + pub task: Option, + pub text_chunk: Option, + pub error_message: Option, } - impl __sdk::InModule for AiTaskProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_snapshot_type.rs index c0259393..66fa9a15 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_snapshot_type.rs @@ -2,17 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::ai_task_kind_type::AiTaskKind; -use super::ai_task_status_type::AiTaskStatus; -use super::ai_task_stage_snapshot_type::AiTaskStageSnapshot; use super::ai_result_reference_snapshot_type::AiResultReferenceSnapshot; +use super::ai_task_kind_type::AiTaskKind; +use super::ai_task_stage_snapshot_type::AiTaskStageSnapshot; +use super::ai_task_status_type::AiTaskStatus; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -22,23 +17,21 @@ pub struct AiTaskSnapshot { pub owner_user_id: String, pub request_label: String, pub source_module: String, - pub source_entity_id: Option::, - pub request_payload_json: Option::, + pub source_entity_id: Option, + pub request_payload_json: Option, pub status: AiTaskStatus, - pub failure_message: Option::, - pub stages: Vec::, - pub result_references: Vec::, - pub latest_text_output: Option::, - pub latest_structured_payload_json: Option::, + pub failure_message: Option, + pub stages: Vec, + pub result_references: Vec, + pub latest_text_output: Option, + pub latest_structured_payload_json: Option, pub version: u32, pub created_at_micros: i64, - pub started_at_micros: Option::, - pub completed_at_micros: Option::, + pub started_at_micros: Option, + pub completed_at_micros: Option, pub updated_at_micros: i64, } - impl __sdk::InModule for AiTaskSnapshot { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_blueprint_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_blueprint_type.rs index 366ca586..8ed04d04 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_blueprint_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_blueprint_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::ai_task_stage_kind_type::AiTaskStageKind; @@ -20,8 +15,6 @@ pub struct AiTaskStageBlueprint { pub order: u32, } - impl __sdk::InModule for AiTaskStageBlueprint { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_kind_type.rs index 679241ae..1d7405de 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_kind_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_kind_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -22,12 +17,8 @@ pub enum AiTaskStageKind { NormalizeResult, PersistResult, - } - - impl __sdk::InModule for AiTaskStageKind { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_snapshot_type.rs index 9d449d38..30cdb845 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_snapshot_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::ai_task_stage_kind_type::AiTaskStageKind; use super::ai_task_stage_status_type::AiTaskStageStatus; @@ -20,15 +15,13 @@ pub struct AiTaskStageSnapshot { pub detail: String, pub order: u32, pub status: AiTaskStageStatus, - pub text_output: Option::, - pub structured_payload_json: Option::, - pub warning_messages: Vec::, - pub started_at_micros: Option::, - pub completed_at_micros: Option::, + pub text_output: Option, + pub structured_payload_json: Option, + pub warning_messages: Vec, + pub started_at_micros: Option, + pub completed_at_micros: Option, } - impl __sdk::InModule for AiTaskStageSnapshot { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_start_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_start_input_type.rs index 8571c6d8..956fff88 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_start_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_start_input_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::ai_task_stage_kind_type::AiTaskStageKind; @@ -19,8 +14,6 @@ pub struct AiTaskStageStartInput { pub started_at_micros: i64, } - impl __sdk::InModule for AiTaskStageStartInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_status_type.rs index 3f60897b..e1a28d7c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_status_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_status_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -20,12 +15,8 @@ pub enum AiTaskStageStatus { Completed, Skipped, - } - - impl __sdk::InModule for AiTaskStageStatus { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_table.rs index ae1617de..0bd84f77 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_table.rs @@ -2,15 +2,10 @@ // 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::ai_task_stage_type::AiTaskStage; use super::ai_task_stage_kind_type::AiTaskStageKind; use super::ai_task_stage_status_type::AiTaskStageStatus; +use super::ai_task_stage_type::AiTaskStage; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `ai_task_stage`. /// @@ -51,8 +46,12 @@ impl<'ctx> __sdk::Table for AiTaskStageTableHandle<'ctx> { type Row = AiTaskStage; type EventContext = super::EventContext; - fn count(&self) -> u64 { self.imp.count() } - fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = AiTaskStageInsertCallbackId; @@ -98,39 +97,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for AiTaskStageTableHandle<'ctx> { } } - /// Access to the `task_stage_id` unique index on the table `ai_task_stage`, - /// which allows point queries on the field of the same name - /// via the [`AiTaskStageTaskStageIdUnique::find`] method. - /// - /// Users are encouraged not to explicitly reference this type, - /// but to directly chain method calls, - /// like `ctx.db.ai_task_stage().task_stage_id().find(...)`. - pub struct AiTaskStageTaskStageIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, - } +/// Access to the `task_stage_id` unique index on the table `ai_task_stage`, +/// which allows point queries on the field of the same name +/// via the [`AiTaskStageTaskStageIdUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.ai_task_stage().task_stage_id().find(...)`. +pub struct AiTaskStageTaskStageIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} - impl<'ctx> AiTaskStageTableHandle<'ctx> { - /// Get a handle on the `task_stage_id` unique index on the table `ai_task_stage`. - pub fn task_stage_id(&self) -> AiTaskStageTaskStageIdUnique<'ctx> { - AiTaskStageTaskStageIdUnique { - imp: self.imp.get_unique_constraint::("task_stage_id"), - phantom: std::marker::PhantomData, - } - } +impl<'ctx> AiTaskStageTableHandle<'ctx> { + /// Get a handle on the `task_stage_id` unique index on the table `ai_task_stage`. + pub fn task_stage_id(&self) -> AiTaskStageTaskStageIdUnique<'ctx> { + AiTaskStageTaskStageIdUnique { + imp: self.imp.get_unique_constraint::("task_stage_id"), + phantom: std::marker::PhantomData, } + } +} + +impl<'ctx> AiTaskStageTaskStageIdUnique<'ctx> { + /// Find the subscribed row whose `task_stage_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) + } +} - impl<'ctx> AiTaskStageTaskStageIdUnique<'ctx> { - /// Find the subscribed row whose `task_stage_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::("ai_task_stage"); _table.add_unique_constraint::("task_stage_id", |row| &row.task_stage_id); } @@ -140,26 +138,24 @@ 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() + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() }) } - #[allow(non_camel_case_types)] - /// Extension trait for query builder access to the table `AiTaskStage`. - /// - /// Implemented for [`__sdk::QueryTableAccessor`]. - pub trait ai_task_stageQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `AiTaskStage`. - fn ai_task_stage(&self) -> __sdk::__query_builder::Table; - } - - impl ai_task_stageQueryTableAccess for __sdk::QueryTableAccessor { - fn ai_task_stage(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("ai_task_stage") - } - } +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `AiTaskStage`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait ai_task_stageQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `AiTaskStage`. + fn ai_task_stage(&self) -> __sdk::__query_builder::Table; +} +impl ai_task_stageQueryTableAccess for __sdk::QueryTableAccessor { + fn ai_task_stage(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("ai_task_stage") + } +} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_type.rs index 56a4094e..f4c902de 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::ai_task_stage_kind_type::AiTaskStageKind; use super::ai_task_stage_status_type::AiTaskStageStatus; @@ -22,19 +17,17 @@ pub struct AiTaskStage { pub detail: String, pub stage_order: u32, pub status: AiTaskStageStatus, - pub text_output: Option::, - pub structured_payload_json: Option::, - pub warning_messages: Vec::, - pub started_at: Option::<__sdk::Timestamp>, - pub completed_at: Option::<__sdk::Timestamp>, + pub text_output: Option, + pub structured_payload_json: Option, + pub warning_messages: Vec, + pub started_at: Option<__sdk::Timestamp>, + pub completed_at: Option<__sdk::Timestamp>, } - impl __sdk::InModule for AiTaskStage { type Module = super::RemoteModule; } - /// Column accessor struct for the table `AiTaskStage`. /// /// Provides typed access to columns for query building. @@ -46,11 +39,11 @@ pub struct AiTaskStageCols { pub detail: __sdk::__query_builder::Col, pub stage_order: __sdk::__query_builder::Col, pub status: __sdk::__query_builder::Col, - pub text_output: __sdk::__query_builder::Col>, - pub structured_payload_json: __sdk::__query_builder::Col>, - pub warning_messages: __sdk::__query_builder::Col>, - pub started_at: __sdk::__query_builder::Col>, - pub completed_at: __sdk::__query_builder::Col>, + pub text_output: __sdk::__query_builder::Col>, + pub structured_payload_json: __sdk::__query_builder::Col>, + pub warning_messages: __sdk::__query_builder::Col>, + pub started_at: __sdk::__query_builder::Col>, + pub completed_at: __sdk::__query_builder::Col>, } impl __sdk::__query_builder::HasCols for AiTaskStage { @@ -65,11 +58,13 @@ impl __sdk::__query_builder::HasCols for AiTaskStage { stage_order: __sdk::__query_builder::Col::new(table_name, "stage_order"), status: __sdk::__query_builder::Col::new(table_name, "status"), text_output: __sdk::__query_builder::Col::new(table_name, "text_output"), - structured_payload_json: __sdk::__query_builder::Col::new(table_name, "structured_payload_json"), + structured_payload_json: __sdk::__query_builder::Col::new( + table_name, + "structured_payload_json", + ), warning_messages: __sdk::__query_builder::Col::new(table_name, "warning_messages"), started_at: __sdk::__query_builder::Col::new(table_name, "started_at"), completed_at: __sdk::__query_builder::Col::new(table_name, "completed_at"), - } } } @@ -88,10 +83,8 @@ impl __sdk::__query_builder::HasIxCols for AiTaskStage { AiTaskStageIxCols { task_id: __sdk::__query_builder::IxCol::new(table_name, "task_id"), task_stage_id: __sdk::__query_builder::IxCol::new(table_name, "task_stage_id"), - } } } impl __sdk::__query_builder::CanBeLookupTable for AiTaskStage {} - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_start_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_start_input_type.rs index 14fa5acb..d2145e81 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_start_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_start_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +11,6 @@ pub struct AiTaskStartInput { pub started_at_micros: i64, } - impl __sdk::InModule for AiTaskStartInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_status_type.rs index 58f1f7a2..3c59cd6a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_status_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_status_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -22,12 +17,8 @@ pub enum AiTaskStatus { Failed, Cancelled, - } - - impl __sdk::InModule for AiTaskStatus { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_table.rs index 60172196..83c04b8a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_table.rs @@ -2,15 +2,10 @@ // 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::ai_task_type::AiTask; use super::ai_task_kind_type::AiTaskKind; use super::ai_task_status_type::AiTaskStatus; +use super::ai_task_type::AiTask; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `ai_task`. /// @@ -51,8 +46,12 @@ impl<'ctx> __sdk::Table for AiTaskTableHandle<'ctx> { type Row = AiTask; type EventContext = super::EventContext; - fn count(&self) -> u64 { self.imp.count() } - fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = AiTaskInsertCallbackId; @@ -98,39 +97,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for AiTaskTableHandle<'ctx> { } } - /// Access to the `task_id` unique index on the table `ai_task`, - /// which allows point queries on the field of the same name - /// via the [`AiTaskTaskIdUnique::find`] method. - /// - /// Users are encouraged not to explicitly reference this type, - /// but to directly chain method calls, - /// like `ctx.db.ai_task().task_id().find(...)`. - pub struct AiTaskTaskIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, - } +/// Access to the `task_id` unique index on the table `ai_task`, +/// which allows point queries on the field of the same name +/// via the [`AiTaskTaskIdUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.ai_task().task_id().find(...)`. +pub struct AiTaskTaskIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} - impl<'ctx> AiTaskTableHandle<'ctx> { - /// Get a handle on the `task_id` unique index on the table `ai_task`. - pub fn task_id(&self) -> AiTaskTaskIdUnique<'ctx> { - AiTaskTaskIdUnique { - imp: self.imp.get_unique_constraint::("task_id"), - phantom: std::marker::PhantomData, - } - } +impl<'ctx> AiTaskTableHandle<'ctx> { + /// Get a handle on the `task_id` unique index on the table `ai_task`. + pub fn task_id(&self) -> AiTaskTaskIdUnique<'ctx> { + AiTaskTaskIdUnique { + imp: self.imp.get_unique_constraint::("task_id"), + phantom: std::marker::PhantomData, } + } +} + +impl<'ctx> AiTaskTaskIdUnique<'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) + } +} - impl<'ctx> AiTaskTaskIdUnique<'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::("ai_task"); _table.add_unique_constraint::("task_id", |row| &row.task_id); } @@ -140,26 +138,24 @@ 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() + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() }) } - #[allow(non_camel_case_types)] - /// Extension trait for query builder access to the table `AiTask`. - /// - /// Implemented for [`__sdk::QueryTableAccessor`]. - pub trait ai_taskQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `AiTask`. - fn ai_task(&self) -> __sdk::__query_builder::Table; - } - - impl ai_taskQueryTableAccess for __sdk::QueryTableAccessor { - fn ai_task(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("ai_task") - } - } +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `AiTask`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait ai_taskQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `AiTask`. + fn ai_task(&self) -> __sdk::__query_builder::Table; +} +impl ai_taskQueryTableAccess for __sdk::QueryTableAccessor { + fn ai_task(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("ai_task") + } +} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_type.rs index 96d4077f..6b2845fc 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::ai_task_kind_type::AiTaskKind; use super::ai_task_status_type::AiTaskStatus; @@ -20,25 +15,23 @@ pub struct AiTask { pub owner_user_id: String, pub request_label: String, pub source_module: String, - pub source_entity_id: Option::, - pub request_payload_json: Option::, + pub source_entity_id: Option, + pub request_payload_json: Option, pub status: AiTaskStatus, - pub failure_message: Option::, - pub latest_text_output: Option::, - pub latest_structured_payload_json: Option::, + pub failure_message: Option, + pub latest_text_output: Option, + pub latest_structured_payload_json: Option, pub version: u32, pub created_at: __sdk::Timestamp, - pub started_at: Option::<__sdk::Timestamp>, - pub completed_at: Option::<__sdk::Timestamp>, + pub started_at: Option<__sdk::Timestamp>, + pub completed_at: Option<__sdk::Timestamp>, pub updated_at: __sdk::Timestamp, } - impl __sdk::InModule for AiTask { type Module = super::RemoteModule; } - /// Column accessor struct for the table `AiTask`. /// /// Provides typed access to columns for query building. @@ -48,16 +41,16 @@ pub struct AiTaskCols { pub owner_user_id: __sdk::__query_builder::Col, pub request_label: __sdk::__query_builder::Col, pub source_module: __sdk::__query_builder::Col, - pub source_entity_id: __sdk::__query_builder::Col>, - pub request_payload_json: __sdk::__query_builder::Col>, + pub source_entity_id: __sdk::__query_builder::Col>, + pub request_payload_json: __sdk::__query_builder::Col>, pub status: __sdk::__query_builder::Col, - pub failure_message: __sdk::__query_builder::Col>, - pub latest_text_output: __sdk::__query_builder::Col>, - pub latest_structured_payload_json: __sdk::__query_builder::Col>, + pub failure_message: __sdk::__query_builder::Col>, + pub latest_text_output: __sdk::__query_builder::Col>, + pub latest_structured_payload_json: __sdk::__query_builder::Col>, pub version: __sdk::__query_builder::Col, pub created_at: __sdk::__query_builder::Col, - pub started_at: __sdk::__query_builder::Col>, - pub completed_at: __sdk::__query_builder::Col>, + pub started_at: __sdk::__query_builder::Col>, + pub completed_at: __sdk::__query_builder::Col>, pub updated_at: __sdk::__query_builder::Col, } @@ -71,17 +64,22 @@ impl __sdk::__query_builder::HasCols for AiTask { request_label: __sdk::__query_builder::Col::new(table_name, "request_label"), source_module: __sdk::__query_builder::Col::new(table_name, "source_module"), source_entity_id: __sdk::__query_builder::Col::new(table_name, "source_entity_id"), - request_payload_json: __sdk::__query_builder::Col::new(table_name, "request_payload_json"), + request_payload_json: __sdk::__query_builder::Col::new( + table_name, + "request_payload_json", + ), status: __sdk::__query_builder::Col::new(table_name, "status"), failure_message: __sdk::__query_builder::Col::new(table_name, "failure_message"), latest_text_output: __sdk::__query_builder::Col::new(table_name, "latest_text_output"), - latest_structured_payload_json: __sdk::__query_builder::Col::new(table_name, "latest_structured_payload_json"), + latest_structured_payload_json: __sdk::__query_builder::Col::new( + table_name, + "latest_structured_payload_json", + ), version: __sdk::__query_builder::Col::new(table_name, "version"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), started_at: __sdk::__query_builder::Col::new(table_name, "started_at"), completed_at: __sdk::__query_builder::Col::new(table_name, "completed_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), - } } } @@ -104,10 +102,8 @@ impl __sdk::__query_builder::HasIxCols for AiTask { status: __sdk::__query_builder::IxCol::new(table_name, "status"), task_id: __sdk::__query_builder::IxCol::new(table_name, "task_id"), task_kind: __sdk::__query_builder::IxCol::new(table_name, "task_kind"), - } } } impl __sdk::__query_builder::CanBeLookupTable for AiTask {} - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_append_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_append_input_type.rs index 11b5da68..0f462690 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_append_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_append_input_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::ai_task_stage_kind_type::AiTaskStageKind; @@ -21,8 +16,6 @@ pub struct AiTextChunkAppendInput { pub created_at_micros: i64, } - impl __sdk::InModule for AiTextChunkAppendInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_snapshot_type.rs index 81cb2ce9..f386071c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_snapshot_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::ai_task_stage_kind_type::AiTaskStageKind; @@ -22,8 +17,6 @@ pub struct AiTextChunkSnapshot { pub created_at_micros: i64, } - impl __sdk::InModule for AiTextChunkSnapshot { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_table.rs index 2ef5c6ad..7311d79f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_table.rs @@ -2,14 +2,9 @@ // 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::ai_text_chunk_type::AiTextChunk; use super::ai_task_stage_kind_type::AiTaskStageKind; +use super::ai_text_chunk_type::AiTextChunk; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `ai_text_chunk`. /// @@ -50,8 +45,12 @@ impl<'ctx> __sdk::Table for AiTextChunkTableHandle<'ctx> { type Row = AiTextChunk; type EventContext = super::EventContext; - fn count(&self) -> u64 { self.imp.count() } - fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = AiTextChunkInsertCallbackId; @@ -97,39 +96,40 @@ impl<'ctx> __sdk::TableWithPrimaryKey for AiTextChunkTableHandle<'ctx> { } } - /// Access to the `text_chunk_row_id` unique index on the table `ai_text_chunk`, - /// which allows point queries on the field of the same name - /// via the [`AiTextChunkTextChunkRowIdUnique::find`] method. - /// - /// Users are encouraged not to explicitly reference this type, - /// but to directly chain method calls, - /// like `ctx.db.ai_text_chunk().text_chunk_row_id().find(...)`. - pub struct AiTextChunkTextChunkRowIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, - } +/// Access to the `text_chunk_row_id` unique index on the table `ai_text_chunk`, +/// which allows point queries on the field of the same name +/// via the [`AiTextChunkTextChunkRowIdUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.ai_text_chunk().text_chunk_row_id().find(...)`. +pub struct AiTextChunkTextChunkRowIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} - impl<'ctx> AiTextChunkTableHandle<'ctx> { - /// Get a handle on the `text_chunk_row_id` unique index on the table `ai_text_chunk`. - pub fn text_chunk_row_id(&self) -> AiTextChunkTextChunkRowIdUnique<'ctx> { - AiTextChunkTextChunkRowIdUnique { - imp: self.imp.get_unique_constraint::("text_chunk_row_id"), - phantom: std::marker::PhantomData, - } - } +impl<'ctx> AiTextChunkTableHandle<'ctx> { + /// Get a handle on the `text_chunk_row_id` unique index on the table `ai_text_chunk`. + pub fn text_chunk_row_id(&self) -> AiTextChunkTextChunkRowIdUnique<'ctx> { + AiTextChunkTextChunkRowIdUnique { + imp: self + .imp + .get_unique_constraint::("text_chunk_row_id"), + phantom: std::marker::PhantomData, } + } +} + +impl<'ctx> AiTextChunkTextChunkRowIdUnique<'ctx> { + /// Find the subscribed row whose `text_chunk_row_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) + } +} - impl<'ctx> AiTextChunkTextChunkRowIdUnique<'ctx> { - /// Find the subscribed row whose `text_chunk_row_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::("ai_text_chunk"); _table.add_unique_constraint::("text_chunk_row_id", |row| &row.text_chunk_row_id); } @@ -139,26 +139,24 @@ 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() + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() }) } - #[allow(non_camel_case_types)] - /// Extension trait for query builder access to the table `AiTextChunk`. - /// - /// Implemented for [`__sdk::QueryTableAccessor`]. - pub trait ai_text_chunkQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `AiTextChunk`. - fn ai_text_chunk(&self) -> __sdk::__query_builder::Table; - } - - impl ai_text_chunkQueryTableAccess for __sdk::QueryTableAccessor { - fn ai_text_chunk(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("ai_text_chunk") - } - } +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `AiTextChunk`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait ai_text_chunkQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `AiTextChunk`. + fn ai_text_chunk(&self) -> __sdk::__query_builder::Table; +} +impl ai_text_chunkQueryTableAccess for __sdk::QueryTableAccessor { + fn ai_text_chunk(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("ai_text_chunk") + } +} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_type.rs index df60c3a7..8a1a8c93 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::ai_task_stage_kind_type::AiTaskStageKind; @@ -23,12 +18,10 @@ pub struct AiTextChunk { pub created_at: __sdk::Timestamp, } - impl __sdk::InModule for AiTextChunk { type Module = super::RemoteModule; } - /// Column accessor struct for the table `AiTextChunk`. /// /// Provides typed access to columns for query building. @@ -53,7 +46,6 @@ impl __sdk::__query_builder::HasCols for AiTextChunk { sequence: __sdk::__query_builder::Col::new(table_name, "sequence"), delta_text: __sdk::__query_builder::Col::new(table_name, "delta_text"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), - } } } @@ -72,10 +64,8 @@ impl __sdk::__query_builder::HasIxCols for AiTextChunk { AiTextChunkIxCols { task_id: __sdk::__query_builder::IxCol::new(table_name, "task_id"), text_chunk_row_id: __sdk::__query_builder::IxCol::new(table_name, "text_chunk_row_id"), - } } } impl __sdk::__query_builder::CanBeLookupTable for AiTextChunk {} - 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 2edd4cbc..191e2ea7 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 @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::ai_text_chunk_append_input_type::AiTextChunkAppendInput; use super::ai_task_procedure_result_type::AiTaskProcedureResult; +use super::ai_text_chunk_append_input_type::AiTextChunkAppendInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct AppendAiTextChunkAndReturnArgs { +struct AppendAiTextChunkAndReturnArgs { pub input: AiTextChunkAppendInput, } - impl __sdk::InModule for AppendAiTextChunkAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for AppendAiTextChunkAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait append_ai_text_chunk_and_return { - fn append_ai_text_chunk_and_return(&self, input: AiTextChunkAppendInput, -) { - self.append_ai_text_chunk_and_return_then(input, |_, _| {}); + fn append_ai_text_chunk_and_return(&self, input: AiTextChunkAppendInput) { + self.append_ai_text_chunk_and_return_then(input, |_, _| {}); } fn append_ai_text_chunk_and_return_then( &self, input: AiTextChunkAppendInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl append_ai_text_chunk_and_return for super::RemoteProcedures { &self, input: AiTextChunkAppendInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, AiTaskProcedureResult>( - "append_ai_text_chunk_and_return", - AppendAiTextChunkAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, AiTaskProcedureResult>( + "append_ai_text_chunk_and_return", + AppendAiTextChunkAndReturnArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/apply_chapter_progression_ledger_entry_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/apply_chapter_progression_ledger_entry_and_return_procedure.rs index e76eac6e..4a949906 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/apply_chapter_progression_ledger_entry_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/apply_chapter_progression_ledger_entry_and_return_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::chapter_progression_ledger_input_type::ChapterProgressionLedgerInput; use super::chapter_progression_procedure_result_type::ChapterProgressionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct ApplyChapterProgressionLedgerEntryAndReturnArgs { +struct ApplyChapterProgressionLedgerEntryAndReturnArgs { pub input: ChapterProgressionLedgerInput, } - impl __sdk::InModule for ApplyChapterProgressionLedgerEntryAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,22 @@ impl __sdk::InModule for ApplyChapterProgressionLedgerEntryAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait apply_chapter_progression_ledger_entry_and_return { - fn apply_chapter_progression_ledger_entry_and_return(&self, input: ChapterProgressionLedgerInput, -) { - self.apply_chapter_progression_ledger_entry_and_return_then(input, |_, _| {}); + fn apply_chapter_progression_ledger_entry_and_return( + &self, + input: ChapterProgressionLedgerInput, + ) { + self.apply_chapter_progression_ledger_entry_and_return_then(input, |_, _| {}); } fn apply_chapter_progression_ledger_entry_and_return_then( &self, input: ChapterProgressionLedgerInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +46,17 @@ impl apply_chapter_progression_ledger_entry_and_return for super::RemoteProcedur &self, input: ChapterProgressionLedgerInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, ChapterProgressionProcedureResult>( - "apply_chapter_progression_ledger_entry_and_return", - ApplyChapterProgressionLedgerEntryAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, ChapterProgressionProcedureResult>( + "apply_chapter_progression_ledger_entry_and_return", + ApplyChapterProgressionLedgerEntryAndReturnArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/apply_chapter_progression_ledger_entry_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/apply_chapter_progression_ledger_entry_reducer.rs index 04f54e54..44596083 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/apply_chapter_progression_ledger_entry_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/apply_chapter_progression_ledger_entry_reducer.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::chapter_progression_ledger_input_type::ChapterProgressionLedgerInput; @@ -19,10 +14,8 @@ pub(super) struct ApplyChapterProgressionLedgerEntryArgs { impl From for super::Reducer { fn from(args: ApplyChapterProgressionLedgerEntryArgs) -> Self { - Self::ApplyChapterProgressionLedgerEntry { - input: args.input, -} -} + Self::ApplyChapterProgressionLedgerEntry { input: args.input } + } } impl __sdk::InModule for ApplyChapterProgressionLedgerEntryArgs { @@ -40,9 +33,11 @@ pub trait apply_chapter_progression_ledger_entry { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`apply_chapter_progression_ledger_entry:apply_chapter_progression_ledger_entry_then`] to run a callback after the reducer completes. - fn apply_chapter_progression_ledger_entry(&self, input: ChapterProgressionLedgerInput, -) -> __sdk::Result<()> { - self.apply_chapter_progression_ledger_entry_then(input, |_, _| {}) + fn apply_chapter_progression_ledger_entry( + &self, + input: ChapterProgressionLedgerInput, + ) -> __sdk::Result<()> { + self.apply_chapter_progression_ledger_entry_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `apply_chapter_progression_ledger_entry` to run as soon as possible, @@ -55,9 +50,11 @@ pub trait apply_chapter_progression_ledger_entry { &self, input: ChapterProgressionLedgerInput, - callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) - + Send - + 'static, + callback: impl FnOnce( + &super::ReducerEventContext, + Result, __sdk::InternalError>, + ) + Send + + 'static, ) -> __sdk::Result<()>; } @@ -66,11 +63,15 @@ impl apply_chapter_progression_ledger_entry for super::RemoteReducers { &self, input: ChapterProgressionLedgerInput, - 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(ApplyChapterProgressionLedgerEntryArgs { input, }, callback) + self.imp.invoke_reducer_with_callback( + ApplyChapterProgressionLedgerEntryArgs { input }, + callback, + ) } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/apply_inventory_mutation_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/apply_inventory_mutation_reducer.rs index 4270f52a..d9b4240d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/apply_inventory_mutation_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/apply_inventory_mutation_reducer.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::inventory_mutation_input_type::InventoryMutationInput; @@ -19,10 +14,8 @@ pub(super) struct ApplyInventoryMutationArgs { impl From for super::Reducer { fn from(args: ApplyInventoryMutationArgs) -> Self { - Self::ApplyInventoryMutation { - input: args.input, -} -} + Self::ApplyInventoryMutation { input: args.input } + } } impl __sdk::InModule for ApplyInventoryMutationArgs { @@ -40,9 +33,8 @@ pub trait apply_inventory_mutation { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`apply_inventory_mutation:apply_inventory_mutation_then`] to run a callback after the reducer completes. - fn apply_inventory_mutation(&self, input: InventoryMutationInput, -) -> __sdk::Result<()> { - self.apply_inventory_mutation_then(input, |_, _| {}) + fn apply_inventory_mutation(&self, input: InventoryMutationInput) -> __sdk::Result<()> { + self.apply_inventory_mutation_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `apply_inventory_mutation` to run as soon as possible, @@ -55,9 +47,11 @@ pub trait apply_inventory_mutation { &self, input: InventoryMutationInput, - callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) - + Send - + 'static, + callback: impl FnOnce( + &super::ReducerEventContext, + Result, __sdk::InternalError>, + ) + Send + + 'static, ) -> __sdk::Result<()>; } @@ -66,11 +60,13 @@ impl apply_inventory_mutation for super::RemoteReducers { &self, input: InventoryMutationInput, - 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(ApplyInventoryMutationArgs { input, }, callback) + self.imp + .invoke_reducer_with_callback(ApplyInventoryMutationArgs { input }, callback) } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/apply_quest_signal_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/apply_quest_signal_reducer.rs index 6976f6aa..6b4c310b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/apply_quest_signal_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/apply_quest_signal_reducer.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::quest_signal_apply_input_type::QuestSignalApplyInput; @@ -19,10 +14,8 @@ pub(super) struct ApplyQuestSignalArgs { impl From for super::Reducer { fn from(args: ApplyQuestSignalArgs) -> Self { - Self::ApplyQuestSignal { - input: args.input, -} -} + Self::ApplyQuestSignal { input: args.input } + } } impl __sdk::InModule for ApplyQuestSignalArgs { @@ -40,9 +33,8 @@ pub trait apply_quest_signal { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`apply_quest_signal:apply_quest_signal_then`] to run a callback after the reducer completes. - fn apply_quest_signal(&self, input: QuestSignalApplyInput, -) -> __sdk::Result<()> { - self.apply_quest_signal_then(input, |_, _| {}) + fn apply_quest_signal(&self, input: QuestSignalApplyInput) -> __sdk::Result<()> { + self.apply_quest_signal_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `apply_quest_signal` to run as soon as possible, @@ -55,9 +47,11 @@ pub trait apply_quest_signal { &self, input: QuestSignalApplyInput, - callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) - + Send - + 'static, + callback: impl FnOnce( + &super::ReducerEventContext, + Result, __sdk::InternalError>, + ) + Send + + 'static, ) -> __sdk::Result<()>; } @@ -66,11 +60,13 @@ impl apply_quest_signal for super::RemoteReducers { &self, input: QuestSignalApplyInput, - 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(ApplyQuestSignalArgs { input, }, callback) + self.imp + .invoke_reducer_with_callback(ApplyQuestSignalArgs { input }, callback) } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_input_type.rs index 10dab835..10a39937 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -19,13 +13,11 @@ pub struct AssetEntityBindingInput { pub entity_id: String, pub slot: String, pub asset_kind: String, - pub owner_user_id: Option::, - pub profile_id: Option::, + pub owner_user_id: Option, + pub profile_id: Option, pub updated_at_micros: i64, } - impl __sdk::InModule for AssetEntityBindingInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_procedure_result_type.rs index 73eff3a6..1c51596f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_procedure_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::asset_entity_binding_snapshot_type::AssetEntityBindingSnapshot; @@ -15,12 +10,10 @@ use super::asset_entity_binding_snapshot_type::AssetEntityBindingSnapshot; #[sats(crate = __lib)] pub struct AssetEntityBindingProcedureResult { pub ok: bool, - pub record: Option::, - pub error_message: Option::, + pub record: Option, + pub error_message: Option, } - impl __sdk::InModule for AssetEntityBindingProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_snapshot_type.rs index 862d1b14..d559ea04 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_snapshot_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -19,14 +13,12 @@ pub struct AssetEntityBindingSnapshot { pub entity_id: String, pub slot: String, pub asset_kind: String, - pub owner_user_id: Option::, - pub profile_id: Option::, + pub owner_user_id: Option, + pub profile_id: Option, pub created_at_micros: i64, pub updated_at_micros: i64, } - impl __sdk::InModule for AssetEntityBindingSnapshot { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_table.rs index 13f7b47f..971704ae 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_table.rs @@ -2,13 +2,8 @@ // 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::asset_entity_binding_type::AssetEntityBinding; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `asset_entity_binding`. /// @@ -36,7 +31,9 @@ pub trait AssetEntityBindingTableAccess { impl AssetEntityBindingTableAccess for super::RemoteTables { fn asset_entity_binding(&self) -> AssetEntityBindingTableHandle<'_> { AssetEntityBindingTableHandle { - imp: self.imp.get_table::("asset_entity_binding"), + imp: self + .imp + .get_table::("asset_entity_binding"), ctx: std::marker::PhantomData, } } @@ -49,8 +46,12 @@ impl<'ctx> __sdk::Table for AssetEntityBindingTableHandle<'ctx> { type Row = AssetEntityBinding; type EventContext = super::EventContext; - fn count(&self) -> u64 { self.imp.count() } - fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = AssetEntityBindingInsertCallbackId; @@ -96,39 +97,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for AssetEntityBindingTableHandle<'ctx> { } } - /// Access to the `binding_id` unique index on the table `asset_entity_binding`, - /// which allows point queries on the field of the same name - /// via the [`AssetEntityBindingBindingIdUnique::find`] method. - /// - /// Users are encouraged not to explicitly reference this type, - /// but to directly chain method calls, - /// like `ctx.db.asset_entity_binding().binding_id().find(...)`. - pub struct AssetEntityBindingBindingIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, - } +/// Access to the `binding_id` unique index on the table `asset_entity_binding`, +/// which allows point queries on the field of the same name +/// via the [`AssetEntityBindingBindingIdUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.asset_entity_binding().binding_id().find(...)`. +pub struct AssetEntityBindingBindingIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} - impl<'ctx> AssetEntityBindingTableHandle<'ctx> { - /// Get a handle on the `binding_id` unique index on the table `asset_entity_binding`. - pub fn binding_id(&self) -> AssetEntityBindingBindingIdUnique<'ctx> { - AssetEntityBindingBindingIdUnique { - imp: self.imp.get_unique_constraint::("binding_id"), - phantom: std::marker::PhantomData, - } - } +impl<'ctx> AssetEntityBindingTableHandle<'ctx> { + /// Get a handle on the `binding_id` unique index on the table `asset_entity_binding`. + pub fn binding_id(&self) -> AssetEntityBindingBindingIdUnique<'ctx> { + AssetEntityBindingBindingIdUnique { + imp: self.imp.get_unique_constraint::("binding_id"), + phantom: std::marker::PhantomData, } + } +} + +impl<'ctx> AssetEntityBindingBindingIdUnique<'ctx> { + /// Find the subscribed row whose `binding_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) + } +} - impl<'ctx> AssetEntityBindingBindingIdUnique<'ctx> { - /// Find the subscribed row whose `binding_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::("asset_entity_binding"); _table.add_unique_constraint::("binding_id", |row| &row.binding_id); } @@ -138,26 +138,24 @@ 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() + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() }) } - #[allow(non_camel_case_types)] - /// Extension trait for query builder access to the table `AssetEntityBinding`. - /// - /// Implemented for [`__sdk::QueryTableAccessor`]. - pub trait asset_entity_bindingQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `AssetEntityBinding`. - fn asset_entity_binding(&self) -> __sdk::__query_builder::Table; - } - - impl asset_entity_bindingQueryTableAccess for __sdk::QueryTableAccessor { - fn asset_entity_binding(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("asset_entity_binding") - } - } +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `AssetEntityBinding`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait asset_entity_bindingQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `AssetEntityBinding`. + fn asset_entity_binding(&self) -> __sdk::__query_builder::Table; +} +impl asset_entity_bindingQueryTableAccess for __sdk::QueryTableAccessor { + fn asset_entity_binding(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("asset_entity_binding") + } +} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_type.rs index 8f5423b6..f12154e1 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -19,18 +13,16 @@ pub struct AssetEntityBinding { pub entity_id: String, pub slot: String, pub asset_kind: String, - pub owner_user_id: Option::, - pub profile_id: Option::, + pub owner_user_id: Option, + pub profile_id: Option, pub created_at: __sdk::Timestamp, pub updated_at: __sdk::Timestamp, } - impl __sdk::InModule for AssetEntityBinding { type Module = super::RemoteModule; } - /// Column accessor struct for the table `AssetEntityBinding`. /// /// Provides typed access to columns for query building. @@ -41,8 +33,8 @@ pub struct AssetEntityBindingCols { pub entity_id: __sdk::__query_builder::Col, pub slot: __sdk::__query_builder::Col, pub asset_kind: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col>, - pub profile_id: __sdk::__query_builder::Col>, + pub owner_user_id: __sdk::__query_builder::Col>, + pub profile_id: __sdk::__query_builder::Col>, pub created_at: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, } @@ -61,7 +53,6 @@ impl __sdk::__query_builder::HasCols for AssetEntityBinding { profile_id: __sdk::__query_builder::Col::new(table_name, "profile_id"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), - } } } @@ -80,10 +71,8 @@ impl __sdk::__query_builder::HasIxCols for AssetEntityBinding { AssetEntityBindingIxCols { asset_object_id: __sdk::__query_builder::IxCol::new(table_name, "asset_object_id"), binding_id: __sdk::__query_builder::IxCol::new(table_name, "binding_id"), - } } } impl __sdk::__query_builder::CanBeLookupTable for AssetEntityBinding {} - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/asset_object_access_policy_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/asset_object_access_policy_type.rs index 3d6203bb..17d02930 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/asset_object_access_policy_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/asset_object_access_policy_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,12 +11,8 @@ pub enum AssetObjectAccessPolicy { Private, PublicRead, - } - - impl __sdk::InModule for AssetObjectAccessPolicy { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/asset_object_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/asset_object_procedure_result_type.rs index ea327af9..9ccf22ed 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/asset_object_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/asset_object_procedure_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::asset_object_upsert_snapshot_type::AssetObjectUpsertSnapshot; @@ -15,12 +10,10 @@ use super::asset_object_upsert_snapshot_type::AssetObjectUpsertSnapshot; #[sats(crate = __lib)] pub struct AssetObjectProcedureResult { pub ok: bool, - pub record: Option::, - pub error_message: Option::, + pub record: Option, + pub error_message: Option, } - impl __sdk::InModule for AssetObjectProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/asset_object_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/asset_object_table.rs index 2aeb9a22..526fa287 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/asset_object_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/asset_object_table.rs @@ -2,14 +2,9 @@ // 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::asset_object_type::AssetObject; use super::asset_object_access_policy_type::AssetObjectAccessPolicy; +use super::asset_object_type::AssetObject; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `asset_object`. /// @@ -50,8 +45,12 @@ impl<'ctx> __sdk::Table for AssetObjectTableHandle<'ctx> { type Row = AssetObject; type EventContext = super::EventContext; - fn count(&self) -> u64 { self.imp.count() } - fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = AssetObjectInsertCallbackId; @@ -97,39 +96,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for AssetObjectTableHandle<'ctx> { } } - /// Access to the `asset_object_id` unique index on the table `asset_object`, - /// which allows point queries on the field of the same name - /// via the [`AssetObjectAssetObjectIdUnique::find`] method. - /// - /// Users are encouraged not to explicitly reference this type, - /// but to directly chain method calls, - /// like `ctx.db.asset_object().asset_object_id().find(...)`. - pub struct AssetObjectAssetObjectIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, - } +/// Access to the `asset_object_id` unique index on the table `asset_object`, +/// which allows point queries on the field of the same name +/// via the [`AssetObjectAssetObjectIdUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.asset_object().asset_object_id().find(...)`. +pub struct AssetObjectAssetObjectIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} - impl<'ctx> AssetObjectTableHandle<'ctx> { - /// Get a handle on the `asset_object_id` unique index on the table `asset_object`. - pub fn asset_object_id(&self) -> AssetObjectAssetObjectIdUnique<'ctx> { - AssetObjectAssetObjectIdUnique { - imp: self.imp.get_unique_constraint::("asset_object_id"), - phantom: std::marker::PhantomData, - } - } +impl<'ctx> AssetObjectTableHandle<'ctx> { + /// Get a handle on the `asset_object_id` unique index on the table `asset_object`. + pub fn asset_object_id(&self) -> AssetObjectAssetObjectIdUnique<'ctx> { + AssetObjectAssetObjectIdUnique { + imp: self.imp.get_unique_constraint::("asset_object_id"), + phantom: std::marker::PhantomData, } + } +} + +impl<'ctx> AssetObjectAssetObjectIdUnique<'ctx> { + /// Find the subscribed row whose `asset_object_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) + } +} - impl<'ctx> AssetObjectAssetObjectIdUnique<'ctx> { - /// Find the subscribed row whose `asset_object_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::("asset_object"); _table.add_unique_constraint::("asset_object_id", |row| &row.asset_object_id); } @@ -139,26 +137,24 @@ 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() + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() }) } - #[allow(non_camel_case_types)] - /// Extension trait for query builder access to the table `AssetObject`. - /// - /// Implemented for [`__sdk::QueryTableAccessor`]. - pub trait asset_objectQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `AssetObject`. - fn asset_object(&self) -> __sdk::__query_builder::Table; - } - - impl asset_objectQueryTableAccess for __sdk::QueryTableAccessor { - fn asset_object(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("asset_object") - } - } +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `AssetObject`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait asset_objectQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `AssetObject`. + fn asset_object(&self) -> __sdk::__query_builder::Table; +} +impl asset_objectQueryTableAccess for __sdk::QueryTableAccessor { + fn asset_object(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("asset_object") + } +} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/asset_object_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/asset_object_type.rs index 75935935..c9d57ac5 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/asset_object_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/asset_object_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::asset_object_access_policy_type::AssetObjectAccessPolicy; @@ -18,25 +13,23 @@ pub struct AssetObject { pub bucket: String, pub object_key: String, pub access_policy: AssetObjectAccessPolicy, - pub content_type: Option::, + pub content_type: Option, pub content_length: u64, - pub content_hash: Option::, + pub content_hash: Option, pub version: u32, - pub source_job_id: Option::, - pub owner_user_id: Option::, - pub profile_id: Option::, - pub entity_id: Option::, + pub source_job_id: Option, + pub owner_user_id: Option, + pub profile_id: Option, + pub entity_id: Option, pub asset_kind: String, pub created_at: __sdk::Timestamp, pub updated_at: __sdk::Timestamp, } - impl __sdk::InModule for AssetObject { type Module = super::RemoteModule; } - /// Column accessor struct for the table `AssetObject`. /// /// Provides typed access to columns for query building. @@ -45,14 +38,14 @@ pub struct AssetObjectCols { pub bucket: __sdk::__query_builder::Col, pub object_key: __sdk::__query_builder::Col, pub access_policy: __sdk::__query_builder::Col, - pub content_type: __sdk::__query_builder::Col>, + pub content_type: __sdk::__query_builder::Col>, pub content_length: __sdk::__query_builder::Col, - pub content_hash: __sdk::__query_builder::Col>, + pub content_hash: __sdk::__query_builder::Col>, pub version: __sdk::__query_builder::Col, - pub source_job_id: __sdk::__query_builder::Col>, - pub owner_user_id: __sdk::__query_builder::Col>, - pub profile_id: __sdk::__query_builder::Col>, - pub entity_id: __sdk::__query_builder::Col>, + pub source_job_id: __sdk::__query_builder::Col>, + pub owner_user_id: __sdk::__query_builder::Col>, + pub profile_id: __sdk::__query_builder::Col>, + pub entity_id: __sdk::__query_builder::Col>, pub asset_kind: __sdk::__query_builder::Col, pub created_at: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, @@ -77,7 +70,6 @@ impl __sdk::__query_builder::HasCols for AssetObject { asset_kind: __sdk::__query_builder::Col::new(table_name, "asset_kind"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), - } } } @@ -96,10 +88,8 @@ impl __sdk::__query_builder::HasIxCols for AssetObject { AssetObjectIxCols { asset_kind: __sdk::__query_builder::IxCol::new(table_name, "asset_kind"), asset_object_id: __sdk::__query_builder::IxCol::new(table_name, "asset_object_id"), - } } } impl __sdk::__query_builder::CanBeLookupTable for AssetObject {} - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/asset_object_upsert_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/asset_object_upsert_input_type.rs index 7e48cffa..85fcadc6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/asset_object_upsert_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/asset_object_upsert_input_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::asset_object_access_policy_type::AssetObjectAccessPolicy; @@ -18,20 +13,18 @@ pub struct AssetObjectUpsertInput { pub bucket: String, pub object_key: String, pub access_policy: AssetObjectAccessPolicy, - pub content_type: Option::, + pub content_type: Option, pub content_length: u64, - pub content_hash: Option::, + pub content_hash: Option, pub version: u32, - pub source_job_id: Option::, - pub owner_user_id: Option::, - pub profile_id: Option::, - pub entity_id: Option::, + pub source_job_id: Option, + pub owner_user_id: Option, + pub profile_id: Option, + pub entity_id: Option, pub asset_kind: String, pub updated_at_micros: i64, } - impl __sdk::InModule for AssetObjectUpsertInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/asset_object_upsert_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/asset_object_upsert_snapshot_type.rs index 7b5d3860..b349f18d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/asset_object_upsert_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/asset_object_upsert_snapshot_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::asset_object_access_policy_type::AssetObjectAccessPolicy; @@ -18,21 +13,19 @@ pub struct AssetObjectUpsertSnapshot { pub bucket: String, pub object_key: String, pub access_policy: AssetObjectAccessPolicy, - pub content_type: Option::, + pub content_type: Option, pub content_length: u64, - pub content_hash: Option::, + pub content_hash: Option, pub version: u32, - pub source_job_id: Option::, - pub owner_user_id: Option::, - pub profile_id: Option::, - pub entity_id: Option::, + pub source_job_id: Option, + pub owner_user_id: Option, + pub profile_id: Option, + pub entity_id: Option, pub asset_kind: String, pub created_at_micros: i64, pub updated_at_micros: i64, } - impl __sdk::InModule for AssetObjectUpsertSnapshot { type Module = super::RemoteModule; } - 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 c7eb0e22..94d41850 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 @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::ai_task_procedure_result_type::AiTaskProcedureResult; use super::ai_result_reference_input_type::AiResultReferenceInput; +use super::ai_task_procedure_result_type::AiTaskProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct AttachAiResultReferenceAndReturnArgs { +struct AttachAiResultReferenceAndReturnArgs { pub input: AiResultReferenceInput, } - impl __sdk::InModule for AttachAiResultReferenceAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for AttachAiResultReferenceAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait attach_ai_result_reference_and_return { - fn attach_ai_result_reference_and_return(&self, input: AiResultReferenceInput, -) { - self.attach_ai_result_reference_and_return_then(input, |_, _| {}); + fn attach_ai_result_reference_and_return(&self, input: AiResultReferenceInput) { + self.attach_ai_result_reference_and_return_then(input, |_, _| {}); } fn attach_ai_result_reference_and_return_then( &self, input: AiResultReferenceInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl attach_ai_result_reference_and_return for super::RemoteProcedures { &self, input: AiResultReferenceInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, AiTaskProcedureResult>( - "attach_ai_result_reference_and_return", - AttachAiResultReferenceAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, AiTaskProcedureResult>( + "attach_ai_result_reference_and_return", + AttachAiResultReferenceAndReturnArgs { input }, + __callback, + ); } } - 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 index 1961ac69..a88c25f4 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,12 +11,8 @@ 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_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/battle_state_input_type.rs index 104b96cb..6a176e2d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/battle_state_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/battle_state_input_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::battle_mode_type::BattleMode; use super::runtime_item_reward_item_snapshot_type::RuntimeItemRewardItemSnapshot; @@ -19,7 +14,7 @@ pub struct BattleStateInput { pub story_session_id: String, pub runtime_session_id: String, pub actor_user_id: String, - pub chapter_id: Option::, + pub chapter_id: Option, pub target_npc_id: String, pub target_name: String, pub battle_mode: BattleMode, @@ -30,12 +25,10 @@ pub struct BattleStateInput { pub target_hp: i32, pub target_max_hp: i32, pub experience_reward: u32, - pub reward_items: Vec::, + pub reward_items: Vec, pub created_at_micros: i64, } - impl __sdk::InModule for BattleStateInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/battle_state_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/battle_state_procedure_result_type.rs index cadc80d8..e66352ad 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/battle_state_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/battle_state_procedure_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::battle_state_snapshot_type::BattleStateSnapshot; @@ -15,12 +10,10 @@ use super::battle_state_snapshot_type::BattleStateSnapshot; #[sats(crate = __lib)] pub struct BattleStateProcedureResult { pub ok: bool, - pub snapshot: Option::, - pub error_message: Option::, + pub snapshot: Option, + pub error_message: Option, } - impl __sdk::InModule for BattleStateProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/battle_state_query_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/battle_state_query_input_type.rs index 6b9298d4..53053cca 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/battle_state_query_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/battle_state_query_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,8 +10,6 @@ pub struct BattleStateQueryInput { pub battle_state_id: String, } - impl __sdk::InModule for BattleStateQueryInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/battle_state_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/battle_state_snapshot_type.rs index c20ec25c..925d8468 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/battle_state_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/battle_state_snapshot_type.rs @@ -2,17 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::battle_mode_type::BattleMode; use super::battle_status_type::BattleStatus; -use super::runtime_item_reward_item_snapshot_type::RuntimeItemRewardItemSnapshot; 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)] @@ -21,7 +16,7 @@ pub struct BattleStateSnapshot { pub story_session_id: String, pub runtime_session_id: String, pub actor_user_id: String, - pub chapter_id: Option::, + pub chapter_id: Option, pub target_npc_id: String, pub target_name: String, pub battle_mode: BattleMode, @@ -33,11 +28,11 @@ pub struct BattleStateSnapshot { pub target_hp: i32, pub target_max_hp: i32, pub experience_reward: u32, - pub reward_items: Vec::, + 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_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, @@ -46,8 +41,6 @@ pub struct BattleStateSnapshot { pub updated_at_micros: i64, } - impl __sdk::InModule for BattleStateSnapshot { 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 index 53dc1ebb..98a289a4 100644 --- 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 @@ -2,17 +2,12 @@ // 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_state_type::BattleState; use super::battle_mode_type::BattleMode; +use super::battle_state_type::BattleState; use super::battle_status_type::BattleStatus; -use super::runtime_item_reward_item_snapshot_type::RuntimeItemRewardItemSnapshot; 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`. /// @@ -53,8 +48,12 @@ 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() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = BattleStateInsertCallbackId; @@ -100,39 +99,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for BattleStateTableHandle<'ctx> { } } - /// 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>, - } +/// 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> 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) + } +} - 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); } @@ -142,26 +140,24 @@ 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() + __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") - } - } +#[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 index 1b7e0420..9d9b852f 100644 --- 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 @@ -2,17 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::battle_mode_type::BattleMode; use super::battle_status_type::BattleStatus; -use super::runtime_item_reward_item_snapshot_type::RuntimeItemRewardItemSnapshot; 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)] @@ -21,7 +16,7 @@ pub struct BattleState { pub story_session_id: String, pub runtime_session_id: String, pub actor_user_id: String, - pub chapter_id: Option::, + pub chapter_id: Option, pub target_npc_id: String, pub target_name: String, pub battle_mode: BattleMode, @@ -33,11 +28,11 @@ pub struct BattleState { pub target_hp: i32, pub target_max_hp: i32, pub experience_reward: u32, - pub reward_items: Vec::, + 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_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, @@ -46,12 +41,10 @@ pub struct BattleState { 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. @@ -60,7 +53,7 @@ pub struct BattleStateCols { 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 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, @@ -72,11 +65,11 @@ pub struct BattleStateCols { 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 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_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, @@ -107,7 +100,10 @@ impl __sdk::__query_builder::HasCols for BattleState { 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_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"), @@ -116,7 +112,6 @@ impl __sdk::__query_builder::HasCols for BattleState { 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"), - } } } @@ -137,12 +132,13 @@ impl __sdk::__query_builder::HasIxCols for BattleState { 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"), + 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 index e869befe..0aba4f43 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,12 +13,8 @@ pub enum BattleStatus { Resolved, Aborted, - } - - impl __sdk::InModule for BattleStatus { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/begin_story_session_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/begin_story_session_and_return_procedure.rs index 75c19e04..304b2e0c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/begin_story_session_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/begin_story_session_and_return_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::story_session_input_type::StorySessionInput; use super::story_session_procedure_result_type::StorySessionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct BeginStorySessionAndReturnArgs { +struct BeginStorySessionAndReturnArgs { pub input: StorySessionInput, } - impl __sdk::InModule for BeginStorySessionAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for BeginStorySessionAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait begin_story_session_and_return { - fn begin_story_session_and_return(&self, input: StorySessionInput, -) { - self.begin_story_session_and_return_then(input, |_, _| {}); + fn begin_story_session_and_return(&self, input: StorySessionInput) { + self.begin_story_session_and_return_then(input, |_, _| {}); } fn begin_story_session_and_return_then( &self, input: StorySessionInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl begin_story_session_and_return for super::RemoteProcedures { &self, input: StorySessionInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, StorySessionProcedureResult>( - "begin_story_session_and_return", - BeginStorySessionAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, StorySessionProcedureResult>( + "begin_story_session_and_return", + BeginStorySessionAndReturnArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/begin_story_session_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/begin_story_session_reducer.rs index 582bb850..22bc4add 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/begin_story_session_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/begin_story_session_reducer.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::story_session_input_type::StorySessionInput; @@ -19,10 +14,8 @@ pub(super) struct BeginStorySessionArgs { impl From for super::Reducer { fn from(args: BeginStorySessionArgs) -> Self { - Self::BeginStorySession { - input: args.input, -} -} + Self::BeginStorySession { input: args.input } + } } impl __sdk::InModule for BeginStorySessionArgs { @@ -40,9 +33,8 @@ pub trait begin_story_session { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`begin_story_session:begin_story_session_then`] to run a callback after the reducer completes. - fn begin_story_session(&self, input: StorySessionInput, -) -> __sdk::Result<()> { - self.begin_story_session_then(input, |_, _| {}) + fn begin_story_session(&self, input: StorySessionInput) -> __sdk::Result<()> { + self.begin_story_session_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `begin_story_session` to run as soon as possible, @@ -55,9 +47,11 @@ pub trait begin_story_session { &self, input: StorySessionInput, - callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) - + Send - + 'static, + callback: impl FnOnce( + &super::ReducerEventContext, + Result, __sdk::InternalError>, + ) + Send + + 'static, ) -> __sdk::Result<()>; } @@ -66,11 +60,13 @@ impl begin_story_session for super::RemoteReducers { &self, input: StorySessionInput, - 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(BeginStorySessionArgs { input, }, callback) + self.imp + .invoke_reducer_with_callback(BeginStorySessionArgs { input }, callback) } } - 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 index 174e55f8..00f36e4e 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -20,12 +15,8 @@ pub enum BigFishAgentMessageKind { 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 index 9f8a0458..d8a1a82c 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,12 +13,8 @@ pub enum BigFishAgentMessageRole { 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_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_snapshot_type.rs index d6b00fc5..acc31e57 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_snapshot_type.rs @@ -2,15 +2,10 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::big_fish_agent_message_role_type::BigFishAgentMessageRole; 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)] @@ -23,8 +18,6 @@ pub struct BigFishAgentMessageSnapshot { pub created_at_micros: i64, } - impl __sdk::InModule for BigFishAgentMessageSnapshot { 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 index 59185a0b..cbb48abe 100644 --- 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 @@ -2,15 +2,10 @@ // 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_type::BigFishAgentMessage; -use super::big_fish_agent_message_role_type::BigFishAgentMessageRole; 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`. /// @@ -38,7 +33,9 @@ pub trait BigFishAgentMessageTableAccess { impl BigFishAgentMessageTableAccess for super::RemoteTables { fn big_fish_agent_message(&self) -> BigFishAgentMessageTableHandle<'_> { BigFishAgentMessageTableHandle { - imp: self.imp.get_table::("big_fish_agent_message"), + imp: self + .imp + .get_table::("big_fish_agent_message"), ctx: std::marker::PhantomData, } } @@ -51,8 +48,12 @@ 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() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = BigFishAgentMessageInsertCallbackId; @@ -98,39 +99,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for BigFishAgentMessageTableHandle<'ctx> { } } - /// 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>, - } +/// 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> 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) + } +} - 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); } @@ -140,26 +140,24 @@ 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() + __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") - } - } +#[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 index c55ecc3d..a5e70272 100644 --- 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 @@ -2,15 +2,10 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::big_fish_agent_message_role_type::BigFishAgentMessageRole; 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)] @@ -23,12 +18,10 @@ pub struct BigFishAgentMessage { 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. @@ -51,7 +44,6 @@ impl __sdk::__query_builder::HasCols for BigFishAgentMessage { 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"), - } } } @@ -70,10 +62,8 @@ impl __sdk::__query_builder::HasIxCols for BigFishAgentMessage { 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_anchor_item_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_anchor_item_type.rs index 80ecc407..d876588e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_anchor_item_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_anchor_item_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::big_fish_anchor_status_type::BigFishAnchorStatus; @@ -20,8 +15,6 @@ pub struct BigFishAnchorItem { pub status: BigFishAnchorStatus, } - impl __sdk::InModule for BigFishAnchorItem { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_anchor_pack_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_anchor_pack_type.rs index 6f93262e..5d93c291 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_anchor_pack_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_anchor_pack_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::big_fish_anchor_item_type::BigFishAnchorItem; @@ -20,8 +15,6 @@ pub struct BigFishAnchorPack { pub risk_tempo: BigFishAnchorItem, } - impl __sdk::InModule for BigFishAnchorPack { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_anchor_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_anchor_status_type.rs index d1ed8bb3..bcfe701e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_anchor_status_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_anchor_status_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -20,12 +15,8 @@ pub enum BigFishAnchorStatus { Missing, Locked, - } - - impl __sdk::InModule for BigFishAnchorStatus { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_coverage_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_coverage_type.rs index c1b3429a..607a8c39 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_coverage_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_coverage_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,11 +12,9 @@ pub struct BigFishAssetCoverage { pub background_ready: bool, pub required_level_count: u32, pub publish_ready: bool, - pub blockers: Vec::, + pub blockers: Vec, } - impl __sdk::InModule for BigFishAssetCoverage { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_generate_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_generate_input_type.rs index e57057d1..d85e9259 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_generate_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_generate_input_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::big_fish_asset_kind_type::BigFishAssetKind; @@ -17,13 +12,11 @@ pub struct BigFishAssetGenerateInput { pub session_id: String, pub owner_user_id: String, pub asset_kind: BigFishAssetKind, - pub level: Option::, - pub motion_key: Option::, + pub level: Option, + pub motion_key: Option, pub generated_at_micros: i64, } - impl __sdk::InModule for BigFishAssetGenerateInput { type Module = super::RemoteModule; } - 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 index a5d6c3ed..b4c9dcd1 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,12 +13,8 @@ pub enum BigFishAssetKind { 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_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_slot_snapshot_type.rs index 911e51fc..200b1a6d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_slot_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_slot_snapshot_type.rs @@ -2,12 +2,7 @@ // 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 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; @@ -18,16 +13,14 @@ pub struct BigFishAssetSlotSnapshot { pub slot_id: String, pub session_id: String, pub asset_kind: BigFishAssetKind, - pub level: Option::, - pub motion_key: Option::, + pub level: Option, + pub motion_key: Option, pub status: BigFishAssetStatus, - pub asset_url: Option::, + pub asset_url: Option, pub prompt_snapshot: String, pub updated_at_micros: i64, } - impl __sdk::InModule for BigFishAssetSlotSnapshot { 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 index 8b296390..d4817cf0 100644 --- 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 @@ -2,15 +2,10 @@ // 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_slot_type::BigFishAssetSlot; 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`. /// @@ -38,7 +33,9 @@ pub trait BigFishAssetSlotTableAccess { impl BigFishAssetSlotTableAccess for super::RemoteTables { fn big_fish_asset_slot(&self) -> BigFishAssetSlotTableHandle<'_> { BigFishAssetSlotTableHandle { - imp: self.imp.get_table::("big_fish_asset_slot"), + imp: self + .imp + .get_table::("big_fish_asset_slot"), ctx: std::marker::PhantomData, } } @@ -51,8 +48,12 @@ 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() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = BigFishAssetSlotInsertCallbackId; @@ -98,39 +99,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for BigFishAssetSlotTableHandle<'ctx> { } } - /// 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>, - } +/// 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> 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) + } +} - 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); } @@ -140,26 +140,24 @@ 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() + __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") - } - } +#[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 index a6cb0813..406c151d 100644 --- 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 @@ -2,12 +2,7 @@ // 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 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; @@ -18,20 +13,18 @@ pub struct BigFishAssetSlot { pub slot_id: String, pub session_id: String, pub asset_kind: BigFishAssetKind, - pub level: Option::, - pub motion_key: Option::, + pub level: Option, + pub motion_key: Option, pub status: BigFishAssetStatus, - pub asset_url: Option::, + 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. @@ -39,10 +32,10 @@ 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 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 asset_url: __sdk::__query_builder::Col>, pub prompt_snapshot: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, } @@ -60,7 +53,6 @@ impl __sdk::__query_builder::HasCols for BigFishAssetSlot { 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"), - } } } @@ -79,10 +71,8 @@ impl __sdk::__query_builder::HasIxCols for BigFishAssetSlot { 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 index 25ed0f6a..c673f0f3 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,12 +11,8 @@ 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_background_blueprint_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_background_blueprint_type.rs index bda8e3be..b28e3196 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_background_blueprint_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_background_blueprint_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -23,8 +17,6 @@ pub struct BigFishBackgroundBlueprint { pub background_prompt_seed: String, } - impl __sdk::InModule for BigFishBackgroundBlueprint { 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 index 3eff808d..d7b82298 100644 --- 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 @@ -2,14 +2,9 @@ // 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_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`. /// @@ -37,7 +32,9 @@ pub trait BigFishCreationSessionTableAccess { impl BigFishCreationSessionTableAccess for super::RemoteTables { fn big_fish_creation_session(&self) -> BigFishCreationSessionTableHandle<'_> { BigFishCreationSessionTableHandle { - imp: self.imp.get_table::("big_fish_creation_session"), + imp: self + .imp + .get_table::("big_fish_creation_session"), ctx: std::marker::PhantomData, } } @@ -50,8 +47,12 @@ 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() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = BigFishCreationSessionInsertCallbackId; @@ -97,40 +98,40 @@ impl<'ctx> __sdk::TableWithPrimaryKey for BigFishCreationSessionTableHandle<'ctx } } - /// 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>, - } +/// 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> 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) + } +} - 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"); + let _table = + client_cache.get_or_make_table::("big_fish_creation_session"); _table.add_unique_constraint::("session_id", |row| &row.session_id); } @@ -139,26 +140,24 @@ 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() + __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") - } - } +#[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 index b45590fe..353343fd 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::big_fish_creation_stage_type::BigFishCreationStage; @@ -21,20 +16,18 @@ pub struct BigFishCreationSession { pub progress_percent: u32, pub stage: BigFishCreationStage, pub anchor_pack_json: String, - pub draft_json: Option::, + pub draft_json: Option, pub asset_coverage_json: String, - pub last_assistant_reply: Option::, + pub last_assistant_reply: Option, pub publish_ready: bool, pub created_at: __sdk::Timestamp, pub updated_at: __sdk::Timestamp, } - impl __sdk::InModule for BigFishCreationSession { type Module = super::RemoteModule; } - /// Column accessor struct for the table `BigFishCreationSession`. /// /// Provides typed access to columns for query building. @@ -46,9 +39,9 @@ pub struct BigFishCreationSessionCols { 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 draft_json: __sdk::__query_builder::Col>, pub asset_coverage_json: __sdk::__query_builder::Col, - pub last_assistant_reply: __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, @@ -66,12 +59,17 @@ impl __sdk::__query_builder::HasCols for BigFishCreationSession { 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"), + 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"), - } } } @@ -90,10 +88,8 @@ impl __sdk::__query_builder::HasIxCols for BigFishCreationSession { 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"), - } } } 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 index b96fb5e4..c878d467 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -22,12 +17,8 @@ pub enum BigFishCreationStage { ReadyToPublish, Published, - } - - impl __sdk::InModule for BigFishCreationStage { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_draft_compile_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_draft_compile_input_type.rs index 25792484..9cf25ddc 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_draft_compile_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_draft_compile_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,8 +12,6 @@ pub struct BigFishDraftCompileInput { pub compiled_at_micros: i64, } - impl __sdk::InModule for BigFishDraftCompileInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_game_draft_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_game_draft_type.rs index 43810d9b..0c661176 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_game_draft_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_game_draft_type.rs @@ -2,15 +2,10 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::big_fish_level_blueprint_type::BigFishLevelBlueprint; use super::big_fish_background_blueprint_type::BigFishBackgroundBlueprint; +use super::big_fish_level_blueprint_type::BigFishLevelBlueprint; use super::big_fish_runtime_params_type::BigFishRuntimeParams; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] @@ -20,13 +15,11 @@ pub struct BigFishGameDraft { pub subtitle: String, pub core_fun: String, pub ecology_theme: String, - pub levels: Vec::, + pub levels: Vec, pub background: BigFishBackgroundBlueprint, pub runtime_params: BigFishRuntimeParams, } - impl __sdk::InModule for BigFishGameDraft { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_level_blueprint_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_level_blueprint_type.rs index 3953e1ff..b8ea2493 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_level_blueprint_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_level_blueprint_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -20,14 +14,12 @@ pub struct BigFishLevelBlueprint { pub size_ratio: f32, pub visual_prompt_seed: String, pub motion_prompt_seed: String, - pub merge_source_level: Option::, - pub prey_window: Vec::, - pub threat_window: Vec::, + pub merge_source_level: Option, + pub prey_window: Vec, + pub threat_window: Vec, pub is_final_level: bool, } - impl __sdk::InModule for BigFishLevelBlueprint { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_message_submit_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_message_submit_input_type.rs index 40dfe964..b0e41147 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_message_submit_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_message_submit_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -21,8 +15,6 @@ pub struct BigFishMessageSubmitInput { pub submitted_at_micros: i64, } - impl __sdk::InModule for BigFishMessageSubmitInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_publish_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_publish_input_type.rs index a1a0fcca..ec00bf84 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_publish_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_publish_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,8 +12,6 @@ pub struct BigFishPublishInput { pub published_at_micros: i64, } - impl __sdk::InModule for BigFishPublishInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_get_input_type.rs index 0940b187..8e0d0d8d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_get_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +11,6 @@ pub struct BigFishRunGetInput { pub owner_user_id: String, } - impl __sdk::InModule for BigFishRunGetInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_input_submit_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_input_submit_input_type.rs index ae5f1367..f3175d40 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_input_submit_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_input_submit_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -20,8 +14,6 @@ pub struct BigFishRunInputSubmitInput { pub submitted_at_micros: i64, } - impl __sdk::InModule for BigFishRunInputSubmitInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_procedure_result_type.rs index 12e6eb95..86d73fc2 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_procedure_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::big_fish_runtime_snapshot_type::BigFishRuntimeSnapshot; @@ -15,12 +10,10 @@ use super::big_fish_runtime_snapshot_type::BigFishRuntimeSnapshot; #[sats(crate = __lib)] pub struct BigFishRunProcedureResult { pub ok: bool, - pub run: Option::, - pub error_message: Option::, + pub run: Option, + pub error_message: Option, } - impl __sdk::InModule for BigFishRunProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_start_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_start_input_type.rs index 4e166892..944fa6da 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_start_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_start_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -19,8 +13,6 @@ pub struct BigFishRunStartInput { pub started_at_micros: i64, } - impl __sdk::InModule for BigFishRunStartInput { type Module = super::RemoteModule; } - 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 index ab1b80cd..6bb94f36 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,12 +13,8 @@ pub enum BigFishRunStatus { 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_entity_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_entity_type.rs index f1a82061..ee7c160c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_entity_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_entity_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::big_fish_vector_2_type::BigFishVector2; @@ -21,8 +16,6 @@ pub struct BigFishRuntimeEntity { pub offscreen_seconds: f32, } - impl __sdk::InModule for BigFishRuntimeEntity { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_params_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_params_type.rs index 1fece110..78117371 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_params_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_params_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -19,13 +13,11 @@ pub struct BigFishRuntimeParams { pub leader_move_speed: f32, pub follower_catch_up_speed: f32, pub offscreen_cull_seconds: f32, - pub prey_spawn_delta_levels: Vec::, - pub threat_spawn_delta_levels: Vec::, + pub prey_spawn_delta_levels: Vec, + pub threat_spawn_delta_levels: Vec, pub win_level: u32, } - impl __sdk::InModule for BigFishRuntimeParams { 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 index 9ed2da19..bbf7ef94 100644 --- 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 @@ -2,14 +2,9 @@ // 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_runtime_run_type::BigFishRuntimeRun; 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`. /// @@ -37,7 +32,9 @@ pub trait BigFishRuntimeRunTableAccess { impl BigFishRuntimeRunTableAccess for super::RemoteTables { fn big_fish_runtime_run(&self) -> BigFishRuntimeRunTableHandle<'_> { BigFishRuntimeRunTableHandle { - imp: self.imp.get_table::("big_fish_runtime_run"), + imp: self + .imp + .get_table::("big_fish_runtime_run"), ctx: std::marker::PhantomData, } } @@ -50,8 +47,12 @@ 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() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = BigFishRuntimeRunInsertCallbackId; @@ -97,39 +98,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for BigFishRuntimeRunTableHandle<'ctx> { } } - /// 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>, - } +/// 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> 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) + } +} - 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); } @@ -139,26 +139,24 @@ 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() + __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") - } - } +#[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 index 20ac1aa1..01852b9c 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::big_fish_run_status_type::BigFishRunStatus; @@ -26,12 +21,10 @@ pub struct BigFishRuntimeRun { 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. @@ -62,7 +55,6 @@ impl __sdk::__query_builder::HasCols for BigFishRuntimeRun { 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"), - } } } @@ -83,10 +75,8 @@ impl __sdk::__query_builder::HasIxCols for BigFishRuntimeRun { 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/big_fish_runtime_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_snapshot_type.rs index 0a367449..32f2a80c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_snapshot_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::big_fish_run_status_type::BigFishRunStatus; use super::big_fish_runtime_entity_type::BigFishRuntimeEntity; @@ -22,17 +17,15 @@ pub struct BigFishRuntimeSnapshot { pub tick: u64, pub player_level: u32, pub win_level: u32, - pub leader_entity_id: Option::, - pub owned_entities: Vec::, - pub wild_entities: Vec::, + pub leader_entity_id: Option, + pub owned_entities: Vec, + pub wild_entities: Vec, pub camera_center: BigFishVector2, pub last_input: BigFishVector2, - pub event_log: Vec::, + pub event_log: Vec, pub updated_at_micros: i64, } - impl __sdk::InModule for BigFishRuntimeSnapshot { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_create_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_create_input_type.rs index f7ae7eb7..13533785 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_create_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_create_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -21,8 +15,6 @@ pub struct BigFishSessionCreateInput { pub created_at_micros: i64, } - impl __sdk::InModule for BigFishSessionCreateInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_get_input_type.rs index 88ef9cfa..396808f4 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_get_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +11,6 @@ pub struct BigFishSessionGetInput { pub owner_user_id: String, } - impl __sdk::InModule for BigFishSessionGetInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_procedure_result_type.rs index db8af7c7..1f2f7666 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_procedure_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::big_fish_session_snapshot_type::BigFishSessionSnapshot; @@ -15,12 +10,10 @@ use super::big_fish_session_snapshot_type::BigFishSessionSnapshot; #[sats(crate = __lib)] pub struct BigFishSessionProcedureResult { pub ok: bool, - pub session: Option::, - pub error_message: Option::, + pub session: Option, + pub error_message: Option, } - impl __sdk::InModule for BigFishSessionProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_snapshot_type.rs index abff56b6..11e6a141 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_snapshot_type.rs @@ -2,19 +2,14 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::big_fish_creation_stage_type::BigFishCreationStage; -use super::big_fish_anchor_pack_type::BigFishAnchorPack; -use super::big_fish_game_draft_type::BigFishGameDraft; -use super::big_fish_asset_slot_snapshot_type::BigFishAssetSlotSnapshot; -use super::big_fish_asset_coverage_type::BigFishAssetCoverage; use super::big_fish_agent_message_snapshot_type::BigFishAgentMessageSnapshot; +use super::big_fish_anchor_pack_type::BigFishAnchorPack; +use super::big_fish_asset_coverage_type::BigFishAssetCoverage; +use super::big_fish_asset_slot_snapshot_type::BigFishAssetSlotSnapshot; +use super::big_fish_creation_stage_type::BigFishCreationStage; +use super::big_fish_game_draft_type::BigFishGameDraft; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -26,18 +21,16 @@ pub struct BigFishSessionSnapshot { pub progress_percent: u32, pub stage: BigFishCreationStage, pub anchor_pack: BigFishAnchorPack, - pub draft: Option::, - pub asset_slots: Vec::, + pub draft: Option, + pub asset_slots: Vec, pub asset_coverage: BigFishAssetCoverage, - pub messages: Vec::, - pub last_assistant_reply: Option::, + pub messages: Vec, + pub last_assistant_reply: Option, pub publish_ready: bool, pub created_at_micros: i64, pub updated_at_micros: i64, } - impl __sdk::InModule for BigFishSessionSnapshot { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_vector_2_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_vector_2_type.rs index 534f83e9..745063ad 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_vector_2_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_vector_2_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +11,6 @@ pub struct BigFishVector2 { pub y: f32, } - impl __sdk::InModule for BigFishVector2 { type Module = super::RemoteModule; } - 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 aebf2217..78c80aee 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 @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::asset_entity_binding_input_type::AssetEntityBindingInput; use super::asset_entity_binding_procedure_result_type::AssetEntityBindingProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct BindAssetObjectToEntityAndReturnArgs { +struct BindAssetObjectToEntityAndReturnArgs { pub input: AssetEntityBindingInput, } - impl __sdk::InModule for BindAssetObjectToEntityAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for BindAssetObjectToEntityAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait bind_asset_object_to_entity_and_return { - fn bind_asset_object_to_entity_and_return(&self, input: AssetEntityBindingInput, -) { - self.bind_asset_object_to_entity_and_return_then(input, |_, _| {}); + fn bind_asset_object_to_entity_and_return(&self, input: AssetEntityBindingInput) { + self.bind_asset_object_to_entity_and_return_then(input, |_, _| {}); } fn bind_asset_object_to_entity_and_return_then( &self, input: AssetEntityBindingInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl bind_asset_object_to_entity_and_return for super::RemoteProcedures { &self, input: AssetEntityBindingInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, AssetEntityBindingProcedureResult>( - "bind_asset_object_to_entity_and_return", - BindAssetObjectToEntityAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, AssetEntityBindingProcedureResult>( + "bind_asset_object_to_entity_and_return", + BindAssetObjectToEntityAndReturnArgs { input }, + __callback, + ); } } - 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 ca2154f7..caf48b26 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::asset_entity_binding_input_type::AssetEntityBindingInput; @@ -19,10 +14,8 @@ pub(super) struct BindAssetObjectToEntityArgs { impl From for super::Reducer { fn from(args: BindAssetObjectToEntityArgs) -> Self { - Self::BindAssetObjectToEntity { - input: args.input, -} -} + Self::BindAssetObjectToEntity { input: args.input } + } } impl __sdk::InModule for BindAssetObjectToEntityArgs { @@ -40,9 +33,8 @@ pub trait bind_asset_object_to_entity { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`bind_asset_object_to_entity:bind_asset_object_to_entity_then`] to run a callback after the reducer completes. - fn bind_asset_object_to_entity(&self, input: AssetEntityBindingInput, -) -> __sdk::Result<()> { - self.bind_asset_object_to_entity_then(input, |_, _| {}) + fn bind_asset_object_to_entity(&self, input: AssetEntityBindingInput) -> __sdk::Result<()> { + self.bind_asset_object_to_entity_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `bind_asset_object_to_entity` to run as soon as possible, @@ -55,9 +47,11 @@ 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<()>; } @@ -66,11 +60,13 @@ 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) + 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 1a4a6394..0c5dc3eb 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 @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::ai_task_procedure_result_type::AiTaskProcedureResult; use super::ai_task_cancel_input_type::AiTaskCancelInput; +use super::ai_task_procedure_result_type::AiTaskProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct CancelAiTaskAndReturnArgs { +struct CancelAiTaskAndReturnArgs { pub input: AiTaskCancelInput, } - impl __sdk::InModule for CancelAiTaskAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for CancelAiTaskAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait cancel_ai_task_and_return { - fn cancel_ai_task_and_return(&self, input: AiTaskCancelInput, -) { - self.cancel_ai_task_and_return_then(input, |_, _| {}); + fn cancel_ai_task_and_return(&self, input: AiTaskCancelInput) { + self.cancel_ai_task_and_return_then(input, |_, _| {}); } fn cancel_ai_task_and_return_then( &self, input: AiTaskCancelInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl cancel_ai_task_and_return for super::RemoteProcedures { &self, input: AiTaskCancelInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, AiTaskProcedureResult>( - "cancel_ai_task_and_return", - CancelAiTaskAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, AiTaskProcedureResult>( + "cancel_ai_task_and_return", + CancelAiTaskAndReturnArgs { input }, + __callback, + ); } } - 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 index fe7d5e3a..effbeb9d 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -20,12 +15,8 @@ pub enum ChapterPaceBand { Pressure, FinaleDense, - } - - impl __sdk::InModule for ChapterPaceBand { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_get_input_type.rs index cc88d00b..927a4b04 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_get_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +11,6 @@ pub struct ChapterProgressionGetInput { pub chapter_id: String, } - impl __sdk::InModule for ChapterProgressionGetInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_input_type.rs index ed9aa5ca..dae51fa0 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_input_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::chapter_pace_band_type::ChapterPaceBand; @@ -31,8 +26,6 @@ pub struct ChapterProgressionInput { pub updated_at_micros: i64, } - impl __sdk::InModule for ChapterProgressionInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_ledger_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_ledger_input_type.rs index a9e0a8c3..a599ffc9 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_ledger_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_ledger_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,12 +12,10 @@ pub struct ChapterProgressionLedgerInput { pub granted_quest_xp: u32, pub granted_hostile_xp: u32, pub hostile_defeat_increment: u32, - pub level_at_exit: Option::, + pub level_at_exit: Option, pub updated_at_micros: i64, } - impl __sdk::InModule for ChapterProgressionLedgerInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_procedure_result_type.rs index 6a7d01af..276b3a26 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_procedure_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::chapter_progression_snapshot_type::ChapterProgressionSnapshot; @@ -15,12 +10,10 @@ use super::chapter_progression_snapshot_type::ChapterProgressionSnapshot; #[sats(crate = __lib)] pub struct ChapterProgressionProcedureResult { pub ok: bool, - pub record: Option::, - pub error_message: Option::, + pub record: Option, + pub error_message: Option, } - impl __sdk::InModule for ChapterProgressionProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_snapshot_type.rs index d1eaad92..e1fde7fe 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_snapshot_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::chapter_pace_band_type::ChapterPaceBand; @@ -30,14 +25,12 @@ pub struct ChapterProgressionSnapshot { pub expected_hostile_defeat_count: u32, pub actual_hostile_defeat_count: u32, pub level_at_entry: u32, - pub level_at_exit: Option::, + pub level_at_exit: Option, pub pace_band: ChapterPaceBand, pub created_at_micros: i64, pub updated_at_micros: i64, } - impl __sdk::InModule for ChapterProgressionSnapshot { 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 index 5bd5c38c..2fb6c042 100644 --- 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 @@ -2,14 +2,9 @@ // 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_progression_type::ChapterProgression; 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`. /// @@ -37,7 +32,9 @@ pub trait ChapterProgressionTableAccess { impl ChapterProgressionTableAccess for super::RemoteTables { fn chapter_progression(&self) -> ChapterProgressionTableHandle<'_> { ChapterProgressionTableHandle { - imp: self.imp.get_table::("chapter_progression"), + imp: self + .imp + .get_table::("chapter_progression"), ctx: std::marker::PhantomData, } } @@ -50,8 +47,12 @@ 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() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = ChapterProgressionInsertCallbackId; @@ -97,41 +98,44 @@ impl<'ctx> __sdk::TableWithPrimaryKey for ChapterProgressionTableHandle<'ctx> { } } - /// 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>, - } +/// 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> 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) + } +} - 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); + _table.add_unique_constraint::("chapter_progression_id", |row| { + &row.chapter_progression_id + }); } #[doc(hidden)] @@ -139,26 +143,24 @@ 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() + __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") - } - } +#[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 index c5600eb7..c94a7196 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::chapter_pace_band_type::ChapterPaceBand; @@ -31,18 +26,16 @@ pub struct ChapterProgression { pub expected_hostile_defeat_count: u32, pub actual_hostile_defeat_count: u32, pub level_at_entry: u32, - pub level_at_exit: Option::, + 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. @@ -64,7 +57,7 @@ pub struct ChapterProgressionCols { 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 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, @@ -74,13 +67,22 @@ 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"), + 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_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"), @@ -88,14 +90,19 @@ impl __sdk::__query_builder::HasCols for ChapterProgression { 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"), + 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"), - } } } @@ -114,12 +121,13 @@ impl __sdk::__query_builder::HasIxCols for ChapterProgression { 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"), + 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/clear_platform_browse_history_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/clear_platform_browse_history_and_return_procedure.rs index 5b9a2c9e..c8ba8d49 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/clear_platform_browse_history_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/clear_platform_browse_history_and_return_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_browse_history_clear_input_type::RuntimeBrowseHistoryClearInput; use super::runtime_browse_history_procedure_result_type::RuntimeBrowseHistoryProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct ClearPlatformBrowseHistoryAndReturnArgs { +struct ClearPlatformBrowseHistoryAndReturnArgs { pub input: RuntimeBrowseHistoryClearInput, } - impl __sdk::InModule for ClearPlatformBrowseHistoryAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for ClearPlatformBrowseHistoryAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait clear_platform_browse_history_and_return { - fn clear_platform_browse_history_and_return(&self, input: RuntimeBrowseHistoryClearInput, -) { - self.clear_platform_browse_history_and_return_then(input, |_, _| {}); + fn clear_platform_browse_history_and_return(&self, input: RuntimeBrowseHistoryClearInput) { + self.clear_platform_browse_history_and_return_then(input, |_, _| {}); } fn clear_platform_browse_history_and_return_then( &self, input: RuntimeBrowseHistoryClearInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl clear_platform_browse_history_and_return for super::RemoteProcedures { &self, input: RuntimeBrowseHistoryClearInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, RuntimeBrowseHistoryProcedureResult>( - "clear_platform_browse_history_and_return", - ClearPlatformBrowseHistoryAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, RuntimeBrowseHistoryProcedureResult>( + "clear_platform_browse_history_and_return", + ClearPlatformBrowseHistoryAndReturnArgs { input }, + __callback, + ); } } - 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 index 5ef77940..731563dd 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -20,12 +15,8 @@ pub enum CombatOutcome { SparComplete, Escaped, - } - - impl __sdk::InModule for CombatOutcome { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/compile_big_fish_draft_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/compile_big_fish_draft_procedure.rs index ba45db0a..bafe95a6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/compile_big_fish_draft_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/compile_big_fish_draft_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::big_fish_draft_compile_input_type::BigFishDraftCompileInput; use super::big_fish_session_procedure_result_type::BigFishSessionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct CompileBigFishDraftArgs { +struct CompileBigFishDraftArgs { pub input: BigFishDraftCompileInput, } - impl __sdk::InModule for CompileBigFishDraftArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for CompileBigFishDraftArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait compile_big_fish_draft { - fn compile_big_fish_draft(&self, input: BigFishDraftCompileInput, -) { - self.compile_big_fish_draft_then(input, |_, _| {}); + fn compile_big_fish_draft(&self, input: BigFishDraftCompileInput) { + self.compile_big_fish_draft_then(input, |_, _| {}); } fn compile_big_fish_draft_then( &self, input: BigFishDraftCompileInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl compile_big_fish_draft for super::RemoteProcedures { &self, input: BigFishDraftCompileInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>( - "compile_big_fish_draft", - CompileBigFishDraftArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>( + "compile_big_fish_draft", + CompileBigFishDraftArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/compile_custom_world_published_profile_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/compile_custom_world_published_profile_procedure.rs index 767a3954..67706fab 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/compile_custom_world_published_profile_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/compile_custom_world_published_profile_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_published_profile_compile_input_type::CustomWorldPublishedProfileCompileInput; use super::custom_world_published_profile_compile_result_type::CustomWorldPublishedProfileCompileResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct CompileCustomWorldPublishedProfileArgs { +struct CompileCustomWorldPublishedProfileArgs { pub input: CustomWorldPublishedProfileCompileInput, } - impl __sdk::InModule for CompileCustomWorldPublishedProfileArgs { type Module = super::RemoteModule; } @@ -28,16 +22,22 @@ impl __sdk::InModule for CompileCustomWorldPublishedProfileArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait compile_custom_world_published_profile { - fn compile_custom_world_published_profile(&self, input: CustomWorldPublishedProfileCompileInput, -) { - self.compile_custom_world_published_profile_then(input, |_, _| {}); + fn compile_custom_world_published_profile( + &self, + input: CustomWorldPublishedProfileCompileInput, + ) { + self.compile_custom_world_published_profile_then(input, |_, _| {}); } fn compile_custom_world_published_profile_then( &self, input: CustomWorldPublishedProfileCompileInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +46,17 @@ impl compile_custom_world_published_profile for super::RemoteProcedures { &self, input: CustomWorldPublishedProfileCompileInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, CustomWorldPublishedProfileCompileResult>( - "compile_custom_world_published_profile", - CompileCustomWorldPublishedProfileArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, CustomWorldPublishedProfileCompileResult>( + "compile_custom_world_published_profile", + CompileCustomWorldPublishedProfileArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/compile_puzzle_agent_draft_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/compile_puzzle_agent_draft_procedure.rs index d90769dc..177c0c40 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/compile_puzzle_agent_draft_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/compile_puzzle_agent_draft_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::puzzle_draft_compile_input_type::PuzzleDraftCompileInput; use super::puzzle_agent_session_procedure_result_type::PuzzleAgentSessionProcedureResult; +use super::puzzle_draft_compile_input_type::PuzzleDraftCompileInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct CompilePuzzleAgentDraftArgs { +struct CompilePuzzleAgentDraftArgs { pub input: PuzzleDraftCompileInput, } - impl __sdk::InModule for CompilePuzzleAgentDraftArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for CompilePuzzleAgentDraftArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait compile_puzzle_agent_draft { - fn compile_puzzle_agent_draft(&self, input: PuzzleDraftCompileInput, -) { - self.compile_puzzle_agent_draft_then(input, |_, _| {}); + fn compile_puzzle_agent_draft(&self, input: PuzzleDraftCompileInput) { + self.compile_puzzle_agent_draft_then(input, |_, _| {}); } fn compile_puzzle_agent_draft_then( &self, input: PuzzleDraftCompileInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl compile_puzzle_agent_draft for super::RemoteProcedures { &self, input: PuzzleDraftCompileInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>( - "compile_puzzle_agent_draft", - CompilePuzzleAgentDraftArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>( + "compile_puzzle_agent_draft", + CompilePuzzleAgentDraftArgs { input }, + __callback, + ); } } - 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 f921c224..e59ab8f0 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 @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::ai_task_procedure_result_type::AiTaskProcedureResult; use super::ai_stage_completion_input_type::AiStageCompletionInput; +use super::ai_task_procedure_result_type::AiTaskProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct CompleteAiStageAndReturnArgs { +struct CompleteAiStageAndReturnArgs { pub input: AiStageCompletionInput, } - impl __sdk::InModule for CompleteAiStageAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for CompleteAiStageAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait complete_ai_stage_and_return { - fn complete_ai_stage_and_return(&self, input: AiStageCompletionInput, -) { - self.complete_ai_stage_and_return_then(input, |_, _| {}); + fn complete_ai_stage_and_return(&self, input: AiStageCompletionInput) { + self.complete_ai_stage_and_return_then(input, |_, _| {}); } fn complete_ai_stage_and_return_then( &self, input: AiStageCompletionInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl complete_ai_stage_and_return for super::RemoteProcedures { &self, input: AiStageCompletionInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, AiTaskProcedureResult>( - "complete_ai_stage_and_return", - CompleteAiStageAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, AiTaskProcedureResult>( + "complete_ai_stage_and_return", + CompleteAiStageAndReturnArgs { input }, + __callback, + ); } } - 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 47ae2af1..ca7eab9f 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 @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::ai_task_procedure_result_type::AiTaskProcedureResult; use super::ai_task_finish_input_type::AiTaskFinishInput; +use super::ai_task_procedure_result_type::AiTaskProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct CompleteAiTaskAndReturnArgs { +struct CompleteAiTaskAndReturnArgs { pub input: AiTaskFinishInput, } - impl __sdk::InModule for CompleteAiTaskAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for CompleteAiTaskAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait complete_ai_task_and_return { - fn complete_ai_task_and_return(&self, input: AiTaskFinishInput, -) { - self.complete_ai_task_and_return_then(input, |_, _| {}); + fn complete_ai_task_and_return(&self, input: AiTaskFinishInput) { + self.complete_ai_task_and_return_then(input, |_, _| {}); } fn complete_ai_task_and_return_then( &self, input: AiTaskFinishInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl complete_ai_task_and_return for super::RemoteProcedures { &self, input: AiTaskFinishInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, AiTaskProcedureResult>( - "complete_ai_task_and_return", - CompleteAiTaskAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, AiTaskProcedureResult>( + "complete_ai_task_and_return", + CompleteAiTaskAndReturnArgs { input }, + __callback, + ); } } - 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 11c079e4..cc65f744 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 @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::asset_object_upsert_input_type::AssetObjectUpsertInput; use super::asset_object_procedure_result_type::AssetObjectProcedureResult; +use super::asset_object_upsert_input_type::AssetObjectUpsertInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct ConfirmAssetObjectAndReturnArgs { +struct ConfirmAssetObjectAndReturnArgs { pub input: AssetObjectUpsertInput, } - impl __sdk::InModule for ConfirmAssetObjectAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for ConfirmAssetObjectAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait confirm_asset_object_and_return { - fn confirm_asset_object_and_return(&self, input: AssetObjectUpsertInput, -) { - self.confirm_asset_object_and_return_then(input, |_, _| {}); + fn confirm_asset_object_and_return(&self, input: AssetObjectUpsertInput) { + self.confirm_asset_object_and_return_then(input, |_, _| {}); } fn confirm_asset_object_and_return_then( &self, input: AssetObjectUpsertInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl confirm_asset_object_and_return for super::RemoteProcedures { &self, input: AssetObjectUpsertInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, AssetObjectProcedureResult>( - "confirm_asset_object_and_return", - ConfirmAssetObjectAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, AssetObjectProcedureResult>( + "confirm_asset_object_and_return", + ConfirmAssetObjectAndReturnArgs { input }, + __callback, + ); } } - 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 fb6acde2..f5edb63a 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::asset_object_upsert_input_type::AssetObjectUpsertInput; @@ -19,10 +14,8 @@ pub(super) struct ConfirmAssetObjectArgs { impl From for super::Reducer { fn from(args: ConfirmAssetObjectArgs) -> Self { - Self::ConfirmAssetObject { - input: args.input, -} -} + Self::ConfirmAssetObject { input: args.input } + } } impl __sdk::InModule for ConfirmAssetObjectArgs { @@ -40,9 +33,8 @@ pub trait confirm_asset_object { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`confirm_asset_object:confirm_asset_object_then`] to run a callback after the reducer completes. - fn confirm_asset_object(&self, input: AssetObjectUpsertInput, -) -> __sdk::Result<()> { - self.confirm_asset_object_then(input, |_, _| {}) + fn confirm_asset_object(&self, input: AssetObjectUpsertInput) -> __sdk::Result<()> { + self.confirm_asset_object_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `confirm_asset_object` to run as soon as possible, @@ -55,9 +47,11 @@ 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<()>; } @@ -66,11 +60,13 @@ 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) + self.imp + .invoke_reducer_with_callback(ConfirmAssetObjectArgs { input }, callback) } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/consume_inventory_item_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/consume_inventory_item_input_type.rs index 3bd69ba8..0e867e21 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/consume_inventory_item_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/consume_inventory_item_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +11,6 @@ pub struct ConsumeInventoryItemInput { pub quantity: u32, } - impl __sdk::InModule for ConsumeInventoryItemInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/continue_story_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/continue_story_and_return_procedure.rs index 0713f423..1c2b51d8 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/continue_story_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/continue_story_and_return_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::story_session_procedure_result_type::StorySessionProcedureResult; use super::story_continue_input_type::StoryContinueInput; +use super::story_session_procedure_result_type::StorySessionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct ContinueStoryAndReturnArgs { +struct ContinueStoryAndReturnArgs { pub input: StoryContinueInput, } - impl __sdk::InModule for ContinueStoryAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for ContinueStoryAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait continue_story_and_return { - fn continue_story_and_return(&self, input: StoryContinueInput, -) { - self.continue_story_and_return_then(input, |_, _| {}); + fn continue_story_and_return(&self, input: StoryContinueInput) { + self.continue_story_and_return_then(input, |_, _| {}); } fn continue_story_and_return_then( &self, input: StoryContinueInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl continue_story_and_return for super::RemoteProcedures { &self, input: StoryContinueInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, StorySessionProcedureResult>( - "continue_story_and_return", - ContinueStoryAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, StorySessionProcedureResult>( + "continue_story_and_return", + ContinueStoryAndReturnArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/continue_story_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/continue_story_reducer.rs index 9c2b310a..fb35bd1f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/continue_story_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/continue_story_reducer.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::story_continue_input_type::StoryContinueInput; @@ -19,10 +14,8 @@ pub(super) struct ContinueStoryArgs { impl From for super::Reducer { fn from(args: ContinueStoryArgs) -> Self { - Self::ContinueStory { - input: args.input, -} -} + Self::ContinueStory { input: args.input } + } } impl __sdk::InModule for ContinueStoryArgs { @@ -40,9 +33,8 @@ pub trait continue_story { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`continue_story:continue_story_then`] to run a callback after the reducer completes. - fn continue_story(&self, input: StoryContinueInput, -) -> __sdk::Result<()> { - self.continue_story_then(input, |_, _| {}) + fn continue_story(&self, input: StoryContinueInput) -> __sdk::Result<()> { + self.continue_story_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `continue_story` to run as soon as possible, @@ -55,9 +47,11 @@ pub trait continue_story { &self, input: StoryContinueInput, - callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) - + Send - + 'static, + callback: impl FnOnce( + &super::ReducerEventContext, + Result, __sdk::InternalError>, + ) + Send + + 'static, ) -> __sdk::Result<()>; } @@ -66,11 +60,13 @@ impl continue_story for super::RemoteReducers { &self, input: StoryContinueInput, - 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(ContinueStoryArgs { input, }, callback) + self.imp + .invoke_reducer_with_callback(ContinueStoryArgs { input }, callback) } } - 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 cee9ffd8..a2f40fd0 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 @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::ai_task_procedure_result_type::AiTaskProcedureResult; use super::ai_task_create_input_type::AiTaskCreateInput; +use super::ai_task_procedure_result_type::AiTaskProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct CreateAiTaskAndReturnArgs { +struct CreateAiTaskAndReturnArgs { pub input: AiTaskCreateInput, } - impl __sdk::InModule for CreateAiTaskAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for CreateAiTaskAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait create_ai_task_and_return { - fn create_ai_task_and_return(&self, input: AiTaskCreateInput, -) { - self.create_ai_task_and_return_then(input, |_, _| {}); + fn create_ai_task_and_return(&self, input: AiTaskCreateInput) { + self.create_ai_task_and_return_then(input, |_, _| {}); } fn create_ai_task_and_return_then( &self, input: AiTaskCreateInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl create_ai_task_and_return for super::RemoteProcedures { &self, input: AiTaskCreateInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, AiTaskProcedureResult>( - "create_ai_task_and_return", - CreateAiTaskAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, AiTaskProcedureResult>( + "create_ai_task_and_return", + CreateAiTaskAndReturnArgs { input }, + __callback, + ); } } - 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 d57e7291..b87207f0 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::ai_task_create_input_type::AiTaskCreateInput; @@ -19,10 +14,8 @@ pub(super) struct CreateAiTaskArgs { impl From for super::Reducer { fn from(args: CreateAiTaskArgs) -> Self { - Self::CreateAiTask { - input: args.input, -} -} + Self::CreateAiTask { input: args.input } + } } impl __sdk::InModule for CreateAiTaskArgs { @@ -40,9 +33,8 @@ pub trait create_ai_task { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`create_ai_task:create_ai_task_then`] to run a callback after the reducer completes. - fn create_ai_task(&self, input: AiTaskCreateInput, -) -> __sdk::Result<()> { - self.create_ai_task_then(input, |_, _| {}) + fn create_ai_task(&self, input: AiTaskCreateInput) -> __sdk::Result<()> { + self.create_ai_task_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `create_ai_task` to run as soon as possible, @@ -55,9 +47,11 @@ 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<()>; } @@ -66,11 +60,13 @@ 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) + self.imp + .invoke_reducer_with_callback(CreateAiTaskArgs { input }, callback) } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/create_battle_state_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/create_battle_state_and_return_procedure.rs index bfee133e..c028ba4e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/create_battle_state_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/create_battle_state_and_return_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::battle_state_input_type::BattleStateInput; use super::battle_state_procedure_result_type::BattleStateProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct CreateBattleStateAndReturnArgs { +struct CreateBattleStateAndReturnArgs { pub input: BattleStateInput, } - impl __sdk::InModule for CreateBattleStateAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for CreateBattleStateAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait create_battle_state_and_return { - fn create_battle_state_and_return(&self, input: BattleStateInput, -) { - self.create_battle_state_and_return_then(input, |_, _| {}); + fn create_battle_state_and_return(&self, input: BattleStateInput) { + self.create_battle_state_and_return_then(input, |_, _| {}); } fn create_battle_state_and_return_then( &self, input: BattleStateInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl create_battle_state_and_return for super::RemoteProcedures { &self, input: BattleStateInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, BattleStateProcedureResult>( - "create_battle_state_and_return", - CreateBattleStateAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, BattleStateProcedureResult>( + "create_battle_state_and_return", + CreateBattleStateAndReturnArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/create_battle_state_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/create_battle_state_reducer.rs index 258d5af2..7f34eab2 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/create_battle_state_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/create_battle_state_reducer.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::battle_state_input_type::BattleStateInput; @@ -19,10 +14,8 @@ pub(super) struct CreateBattleStateArgs { impl From for super::Reducer { fn from(args: CreateBattleStateArgs) -> Self { - Self::CreateBattleState { - input: args.input, -} -} + Self::CreateBattleState { input: args.input } + } } impl __sdk::InModule for CreateBattleStateArgs { @@ -40,9 +33,8 @@ pub trait create_battle_state { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`create_battle_state:create_battle_state_then`] to run a callback after the reducer completes. - fn create_battle_state(&self, input: BattleStateInput, -) -> __sdk::Result<()> { - self.create_battle_state_then(input, |_, _| {}) + fn create_battle_state(&self, input: BattleStateInput) -> __sdk::Result<()> { + self.create_battle_state_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `create_battle_state` to run as soon as possible, @@ -55,9 +47,11 @@ pub trait create_battle_state { &self, input: BattleStateInput, - callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) - + Send - + 'static, + callback: impl FnOnce( + &super::ReducerEventContext, + Result, __sdk::InternalError>, + ) + Send + + 'static, ) -> __sdk::Result<()>; } @@ -66,11 +60,13 @@ impl create_battle_state for super::RemoteReducers { &self, input: BattleStateInput, - 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(CreateBattleStateArgs { input, }, callback) + self.imp + .invoke_reducer_with_callback(CreateBattleStateArgs { input }, callback) } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/create_big_fish_session_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/create_big_fish_session_procedure.rs index cf4398e6..6e48521a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/create_big_fish_session_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/create_big_fish_session_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::big_fish_session_procedure_result_type::BigFishSessionProcedureResult; use super::big_fish_session_create_input_type::BigFishSessionCreateInput; +use super::big_fish_session_procedure_result_type::BigFishSessionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct CreateBigFishSessionArgs { +struct CreateBigFishSessionArgs { pub input: BigFishSessionCreateInput, } - impl __sdk::InModule for CreateBigFishSessionArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for CreateBigFishSessionArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait create_big_fish_session { - fn create_big_fish_session(&self, input: BigFishSessionCreateInput, -) { - self.create_big_fish_session_then(input, |_, _| {}); + fn create_big_fish_session(&self, input: BigFishSessionCreateInput) { + self.create_big_fish_session_then(input, |_, _| {}); } fn create_big_fish_session_then( &self, input: BigFishSessionCreateInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl create_big_fish_session for super::RemoteProcedures { &self, input: BigFishSessionCreateInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>( - "create_big_fish_session", - CreateBigFishSessionArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>( + "create_big_fish_session", + CreateBigFishSessionArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/create_custom_world_agent_session_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/create_custom_world_agent_session_procedure.rs index 18065e71..96a21162 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/create_custom_world_agent_session_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/create_custom_world_agent_session_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_agent_session_create_input_type::CustomWorldAgentSessionCreateInput; use super::custom_world_agent_session_procedure_result_type::CustomWorldAgentSessionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct CreateCustomWorldAgentSessionArgs { +struct CreateCustomWorldAgentSessionArgs { pub input: CustomWorldAgentSessionCreateInput, } - impl __sdk::InModule for CreateCustomWorldAgentSessionArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for CreateCustomWorldAgentSessionArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait create_custom_world_agent_session { - fn create_custom_world_agent_session(&self, input: CustomWorldAgentSessionCreateInput, -) { - self.create_custom_world_agent_session_then(input, |_, _| {}); + fn create_custom_world_agent_session(&self, input: CustomWorldAgentSessionCreateInput) { + self.create_custom_world_agent_session_then(input, |_, _| {}); } fn create_custom_world_agent_session_then( &self, input: CustomWorldAgentSessionCreateInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl create_custom_world_agent_session for super::RemoteProcedures { &self, input: CustomWorldAgentSessionCreateInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, CustomWorldAgentSessionProcedureResult>( - "create_custom_world_agent_session", - CreateCustomWorldAgentSessionArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, CustomWorldAgentSessionProcedureResult>( + "create_custom_world_agent_session", + CreateCustomWorldAgentSessionArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/create_puzzle_agent_session_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/create_puzzle_agent_session_procedure.rs index d5c79fa4..62b77081 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/create_puzzle_agent_session_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/create_puzzle_agent_session_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::puzzle_agent_session_procedure_result_type::PuzzleAgentSessionProcedureResult; use super::puzzle_agent_session_create_input_type::PuzzleAgentSessionCreateInput; +use super::puzzle_agent_session_procedure_result_type::PuzzleAgentSessionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct CreatePuzzleAgentSessionArgs { +struct CreatePuzzleAgentSessionArgs { pub input: PuzzleAgentSessionCreateInput, } - impl __sdk::InModule for CreatePuzzleAgentSessionArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for CreatePuzzleAgentSessionArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait create_puzzle_agent_session { - fn create_puzzle_agent_session(&self, input: PuzzleAgentSessionCreateInput, -) { - self.create_puzzle_agent_session_then(input, |_, _| {}); + fn create_puzzle_agent_session(&self, input: PuzzleAgentSessionCreateInput) { + self.create_puzzle_agent_session_then(input, |_, _| {}); } fn create_puzzle_agent_session_then( &self, input: PuzzleAgentSessionCreateInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl create_puzzle_agent_session for super::RemoteProcedures { &self, input: PuzzleAgentSessionCreateInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>( - "create_puzzle_agent_session", - CreatePuzzleAgentSessionArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>( + "create_puzzle_agent_session", + CreatePuzzleAgentSessionArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_action_execute_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_action_execute_input_type.rs index 3281a80a..9663e12d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_action_execute_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_action_execute_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,12 +11,10 @@ pub struct CustomWorldAgentActionExecuteInput { pub owner_user_id: String, pub operation_id: String, pub action: String, - pub payload_json: Option::, + pub payload_json: Option, pub submitted_at_micros: i64, } - impl __sdk::InModule for CustomWorldAgentActionExecuteInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_action_execute_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_action_execute_result_type.rs index 6729b4db..39aeb7e0 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_action_execute_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_action_execute_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_agent_operation_snapshot_type::CustomWorldAgentOperationSnapshot; @@ -15,12 +10,10 @@ use super::custom_world_agent_operation_snapshot_type::CustomWorldAgentOperation #[sats(crate = __lib)] pub struct CustomWorldAgentActionExecuteResult { pub ok: bool, - pub operation: Option::, - pub error_message: Option::, + pub operation: Option, + pub error_message: Option, } - impl __sdk::InModule for CustomWorldAgentActionExecuteResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_card_detail_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_card_detail_get_input_type.rs index c6cdeb3b..2b8cde47 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_card_detail_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_card_detail_get_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,8 +12,6 @@ pub struct CustomWorldAgentCardDetailGetInput { pub card_id: String, } - impl __sdk::InModule for CustomWorldAgentCardDetailGetInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_snapshot_type.rs index e57b9839..69368214 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_snapshot_type.rs @@ -2,15 +2,10 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::rpg_agent_message_role_type::RpgAgentMessageRole; 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)] @@ -20,12 +15,10 @@ pub struct CustomWorldAgentMessageSnapshot { pub role: RpgAgentMessageRole, pub kind: RpgAgentMessageKind, pub text: String, - pub related_operation_id: Option::, + pub related_operation_id: Option, pub created_at_micros: i64, } - impl __sdk::InModule for CustomWorldAgentMessageSnapshot { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_submit_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_submit_input_type.rs index bc2da116..cf3a4230 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_submit_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_submit_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -21,8 +15,6 @@ pub struct CustomWorldAgentMessageSubmitInput { pub submitted_at_micros: i64, } - impl __sdk::InModule for CustomWorldAgentMessageSubmitInput { type Module = super::RemoteModule; } - 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 index 12cae6f1..1d0886e7 100644 --- 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 @@ -2,15 +2,10 @@ // 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_agent_message_type::CustomWorldAgentMessage; -use super::rpg_agent_message_role_type::RpgAgentMessageRole; 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`. /// @@ -38,7 +33,9 @@ pub trait CustomWorldAgentMessageTableAccess { impl CustomWorldAgentMessageTableAccess for super::RemoteTables { fn custom_world_agent_message(&self) -> CustomWorldAgentMessageTableHandle<'_> { CustomWorldAgentMessageTableHandle { - imp: self.imp.get_table::("custom_world_agent_message"), + imp: self + .imp + .get_table::("custom_world_agent_message"), ctx: std::marker::PhantomData, } } @@ -51,8 +48,12 @@ 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() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = CustomWorldAgentMessageInsertCallbackId; @@ -98,40 +99,40 @@ impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldAgentMessageTableHandle<'ct } } - /// 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>, - } +/// 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> 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) + } +} - 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"); + let _table = + client_cache.get_or_make_table::("custom_world_agent_message"); _table.add_unique_constraint::("message_id", |row| &row.message_id); } @@ -140,26 +141,24 @@ 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() + __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") - } - } +#[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 index e33b5c4a..75110860 100644 --- 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 @@ -2,15 +2,10 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::rpg_agent_message_role_type::RpgAgentMessageRole; 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)] @@ -20,16 +15,14 @@ pub struct CustomWorldAgentMessage { pub role: RpgAgentMessageRole, pub kind: RpgAgentMessageKind, pub text: String, - pub related_operation_id: Option::, + 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. @@ -39,7 +32,7 @@ pub struct CustomWorldAgentMessageCols { 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 related_operation_id: __sdk::__query_builder::Col>, pub created_at: __sdk::__query_builder::Col, } @@ -52,9 +45,11 @@ impl __sdk::__query_builder::HasCols for CustomWorldAgentMessage { 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"), + related_operation_id: __sdk::__query_builder::Col::new( + table_name, + "related_operation_id", + ), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), - } } } @@ -73,10 +68,8 @@ impl __sdk::__query_builder::HasIxCols for CustomWorldAgentMessage { 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_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_get_input_type.rs index 2aa3b05b..1e249edf 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_get_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,8 +12,6 @@ pub struct CustomWorldAgentOperationGetInput { pub operation_id: String, } - impl __sdk::InModule for CustomWorldAgentOperationGetInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_procedure_result_type.rs index f9bf13da..39d0e493 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_procedure_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_agent_operation_snapshot_type::CustomWorldAgentOperationSnapshot; @@ -15,12 +10,10 @@ use super::custom_world_agent_operation_snapshot_type::CustomWorldAgentOperation #[sats(crate = __lib)] pub struct CustomWorldAgentOperationProcedureResult { pub ok: bool, - pub operation: Option::, - pub error_message: Option::, + pub operation: Option, + pub error_message: Option, } - impl __sdk::InModule for CustomWorldAgentOperationProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_snapshot_type.rs index 954a809c..61e86eb3 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_snapshot_type.rs @@ -2,15 +2,10 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::rpg_agent_operation_type_type::RpgAgentOperationType; 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)] @@ -22,13 +17,11 @@ pub struct CustomWorldAgentOperationSnapshot { pub phase_label: String, pub phase_detail: String, pub progress: u32, - pub error_message: Option::, + pub error_message: Option, pub created_at_micros: i64, pub updated_at_micros: i64, } - impl __sdk::InModule for CustomWorldAgentOperationSnapshot { type Module = super::RemoteModule; } - 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 index 7e6b6b11..316a95b1 100644 --- 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 @@ -2,15 +2,10 @@ // 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_agent_operation_type::CustomWorldAgentOperation; -use super::rpg_agent_operation_type_type::RpgAgentOperationType; 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`. /// @@ -38,7 +33,9 @@ pub trait CustomWorldAgentOperationTableAccess { impl CustomWorldAgentOperationTableAccess for super::RemoteTables { fn custom_world_agent_operation(&self) -> CustomWorldAgentOperationTableHandle<'_> { CustomWorldAgentOperationTableHandle { - imp: self.imp.get_table::("custom_world_agent_operation"), + imp: self + .imp + .get_table::("custom_world_agent_operation"), ctx: std::marker::PhantomData, } } @@ -51,8 +48,12 @@ 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() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = CustomWorldAgentOperationInsertCallbackId; @@ -98,40 +99,40 @@ impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldAgentOperationTableHandle<' } } - /// 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>, - } +/// 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> 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) + } +} - 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"); + let _table = + client_cache.get_or_make_table::("custom_world_agent_operation"); _table.add_unique_constraint::("operation_id", |row| &row.operation_id); } @@ -140,26 +141,28 @@ 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() + __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") - } - } +#[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 index b195855d..41957317 100644 --- 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 @@ -2,15 +2,10 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::rpg_agent_operation_type_type::RpgAgentOperationType; 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)] @@ -22,29 +17,28 @@ pub struct CustomWorldAgentOperation { pub phase_label: String, pub phase_detail: String, pub progress: u32, - pub error_message: Option::, + 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 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 error_message: __sdk::__query_builder::Col>, pub created_at: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, } @@ -63,7 +57,6 @@ impl __sdk::__query_builder::HasCols for CustomWorldAgentOperation { 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"), - } } } @@ -82,10 +75,8 @@ impl __sdk::__query_builder::HasIxCols for CustomWorldAgentOperation { 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_create_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_create_input_type.rs index 7a36c77b..d2ea6be9 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_create_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_create_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -19,11 +13,11 @@ pub struct CustomWorldAgentSessionCreateInput { pub welcome_message_id: String, pub welcome_message_text: String, pub anchor_content_json: String, - pub creator_intent_json: Option::, + 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 anchor_pack_json: Option, + pub lock_state_json: Option, + pub draft_profile_json: Option, pub pending_clarifications_json: String, pub suggested_actions_json: String, pub recommended_replies_json: String, @@ -33,8 +27,6 @@ pub struct CustomWorldAgentSessionCreateInput { pub created_at_micros: i64, } - impl __sdk::InModule for CustomWorldAgentSessionCreateInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_get_input_type.rs index 0e4f3319..733eaecb 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_get_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +11,6 @@ pub struct CustomWorldAgentSessionGetInput { pub owner_user_id: String, } - impl __sdk::InModule for CustomWorldAgentSessionGetInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_procedure_result_type.rs index 4da0e11a..1ca24f19 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_procedure_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_agent_session_snapshot_type::CustomWorldAgentSessionSnapshot; @@ -15,12 +10,10 @@ use super::custom_world_agent_session_snapshot_type::CustomWorldAgentSessionSnap #[sats(crate = __lib)] pub struct CustomWorldAgentSessionProcedureResult { pub ok: bool, - pub session: Option::, - pub error_message: Option::, + pub session: Option, + pub error_message: Option, } - impl __sdk::InModule for CustomWorldAgentSessionProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_snapshot_type.rs index e263df53..6a50455e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_snapshot_type.rs @@ -2,17 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::rpg_agent_stage_type::RpgAgentStage; use super::custom_world_agent_message_snapshot_type::CustomWorldAgentMessageSnapshot; -use super::custom_world_draft_card_snapshot_type::CustomWorldDraftCardSnapshot; use super::custom_world_agent_operation_snapshot_type::CustomWorldAgentOperationSnapshot; +use super::custom_world_draft_card_snapshot_type::CustomWorldDraftCardSnapshot; +use super::rpg_agent_stage_type::RpgAgentStage; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -23,16 +18,16 @@ pub struct CustomWorldAgentSessionSnapshot { pub current_turn: u32, pub progress_percent: u32, pub stage: RpgAgentStage, - pub focus_card_id: Option::, + pub focus_card_id: Option, pub anchor_content_json: String, - pub creator_intent_json: Option::, + 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 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, @@ -40,15 +35,13 @@ pub struct CustomWorldAgentSessionSnapshot { pub asset_coverage_json: String, pub checkpoints_json: String, pub supported_actions_json: String, - pub messages: Vec::, - pub draft_cards: Vec::, - pub operations: Vec::, + pub messages: Vec, + pub draft_cards: Vec, + pub operations: Vec, pub created_at_micros: i64, pub updated_at_micros: i64, } - impl __sdk::InModule for CustomWorldAgentSessionSnapshot { type Module = super::RemoteModule; } - 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 index 8b907a69..d63d156c 100644 --- 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 @@ -2,14 +2,9 @@ // 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_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`. /// @@ -37,7 +32,9 @@ pub trait CustomWorldAgentSessionTableAccess { impl CustomWorldAgentSessionTableAccess for super::RemoteTables { fn custom_world_agent_session(&self) -> CustomWorldAgentSessionTableHandle<'_> { CustomWorldAgentSessionTableHandle { - imp: self.imp.get_table::("custom_world_agent_session"), + imp: self + .imp + .get_table::("custom_world_agent_session"), ctx: std::marker::PhantomData, } } @@ -50,8 +47,12 @@ 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() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = CustomWorldAgentSessionInsertCallbackId; @@ -97,40 +98,40 @@ impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldAgentSessionTableHandle<'ct } } - /// 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>, - } +/// 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> 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) + } +} - 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"); + let _table = + client_cache.get_or_make_table::("custom_world_agent_session"); _table.add_unique_constraint::("session_id", |row| &row.session_id); } @@ -139,26 +140,24 @@ 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() + __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") - } - } +#[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 index 128d93e3..105bc924 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::rpg_agent_stage_type::RpgAgentStage; @@ -20,16 +15,16 @@ pub struct CustomWorldAgentSession { pub current_turn: u32, pub progress_percent: u32, pub stage: RpgAgentStage, - pub focus_card_id: Option::, + pub focus_card_id: Option, pub anchor_content_json: String, - pub creator_intent_json: Option::, + 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 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, @@ -40,12 +35,10 @@ pub struct CustomWorldAgentSession { 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. @@ -56,16 +49,16 @@ pub struct CustomWorldAgentSessionCols { 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 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_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 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, @@ -87,24 +80,53 @@ impl __sdk::__query_builder::HasCols for CustomWorldAgentSession { 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_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"), + 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"), + 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"), - } } } @@ -125,10 +147,8 @@ impl __sdk::__query_builder::HasIxCols for CustomWorldAgentSession { 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_detail_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_detail_result_type.rs index 384a2c8c..ee8f9ba4 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_detail_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_detail_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_draft_card_detail_snapshot_type::CustomWorldDraftCardDetailSnapshot; @@ -15,12 +10,10 @@ use super::custom_world_draft_card_detail_snapshot_type::CustomWorldDraftCardDet #[sats(crate = __lib)] pub struct CustomWorldDraftCardDetailResult { pub ok: bool, - pub card: Option::, - pub error_message: Option::, + pub card: Option, + pub error_message: Option, } - impl __sdk::InModule for CustomWorldDraftCardDetailResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_detail_section_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_detail_section_snapshot_type.rs index 2e256890..b7f30c00 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_detail_section_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_detail_section_snapshot_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,8 +12,6 @@ pub struct CustomWorldDraftCardDetailSectionSnapshot { pub value: String, } - impl __sdk::InModule for CustomWorldDraftCardDetailSectionSnapshot { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_detail_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_detail_snapshot_type.rs index 6bb20096..fab895fe 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_detail_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_detail_snapshot_type.rs @@ -2,16 +2,11 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::rpg_agent_draft_card_kind_type::RpgAgentDraftCardKind; -use super::custom_world_role_asset_status_type::CustomWorldRoleAssetStatus; use super::custom_world_draft_card_detail_section_snapshot_type::CustomWorldDraftCardDetailSectionSnapshot; +use super::custom_world_role_asset_status_type::CustomWorldRoleAssetStatus; +use super::rpg_agent_draft_card_kind_type::RpgAgentDraftCardKind; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -19,18 +14,16 @@ pub struct CustomWorldDraftCardDetailSnapshot { pub card_id: String, pub kind: RpgAgentDraftCardKind, pub title: String, - pub sections: Vec::, + pub sections: Vec, pub linked_ids_json: String, pub locked: bool, pub editable: bool, pub editable_section_ids_json: String, pub warning_messages_json: String, - pub asset_status: Option::, - pub asset_status_label: Option::, + pub asset_status: Option, + pub asset_status_label: Option, } - impl __sdk::InModule for CustomWorldDraftCardDetailSnapshot { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_snapshot_type.rs index c9497003..84108f6e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_snapshot_type.rs @@ -2,16 +2,11 @@ // 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 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; -use super::custom_world_role_asset_status_type::CustomWorldRoleAssetStatus; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -25,15 +20,13 @@ pub struct CustomWorldDraftCardSnapshot { 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 asset_status: Option, + pub asset_status_label: Option, + pub detail_payload_json: Option, pub created_at_micros: i64, pub updated_at_micros: i64, } - impl __sdk::InModule for CustomWorldDraftCardSnapshot { type Module = super::RemoteModule; } - 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 index 9d197db6..6f175998 100644 --- 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 @@ -2,16 +2,11 @@ // 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_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 super::custom_world_role_asset_status_type::CustomWorldRoleAssetStatus; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `custom_world_draft_card`. /// @@ -39,7 +34,9 @@ pub trait CustomWorldDraftCardTableAccess { impl CustomWorldDraftCardTableAccess for super::RemoteTables { fn custom_world_draft_card(&self) -> CustomWorldDraftCardTableHandle<'_> { CustomWorldDraftCardTableHandle { - imp: self.imp.get_table::("custom_world_draft_card"), + imp: self + .imp + .get_table::("custom_world_draft_card"), ctx: std::marker::PhantomData, } } @@ -52,8 +49,12 @@ 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() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = CustomWorldDraftCardInsertCallbackId; @@ -99,39 +100,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldDraftCardTableHandle<'ctx> } } - /// 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>, - } +/// 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> 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) + } +} - 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); } @@ -141,26 +141,24 @@ 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() + __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") - } - } +#[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 index 64dd162a..600c1f31 100644 --- 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 @@ -2,16 +2,11 @@ // 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 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; -use super::custom_world_role_asset_status_type::CustomWorldRoleAssetStatus; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -25,19 +20,17 @@ pub struct CustomWorldDraftCard { 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 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. @@ -51,9 +44,10 @@ pub struct CustomWorldDraftCardCols { 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 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, } @@ -73,10 +67,12 @@ impl __sdk::__query_builder::HasCols for CustomWorldDraftCard { 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"), + 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"), - } } } @@ -97,10 +93,8 @@ impl __sdk::__query_builder::HasIxCols for CustomWorldDraftCard { 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_detail_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_detail_input_type.rs index 5df002ea..64724446 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_detail_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_detail_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +11,6 @@ pub struct CustomWorldGalleryDetailInput { pub profile_id: String, } - impl __sdk::InModule for CustomWorldGalleryDetailInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_entry_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_entry_snapshot_type.rs index 9d81b728..c2a84ee3 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_entry_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_entry_snapshot_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_theme_mode_type::CustomWorldThemeMode; @@ -20,7 +15,7 @@ pub struct CustomWorldGalleryEntrySnapshot { pub world_name: String, pub subtitle: String, pub summary_text: String, - pub cover_image_src: Option::, + pub cover_image_src: Option, pub theme_mode: CustomWorldThemeMode, pub playable_npc_count: u32, pub landmark_count: u32, @@ -28,8 +23,6 @@ pub struct CustomWorldGalleryEntrySnapshot { pub updated_at_micros: i64, } - impl __sdk::InModule for CustomWorldGalleryEntrySnapshot { type Module = super::RemoteModule; } - 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 index f215d0c9..425b6a12 100644 --- 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 @@ -2,14 +2,9 @@ // 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_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`. /// @@ -37,7 +32,9 @@ pub trait CustomWorldGalleryEntryTableAccess { impl CustomWorldGalleryEntryTableAccess for super::RemoteTables { fn custom_world_gallery_entry(&self) -> CustomWorldGalleryEntryTableHandle<'_> { CustomWorldGalleryEntryTableHandle { - imp: self.imp.get_table::("custom_world_gallery_entry"), + imp: self + .imp + .get_table::("custom_world_gallery_entry"), ctx: std::marker::PhantomData, } } @@ -50,8 +47,12 @@ 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() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = CustomWorldGalleryEntryInsertCallbackId; @@ -97,40 +98,40 @@ impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldGalleryEntryTableHandle<'ct } } - /// 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>, - } +/// 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> 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) + } +} - 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"); + let _table = + client_cache.get_or_make_table::("custom_world_gallery_entry"); _table.add_unique_constraint::("profile_id", |row| &row.profile_id); } @@ -139,26 +140,24 @@ 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() + __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") - } - } +#[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 index 471ad9fb..03ad4584 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_theme_mode_type::CustomWorldThemeMode; @@ -20,7 +15,7 @@ pub struct CustomWorldGalleryEntry { pub world_name: String, pub subtitle: String, pub summary_text: String, - pub cover_image_src: Option::, + pub cover_image_src: Option, pub theme_mode: CustomWorldThemeMode, pub playable_npc_count: u32, pub landmark_count: u32, @@ -28,12 +23,10 @@ pub struct CustomWorldGalleryEntry { pub updated_at: __sdk::Timestamp, } - impl __sdk::InModule for CustomWorldGalleryEntry { type Module = super::RemoteModule; } - /// Column accessor struct for the table `CustomWorldGalleryEntry`. /// /// Provides typed access to columns for query building. @@ -44,7 +37,7 @@ pub struct CustomWorldGalleryEntryCols { 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 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, @@ -58,7 +51,10 @@ impl __sdk::__query_builder::HasCols for CustomWorldGalleryEntry { 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"), - author_display_name: __sdk::__query_builder::Col::new(table_name, "author_display_name"), + 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"), @@ -68,7 +64,6 @@ impl __sdk::__query_builder::HasCols for CustomWorldGalleryEntry { landmark_count: __sdk::__query_builder::Col::new(table_name, "landmark_count"), published_at: __sdk::__query_builder::Col::new(table_name, "published_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), - } } } @@ -89,10 +84,8 @@ impl __sdk::__query_builder::HasIxCols for CustomWorldGalleryEntry { owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"), profile_id: __sdk::__query_builder::IxCol::new(table_name, "profile_id"), 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_gallery_list_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_list_result_type.rs index 357c32c5..bf101ef1 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_list_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_list_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_gallery_entry_snapshot_type::CustomWorldGalleryEntrySnapshot; @@ -15,12 +10,10 @@ use super::custom_world_gallery_entry_snapshot_type::CustomWorldGalleryEntrySnap #[sats(crate = __lib)] pub struct CustomWorldGalleryListResult { pub ok: bool, - pub entries: Vec::, - pub error_message: Option::, + pub entries: Vec, + pub error_message: Option, } - impl __sdk::InModule for CustomWorldGalleryListResult { type Module = super::RemoteModule; } - 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 index 375a464c..8b424a9a 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,12 +11,8 @@ 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_library_detail_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_library_detail_input_type.rs index e29dbaa9..472c1b80 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_library_detail_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_library_detail_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +11,6 @@ pub struct CustomWorldLibraryDetailInput { pub profile_id: String, } - impl __sdk::InModule for CustomWorldLibraryDetailInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_library_mutation_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_library_mutation_result_type.rs index 6fd0d2ff..3c3bb3b3 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_library_mutation_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_library_mutation_result_type.rs @@ -2,27 +2,20 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::custom_world_profile_snapshot_type::CustomWorldProfileSnapshot; use super::custom_world_gallery_entry_snapshot_type::CustomWorldGalleryEntrySnapshot; +use super::custom_world_profile_snapshot_type::CustomWorldProfileSnapshot; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct CustomWorldLibraryMutationResult { pub ok: bool, - pub entry: Option::, - pub gallery_entry: Option::, - pub error_message: Option::, + pub entry: Option, + pub gallery_entry: Option, + pub error_message: Option, } - impl __sdk::InModule for CustomWorldLibraryMutationResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_delete_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_delete_input_type.rs new file mode 100644 index 00000000..f9d4a10f --- /dev/null +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_delete_input_type.rs @@ -0,0 +1,17 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct CustomWorldProfileDeleteInput { + pub profile_id: String, + pub owner_user_id: String, + pub deleted_at_micros: i64, +} + +impl __sdk::InModule for CustomWorldProfileDeleteInput { + type Module = super::RemoteModule; +} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_list_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_list_input_type.rs index 2d4b431e..53c46830 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_list_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_list_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,8 +10,6 @@ pub struct CustomWorldProfileListInput { pub owner_user_id: String, } - impl __sdk::InModule for CustomWorldProfileListInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_list_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_list_result_type.rs index 4e6a5a4a..10db7d0e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_list_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_list_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_profile_snapshot_type::CustomWorldProfileSnapshot; @@ -15,12 +10,10 @@ use super::custom_world_profile_snapshot_type::CustomWorldProfileSnapshot; #[sats(crate = __lib)] pub struct CustomWorldProfileListResult { pub ok: bool, - pub entries: Vec::, - pub error_message: Option::, + pub entries: Vec, + pub error_message: Option, } - impl __sdk::InModule for CustomWorldProfileListResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_publish_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_publish_input_type.rs index 42b63f84..16d06654 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_publish_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_publish_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -19,8 +13,6 @@ pub struct CustomWorldProfilePublishInput { pub published_at_micros: i64, } - impl __sdk::InModule for CustomWorldProfilePublishInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_snapshot_type.rs index dd75571e..ece3168d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_snapshot_type.rs @@ -2,39 +2,33 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::custom_world_theme_mode_type::CustomWorldThemeMode; 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 CustomWorldProfileSnapshot { pub profile_id: String, pub owner_user_id: String, - pub source_agent_session_id: 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 cover_image_src: Option, pub profile_payload_json: String, pub playable_npc_count: u32, pub landmark_count: u32, pub author_display_name: String, - pub published_at_micros: Option::, + pub published_at_micros: Option, + pub deleted_at_micros: Option, pub created_at_micros: i64, pub updated_at_micros: i64, } - impl __sdk::InModule for CustomWorldProfileSnapshot { 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 index 69639bf3..22692434 100644 --- 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 @@ -2,15 +2,10 @@ // 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_profile_type::CustomWorldProfile; -use super::custom_world_theme_mode_type::CustomWorldThemeMode; 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`. /// @@ -38,7 +33,9 @@ pub trait CustomWorldProfileTableAccess { impl CustomWorldProfileTableAccess for super::RemoteTables { fn custom_world_profile(&self) -> CustomWorldProfileTableHandle<'_> { CustomWorldProfileTableHandle { - imp: self.imp.get_table::("custom_world_profile"), + imp: self + .imp + .get_table::("custom_world_profile"), ctx: std::marker::PhantomData, } } @@ -51,8 +48,12 @@ 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() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = CustomWorldProfileInsertCallbackId; @@ -98,39 +99,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldProfileTableHandle<'ctx> { } } - /// 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>, - } +/// 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> 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) + } +} - 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); } @@ -140,26 +140,24 @@ 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() + __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") - } - } +#[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 index fdfe7a2f..4fddf669 100644 --- 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 @@ -2,61 +2,57 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::custom_world_theme_mode_type::CustomWorldThemeMode; 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 source_agent_session_id: 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 cover_image_src: Option, pub profile_payload_json: String, pub playable_npc_count: u32, pub landmark_count: u32, pub author_display_name: String, - pub published_at: Option::<__sdk::Timestamp>, + pub published_at: Option<__sdk::Timestamp>, + pub deleted_at: Option<__sdk::Timestamp>, pub created_at: __sdk::Timestamp, pub updated_at: __sdk::Timestamp, } - 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 source_agent_session_id: __sdk::__query_builder::Col>, - pub publication_status: __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 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 author_display_name: __sdk::__query_builder::Col, - pub published_at: __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, } @@ -67,21 +63,30 @@ impl __sdk::__query_builder::HasCols for CustomWorldProfile { 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"), - source_agent_session_id: __sdk::__query_builder::Col::new(table_name, "source_agent_session_id"), + 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"), + 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"), - author_display_name: __sdk::__query_builder::Col::new(table_name, "author_display_name"), + 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"), - } } } @@ -92,7 +97,8 @@ impl __sdk::__query_builder::HasCols for CustomWorldProfile { 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, + pub publication_status: + __sdk::__query_builder::IxCol, } impl __sdk::__query_builder::HasIxCols for CustomWorldProfile { @@ -101,11 +107,12 @@ impl __sdk::__query_builder::HasIxCols for CustomWorldProfile { 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"), - + 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_profile_unpublish_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_unpublish_input_type.rs index 79aa9ff6..7d688d96 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_unpublish_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_unpublish_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -19,8 +13,6 @@ pub struct CustomWorldProfileUnpublishInput { pub updated_at_micros: i64, } - impl __sdk::InModule for CustomWorldProfileUnpublishInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_upsert_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_upsert_input_type.rs index 53761a14..f9a00111 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_upsert_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_upsert_input_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_theme_mode_type::CustomWorldThemeMode; @@ -16,12 +11,12 @@ use super::custom_world_theme_mode_type::CustomWorldThemeMode; pub struct CustomWorldProfileUpsertInput { pub profile_id: String, pub owner_user_id: String, - pub source_agent_session_id: Option::, + pub source_agent_session_id: Option, pub world_name: String, pub subtitle: String, pub summary_text: String, pub theme_mode: CustomWorldThemeMode, - pub cover_image_src: Option::, + pub cover_image_src: Option, pub profile_payload_json: String, pub playable_npc_count: u32, pub landmark_count: u32, @@ -29,8 +24,6 @@ pub struct CustomWorldProfileUpsertInput { pub updated_at_micros: i64, } - impl __sdk::InModule for CustomWorldProfileUpsertInput { type Module = super::RemoteModule; } - 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 index d81681f4..f21186ff 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,12 +11,8 @@ 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_publish_world_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_publish_world_input_type.rs index f59454ef..206dffb9 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_publish_world_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_publish_world_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,14 +11,12 @@ pub struct CustomWorldPublishWorldInput { pub profile_id: String, pub owner_user_id: String, pub draft_profile_json: String, - pub legacy_result_profile_json: Option::, + pub legacy_result_profile_json: Option, pub setting_text: String, pub author_display_name: String, pub published_at_micros: i64, } - impl __sdk::InModule for CustomWorldPublishWorldInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_publish_world_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_publish_world_result_type.rs index 542810a3..a44ca2b1 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_publish_world_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_publish_world_result_type.rs @@ -2,31 +2,24 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; +use super::custom_world_gallery_entry_snapshot_type::CustomWorldGalleryEntrySnapshot; +use super::custom_world_profile_snapshot_type::CustomWorldProfileSnapshot; use super::custom_world_published_profile_compile_snapshot_type::CustomWorldPublishedProfileCompileSnapshot; use super::rpg_agent_stage_type::RpgAgentStage; -use super::custom_world_profile_snapshot_type::CustomWorldProfileSnapshot; -use super::custom_world_gallery_entry_snapshot_type::CustomWorldGalleryEntrySnapshot; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct CustomWorldPublishWorldResult { pub ok: bool, - pub compiled_record: Option::, - pub entry: Option::, - pub gallery_entry: Option::, - pub session_stage: Option::, - pub error_message: Option::, + pub compiled_record: Option, + pub entry: Option, + pub gallery_entry: Option, + pub session_stage: Option, + pub error_message: Option, } - impl __sdk::InModule for CustomWorldPublishWorldResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_published_profile_compile_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_published_profile_compile_input_type.rs index c78399a4..fda3d08b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_published_profile_compile_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_published_profile_compile_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,14 +11,12 @@ pub struct CustomWorldPublishedProfileCompileInput { pub profile_id: String, pub owner_user_id: String, pub draft_profile_json: String, - pub legacy_result_profile_json: Option::, + pub legacy_result_profile_json: Option, pub setting_text: String, pub author_display_name: String, pub updated_at_micros: i64, } - impl __sdk::InModule for CustomWorldPublishedProfileCompileInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_published_profile_compile_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_published_profile_compile_result_type.rs index 42d770b5..4783f889 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_published_profile_compile_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_published_profile_compile_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_published_profile_compile_snapshot_type::CustomWorldPublishedProfileCompileSnapshot; @@ -15,12 +10,10 @@ use super::custom_world_published_profile_compile_snapshot_type::CustomWorldPubl #[sats(crate = __lib)] pub struct CustomWorldPublishedProfileCompileResult { pub ok: bool, - pub record: Option::, - pub error_message: Option::, + pub record: Option, + pub error_message: Option, } - impl __sdk::InModule for CustomWorldPublishedProfileCompileResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_published_profile_compile_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_published_profile_compile_snapshot_type.rs index 9214b492..0af4d59e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_published_profile_compile_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_published_profile_compile_snapshot_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_theme_mode_type::CustomWorldThemeMode; @@ -20,7 +15,7 @@ pub struct CustomWorldPublishedProfileCompileSnapshot { pub subtitle: String, pub summary_text: String, pub theme_mode: CustomWorldThemeMode, - pub cover_image_src: Option::, + pub cover_image_src: Option, pub playable_npc_count: u32, pub landmark_count: u32, pub author_display_name: String, @@ -28,8 +23,6 @@ pub struct CustomWorldPublishedProfileCompileSnapshot { pub updated_at_micros: i64, } - impl __sdk::InModule for CustomWorldPublishedProfileCompileSnapshot { 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 index a969aa55..1ab238e9 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -20,12 +15,8 @@ pub enum CustomWorldRoleAssetStatus { 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 index f7fe499d..9b640e4f 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -22,12 +17,8 @@ pub enum CustomWorldSessionStatus { 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 index 4d44d0ff..2813b6e2 100644 --- 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 @@ -2,15 +2,10 @@ // 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_session_type::CustomWorldSession; 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`. /// @@ -38,7 +33,9 @@ pub trait CustomWorldSessionTableAccess { impl CustomWorldSessionTableAccess for super::RemoteTables { fn custom_world_session(&self) -> CustomWorldSessionTableHandle<'_> { CustomWorldSessionTableHandle { - imp: self.imp.get_table::("custom_world_session"), + imp: self + .imp + .get_table::("custom_world_session"), ctx: std::marker::PhantomData, } } @@ -51,8 +48,12 @@ 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() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = CustomWorldSessionInsertCallbackId; @@ -98,39 +99,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldSessionTableHandle<'ctx> { } } - /// 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>, - } +/// 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> 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) + } +} - 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); } @@ -140,26 +140,24 @@ 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() + __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") - } - } +#[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 index 2646073e..58e9f40c 100644 --- 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 @@ -2,12 +2,7 @@ // 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 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; @@ -20,20 +15,18 @@ pub struct CustomWorldSession { pub generation_mode: CustomWorldGenerationMode, pub status: CustomWorldSessionStatus, pub setting_text: String, - pub creator_intent_json: Option::, + pub creator_intent_json: Option, pub question_snapshot_json: String, - pub result_payload_json: Option::, - pub last_error_message: Option::, + 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. @@ -43,10 +36,10 @@ pub struct CustomWorldSessionCols { 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 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 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, } @@ -60,13 +53,21 @@ impl __sdk::__query_builder::HasCols for CustomWorldSession { 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"), + 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"), - } } } @@ -85,10 +86,8 @@ impl __sdk::__query_builder::HasIxCols for CustomWorldSession { 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 index 766d1d08..2084ea04 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -24,12 +19,8 @@ pub enum CustomWorldThemeMode { Rift, Mythic, - } - - impl __sdk::InModule for CustomWorldThemeMode { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_work_summary_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_work_summary_snapshot_type.rs index e81345b0..ed735fc3 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_work_summary_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_work_summary_snapshot_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::rpg_agent_stage_type::RpgAgentStage; @@ -20,28 +15,26 @@ pub struct CustomWorldWorkSummarySnapshot { pub title: String, pub subtitle: String, pub summary: String, - pub cover_image_src: Option::, - pub cover_render_mode: Option::, + pub cover_image_src: Option, + pub cover_render_mode: Option, pub cover_character_image_srcs_json: String, pub updated_at_micros: i64, - pub published_at_micros: Option::, - pub stage: Option::, - pub stage_label: Option::, + pub published_at_micros: Option, + pub stage: Option, + pub stage_label: Option, pub playable_npc_count: u32, pub landmark_count: u32, - pub role_visual_ready_count: Option::, - pub role_animation_ready_count: Option::, - pub role_asset_summary_label: Option::, - pub session_id: Option::, - pub profile_id: Option::, + pub role_visual_ready_count: Option, + pub role_animation_ready_count: Option, + pub role_asset_summary_label: Option, + pub session_id: Option, + pub profile_id: Option, pub can_resume: bool, pub can_enter_world: bool, pub blocker_count: u32, pub publish_ready: bool, } - impl __sdk::InModule for CustomWorldWorkSummarySnapshot { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_works_list_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_works_list_input_type.rs index 073faecf..a007007b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_works_list_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_works_list_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,8 +10,6 @@ pub struct CustomWorldWorksListInput { pub owner_user_id: String, } - impl __sdk::InModule for CustomWorldWorksListInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_works_list_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_works_list_result_type.rs index 937b450e..9296740e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_works_list_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_works_list_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_work_summary_snapshot_type::CustomWorldWorkSummarySnapshot; @@ -15,12 +10,10 @@ use super::custom_world_work_summary_snapshot_type::CustomWorldWorkSummarySnapsh #[sats(crate = __lib)] pub struct CustomWorldWorksListResult { pub ok: bool, - pub items: Vec::, - pub error_message: Option::, + pub items: Vec, + pub error_message: Option, } - impl __sdk::InModule for CustomWorldWorksListResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/delete_custom_world_profile_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/delete_custom_world_profile_and_return_procedure.rs new file mode 100644 index 00000000..5dc9da2f --- /dev/null +++ b/server-rs/crates/spacetime-client/src/module_bindings/delete_custom_world_profile_and_return_procedure.rs @@ -0,0 +1,59 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +use super::custom_world_profile_delete_input_type::CustomWorldProfileDeleteInput; +use super::custom_world_profile_list_result_type::CustomWorldProfileListResult; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +struct DeleteCustomWorldProfileAndReturnArgs { + pub input: CustomWorldProfileDeleteInput, +} + +impl __sdk::InModule for DeleteCustomWorldProfileAndReturnArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the procedure `delete_custom_world_profile_and_return`. +/// +/// Implemented for [`super::RemoteProcedures`]. +pub trait delete_custom_world_profile_and_return { + fn delete_custom_world_profile_and_return(&self, input: CustomWorldProfileDeleteInput) { + self.delete_custom_world_profile_and_return_then(input, |_, _| {}); + } + + fn delete_custom_world_profile_and_return_then( + &self, + input: CustomWorldProfileDeleteInput, + + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, + ); +} + +impl delete_custom_world_profile_and_return for super::RemoteProcedures { + fn delete_custom_world_profile_and_return_then( + &self, + input: CustomWorldProfileDeleteInput, + + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, + ) { + self.imp + .invoke_procedure_with_callback::<_, CustomWorldProfileListResult>( + "delete_custom_world_profile_and_return", + DeleteCustomWorldProfileAndReturnArgs { input }, + __callback, + ); + } +} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/delete_runtime_snapshot_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/delete_runtime_snapshot_and_return_procedure.rs index 6c38b74b..9173255a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/delete_runtime_snapshot_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/delete_runtime_snapshot_and_return_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_snapshot_delete_input_type::RuntimeSnapshotDeleteInput; use super::runtime_snapshot_procedure_result_type::RuntimeSnapshotProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct DeleteRuntimeSnapshotAndReturnArgs { +struct DeleteRuntimeSnapshotAndReturnArgs { pub input: RuntimeSnapshotDeleteInput, } - impl __sdk::InModule for DeleteRuntimeSnapshotAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for DeleteRuntimeSnapshotAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait delete_runtime_snapshot_and_return { - fn delete_runtime_snapshot_and_return(&self, input: RuntimeSnapshotDeleteInput, -) { - self.delete_runtime_snapshot_and_return_then(input, |_, _| {}); + fn delete_runtime_snapshot_and_return(&self, input: RuntimeSnapshotDeleteInput) { + self.delete_runtime_snapshot_and_return_then(input, |_, _| {}); } fn delete_runtime_snapshot_and_return_then( &self, input: RuntimeSnapshotDeleteInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl delete_runtime_snapshot_and_return for super::RemoteProcedures { &self, input: RuntimeSnapshotDeleteInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, RuntimeSnapshotProcedureResult>( - "delete_runtime_snapshot_and_return", - DeleteRuntimeSnapshotAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, RuntimeSnapshotProcedureResult>( + "delete_runtime_snapshot_and_return", + DeleteRuntimeSnapshotAndReturnArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/drag_puzzle_piece_or_group_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/drag_puzzle_piece_or_group_procedure.rs index 49c4ee1c..1207f7b5 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/drag_puzzle_piece_or_group_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/drag_puzzle_piece_or_group_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::puzzle_run_procedure_result_type::PuzzleRunProcedureResult; use super::puzzle_run_drag_input_type::PuzzleRunDragInput; +use super::puzzle_run_procedure_result_type::PuzzleRunProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct DragPuzzlePieceOrGroupArgs { +struct DragPuzzlePieceOrGroupArgs { pub input: PuzzleRunDragInput, } - impl __sdk::InModule for DragPuzzlePieceOrGroupArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for DragPuzzlePieceOrGroupArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait drag_puzzle_piece_or_group { - fn drag_puzzle_piece_or_group(&self, input: PuzzleRunDragInput, -) { - self.drag_puzzle_piece_or_group_then(input, |_, _| {}); + fn drag_puzzle_piece_or_group(&self, input: PuzzleRunDragInput) { + self.drag_puzzle_piece_or_group_then(input, |_, _| {}); } fn drag_puzzle_piece_or_group_then( &self, input: PuzzleRunDragInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl drag_puzzle_piece_or_group for super::RemoteProcedures { &self, input: PuzzleRunDragInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, PuzzleRunProcedureResult>( - "drag_puzzle_piece_or_group", - DragPuzzlePieceOrGroupArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, PuzzleRunProcedureResult>( + "drag_puzzle_piece_or_group", + DragPuzzlePieceOrGroupArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/equip_inventory_item_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/equip_inventory_item_input_type.rs index 19545699..775ad7fa 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/equip_inventory_item_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/equip_inventory_item_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,8 +10,6 @@ pub struct EquipInventoryItemInput { pub slot_id: String, } - impl __sdk::InModule for EquipInventoryItemInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/execute_custom_world_agent_action_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/execute_custom_world_agent_action_procedure.rs index 390871f5..c1008466 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/execute_custom_world_agent_action_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/execute_custom_world_agent_action_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_agent_action_execute_input_type::CustomWorldAgentActionExecuteInput; use super::custom_world_agent_action_execute_result_type::CustomWorldAgentActionExecuteResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct ExecuteCustomWorldAgentActionArgs { +struct ExecuteCustomWorldAgentActionArgs { pub input: CustomWorldAgentActionExecuteInput, } - impl __sdk::InModule for ExecuteCustomWorldAgentActionArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for ExecuteCustomWorldAgentActionArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait execute_custom_world_agent_action { - fn execute_custom_world_agent_action(&self, input: CustomWorldAgentActionExecuteInput, -) { - self.execute_custom_world_agent_action_then(input, |_, _| {}); + fn execute_custom_world_agent_action(&self, input: CustomWorldAgentActionExecuteInput) { + self.execute_custom_world_agent_action_then(input, |_, _| {}); } fn execute_custom_world_agent_action_then( &self, input: CustomWorldAgentActionExecuteInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl execute_custom_world_agent_action for super::RemoteProcedures { &self, input: CustomWorldAgentActionExecuteInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, CustomWorldAgentActionExecuteResult>( - "execute_custom_world_agent_action", - ExecuteCustomWorldAgentActionArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, CustomWorldAgentActionExecuteResult>( + "execute_custom_world_agent_action", + ExecuteCustomWorldAgentActionArgs { input }, + __callback, + ); } } - 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 b92e796d..3194799b 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 @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::ai_task_procedure_result_type::AiTaskProcedureResult; use super::ai_task_failure_input_type::AiTaskFailureInput; +use super::ai_task_procedure_result_type::AiTaskProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct FailAiTaskAndReturnArgs { +struct FailAiTaskAndReturnArgs { pub input: AiTaskFailureInput, } - impl __sdk::InModule for FailAiTaskAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for FailAiTaskAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait fail_ai_task_and_return { - fn fail_ai_task_and_return(&self, input: AiTaskFailureInput, -) { - self.fail_ai_task_and_return_then(input, |_, _| {}); + fn fail_ai_task_and_return(&self, input: AiTaskFailureInput) { + self.fail_ai_task_and_return_then(input, |_, _| {}); } fn fail_ai_task_and_return_then( &self, input: AiTaskFailureInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl fail_ai_task_and_return for super::RemoteProcedures { &self, input: AiTaskFailureInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, AiTaskProcedureResult>( - "fail_ai_task_and_return", - FailAiTaskAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, AiTaskProcedureResult>( + "fail_ai_task_and_return", + FailAiTaskAndReturnArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/generate_big_fish_asset_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/generate_big_fish_asset_procedure.rs index 6ee820f7..144c5d40 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/generate_big_fish_asset_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/generate_big_fish_asset_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::big_fish_session_procedure_result_type::BigFishSessionProcedureResult; use super::big_fish_asset_generate_input_type::BigFishAssetGenerateInput; +use super::big_fish_session_procedure_result_type::BigFishSessionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct GenerateBigFishAssetArgs { +struct GenerateBigFishAssetArgs { pub input: BigFishAssetGenerateInput, } - impl __sdk::InModule for GenerateBigFishAssetArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for GenerateBigFishAssetArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait generate_big_fish_asset { - fn generate_big_fish_asset(&self, input: BigFishAssetGenerateInput, -) { - self.generate_big_fish_asset_then(input, |_, _| {}); + fn generate_big_fish_asset(&self, input: BigFishAssetGenerateInput) { + self.generate_big_fish_asset_then(input, |_, _| {}); } fn generate_big_fish_asset_then( &self, input: BigFishAssetGenerateInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl generate_big_fish_asset for super::RemoteProcedures { &self, input: BigFishAssetGenerateInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>( - "generate_big_fish_asset", - GenerateBigFishAssetArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>( + "generate_big_fish_asset", + GenerateBigFishAssetArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_battle_state_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_battle_state_procedure.rs index c6f93416..0fcc276c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_battle_state_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_battle_state_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::battle_state_procedure_result_type::BattleStateProcedureResult; use super::battle_state_query_input_type::BattleStateQueryInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct GetBattleStateArgs { +struct GetBattleStateArgs { pub input: BattleStateQueryInput, } - impl __sdk::InModule for GetBattleStateArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for GetBattleStateArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_battle_state { - fn get_battle_state(&self, input: BattleStateQueryInput, -) { - self.get_battle_state_then(input, |_, _| {}); + fn get_battle_state(&self, input: BattleStateQueryInput) { + self.get_battle_state_then(input, |_, _| {}); } fn get_battle_state_then( &self, input: BattleStateQueryInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl get_battle_state for super::RemoteProcedures { &self, input: BattleStateQueryInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, BattleStateProcedureResult>( - "get_battle_state", - GetBattleStateArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, BattleStateProcedureResult>( + "get_battle_state", + GetBattleStateArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_big_fish_run_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_big_fish_run_procedure.rs index a16bbc76..9a601ff2 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_big_fish_run_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_big_fish_run_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::big_fish_run_get_input_type::BigFishRunGetInput; use super::big_fish_run_procedure_result_type::BigFishRunProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct GetBigFishRunArgs { +struct GetBigFishRunArgs { pub input: BigFishRunGetInput, } - impl __sdk::InModule for GetBigFishRunArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for GetBigFishRunArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_big_fish_run { - fn get_big_fish_run(&self, input: BigFishRunGetInput, -) { - self.get_big_fish_run_then(input, |_, _| {}); + fn get_big_fish_run(&self, input: BigFishRunGetInput) { + self.get_big_fish_run_then(input, |_, _| {}); } fn get_big_fish_run_then( &self, input: BigFishRunGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl get_big_fish_run for super::RemoteProcedures { &self, input: BigFishRunGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, BigFishRunProcedureResult>( - "get_big_fish_run", - GetBigFishRunArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, BigFishRunProcedureResult>( + "get_big_fish_run", + GetBigFishRunArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_big_fish_session_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_big_fish_session_procedure.rs index f54dc9e4..7f52f94b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_big_fish_session_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_big_fish_session_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::big_fish_session_procedure_result_type::BigFishSessionProcedureResult; use super::big_fish_session_get_input_type::BigFishSessionGetInput; +use super::big_fish_session_procedure_result_type::BigFishSessionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct GetBigFishSessionArgs { +struct GetBigFishSessionArgs { pub input: BigFishSessionGetInput, } - impl __sdk::InModule for GetBigFishSessionArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for GetBigFishSessionArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_big_fish_session { - fn get_big_fish_session(&self, input: BigFishSessionGetInput, -) { - self.get_big_fish_session_then(input, |_, _| {}); + fn get_big_fish_session(&self, input: BigFishSessionGetInput) { + self.get_big_fish_session_then(input, |_, _| {}); } fn get_big_fish_session_then( &self, input: BigFishSessionGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl get_big_fish_session for super::RemoteProcedures { &self, input: BigFishSessionGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>( - "get_big_fish_session", - GetBigFishSessionArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>( + "get_big_fish_session", + GetBigFishSessionArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_chapter_progression_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_chapter_progression_procedure.rs index dc75dc77..18f9ae27 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_chapter_progression_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_chapter_progression_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::chapter_progression_procedure_result_type::ChapterProgressionProcedureResult; use super::chapter_progression_get_input_type::ChapterProgressionGetInput; +use super::chapter_progression_procedure_result_type::ChapterProgressionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct GetChapterProgressionArgs { +struct GetChapterProgressionArgs { pub input: ChapterProgressionGetInput, } - impl __sdk::InModule for GetChapterProgressionArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for GetChapterProgressionArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_chapter_progression { - fn get_chapter_progression(&self, input: ChapterProgressionGetInput, -) { - self.get_chapter_progression_then(input, |_, _| {}); + fn get_chapter_progression(&self, input: ChapterProgressionGetInput) { + self.get_chapter_progression_then(input, |_, _| {}); } fn get_chapter_progression_then( &self, input: ChapterProgressionGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl get_chapter_progression for super::RemoteProcedures { &self, input: ChapterProgressionGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, ChapterProgressionProcedureResult>( - "get_chapter_progression", - GetChapterProgressionArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, ChapterProgressionProcedureResult>( + "get_chapter_progression", + GetChapterProgressionArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_agent_card_detail_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_agent_card_detail_procedure.rs index f0e38f3b..e1034345 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_agent_card_detail_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_agent_card_detail_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_agent_card_detail_get_input_type::CustomWorldAgentCardDetailGetInput; use super::custom_world_draft_card_detail_result_type::CustomWorldDraftCardDetailResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct GetCustomWorldAgentCardDetailArgs { +struct GetCustomWorldAgentCardDetailArgs { pub input: CustomWorldAgentCardDetailGetInput, } - impl __sdk::InModule for GetCustomWorldAgentCardDetailArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for GetCustomWorldAgentCardDetailArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_custom_world_agent_card_detail { - fn get_custom_world_agent_card_detail(&self, input: CustomWorldAgentCardDetailGetInput, -) { - self.get_custom_world_agent_card_detail_then(input, |_, _| {}); + fn get_custom_world_agent_card_detail(&self, input: CustomWorldAgentCardDetailGetInput) { + self.get_custom_world_agent_card_detail_then(input, |_, _| {}); } fn get_custom_world_agent_card_detail_then( &self, input: CustomWorldAgentCardDetailGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl get_custom_world_agent_card_detail for super::RemoteProcedures { &self, input: CustomWorldAgentCardDetailGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, CustomWorldDraftCardDetailResult>( - "get_custom_world_agent_card_detail", - GetCustomWorldAgentCardDetailArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, CustomWorldDraftCardDetailResult>( + "get_custom_world_agent_card_detail", + GetCustomWorldAgentCardDetailArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_agent_operation_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_agent_operation_procedure.rs index e8a4f855..cce1dbb5 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_agent_operation_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_agent_operation_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_agent_operation_get_input_type::CustomWorldAgentOperationGetInput; use super::custom_world_agent_operation_procedure_result_type::CustomWorldAgentOperationProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct GetCustomWorldAgentOperationArgs { +struct GetCustomWorldAgentOperationArgs { pub input: CustomWorldAgentOperationGetInput, } - impl __sdk::InModule for GetCustomWorldAgentOperationArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for GetCustomWorldAgentOperationArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_custom_world_agent_operation { - fn get_custom_world_agent_operation(&self, input: CustomWorldAgentOperationGetInput, -) { - self.get_custom_world_agent_operation_then(input, |_, _| {}); + fn get_custom_world_agent_operation(&self, input: CustomWorldAgentOperationGetInput) { + self.get_custom_world_agent_operation_then(input, |_, _| {}); } fn get_custom_world_agent_operation_then( &self, input: CustomWorldAgentOperationGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl get_custom_world_agent_operation for super::RemoteProcedures { &self, input: CustomWorldAgentOperationGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, CustomWorldAgentOperationProcedureResult>( - "get_custom_world_agent_operation", - GetCustomWorldAgentOperationArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, CustomWorldAgentOperationProcedureResult>( + "get_custom_world_agent_operation", + GetCustomWorldAgentOperationArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_agent_session_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_agent_session_procedure.rs index e1660a95..f4b678e9 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_agent_session_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_agent_session_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::custom_world_agent_session_procedure_result_type::CustomWorldAgentSessionProcedureResult; use super::custom_world_agent_session_get_input_type::CustomWorldAgentSessionGetInput; +use super::custom_world_agent_session_procedure_result_type::CustomWorldAgentSessionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct GetCustomWorldAgentSessionArgs { +struct GetCustomWorldAgentSessionArgs { pub input: CustomWorldAgentSessionGetInput, } - impl __sdk::InModule for GetCustomWorldAgentSessionArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for GetCustomWorldAgentSessionArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_custom_world_agent_session { - fn get_custom_world_agent_session(&self, input: CustomWorldAgentSessionGetInput, -) { - self.get_custom_world_agent_session_then(input, |_, _| {}); + fn get_custom_world_agent_session(&self, input: CustomWorldAgentSessionGetInput) { + self.get_custom_world_agent_session_then(input, |_, _| {}); } fn get_custom_world_agent_session_then( &self, input: CustomWorldAgentSessionGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl get_custom_world_agent_session for super::RemoteProcedures { &self, input: CustomWorldAgentSessionGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, CustomWorldAgentSessionProcedureResult>( - "get_custom_world_agent_session", - GetCustomWorldAgentSessionArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, CustomWorldAgentSessionProcedureResult>( + "get_custom_world_agent_session", + GetCustomWorldAgentSessionArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_gallery_detail_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_gallery_detail_procedure.rs index 79050c11..d0e029ff 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_gallery_detail_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_gallery_detail_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_gallery_detail_input_type::CustomWorldGalleryDetailInput; use super::custom_world_library_mutation_result_type::CustomWorldLibraryMutationResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct GetCustomWorldGalleryDetailArgs { +struct GetCustomWorldGalleryDetailArgs { pub input: CustomWorldGalleryDetailInput, } - impl __sdk::InModule for GetCustomWorldGalleryDetailArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for GetCustomWorldGalleryDetailArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_custom_world_gallery_detail { - fn get_custom_world_gallery_detail(&self, input: CustomWorldGalleryDetailInput, -) { - self.get_custom_world_gallery_detail_then(input, |_, _| {}); + fn get_custom_world_gallery_detail(&self, input: CustomWorldGalleryDetailInput) { + self.get_custom_world_gallery_detail_then(input, |_, _| {}); } fn get_custom_world_gallery_detail_then( &self, input: CustomWorldGalleryDetailInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl get_custom_world_gallery_detail for super::RemoteProcedures { &self, input: CustomWorldGalleryDetailInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, CustomWorldLibraryMutationResult>( - "get_custom_world_gallery_detail", - GetCustomWorldGalleryDetailArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, CustomWorldLibraryMutationResult>( + "get_custom_world_gallery_detail", + GetCustomWorldGalleryDetailArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_library_detail_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_library_detail_procedure.rs index 175758c2..82bd1c3c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_library_detail_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_library_detail_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::custom_world_library_mutation_result_type::CustomWorldLibraryMutationResult; use super::custom_world_library_detail_input_type::CustomWorldLibraryDetailInput; +use super::custom_world_library_mutation_result_type::CustomWorldLibraryMutationResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct GetCustomWorldLibraryDetailArgs { +struct GetCustomWorldLibraryDetailArgs { pub input: CustomWorldLibraryDetailInput, } - impl __sdk::InModule for GetCustomWorldLibraryDetailArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for GetCustomWorldLibraryDetailArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_custom_world_library_detail { - fn get_custom_world_library_detail(&self, input: CustomWorldLibraryDetailInput, -) { - self.get_custom_world_library_detail_then(input, |_, _| {}); + fn get_custom_world_library_detail(&self, input: CustomWorldLibraryDetailInput) { + self.get_custom_world_library_detail_then(input, |_, _| {}); } fn get_custom_world_library_detail_then( &self, input: CustomWorldLibraryDetailInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl get_custom_world_library_detail for super::RemoteProcedures { &self, input: CustomWorldLibraryDetailInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, CustomWorldLibraryMutationResult>( - "get_custom_world_library_detail", - GetCustomWorldLibraryDetailArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, CustomWorldLibraryMutationResult>( + "get_custom_world_library_detail", + GetCustomWorldLibraryDetailArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_player_progression_or_default_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_player_progression_or_default_procedure.rs index 73490884..38a1525a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_player_progression_or_default_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_player_progression_or_default_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::player_progression_get_input_type::PlayerProgressionGetInput; use super::player_progression_procedure_result_type::PlayerProgressionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct GetPlayerProgressionOrDefaultArgs { +struct GetPlayerProgressionOrDefaultArgs { pub input: PlayerProgressionGetInput, } - impl __sdk::InModule for GetPlayerProgressionOrDefaultArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for GetPlayerProgressionOrDefaultArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_player_progression_or_default { - fn get_player_progression_or_default(&self, input: PlayerProgressionGetInput, -) { - self.get_player_progression_or_default_then(input, |_, _| {}); + fn get_player_progression_or_default(&self, input: PlayerProgressionGetInput) { + self.get_player_progression_or_default_then(input, |_, _| {}); } fn get_player_progression_or_default_then( &self, input: PlayerProgressionGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl get_player_progression_or_default for super::RemoteProcedures { &self, input: PlayerProgressionGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, PlayerProgressionProcedureResult>( - "get_player_progression_or_default", - GetPlayerProgressionOrDefaultArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, PlayerProgressionProcedureResult>( + "get_player_progression_or_default", + GetPlayerProgressionOrDefaultArgs { input }, + __callback, + ); } } - 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 616a11b8..6c48fafb 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 @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_profile_dashboard_get_input_type::RuntimeProfileDashboardGetInput; use super::runtime_profile_dashboard_procedure_result_type::RuntimeProfileDashboardProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct GetProfileDashboardArgs { +struct GetProfileDashboardArgs { pub input: RuntimeProfileDashboardGetInput, } - impl __sdk::InModule for GetProfileDashboardArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for GetProfileDashboardArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_profile_dashboard { - fn get_profile_dashboard(&self, input: RuntimeProfileDashboardGetInput, -) { - self.get_profile_dashboard_then(input, |_, _| {}); + fn get_profile_dashboard(&self, input: RuntimeProfileDashboardGetInput) { + self.get_profile_dashboard_then(input, |_, _| {}); } fn get_profile_dashboard_then( &self, input: RuntimeProfileDashboardGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl get_profile_dashboard for super::RemoteProcedures { &self, input: RuntimeProfileDashboardGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, RuntimeProfileDashboardProcedureResult>( - "get_profile_dashboard", - GetProfileDashboardArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, RuntimeProfileDashboardProcedureResult>( + "get_profile_dashboard", + GetProfileDashboardArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_profile_play_stats_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_profile_play_stats_procedure.rs index 466c6902..088f4812 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_profile_play_stats_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_profile_play_stats_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_profile_play_stats_get_input_type::RuntimeProfilePlayStatsGetInput; use super::runtime_profile_play_stats_procedure_result_type::RuntimeProfilePlayStatsProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct GetProfilePlayStatsArgs { +struct GetProfilePlayStatsArgs { pub input: RuntimeProfilePlayStatsGetInput, } - impl __sdk::InModule for GetProfilePlayStatsArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for GetProfilePlayStatsArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_profile_play_stats { - fn get_profile_play_stats(&self, input: RuntimeProfilePlayStatsGetInput, -) { - self.get_profile_play_stats_then(input, |_, _| {}); + fn get_profile_play_stats(&self, input: RuntimeProfilePlayStatsGetInput) { + self.get_profile_play_stats_then(input, |_, _| {}); } fn get_profile_play_stats_then( &self, input: RuntimeProfilePlayStatsGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl get_profile_play_stats for super::RemoteProcedures { &self, input: RuntimeProfilePlayStatsGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, RuntimeProfilePlayStatsProcedureResult>( - "get_profile_play_stats", - GetProfilePlayStatsArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, RuntimeProfilePlayStatsProcedureResult>( + "get_profile_play_stats", + GetProfilePlayStatsArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_agent_session_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_agent_session_procedure.rs index 8946764b..8aa5a78f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_agent_session_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_agent_session_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::puzzle_agent_session_procedure_result_type::PuzzleAgentSessionProcedureResult; use super::puzzle_agent_session_get_input_type::PuzzleAgentSessionGetInput; +use super::puzzle_agent_session_procedure_result_type::PuzzleAgentSessionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct GetPuzzleAgentSessionArgs { +struct GetPuzzleAgentSessionArgs { pub input: PuzzleAgentSessionGetInput, } - impl __sdk::InModule for GetPuzzleAgentSessionArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for GetPuzzleAgentSessionArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_puzzle_agent_session { - fn get_puzzle_agent_session(&self, input: PuzzleAgentSessionGetInput, -) { - self.get_puzzle_agent_session_then(input, |_, _| {}); + fn get_puzzle_agent_session(&self, input: PuzzleAgentSessionGetInput) { + self.get_puzzle_agent_session_then(input, |_, _| {}); } fn get_puzzle_agent_session_then( &self, input: PuzzleAgentSessionGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl get_puzzle_agent_session for super::RemoteProcedures { &self, input: PuzzleAgentSessionGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>( - "get_puzzle_agent_session", - GetPuzzleAgentSessionArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>( + "get_puzzle_agent_session", + GetPuzzleAgentSessionArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_gallery_detail_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_gallery_detail_procedure.rs index 0c78ac7c..85b70081 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_gallery_detail_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_gallery_detail_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::puzzle_work_get_input_type::PuzzleWorkGetInput; use super::puzzle_work_procedure_result_type::PuzzleWorkProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct GetPuzzleGalleryDetailArgs { +struct GetPuzzleGalleryDetailArgs { pub input: PuzzleWorkGetInput, } - impl __sdk::InModule for GetPuzzleGalleryDetailArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for GetPuzzleGalleryDetailArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_puzzle_gallery_detail { - fn get_puzzle_gallery_detail(&self, input: PuzzleWorkGetInput, -) { - self.get_puzzle_gallery_detail_then(input, |_, _| {}); + fn get_puzzle_gallery_detail(&self, input: PuzzleWorkGetInput) { + self.get_puzzle_gallery_detail_then(input, |_, _| {}); } fn get_puzzle_gallery_detail_then( &self, input: PuzzleWorkGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl get_puzzle_gallery_detail for super::RemoteProcedures { &self, input: PuzzleWorkGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, PuzzleWorkProcedureResult>( - "get_puzzle_gallery_detail", - GetPuzzleGalleryDetailArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, PuzzleWorkProcedureResult>( + "get_puzzle_gallery_detail", + GetPuzzleGalleryDetailArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_run_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_run_procedure.rs index c409b79d..d09fc285 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_run_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_run_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::puzzle_run_procedure_result_type::PuzzleRunProcedureResult; use super::puzzle_run_get_input_type::PuzzleRunGetInput; +use super::puzzle_run_procedure_result_type::PuzzleRunProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct GetPuzzleRunArgs { +struct GetPuzzleRunArgs { pub input: PuzzleRunGetInput, } - impl __sdk::InModule for GetPuzzleRunArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for GetPuzzleRunArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_puzzle_run { - fn get_puzzle_run(&self, input: PuzzleRunGetInput, -) { - self.get_puzzle_run_then(input, |_, _| {}); + fn get_puzzle_run(&self, input: PuzzleRunGetInput) { + self.get_puzzle_run_then(input, |_, _| {}); } fn get_puzzle_run_then( &self, input: PuzzleRunGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl get_puzzle_run for super::RemoteProcedures { &self, input: PuzzleRunGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, PuzzleRunProcedureResult>( - "get_puzzle_run", - GetPuzzleRunArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, PuzzleRunProcedureResult>( + "get_puzzle_run", + GetPuzzleRunArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_work_detail_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_work_detail_procedure.rs index c21d1048..0d6c4f70 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_work_detail_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_work_detail_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::puzzle_work_get_input_type::PuzzleWorkGetInput; use super::puzzle_work_procedure_result_type::PuzzleWorkProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct GetPuzzleWorkDetailArgs { +struct GetPuzzleWorkDetailArgs { pub input: PuzzleWorkGetInput, } - impl __sdk::InModule for GetPuzzleWorkDetailArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for GetPuzzleWorkDetailArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_puzzle_work_detail { - fn get_puzzle_work_detail(&self, input: PuzzleWorkGetInput, -) { - self.get_puzzle_work_detail_then(input, |_, _| {}); + fn get_puzzle_work_detail(&self, input: PuzzleWorkGetInput) { + self.get_puzzle_work_detail_then(input, |_, _| {}); } fn get_puzzle_work_detail_then( &self, input: PuzzleWorkGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl get_puzzle_work_detail for super::RemoteProcedures { &self, input: PuzzleWorkGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, PuzzleWorkProcedureResult>( - "get_puzzle_work_detail", - GetPuzzleWorkDetailArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, PuzzleWorkProcedureResult>( + "get_puzzle_work_detail", + GetPuzzleWorkDetailArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_runtime_inventory_state_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_runtime_inventory_state_procedure.rs index d5137496..c8dfefac 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_runtime_inventory_state_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_runtime_inventory_state_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::runtime_inventory_state_query_input_type::RuntimeInventoryStateQueryInput; use super::runtime_inventory_state_procedure_result_type::RuntimeInventoryStateProcedureResult; +use super::runtime_inventory_state_query_input_type::RuntimeInventoryStateQueryInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct GetRuntimeInventoryStateArgs { +struct GetRuntimeInventoryStateArgs { pub input: RuntimeInventoryStateQueryInput, } - impl __sdk::InModule for GetRuntimeInventoryStateArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for GetRuntimeInventoryStateArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_runtime_inventory_state { - fn get_runtime_inventory_state(&self, input: RuntimeInventoryStateQueryInput, -) { - self.get_runtime_inventory_state_then(input, |_, _| {}); + fn get_runtime_inventory_state(&self, input: RuntimeInventoryStateQueryInput) { + self.get_runtime_inventory_state_then(input, |_, _| {}); } fn get_runtime_inventory_state_then( &self, input: RuntimeInventoryStateQueryInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl get_runtime_inventory_state for super::RemoteProcedures { &self, input: RuntimeInventoryStateQueryInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, RuntimeInventoryStateProcedureResult>( - "get_runtime_inventory_state", - GetRuntimeInventoryStateArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, RuntimeInventoryStateProcedureResult>( + "get_runtime_inventory_state", + GetRuntimeInventoryStateArgs { input }, + __callback, + ); } } - 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 a58e515c..4ca8b03e 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 @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_setting_get_input_type::RuntimeSettingGetInput; use super::runtime_setting_procedure_result_type::RuntimeSettingProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct GetRuntimeSettingOrDefaultArgs { +struct GetRuntimeSettingOrDefaultArgs { pub input: RuntimeSettingGetInput, } - impl __sdk::InModule for GetRuntimeSettingOrDefaultArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for GetRuntimeSettingOrDefaultArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_runtime_setting_or_default { - fn get_runtime_setting_or_default(&self, input: RuntimeSettingGetInput, -) { - self.get_runtime_setting_or_default_then(input, |_, _| {}); + fn get_runtime_setting_or_default(&self, input: RuntimeSettingGetInput) { + self.get_runtime_setting_or_default_then(input, |_, _| {}); } fn get_runtime_setting_or_default_then( &self, input: RuntimeSettingGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl get_runtime_setting_or_default for super::RemoteProcedures { &self, input: RuntimeSettingGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, RuntimeSettingProcedureResult>( - "get_runtime_setting_or_default", - GetRuntimeSettingOrDefaultArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, RuntimeSettingProcedureResult>( + "get_runtime_setting_or_default", + GetRuntimeSettingOrDefaultArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_runtime_snapshot_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_runtime_snapshot_procedure.rs index 75117d98..7f9feb4f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_runtime_snapshot_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_runtime_snapshot_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::runtime_snapshot_procedure_result_type::RuntimeSnapshotProcedureResult; use super::runtime_snapshot_get_input_type::RuntimeSnapshotGetInput; +use super::runtime_snapshot_procedure_result_type::RuntimeSnapshotProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct GetRuntimeSnapshotArgs { +struct GetRuntimeSnapshotArgs { pub input: RuntimeSnapshotGetInput, } - impl __sdk::InModule for GetRuntimeSnapshotArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for GetRuntimeSnapshotArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_runtime_snapshot { - fn get_runtime_snapshot(&self, input: RuntimeSnapshotGetInput, -) { - self.get_runtime_snapshot_then(input, |_, _| {}); + fn get_runtime_snapshot(&self, input: RuntimeSnapshotGetInput) { + self.get_runtime_snapshot_then(input, |_, _| {}); } fn get_runtime_snapshot_then( &self, input: RuntimeSnapshotGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl get_runtime_snapshot for super::RemoteProcedures { &self, input: RuntimeSnapshotGetInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, RuntimeSnapshotProcedureResult>( - "get_runtime_snapshot", - GetRuntimeSnapshotArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, RuntimeSnapshotProcedureResult>( + "get_runtime_snapshot", + GetRuntimeSnapshotArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_story_session_state_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_story_session_state_procedure.rs index b454ab5d..44b48ada 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_story_session_state_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_story_session_state_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::story_session_state_input_type::StorySessionStateInput; use super::story_session_state_procedure_result_type::StorySessionStateProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct GetStorySessionStateArgs { +struct GetStorySessionStateArgs { pub input: StorySessionStateInput, } - impl __sdk::InModule for GetStorySessionStateArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for GetStorySessionStateArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_story_session_state { - fn get_story_session_state(&self, input: StorySessionStateInput, -) { - self.get_story_session_state_then(input, |_, _| {}); + fn get_story_session_state(&self, input: StorySessionStateInput) { + self.get_story_session_state_then(input, |_, _| {}); } fn get_story_session_state_then( &self, input: StorySessionStateInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl get_story_session_state for super::RemoteProcedures { &self, input: StorySessionStateInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, StorySessionStateProcedureResult>( - "get_story_session_state", - GetStorySessionStateArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, StorySessionStateProcedureResult>( + "get_story_session_state", + GetStorySessionStateArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/grant_inventory_item_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/grant_inventory_item_input_type.rs index c9389060..553aff65 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/grant_inventory_item_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/grant_inventory_item_input_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::inventory_item_snapshot_type::InventoryItemSnapshot; @@ -18,8 +13,6 @@ pub struct GrantInventoryItemInput { pub item: InventoryItemSnapshot, } - impl __sdk::InModule for GrantInventoryItemInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/grant_player_progression_experience_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/grant_player_progression_experience_and_return_procedure.rs index 04e0ae9a..a3f2aa9e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/grant_player_progression_experience_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/grant_player_progression_experience_and_return_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::player_progression_procedure_result_type::PlayerProgressionProcedureResult; use super::player_progression_grant_input_type::PlayerProgressionGrantInput; +use super::player_progression_procedure_result_type::PlayerProgressionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct GrantPlayerProgressionExperienceAndReturnArgs { +struct GrantPlayerProgressionExperienceAndReturnArgs { pub input: PlayerProgressionGrantInput, } - impl __sdk::InModule for GrantPlayerProgressionExperienceAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for GrantPlayerProgressionExperienceAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait grant_player_progression_experience_and_return { - fn grant_player_progression_experience_and_return(&self, input: PlayerProgressionGrantInput, -) { - self.grant_player_progression_experience_and_return_then(input, |_, _| {}); + fn grant_player_progression_experience_and_return(&self, input: PlayerProgressionGrantInput) { + self.grant_player_progression_experience_and_return_then(input, |_, _| {}); } fn grant_player_progression_experience_and_return_then( &self, input: PlayerProgressionGrantInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl grant_player_progression_experience_and_return for super::RemoteProcedures &self, input: PlayerProgressionGrantInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, PlayerProgressionProcedureResult>( - "grant_player_progression_experience_and_return", - GrantPlayerProgressionExperienceAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, PlayerProgressionProcedureResult>( + "grant_player_progression_experience_and_return", + GrantPlayerProgressionExperienceAndReturnArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/grant_player_progression_experience_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/grant_player_progression_experience_reducer.rs index 324bb57f..bd07115e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/grant_player_progression_experience_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/grant_player_progression_experience_reducer.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::player_progression_grant_input_type::PlayerProgressionGrantInput; @@ -19,10 +14,8 @@ pub(super) struct GrantPlayerProgressionExperienceArgs { impl From for super::Reducer { fn from(args: GrantPlayerProgressionExperienceArgs) -> Self { - Self::GrantPlayerProgressionExperience { - input: args.input, -} -} + Self::GrantPlayerProgressionExperience { input: args.input } + } } impl __sdk::InModule for GrantPlayerProgressionExperienceArgs { @@ -40,9 +33,11 @@ pub trait grant_player_progression_experience { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`grant_player_progression_experience:grant_player_progression_experience_then`] to run a callback after the reducer completes. - fn grant_player_progression_experience(&self, input: PlayerProgressionGrantInput, -) -> __sdk::Result<()> { - self.grant_player_progression_experience_then(input, |_, _| {}) + fn grant_player_progression_experience( + &self, + input: PlayerProgressionGrantInput, + ) -> __sdk::Result<()> { + self.grant_player_progression_experience_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `grant_player_progression_experience` to run as soon as possible, @@ -55,9 +50,11 @@ pub trait grant_player_progression_experience { &self, input: PlayerProgressionGrantInput, - callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) - + Send - + 'static, + callback: impl FnOnce( + &super::ReducerEventContext, + Result, __sdk::InternalError>, + ) + Send + + 'static, ) -> __sdk::Result<()>; } @@ -66,11 +63,13 @@ impl grant_player_progression_experience for super::RemoteReducers { &self, input: PlayerProgressionGrantInput, - 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(GrantPlayerProgressionExperienceArgs { input, }, callback) + self.imp + .invoke_reducer_with_callback(GrantPlayerProgressionExperienceArgs { input }, callback) } } - 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 index 23de3559..45522ce7 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,12 +11,8 @@ 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 index 81154f9f..e2055f6a 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,12 +13,8 @@ pub enum InventoryEquipmentSlot { 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 index e277c402..85b46090 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -22,12 +17,8 @@ pub enum InventoryItemRarity { Epic, Legendary, - } - - impl __sdk::InModule for InventoryItemRarity { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/inventory_item_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/inventory_item_snapshot_type.rs index 7e962e4d..3769735e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/inventory_item_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/inventory_item_snapshot_type.rs @@ -2,15 +2,10 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::inventory_item_rarity_type::InventoryItemRarity; 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)] @@ -19,19 +14,17 @@ pub struct InventoryItemSnapshot { pub item_id: String, pub category: String, pub name: String, - pub description: Option::, + pub description: Option, pub quantity: u32, pub rarity: InventoryItemRarity, - pub tags: Vec::, + pub tags: Vec, pub stackable: bool, pub stack_key: String, - pub equipment_slot_id: Option::, + pub equipment_slot_id: Option, pub source_kind: InventoryItemSourceKind, - pub source_reference_id: Option::, + pub source_reference_id: Option, } - impl __sdk::InModule for InventoryItemSnapshot { 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 index 5303c581..1d3961bc 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -30,12 +25,8 @@ pub enum InventoryItemSourceKind { ForgeReforge, ManualPatch, - } - - impl __sdk::InModule for InventoryItemSourceKind { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/inventory_mutation_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/inventory_mutation_input_type.rs index c696e383..3540ad3b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/inventory_mutation_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/inventory_mutation_input_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::inventory_mutation_type::InventoryMutation; @@ -16,14 +11,12 @@ use super::inventory_mutation_type::InventoryMutation; pub struct InventoryMutationInput { pub mutation_id: String, pub runtime_session_id: String, - pub story_session_id: Option::, + pub story_session_id: Option, pub actor_user_id: String, pub mutation: InventoryMutation, pub updated_at_micros: i64, } - impl __sdk::InModule for InventoryMutationInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/inventory_mutation_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/inventory_mutation_type.rs index d7b64029..3d0d0e4f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/inventory_mutation_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/inventory_mutation_type.rs @@ -2,16 +2,11 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::grant_inventory_item_input_type::GrantInventoryItemInput; use super::consume_inventory_item_input_type::ConsumeInventoryItemInput; use super::equip_inventory_item_input_type::EquipInventoryItemInput; +use super::grant_inventory_item_input_type::GrantInventoryItemInput; use super::unequip_inventory_item_input_type::UnequipInventoryItemInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] @@ -24,12 +19,8 @@ pub enum InventoryMutation { EquipItem(EquipInventoryItemInput), UnequipItem(UnequipInventoryItemInput), - } - - impl __sdk::InModule for InventoryMutation { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/inventory_slot_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/inventory_slot_snapshot_type.rs index 4ce26de5..f20e5451 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/inventory_slot_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/inventory_slot_snapshot_type.rs @@ -2,45 +2,38 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::inventory_item_rarity_type::InventoryItemRarity; -use super::inventory_equipment_slot_type::InventoryEquipmentSlot; -use super::inventory_item_source_kind_type::InventoryItemSourceKind; 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 InventorySlotSnapshot { pub slot_id: String, pub runtime_session_id: String, - pub story_session_id: Option::, + 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 description: Option, pub quantity: u32, pub rarity: InventoryItemRarity, - pub tags: Vec::, + pub tags: Vec, pub stackable: bool, pub stack_key: String, - pub equipment_slot_id: Option::, + pub equipment_slot_id: Option, pub source_kind: InventoryItemSourceKind, - pub source_reference_id: Option::, + pub source_reference_id: Option, pub created_at_micros: i64, pub updated_at_micros: i64, } - impl __sdk::InModule for InventorySlotSnapshot { 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 index da04ff99..277df68a 100644 --- 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 @@ -2,17 +2,12 @@ // 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_slot_type::InventorySlot; -use super::inventory_item_rarity_type::InventoryItemRarity; -use super::inventory_equipment_slot_type::InventoryEquipmentSlot; -use super::inventory_item_source_kind_type::InventoryItemSourceKind; 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`. /// @@ -53,8 +48,12 @@ 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() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = InventorySlotInsertCallbackId; @@ -100,39 +99,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for InventorySlotTableHandle<'ctx> { } } - /// 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>, - } +/// 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> 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) + } +} - 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); } @@ -142,26 +140,24 @@ 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() + __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") - } - } +#[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 index c824c438..fcfbab6a 100644 --- 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 @@ -2,71 +2,65 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::inventory_item_rarity_type::InventoryItemRarity; -use super::inventory_equipment_slot_type::InventoryEquipmentSlot; -use super::inventory_item_source_kind_type::InventoryItemSourceKind; 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 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 description: Option, pub quantity: u32, pub rarity: InventoryItemRarity, - pub tags: Vec::, + pub tags: Vec, pub stackable: bool, pub stack_key: String, - pub equipment_slot_id: Option::, + pub equipment_slot_id: Option, pub source_kind: InventoryItemSourceKind, - pub source_reference_id: Option::, + 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 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 description: __sdk::__query_builder::Col>, pub quantity: __sdk::__query_builder::Col, pub rarity: __sdk::__query_builder::Col, - pub tags: __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 equipment_slot_id: + __sdk::__query_builder::Col>, pub source_kind: __sdk::__query_builder::Col, - pub source_reference_id: __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, } @@ -92,10 +86,12 @@ impl __sdk::__query_builder::HasCols for InventorySlot { 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"), + 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"), - } } } @@ -116,12 +112,13 @@ impl __sdk::__query_builder::HasIxCols for InventorySlot { 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"), + 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/list_custom_world_gallery_entries_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_custom_world_gallery_entries_procedure.rs index 507757cf..01f6cb0c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_custom_world_gallery_entries_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_custom_world_gallery_entries_procedure.rs @@ -2,20 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_gallery_list_result_type::CustomWorldGalleryListResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct ListCustomWorldGalleryEntriesArgs { - } - +struct ListCustomWorldGalleryEntriesArgs {} impl __sdk::InModule for ListCustomWorldGalleryEntriesArgs { type Module = super::RemoteModule; @@ -26,28 +19,36 @@ impl __sdk::InModule for ListCustomWorldGalleryEntriesArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait list_custom_world_gallery_entries { - fn list_custom_world_gallery_entries(&self, ) { - self.list_custom_world_gallery_entries_then( |_, _| {}); + fn list_custom_world_gallery_entries(&self) { + self.list_custom_world_gallery_entries_then(|_, _| {}); } fn list_custom_world_gallery_entries_then( &self, - - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } impl list_custom_world_gallery_entries for super::RemoteProcedures { fn list_custom_world_gallery_entries_then( &self, - - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, CustomWorldGalleryListResult>( - "list_custom_world_gallery_entries", - ListCustomWorldGalleryEntriesArgs { }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, CustomWorldGalleryListResult>( + "list_custom_world_gallery_entries", + ListCustomWorldGalleryEntriesArgs {}, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_custom_world_profiles_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_custom_world_profiles_procedure.rs index 4008b0b0..c42ce2c6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_custom_world_profiles_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_custom_world_profiles_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_profile_list_input_type::CustomWorldProfileListInput; use super::custom_world_profile_list_result_type::CustomWorldProfileListResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct ListCustomWorldProfilesArgs { +struct ListCustomWorldProfilesArgs { pub input: CustomWorldProfileListInput, } - impl __sdk::InModule for ListCustomWorldProfilesArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for ListCustomWorldProfilesArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait list_custom_world_profiles { - fn list_custom_world_profiles(&self, input: CustomWorldProfileListInput, -) { - self.list_custom_world_profiles_then(input, |_, _| {}); + fn list_custom_world_profiles(&self, input: CustomWorldProfileListInput) { + self.list_custom_world_profiles_then(input, |_, _| {}); } fn list_custom_world_profiles_then( &self, input: CustomWorldProfileListInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl list_custom_world_profiles for super::RemoteProcedures { &self, input: CustomWorldProfileListInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, CustomWorldProfileListResult>( - "list_custom_world_profiles", - ListCustomWorldProfilesArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, CustomWorldProfileListResult>( + "list_custom_world_profiles", + ListCustomWorldProfilesArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_custom_world_works_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_custom_world_works_procedure.rs index aca87254..77f48ba6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_custom_world_works_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_custom_world_works_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_works_list_input_type::CustomWorldWorksListInput; use super::custom_world_works_list_result_type::CustomWorldWorksListResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct ListCustomWorldWorksArgs { +struct ListCustomWorldWorksArgs { pub input: CustomWorldWorksListInput, } - impl __sdk::InModule for ListCustomWorldWorksArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for ListCustomWorldWorksArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait list_custom_world_works { - fn list_custom_world_works(&self, input: CustomWorldWorksListInput, -) { - self.list_custom_world_works_then(input, |_, _| {}); + fn list_custom_world_works(&self, input: CustomWorldWorksListInput) { + self.list_custom_world_works_then(input, |_, _| {}); } fn list_custom_world_works_then( &self, input: CustomWorldWorksListInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl list_custom_world_works for super::RemoteProcedures { &self, input: CustomWorldWorksListInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, CustomWorldWorksListResult>( - "list_custom_world_works", - ListCustomWorldWorksArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, CustomWorldWorksListResult>( + "list_custom_world_works", + ListCustomWorldWorksArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_platform_browse_history_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_platform_browse_history_procedure.rs index 0c10f6c3..00176656 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_platform_browse_history_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_platform_browse_history_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::runtime_browse_history_procedure_result_type::RuntimeBrowseHistoryProcedureResult; use super::runtime_browse_history_list_input_type::RuntimeBrowseHistoryListInput; +use super::runtime_browse_history_procedure_result_type::RuntimeBrowseHistoryProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct ListPlatformBrowseHistoryArgs { +struct ListPlatformBrowseHistoryArgs { pub input: RuntimeBrowseHistoryListInput, } - impl __sdk::InModule for ListPlatformBrowseHistoryArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for ListPlatformBrowseHistoryArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait list_platform_browse_history { - fn list_platform_browse_history(&self, input: RuntimeBrowseHistoryListInput, -) { - self.list_platform_browse_history_then(input, |_, _| {}); + fn list_platform_browse_history(&self, input: RuntimeBrowseHistoryListInput) { + self.list_platform_browse_history_then(input, |_, _| {}); } fn list_platform_browse_history_then( &self, input: RuntimeBrowseHistoryListInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl list_platform_browse_history for super::RemoteProcedures { &self, input: RuntimeBrowseHistoryListInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, RuntimeBrowseHistoryProcedureResult>( - "list_platform_browse_history", - ListPlatformBrowseHistoryArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, RuntimeBrowseHistoryProcedureResult>( + "list_platform_browse_history", + ListPlatformBrowseHistoryArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_profile_save_archives_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_profile_save_archives_procedure.rs index 6476c3ac..1c7176cf 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_profile_save_archives_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_profile_save_archives_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_profile_save_archive_list_input_type::RuntimeProfileSaveArchiveListInput; use super::runtime_profile_save_archive_procedure_result_type::RuntimeProfileSaveArchiveProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct ListProfileSaveArchivesArgs { +struct ListProfileSaveArchivesArgs { pub input: RuntimeProfileSaveArchiveListInput, } - impl __sdk::InModule for ListProfileSaveArchivesArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for ListProfileSaveArchivesArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait list_profile_save_archives { - fn list_profile_save_archives(&self, input: RuntimeProfileSaveArchiveListInput, -) { - self.list_profile_save_archives_then(input, |_, _| {}); + fn list_profile_save_archives(&self, input: RuntimeProfileSaveArchiveListInput) { + self.list_profile_save_archives_then(input, |_, _| {}); } fn list_profile_save_archives_then( &self, input: RuntimeProfileSaveArchiveListInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl list_profile_save_archives for super::RemoteProcedures { &self, input: RuntimeProfileSaveArchiveListInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, RuntimeProfileSaveArchiveProcedureResult>( - "list_profile_save_archives", - ListProfileSaveArchivesArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, RuntimeProfileSaveArchiveProcedureResult>( + "list_profile_save_archives", + ListProfileSaveArchivesArgs { input }, + __callback, + ); } } - 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 4ae618f0..d51f0df2 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 @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_profile_wallet_ledger_list_input_type::RuntimeProfileWalletLedgerListInput; use super::runtime_profile_wallet_ledger_procedure_result_type::RuntimeProfileWalletLedgerProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct ListProfileWalletLedgerArgs { +struct ListProfileWalletLedgerArgs { pub input: RuntimeProfileWalletLedgerListInput, } - impl __sdk::InModule for ListProfileWalletLedgerArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for ListProfileWalletLedgerArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait list_profile_wallet_ledger { - fn list_profile_wallet_ledger(&self, input: RuntimeProfileWalletLedgerListInput, -) { - self.list_profile_wallet_ledger_then(input, |_, _| {}); + fn list_profile_wallet_ledger(&self, input: RuntimeProfileWalletLedgerListInput) { + self.list_profile_wallet_ledger_then(input, |_, _| {}); } fn list_profile_wallet_ledger_then( &self, input: RuntimeProfileWalletLedgerListInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl list_profile_wallet_ledger for super::RemoteProcedures { &self, input: RuntimeProfileWalletLedgerListInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, RuntimeProfileWalletLedgerProcedureResult>( - "list_profile_wallet_ledger", - ListProfileWalletLedgerArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, RuntimeProfileWalletLedgerProcedureResult>( + "list_profile_wallet_ledger", + ListProfileWalletLedgerArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_puzzle_gallery_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_puzzle_gallery_procedure.rs index 329e53a4..e62fd064 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_puzzle_gallery_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_puzzle_gallery_procedure.rs @@ -2,20 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::puzzle_works_procedure_result_type::PuzzleWorksProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct ListPuzzleGalleryArgs { - } - +struct ListPuzzleGalleryArgs {} impl __sdk::InModule for ListPuzzleGalleryArgs { type Module = super::RemoteModule; @@ -26,28 +19,36 @@ impl __sdk::InModule for ListPuzzleGalleryArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait list_puzzle_gallery { - fn list_puzzle_gallery(&self, ) { - self.list_puzzle_gallery_then( |_, _| {}); + fn list_puzzle_gallery(&self) { + self.list_puzzle_gallery_then(|_, _| {}); } fn list_puzzle_gallery_then( &self, - - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } impl list_puzzle_gallery for super::RemoteProcedures { fn list_puzzle_gallery_then( &self, - - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, PuzzleWorksProcedureResult>( - "list_puzzle_gallery", - ListPuzzleGalleryArgs { }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, PuzzleWorksProcedureResult>( + "list_puzzle_gallery", + ListPuzzleGalleryArgs {}, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_puzzle_works_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_puzzle_works_procedure.rs index 980a3698..1da004e9 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_puzzle_works_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_puzzle_works_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::puzzle_works_procedure_result_type::PuzzleWorksProcedureResult; use super::puzzle_works_list_input_type::PuzzleWorksListInput; +use super::puzzle_works_procedure_result_type::PuzzleWorksProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct ListPuzzleWorksArgs { +struct ListPuzzleWorksArgs { pub input: PuzzleWorksListInput, } - impl __sdk::InModule for ListPuzzleWorksArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for ListPuzzleWorksArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait list_puzzle_works { - fn list_puzzle_works(&self, input: PuzzleWorksListInput, -) { - self.list_puzzle_works_then(input, |_, _| {}); + fn list_puzzle_works(&self, input: PuzzleWorksListInput) { + self.list_puzzle_works_then(input, |_, _| {}); } fn list_puzzle_works_then( &self, input: PuzzleWorksListInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl list_puzzle_works for super::RemoteProcedures { &self, input: PuzzleWorksListInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, PuzzleWorksProcedureResult>( - "list_puzzle_works", - ListPuzzleWorksArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, PuzzleWorksProcedureResult>( + "list_puzzle_works", + ListPuzzleWorksArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/mod.rs b/server-rs/crates/spacetime-client/src/module_bindings/mod.rs index 2ab529c8..0fa47a5a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/mod.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/mod.rs @@ -4,19 +4,17 @@ // This was generated using spacetimedb cli version 2.1.0 (commit 6981f48b4bc1a71c8dd9bdfe5a2c343f6370243d). #![allow(unused, clippy::all)] -use spacetimedb_sdk::__codegen::{ - self as __sdk, - __lib, - __sats, - __ws, -}; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -pub mod ai_result_reference_type; +pub mod accept_quest_reducer; +pub mod acknowledge_quest_completion_reducer; +pub mod advance_puzzle_next_level_procedure; pub mod ai_result_reference_input_type; pub mod ai_result_reference_kind_type; pub mod ai_result_reference_snapshot_type; +pub mod ai_result_reference_table; +pub mod ai_result_reference_type; pub mod ai_stage_completion_input_type; -pub mod ai_task_type; pub mod ai_task_cancel_input_type; pub mod ai_task_create_input_type; pub mod ai_task_failure_input_type; @@ -24,47 +22,65 @@ pub mod ai_task_finish_input_type; pub mod ai_task_kind_type; pub mod ai_task_procedure_result_type; pub mod ai_task_snapshot_type; -pub mod ai_task_stage_type; pub mod ai_task_stage_blueprint_type; pub mod ai_task_stage_kind_type; pub mod ai_task_stage_snapshot_type; pub mod ai_task_stage_start_input_type; pub mod ai_task_stage_status_type; +pub mod ai_task_stage_table; +pub mod ai_task_stage_type; pub mod ai_task_start_input_type; pub mod ai_task_status_type; -pub mod ai_text_chunk_type; +pub mod ai_task_table; +pub mod ai_task_type; pub mod ai_text_chunk_append_input_type; pub mod ai_text_chunk_snapshot_type; -pub mod asset_entity_binding_type; +pub mod ai_text_chunk_table; +pub mod ai_text_chunk_type; +pub mod append_ai_text_chunk_and_return_procedure; +pub mod apply_chapter_progression_ledger_entry_and_return_procedure; +pub mod apply_chapter_progression_ledger_entry_reducer; +pub mod apply_inventory_mutation_reducer; +pub mod apply_quest_signal_reducer; pub mod asset_entity_binding_input_type; pub mod asset_entity_binding_procedure_result_type; pub mod asset_entity_binding_snapshot_type; -pub mod asset_object_type; +pub mod asset_entity_binding_table; +pub mod asset_entity_binding_type; pub mod asset_object_access_policy_type; pub mod asset_object_procedure_result_type; +pub mod asset_object_table; +pub mod asset_object_type; pub mod asset_object_upsert_input_type; pub mod asset_object_upsert_snapshot_type; +pub mod attach_ai_result_reference_and_return_procedure; pub mod battle_mode_type; -pub mod battle_state_type; pub mod battle_state_input_type; pub mod battle_state_procedure_result_type; pub mod battle_state_query_input_type; pub mod battle_state_snapshot_type; +pub mod battle_state_table; +pub mod battle_state_type; pub mod battle_status_type; -pub mod big_fish_agent_message_type; +pub mod begin_story_session_and_return_procedure; +pub mod begin_story_session_reducer; pub mod big_fish_agent_message_kind_type; pub mod big_fish_agent_message_role_type; pub mod big_fish_agent_message_snapshot_type; +pub mod big_fish_agent_message_table; +pub mod big_fish_agent_message_type; pub mod big_fish_anchor_item_type; pub mod big_fish_anchor_pack_type; pub mod big_fish_anchor_status_type; pub mod big_fish_asset_coverage_type; pub mod big_fish_asset_generate_input_type; pub mod big_fish_asset_kind_type; -pub mod big_fish_asset_slot_type; pub mod big_fish_asset_slot_snapshot_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_background_blueprint_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_draft_compile_input_type; @@ -79,6 +95,7 @@ pub mod big_fish_run_start_input_type; pub mod big_fish_run_status_type; pub mod big_fish_runtime_entity_type; pub mod big_fish_runtime_params_type; +pub mod big_fish_runtime_run_table; pub mod big_fish_runtime_run_type; pub mod big_fish_runtime_snapshot_type; pub mod big_fish_session_create_input_type; @@ -86,47 +103,75 @@ pub mod big_fish_session_get_input_type; pub mod big_fish_session_procedure_result_type; pub mod big_fish_session_snapshot_type; pub mod big_fish_vector_2_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 chapter_pace_band_type; -pub mod chapter_progression_type; pub mod chapter_progression_get_input_type; pub mod chapter_progression_input_type; pub mod chapter_progression_ledger_input_type; pub mod chapter_progression_procedure_result_type; pub mod chapter_progression_snapshot_type; +pub mod chapter_progression_table; +pub mod chapter_progression_type; +pub mod clear_platform_browse_history_and_return_procedure; pub mod combat_outcome_type; +pub mod compile_big_fish_draft_procedure; +pub mod compile_custom_world_published_profile_procedure; +pub mod compile_puzzle_agent_draft_procedure; +pub mod complete_ai_stage_and_return_procedure; +pub mod complete_ai_task_and_return_procedure; +pub mod confirm_asset_object_and_return_procedure; +pub mod confirm_asset_object_reducer; pub mod consume_inventory_item_input_type; +pub mod continue_story_and_return_procedure; +pub mod continue_story_reducer; +pub mod create_ai_task_and_return_procedure; +pub mod create_ai_task_reducer; +pub mod create_battle_state_and_return_procedure; +pub mod create_battle_state_reducer; +pub mod create_big_fish_session_procedure; +pub mod create_custom_world_agent_session_procedure; +pub mod create_puzzle_agent_session_procedure; pub mod custom_world_agent_action_execute_input_type; pub mod custom_world_agent_action_execute_result_type; pub mod custom_world_agent_card_detail_get_input_type; -pub mod custom_world_agent_message_type; pub mod custom_world_agent_message_snapshot_type; pub mod custom_world_agent_message_submit_input_type; -pub mod custom_world_agent_operation_type; +pub mod custom_world_agent_message_table; +pub mod custom_world_agent_message_type; pub mod custom_world_agent_operation_get_input_type; pub mod custom_world_agent_operation_procedure_result_type; pub mod custom_world_agent_operation_snapshot_type; -pub mod custom_world_agent_session_type; +pub mod custom_world_agent_operation_table; +pub mod custom_world_agent_operation_type; pub mod custom_world_agent_session_create_input_type; pub mod custom_world_agent_session_get_input_type; pub mod custom_world_agent_session_procedure_result_type; pub mod custom_world_agent_session_snapshot_type; -pub mod custom_world_draft_card_type; +pub mod custom_world_agent_session_table; +pub mod custom_world_agent_session_type; pub mod custom_world_draft_card_detail_result_type; pub mod custom_world_draft_card_detail_section_snapshot_type; pub mod custom_world_draft_card_detail_snapshot_type; pub mod custom_world_draft_card_snapshot_type; +pub mod custom_world_draft_card_table; +pub mod custom_world_draft_card_type; pub mod custom_world_gallery_detail_input_type; -pub mod custom_world_gallery_entry_type; pub mod custom_world_gallery_entry_snapshot_type; +pub mod custom_world_gallery_entry_table; +pub mod custom_world_gallery_entry_type; pub mod custom_world_gallery_list_result_type; pub mod custom_world_generation_mode_type; pub mod custom_world_library_detail_input_type; pub mod custom_world_library_mutation_result_type; -pub mod custom_world_profile_type; +pub mod custom_world_profile_delete_input_type; pub mod custom_world_profile_list_input_type; pub mod custom_world_profile_list_result_type; pub mod custom_world_profile_publish_input_type; pub mod custom_world_profile_snapshot_type; +pub mod custom_world_profile_table; +pub mod custom_world_profile_type; pub mod custom_world_profile_unpublish_input_type; pub mod custom_world_profile_upsert_input_type; pub mod custom_world_publication_status_type; @@ -136,23 +181,61 @@ pub mod custom_world_published_profile_compile_input_type; pub mod custom_world_published_profile_compile_result_type; pub mod custom_world_published_profile_compile_snapshot_type; pub mod custom_world_role_asset_status_type; -pub mod custom_world_session_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 custom_world_work_summary_snapshot_type; pub mod custom_world_works_list_input_type; pub mod custom_world_works_list_result_type; +pub mod delete_custom_world_profile_and_return_procedure; +pub mod delete_runtime_snapshot_and_return_procedure; +pub mod drag_puzzle_piece_or_group_procedure; pub mod equip_inventory_item_input_type; +pub mod execute_custom_world_agent_action_procedure; +pub mod fail_ai_task_and_return_procedure; +pub mod generate_big_fish_asset_procedure; +pub mod get_battle_state_procedure; +pub mod get_big_fish_run_procedure; +pub mod get_big_fish_session_procedure; +pub mod get_chapter_progression_procedure; +pub mod get_custom_world_agent_card_detail_procedure; +pub mod get_custom_world_agent_operation_procedure; +pub mod get_custom_world_agent_session_procedure; +pub mod get_custom_world_gallery_detail_procedure; +pub mod get_custom_world_library_detail_procedure; +pub mod get_player_progression_or_default_procedure; +pub mod get_profile_dashboard_procedure; +pub mod get_profile_play_stats_procedure; +pub mod get_puzzle_agent_session_procedure; +pub mod get_puzzle_gallery_detail_procedure; +pub mod get_puzzle_run_procedure; +pub mod get_puzzle_work_detail_procedure; +pub mod get_runtime_inventory_state_procedure; +pub mod get_runtime_setting_or_default_procedure; +pub mod get_runtime_snapshot_procedure; +pub mod get_story_session_state_procedure; pub mod grant_inventory_item_input_type; +pub mod grant_player_progression_experience_and_return_procedure; +pub mod grant_player_progression_experience_reducer; pub mod inventory_container_kind_type; pub mod inventory_equipment_slot_type; pub mod inventory_item_rarity_type; pub mod inventory_item_snapshot_type; pub mod inventory_item_source_kind_type; -pub mod inventory_mutation_type; pub mod inventory_mutation_input_type; -pub mod inventory_slot_type; +pub mod inventory_mutation_type; pub mod inventory_slot_snapshot_type; +pub mod inventory_slot_table; +pub mod inventory_slot_type; +pub mod list_custom_world_gallery_entries_procedure; +pub mod list_custom_world_profiles_procedure; +pub mod list_custom_world_works_procedure; +pub mod list_platform_browse_history_procedure; +pub mod list_profile_save_archives_procedure; +pub mod list_profile_wallet_ledger_procedure; +pub mod list_puzzle_gallery_procedure; +pub mod list_puzzle_works_procedure; pub mod npc_battle_interaction_procedure_result_type; pub mod npc_battle_interaction_result_type; pub mod npc_interaction_battle_mode_type; @@ -163,28 +246,41 @@ pub mod npc_relation_stance_type; pub mod npc_relation_state_type; pub mod npc_social_action_kind_type; pub mod npc_stance_profile_type; -pub mod npc_state_type; pub mod npc_state_procedure_result_type; pub mod npc_state_snapshot_type; +pub mod npc_state_table; +pub mod npc_state_type; pub mod npc_state_upsert_input_type; -pub mod player_progression_type; pub mod player_progression_get_input_type; pub mod player_progression_grant_input_type; pub mod player_progression_grant_source_type; pub mod player_progression_procedure_result_type; pub mod player_progression_snapshot_type; +pub mod player_progression_table; +pub mod player_progression_type; +pub mod profile_dashboard_state_table; pub mod profile_dashboard_state_type; +pub mod profile_played_world_table; pub mod profile_played_world_type; +pub mod profile_save_archive_table; pub mod profile_save_archive_type; +pub mod profile_wallet_ledger_table; pub mod profile_wallet_ledger_type; +pub mod publish_big_fish_game_procedure; +pub mod publish_custom_world_profile_and_return_procedure; +pub mod publish_custom_world_profile_reducer; +pub mod publish_custom_world_world_procedure; +pub mod publish_puzzle_work_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_submit_input_type; +pub mod puzzle_agent_message_table; pub mod puzzle_agent_session_create_input_type; pub mod puzzle_agent_session_get_input_type; pub mod puzzle_agent_session_procedure_result_type; pub mod puzzle_agent_session_row_type; +pub mod puzzle_agent_session_table; pub mod puzzle_agent_stage_type; pub mod puzzle_draft_compile_input_type; pub mod puzzle_generated_images_save_input_type; @@ -197,18 +293,21 @@ pub mod puzzle_run_procedure_result_type; pub mod puzzle_run_start_input_type; pub mod puzzle_run_swap_input_type; pub mod puzzle_runtime_run_row_type; +pub mod puzzle_runtime_run_table; pub mod puzzle_select_cover_image_input_type; pub mod puzzle_work_get_input_type; pub mod puzzle_work_procedure_result_type; pub mod puzzle_work_profile_row_type; +pub mod puzzle_work_profile_table; pub mod puzzle_work_upsert_input_type; pub mod puzzle_works_list_input_type; pub mod puzzle_works_procedure_result_type; pub mod quest_completion_ack_input_type; pub mod quest_hostile_npc_defeated_signal_type; pub mod quest_item_delivered_signal_type; -pub mod quest_log_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; @@ -217,12 +316,13 @@ 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_type; pub mod quest_record_input_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_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_apply_input_type; @@ -231,12 +331,22 @@ pub mod quest_status_type; pub mod quest_step_snapshot_type; pub mod quest_treasure_inspected_signal_type; pub mod quest_turn_in_input_type; +pub mod resolve_combat_action_and_return_procedure; pub mod resolve_combat_action_input_type; pub mod resolve_combat_action_procedure_result_type; +pub mod resolve_combat_action_reducer; pub mod resolve_combat_action_result_type; +pub mod resolve_npc_battle_interaction_and_return_procedure; pub mod resolve_npc_battle_interaction_input_type; +pub mod resolve_npc_interaction_and_return_procedure; pub mod resolve_npc_interaction_input_type; +pub mod resolve_npc_interaction_reducer; +pub mod resolve_npc_social_action_and_return_procedure; pub mod resolve_npc_social_action_input_type; +pub mod resolve_npc_social_action_reducer; +pub mod resolve_treasure_interaction_and_return_procedure; +pub mod resolve_treasure_interaction_reducer; +pub mod resume_profile_save_archive_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; @@ -273,185 +383,75 @@ pub mod runtime_profile_wallet_ledger_entry_snapshot_type; pub mod runtime_profile_wallet_ledger_list_input_type; pub mod runtime_profile_wallet_ledger_procedure_result_type; pub mod runtime_profile_wallet_ledger_source_type_type; -pub mod runtime_setting_type; pub mod runtime_setting_get_input_type; pub mod runtime_setting_procedure_result_type; pub mod runtime_setting_snapshot_type; +pub mod runtime_setting_table; +pub mod runtime_setting_type; pub mod runtime_setting_upsert_input_type; -pub mod runtime_snapshot_type; pub mod runtime_snapshot_delete_input_type; pub mod runtime_snapshot_get_input_type; pub mod runtime_snapshot_procedure_result_type; pub mod runtime_snapshot_row_type; +pub mod runtime_snapshot_table; +pub mod runtime_snapshot_type; pub mod runtime_snapshot_upsert_input_type; +pub mod save_puzzle_generated_images_procedure; +pub mod select_puzzle_cover_image_procedure; +pub mod start_ai_task_reducer; +pub mod start_ai_task_stage_reducer; +pub mod start_big_fish_run_procedure; +pub mod start_puzzle_run_procedure; pub mod story_continue_input_type; -pub mod story_event_type; pub mod story_event_kind_type; pub mod story_event_snapshot_type; -pub mod story_session_type; +pub mod story_event_table; +pub mod story_event_type; pub mod story_session_input_type; pub mod story_session_procedure_result_type; pub mod story_session_snapshot_type; pub mod story_session_state_input_type; pub mod story_session_state_procedure_result_type; pub mod story_session_status_type; -pub mod treasure_interaction_action_type; -pub mod treasure_record_type; -pub mod treasure_record_procedure_result_type; -pub mod treasure_record_snapshot_type; -pub mod treasure_resolve_input_type; -pub mod unequip_inventory_item_input_type; -pub mod user_browse_history_type; -pub mod accept_quest_reducer; -pub mod acknowledge_quest_completion_reducer; -pub mod apply_chapter_progression_ledger_entry_reducer; -pub mod apply_inventory_mutation_reducer; -pub mod apply_quest_signal_reducer; -pub mod begin_story_session_reducer; -pub mod bind_asset_object_to_entity_reducer; -pub mod confirm_asset_object_reducer; -pub mod continue_story_reducer; -pub mod create_ai_task_reducer; -pub mod create_battle_state_reducer; -pub mod grant_player_progression_experience_reducer; -pub mod publish_custom_world_profile_reducer; -pub mod resolve_combat_action_reducer; -pub mod resolve_npc_interaction_reducer; -pub mod resolve_npc_social_action_reducer; -pub mod resolve_treasure_interaction_reducer; -pub mod start_ai_task_reducer; -pub mod start_ai_task_stage_reducer; -pub mod turn_in_quest_reducer; -pub mod unpublish_custom_world_profile_reducer; -pub mod upsert_chapter_progression_reducer; -pub mod upsert_custom_world_profile_reducer; -pub mod upsert_npc_state_reducer; -pub mod ai_result_reference_table; -pub mod ai_task_table; -pub mod ai_task_stage_table; -pub mod ai_text_chunk_table; -pub mod asset_entity_binding_table; -pub mod asset_object_table; -pub mod battle_state_table; -pub mod big_fish_agent_message_table; -pub mod big_fish_asset_slot_table; -pub mod big_fish_creation_session_table; -pub mod big_fish_runtime_run_table; -pub mod chapter_progression_table; -pub mod custom_world_agent_message_table; -pub mod custom_world_agent_operation_table; -pub mod custom_world_agent_session_table; -pub mod custom_world_draft_card_table; -pub mod custom_world_gallery_entry_table; -pub mod custom_world_profile_table; -pub mod custom_world_session_table; -pub mod inventory_slot_table; -pub mod npc_state_table; -pub mod player_progression_table; -pub mod profile_dashboard_state_table; -pub mod profile_played_world_table; -pub mod profile_save_archive_table; -pub mod profile_wallet_ledger_table; -pub mod puzzle_agent_message_table; -pub mod puzzle_agent_session_table; -pub mod puzzle_runtime_run_table; -pub mod puzzle_work_profile_table; -pub mod quest_log_table; -pub mod quest_record_table; -pub mod runtime_setting_table; -pub mod runtime_snapshot_table; -pub mod story_event_table; pub mod story_session_table; -pub mod treasure_record_table; -pub mod user_browse_history_table; -pub mod advance_puzzle_next_level_procedure; -pub mod append_ai_text_chunk_and_return_procedure; -pub mod apply_chapter_progression_ledger_entry_and_return_procedure; -pub mod attach_ai_result_reference_and_return_procedure; -pub mod begin_story_session_and_return_procedure; -pub mod bind_asset_object_to_entity_and_return_procedure; -pub mod cancel_ai_task_and_return_procedure; -pub mod clear_platform_browse_history_and_return_procedure; -pub mod compile_big_fish_draft_procedure; -pub mod compile_custom_world_published_profile_procedure; -pub mod compile_puzzle_agent_draft_procedure; -pub mod complete_ai_stage_and_return_procedure; -pub mod complete_ai_task_and_return_procedure; -pub mod confirm_asset_object_and_return_procedure; -pub mod continue_story_and_return_procedure; -pub mod create_ai_task_and_return_procedure; -pub mod create_battle_state_and_return_procedure; -pub mod create_big_fish_session_procedure; -pub mod create_custom_world_agent_session_procedure; -pub mod create_puzzle_agent_session_procedure; -pub mod delete_runtime_snapshot_and_return_procedure; -pub mod drag_puzzle_piece_or_group_procedure; -pub mod execute_custom_world_agent_action_procedure; -pub mod fail_ai_task_and_return_procedure; -pub mod generate_big_fish_asset_procedure; -pub mod get_battle_state_procedure; -pub mod get_big_fish_run_procedure; -pub mod get_big_fish_session_procedure; -pub mod get_chapter_progression_procedure; -pub mod get_custom_world_agent_card_detail_procedure; -pub mod get_custom_world_agent_operation_procedure; -pub mod get_custom_world_agent_session_procedure; -pub mod get_custom_world_gallery_detail_procedure; -pub mod get_custom_world_library_detail_procedure; -pub mod get_player_progression_or_default_procedure; -pub mod get_profile_dashboard_procedure; -pub mod get_profile_play_stats_procedure; -pub mod get_puzzle_agent_session_procedure; -pub mod get_puzzle_gallery_detail_procedure; -pub mod get_puzzle_run_procedure; -pub mod get_puzzle_work_detail_procedure; -pub mod get_runtime_inventory_state_procedure; -pub mod get_runtime_setting_or_default_procedure; -pub mod get_runtime_snapshot_procedure; -pub mod get_story_session_state_procedure; -pub mod grant_player_progression_experience_and_return_procedure; -pub mod list_custom_world_gallery_entries_procedure; -pub mod list_custom_world_profiles_procedure; -pub mod list_custom_world_works_procedure; -pub mod list_platform_browse_history_procedure; -pub mod list_profile_save_archives_procedure; -pub mod list_profile_wallet_ledger_procedure; -pub mod list_puzzle_gallery_procedure; -pub mod list_puzzle_works_procedure; -pub mod publish_big_fish_game_procedure; -pub mod publish_custom_world_profile_and_return_procedure; -pub mod publish_custom_world_world_procedure; -pub mod publish_puzzle_work_procedure; -pub mod resolve_combat_action_and_return_procedure; -pub mod resolve_npc_battle_interaction_and_return_procedure; -pub mod resolve_npc_interaction_and_return_procedure; -pub mod resolve_npc_social_action_and_return_procedure; -pub mod resolve_treasure_interaction_and_return_procedure; -pub mod resume_profile_save_archive_and_return_procedure; -pub mod save_puzzle_generated_images_procedure; -pub mod select_puzzle_cover_image_procedure; -pub mod start_big_fish_run_procedure; -pub mod start_puzzle_run_procedure; +pub mod story_session_type; pub mod submit_big_fish_input_procedure; pub mod submit_big_fish_message_procedure; pub mod submit_custom_world_agent_message_procedure; pub mod submit_puzzle_agent_message_procedure; pub mod swap_puzzle_pieces_procedure; +pub mod treasure_interaction_action_type; +pub mod treasure_record_procedure_result_type; +pub mod treasure_record_snapshot_type; +pub mod treasure_record_table; +pub mod treasure_record_type; +pub mod treasure_resolve_input_type; +pub mod turn_in_quest_reducer; +pub mod unequip_inventory_item_input_type; pub mod unpublish_custom_world_profile_and_return_procedure; +pub mod unpublish_custom_world_profile_reducer; pub mod update_puzzle_work_procedure; pub mod upsert_chapter_progression_and_return_procedure; +pub mod upsert_chapter_progression_reducer; pub mod upsert_custom_world_profile_and_return_procedure; +pub mod upsert_custom_world_profile_reducer; pub mod upsert_npc_state_and_return_procedure; +pub mod upsert_npc_state_reducer; pub mod upsert_platform_browse_history_and_return_procedure; pub mod upsert_runtime_setting_and_return_procedure; pub mod upsert_runtime_snapshot_and_return_procedure; +pub mod user_browse_history_table; +pub mod user_browse_history_type; -pub use ai_result_reference_type::AiResultReference; +pub use accept_quest_reducer::accept_quest; +pub use acknowledge_quest_completion_reducer::acknowledge_quest_completion; +pub use advance_puzzle_next_level_procedure::advance_puzzle_next_level; pub use ai_result_reference_input_type::AiResultReferenceInput; pub use ai_result_reference_kind_type::AiResultReferenceKind; pub use ai_result_reference_snapshot_type::AiResultReferenceSnapshot; +pub use ai_result_reference_table::*; +pub use ai_result_reference_type::AiResultReference; pub use ai_stage_completion_input_type::AiStageCompletionInput; -pub use ai_task_type::AiTask; pub use ai_task_cancel_input_type::AiTaskCancelInput; pub use ai_task_create_input_type::AiTaskCreateInput; pub use ai_task_failure_input_type::AiTaskFailureInput; @@ -459,47 +459,65 @@ pub use ai_task_finish_input_type::AiTaskFinishInput; pub use ai_task_kind_type::AiTaskKind; pub use ai_task_procedure_result_type::AiTaskProcedureResult; pub use ai_task_snapshot_type::AiTaskSnapshot; -pub use ai_task_stage_type::AiTaskStage; pub use ai_task_stage_blueprint_type::AiTaskStageBlueprint; pub use ai_task_stage_kind_type::AiTaskStageKind; pub use ai_task_stage_snapshot_type::AiTaskStageSnapshot; pub use ai_task_stage_start_input_type::AiTaskStageStartInput; pub use ai_task_stage_status_type::AiTaskStageStatus; +pub use ai_task_stage_table::*; +pub use ai_task_stage_type::AiTaskStage; pub use ai_task_start_input_type::AiTaskStartInput; pub use ai_task_status_type::AiTaskStatus; -pub use ai_text_chunk_type::AiTextChunk; +pub use ai_task_table::*; +pub use ai_task_type::AiTask; pub use ai_text_chunk_append_input_type::AiTextChunkAppendInput; pub use ai_text_chunk_snapshot_type::AiTextChunkSnapshot; -pub use asset_entity_binding_type::AssetEntityBinding; +pub use ai_text_chunk_table::*; +pub use ai_text_chunk_type::AiTextChunk; +pub use append_ai_text_chunk_and_return_procedure::append_ai_text_chunk_and_return; +pub use apply_chapter_progression_ledger_entry_and_return_procedure::apply_chapter_progression_ledger_entry_and_return; +pub use apply_chapter_progression_ledger_entry_reducer::apply_chapter_progression_ledger_entry; +pub use apply_inventory_mutation_reducer::apply_inventory_mutation; +pub use apply_quest_signal_reducer::apply_quest_signal; pub use asset_entity_binding_input_type::AssetEntityBindingInput; pub use asset_entity_binding_procedure_result_type::AssetEntityBindingProcedureResult; pub use asset_entity_binding_snapshot_type::AssetEntityBindingSnapshot; -pub use asset_object_type::AssetObject; +pub use asset_entity_binding_table::*; +pub use asset_entity_binding_type::AssetEntityBinding; pub use asset_object_access_policy_type::AssetObjectAccessPolicy; pub use asset_object_procedure_result_type::AssetObjectProcedureResult; +pub use asset_object_table::*; +pub use asset_object_type::AssetObject; pub use asset_object_upsert_input_type::AssetObjectUpsertInput; pub use asset_object_upsert_snapshot_type::AssetObjectUpsertSnapshot; +pub use attach_ai_result_reference_and_return_procedure::attach_ai_result_reference_and_return; pub use battle_mode_type::BattleMode; -pub use battle_state_type::BattleState; pub use battle_state_input_type::BattleStateInput; pub use battle_state_procedure_result_type::BattleStateProcedureResult; pub use battle_state_query_input_type::BattleStateQueryInput; pub use battle_state_snapshot_type::BattleStateSnapshot; +pub use battle_state_table::*; +pub use battle_state_type::BattleState; pub use battle_status_type::BattleStatus; -pub use big_fish_agent_message_type::BigFishAgentMessage; +pub use begin_story_session_and_return_procedure::begin_story_session_and_return; +pub use begin_story_session_reducer::begin_story_session; pub use big_fish_agent_message_kind_type::BigFishAgentMessageKind; pub use big_fish_agent_message_role_type::BigFishAgentMessageRole; pub use big_fish_agent_message_snapshot_type::BigFishAgentMessageSnapshot; +pub use big_fish_agent_message_table::*; +pub use big_fish_agent_message_type::BigFishAgentMessage; pub use big_fish_anchor_item_type::BigFishAnchorItem; pub use big_fish_anchor_pack_type::BigFishAnchorPack; pub use big_fish_anchor_status_type::BigFishAnchorStatus; pub use big_fish_asset_coverage_type::BigFishAssetCoverage; pub use big_fish_asset_generate_input_type::BigFishAssetGenerateInput; pub use big_fish_asset_kind_type::BigFishAssetKind; -pub use big_fish_asset_slot_type::BigFishAssetSlot; pub use big_fish_asset_slot_snapshot_type::BigFishAssetSlotSnapshot; +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_background_blueprint_type::BigFishBackgroundBlueprint; +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_draft_compile_input_type::BigFishDraftCompileInput; @@ -514,6 +532,7 @@ pub use big_fish_run_start_input_type::BigFishRunStartInput; pub use big_fish_run_status_type::BigFishRunStatus; pub use big_fish_runtime_entity_type::BigFishRuntimeEntity; pub use big_fish_runtime_params_type::BigFishRuntimeParams; +pub use big_fish_runtime_run_table::*; pub use big_fish_runtime_run_type::BigFishRuntimeRun; pub use big_fish_runtime_snapshot_type::BigFishRuntimeSnapshot; pub use big_fish_session_create_input_type::BigFishSessionCreateInput; @@ -521,47 +540,75 @@ pub use big_fish_session_get_input_type::BigFishSessionGetInput; pub use big_fish_session_procedure_result_type::BigFishSessionProcedureResult; pub use big_fish_session_snapshot_type::BigFishSessionSnapshot; pub use big_fish_vector_2_type::BigFishVector2; +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 chapter_pace_band_type::ChapterPaceBand; -pub use chapter_progression_type::ChapterProgression; pub use chapter_progression_get_input_type::ChapterProgressionGetInput; pub use chapter_progression_input_type::ChapterProgressionInput; pub use chapter_progression_ledger_input_type::ChapterProgressionLedgerInput; pub use chapter_progression_procedure_result_type::ChapterProgressionProcedureResult; pub use chapter_progression_snapshot_type::ChapterProgressionSnapshot; +pub use chapter_progression_table::*; +pub use chapter_progression_type::ChapterProgression; +pub use clear_platform_browse_history_and_return_procedure::clear_platform_browse_history_and_return; pub use combat_outcome_type::CombatOutcome; +pub use compile_big_fish_draft_procedure::compile_big_fish_draft; +pub use compile_custom_world_published_profile_procedure::compile_custom_world_published_profile; +pub use compile_puzzle_agent_draft_procedure::compile_puzzle_agent_draft; +pub use complete_ai_stage_and_return_procedure::complete_ai_stage_and_return; +pub use complete_ai_task_and_return_procedure::complete_ai_task_and_return; +pub use confirm_asset_object_and_return_procedure::confirm_asset_object_and_return; +pub use confirm_asset_object_reducer::confirm_asset_object; pub use consume_inventory_item_input_type::ConsumeInventoryItemInput; +pub use continue_story_and_return_procedure::continue_story_and_return; +pub use continue_story_reducer::continue_story; +pub use create_ai_task_and_return_procedure::create_ai_task_and_return; +pub use create_ai_task_reducer::create_ai_task; +pub use create_battle_state_and_return_procedure::create_battle_state_and_return; +pub use create_battle_state_reducer::create_battle_state; +pub use create_big_fish_session_procedure::create_big_fish_session; +pub use create_custom_world_agent_session_procedure::create_custom_world_agent_session; +pub use create_puzzle_agent_session_procedure::create_puzzle_agent_session; pub use custom_world_agent_action_execute_input_type::CustomWorldAgentActionExecuteInput; pub use custom_world_agent_action_execute_result_type::CustomWorldAgentActionExecuteResult; pub use custom_world_agent_card_detail_get_input_type::CustomWorldAgentCardDetailGetInput; -pub use custom_world_agent_message_type::CustomWorldAgentMessage; pub use custom_world_agent_message_snapshot_type::CustomWorldAgentMessageSnapshot; pub use custom_world_agent_message_submit_input_type::CustomWorldAgentMessageSubmitInput; -pub use custom_world_agent_operation_type::CustomWorldAgentOperation; +pub use custom_world_agent_message_table::*; +pub use custom_world_agent_message_type::CustomWorldAgentMessage; pub use custom_world_agent_operation_get_input_type::CustomWorldAgentOperationGetInput; pub use custom_world_agent_operation_procedure_result_type::CustomWorldAgentOperationProcedureResult; pub use custom_world_agent_operation_snapshot_type::CustomWorldAgentOperationSnapshot; -pub use custom_world_agent_session_type::CustomWorldAgentSession; +pub use custom_world_agent_operation_table::*; +pub use custom_world_agent_operation_type::CustomWorldAgentOperation; pub use custom_world_agent_session_create_input_type::CustomWorldAgentSessionCreateInput; pub use custom_world_agent_session_get_input_type::CustomWorldAgentSessionGetInput; pub use custom_world_agent_session_procedure_result_type::CustomWorldAgentSessionProcedureResult; pub use custom_world_agent_session_snapshot_type::CustomWorldAgentSessionSnapshot; -pub use custom_world_draft_card_type::CustomWorldDraftCard; +pub use custom_world_agent_session_table::*; +pub use custom_world_agent_session_type::CustomWorldAgentSession; pub use custom_world_draft_card_detail_result_type::CustomWorldDraftCardDetailResult; pub use custom_world_draft_card_detail_section_snapshot_type::CustomWorldDraftCardDetailSectionSnapshot; pub use custom_world_draft_card_detail_snapshot_type::CustomWorldDraftCardDetailSnapshot; pub use custom_world_draft_card_snapshot_type::CustomWorldDraftCardSnapshot; +pub use custom_world_draft_card_table::*; +pub use custom_world_draft_card_type::CustomWorldDraftCard; pub use custom_world_gallery_detail_input_type::CustomWorldGalleryDetailInput; -pub use custom_world_gallery_entry_type::CustomWorldGalleryEntry; pub use custom_world_gallery_entry_snapshot_type::CustomWorldGalleryEntrySnapshot; +pub use custom_world_gallery_entry_table::*; +pub use custom_world_gallery_entry_type::CustomWorldGalleryEntry; pub use custom_world_gallery_list_result_type::CustomWorldGalleryListResult; pub use custom_world_generation_mode_type::CustomWorldGenerationMode; pub use custom_world_library_detail_input_type::CustomWorldLibraryDetailInput; pub use custom_world_library_mutation_result_type::CustomWorldLibraryMutationResult; -pub use custom_world_profile_type::CustomWorldProfile; +pub use custom_world_profile_delete_input_type::CustomWorldProfileDeleteInput; pub use custom_world_profile_list_input_type::CustomWorldProfileListInput; pub use custom_world_profile_list_result_type::CustomWorldProfileListResult; pub use custom_world_profile_publish_input_type::CustomWorldProfilePublishInput; pub use custom_world_profile_snapshot_type::CustomWorldProfileSnapshot; +pub use custom_world_profile_table::*; +pub use custom_world_profile_type::CustomWorldProfile; pub use custom_world_profile_unpublish_input_type::CustomWorldProfileUnpublishInput; pub use custom_world_profile_upsert_input_type::CustomWorldProfileUpsertInput; pub use custom_world_publication_status_type::CustomWorldPublicationStatus; @@ -571,23 +618,61 @@ pub use custom_world_published_profile_compile_input_type::CustomWorldPublishedP pub use custom_world_published_profile_compile_result_type::CustomWorldPublishedProfileCompileResult; pub use custom_world_published_profile_compile_snapshot_type::CustomWorldPublishedProfileCompileSnapshot; pub use custom_world_role_asset_status_type::CustomWorldRoleAssetStatus; -pub use custom_world_session_type::CustomWorldSession; 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 custom_world_work_summary_snapshot_type::CustomWorldWorkSummarySnapshot; pub use custom_world_works_list_input_type::CustomWorldWorksListInput; pub use custom_world_works_list_result_type::CustomWorldWorksListResult; +pub use delete_custom_world_profile_and_return_procedure::delete_custom_world_profile_and_return; +pub use delete_runtime_snapshot_and_return_procedure::delete_runtime_snapshot_and_return; +pub use drag_puzzle_piece_or_group_procedure::drag_puzzle_piece_or_group; pub use equip_inventory_item_input_type::EquipInventoryItemInput; +pub use execute_custom_world_agent_action_procedure::execute_custom_world_agent_action; +pub use fail_ai_task_and_return_procedure::fail_ai_task_and_return; +pub use generate_big_fish_asset_procedure::generate_big_fish_asset; +pub use get_battle_state_procedure::get_battle_state; +pub use get_big_fish_run_procedure::get_big_fish_run; +pub use get_big_fish_session_procedure::get_big_fish_session; +pub use get_chapter_progression_procedure::get_chapter_progression; +pub use get_custom_world_agent_card_detail_procedure::get_custom_world_agent_card_detail; +pub use get_custom_world_agent_operation_procedure::get_custom_world_agent_operation; +pub use get_custom_world_agent_session_procedure::get_custom_world_agent_session; +pub use get_custom_world_gallery_detail_procedure::get_custom_world_gallery_detail; +pub use get_custom_world_library_detail_procedure::get_custom_world_library_detail; +pub use get_player_progression_or_default_procedure::get_player_progression_or_default; +pub use get_profile_dashboard_procedure::get_profile_dashboard; +pub use get_profile_play_stats_procedure::get_profile_play_stats; +pub use get_puzzle_agent_session_procedure::get_puzzle_agent_session; +pub use get_puzzle_gallery_detail_procedure::get_puzzle_gallery_detail; +pub use get_puzzle_run_procedure::get_puzzle_run; +pub use get_puzzle_work_detail_procedure::get_puzzle_work_detail; +pub use get_runtime_inventory_state_procedure::get_runtime_inventory_state; +pub use get_runtime_setting_or_default_procedure::get_runtime_setting_or_default; +pub use get_runtime_snapshot_procedure::get_runtime_snapshot; +pub use get_story_session_state_procedure::get_story_session_state; pub use grant_inventory_item_input_type::GrantInventoryItemInput; +pub use grant_player_progression_experience_and_return_procedure::grant_player_progression_experience_and_return; +pub use grant_player_progression_experience_reducer::grant_player_progression_experience; 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_snapshot_type::InventoryItemSnapshot; pub use inventory_item_source_kind_type::InventoryItemSourceKind; -pub use inventory_mutation_type::InventoryMutation; pub use inventory_mutation_input_type::InventoryMutationInput; -pub use inventory_slot_type::InventorySlot; +pub use inventory_mutation_type::InventoryMutation; pub use inventory_slot_snapshot_type::InventorySlotSnapshot; +pub use inventory_slot_table::*; +pub use inventory_slot_type::InventorySlot; +pub use list_custom_world_gallery_entries_procedure::list_custom_world_gallery_entries; +pub use list_custom_world_profiles_procedure::list_custom_world_profiles; +pub use list_custom_world_works_procedure::list_custom_world_works; +pub use list_platform_browse_history_procedure::list_platform_browse_history; +pub use list_profile_save_archives_procedure::list_profile_save_archives; +pub use list_profile_wallet_ledger_procedure::list_profile_wallet_ledger; +pub use list_puzzle_gallery_procedure::list_puzzle_gallery; +pub use list_puzzle_works_procedure::list_puzzle_works; pub use npc_battle_interaction_procedure_result_type::NpcBattleInteractionProcedureResult; pub use npc_battle_interaction_result_type::NpcBattleInteractionResult; pub use npc_interaction_battle_mode_type::NpcInteractionBattleMode; @@ -598,28 +683,41 @@ pub use npc_relation_stance_type::NpcRelationStance; pub use npc_relation_state_type::NpcRelationState; pub use npc_social_action_kind_type::NpcSocialActionKind; pub use npc_stance_profile_type::NpcStanceProfile; -pub use npc_state_type::NpcState; pub use npc_state_procedure_result_type::NpcStateProcedureResult; pub use npc_state_snapshot_type::NpcStateSnapshot; +pub use npc_state_table::*; +pub use npc_state_type::NpcState; pub use npc_state_upsert_input_type::NpcStateUpsertInput; -pub use player_progression_type::PlayerProgression; pub use player_progression_get_input_type::PlayerProgressionGetInput; pub use player_progression_grant_input_type::PlayerProgressionGrantInput; pub use player_progression_grant_source_type::PlayerProgressionGrantSource; pub use player_progression_procedure_result_type::PlayerProgressionProcedureResult; pub use player_progression_snapshot_type::PlayerProgressionSnapshot; +pub use player_progression_table::*; +pub use player_progression_type::PlayerProgression; +pub use profile_dashboard_state_table::*; pub use profile_dashboard_state_type::ProfileDashboardState; +pub use profile_played_world_table::*; pub use profile_played_world_type::ProfilePlayedWorld; +pub use profile_save_archive_table::*; pub use profile_save_archive_type::ProfileSaveArchive; +pub use profile_wallet_ledger_table::*; pub use profile_wallet_ledger_type::ProfileWalletLedger; +pub use publish_big_fish_game_procedure::publish_big_fish_game; +pub use publish_custom_world_profile_and_return_procedure::publish_custom_world_profile_and_return; +pub use publish_custom_world_profile_reducer::publish_custom_world_profile; +pub use publish_custom_world_world_procedure::publish_custom_world_world; +pub use publish_puzzle_work_procedure::publish_puzzle_work; 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_submit_input_type::PuzzleAgentMessageSubmitInput; +pub use puzzle_agent_message_table::*; pub use puzzle_agent_session_create_input_type::PuzzleAgentSessionCreateInput; pub use puzzle_agent_session_get_input_type::PuzzleAgentSessionGetInput; pub use puzzle_agent_session_procedure_result_type::PuzzleAgentSessionProcedureResult; pub use puzzle_agent_session_row_type::PuzzleAgentSessionRow; +pub use puzzle_agent_session_table::*; pub use puzzle_agent_stage_type::PuzzleAgentStage; pub use puzzle_draft_compile_input_type::PuzzleDraftCompileInput; pub use puzzle_generated_images_save_input_type::PuzzleGeneratedImagesSaveInput; @@ -632,18 +730,21 @@ pub use puzzle_run_procedure_result_type::PuzzleRunProcedureResult; pub use puzzle_run_start_input_type::PuzzleRunStartInput; pub use puzzle_run_swap_input_type::PuzzleRunSwapInput; pub use puzzle_runtime_run_row_type::PuzzleRuntimeRunRow; +pub use puzzle_runtime_run_table::*; pub use puzzle_select_cover_image_input_type::PuzzleSelectCoverImageInput; pub use puzzle_work_get_input_type::PuzzleWorkGetInput; pub use puzzle_work_procedure_result_type::PuzzleWorkProcedureResult; pub use puzzle_work_profile_row_type::PuzzleWorkProfileRow; +pub use puzzle_work_profile_table::*; pub use puzzle_work_upsert_input_type::PuzzleWorkUpsertInput; pub use puzzle_works_list_input_type::PuzzleWorksListInput; pub use puzzle_works_procedure_result_type::PuzzleWorksProcedureResult; pub use quest_completion_ack_input_type::QuestCompletionAckInput; pub use quest_hostile_npc_defeated_signal_type::QuestHostileNpcDefeatedSignal; pub use quest_item_delivered_signal_type::QuestItemDeliveredSignal; -pub use quest_log_type::QuestLog; 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; @@ -652,12 +753,13 @@ 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_type::QuestRecord; pub use quest_record_input_type::QuestRecordInput; +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_type::QuestRewardItem; 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_apply_input_type::QuestSignalApplyInput; @@ -666,12 +768,22 @@ pub use quest_status_type::QuestStatus; pub use quest_step_snapshot_type::QuestStepSnapshot; pub use quest_treasure_inspected_signal_type::QuestTreasureInspectedSignal; pub use quest_turn_in_input_type::QuestTurnInInput; +pub use resolve_combat_action_and_return_procedure::resolve_combat_action_and_return; pub use resolve_combat_action_input_type::ResolveCombatActionInput; pub use resolve_combat_action_procedure_result_type::ResolveCombatActionProcedureResult; +pub use resolve_combat_action_reducer::resolve_combat_action; pub use resolve_combat_action_result_type::ResolveCombatActionResult; +pub use resolve_npc_battle_interaction_and_return_procedure::resolve_npc_battle_interaction_and_return; pub use resolve_npc_battle_interaction_input_type::ResolveNpcBattleInteractionInput; +pub use resolve_npc_interaction_and_return_procedure::resolve_npc_interaction_and_return; pub use resolve_npc_interaction_input_type::ResolveNpcInteractionInput; +pub use resolve_npc_interaction_reducer::resolve_npc_interaction; +pub use resolve_npc_social_action_and_return_procedure::resolve_npc_social_action_and_return; pub use resolve_npc_social_action_input_type::ResolveNpcSocialActionInput; +pub use resolve_npc_social_action_reducer::resolve_npc_social_action; +pub use resolve_treasure_interaction_and_return_procedure::resolve_treasure_interaction_and_return; +pub use resolve_treasure_interaction_reducer::resolve_treasure_interaction; +pub use resume_profile_save_archive_and_return_procedure::resume_profile_save_archive_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; @@ -708,178 +820,65 @@ pub use runtime_profile_wallet_ledger_entry_snapshot_type::RuntimeProfileWalletL pub use runtime_profile_wallet_ledger_list_input_type::RuntimeProfileWalletLedgerListInput; pub use runtime_profile_wallet_ledger_procedure_result_type::RuntimeProfileWalletLedgerProcedureResult; pub use runtime_profile_wallet_ledger_source_type_type::RuntimeProfileWalletLedgerSourceType; -pub use runtime_setting_type::RuntimeSetting; pub use runtime_setting_get_input_type::RuntimeSettingGetInput; pub use runtime_setting_procedure_result_type::RuntimeSettingProcedureResult; pub use runtime_setting_snapshot_type::RuntimeSettingSnapshot; +pub use runtime_setting_table::*; +pub use runtime_setting_type::RuntimeSetting; pub use runtime_setting_upsert_input_type::RuntimeSettingUpsertInput; -pub use runtime_snapshot_type::RuntimeSnapshot; pub use runtime_snapshot_delete_input_type::RuntimeSnapshotDeleteInput; pub use runtime_snapshot_get_input_type::RuntimeSnapshotGetInput; pub use runtime_snapshot_procedure_result_type::RuntimeSnapshotProcedureResult; pub use runtime_snapshot_row_type::RuntimeSnapshotRow; +pub use runtime_snapshot_table::*; +pub use runtime_snapshot_type::RuntimeSnapshot; pub use runtime_snapshot_upsert_input_type::RuntimeSnapshotUpsertInput; +pub use save_puzzle_generated_images_procedure::save_puzzle_generated_images; +pub use select_puzzle_cover_image_procedure::select_puzzle_cover_image; +pub use start_ai_task_reducer::start_ai_task; +pub use start_ai_task_stage_reducer::start_ai_task_stage; +pub use start_big_fish_run_procedure::start_big_fish_run; +pub use start_puzzle_run_procedure::start_puzzle_run; pub use story_continue_input_type::StoryContinueInput; -pub use story_event_type::StoryEvent; pub use story_event_kind_type::StoryEventKind; pub use story_event_snapshot_type::StoryEventSnapshot; -pub use story_session_type::StorySession; +pub use story_event_table::*; +pub use story_event_type::StoryEvent; pub use story_session_input_type::StorySessionInput; pub use story_session_procedure_result_type::StorySessionProcedureResult; pub use story_session_snapshot_type::StorySessionSnapshot; pub use story_session_state_input_type::StorySessionStateInput; pub use story_session_state_procedure_result_type::StorySessionStateProcedureResult; pub use story_session_status_type::StorySessionStatus; -pub use treasure_interaction_action_type::TreasureInteractionAction; -pub use treasure_record_type::TreasureRecord; -pub use treasure_record_procedure_result_type::TreasureRecordProcedureResult; -pub use treasure_record_snapshot_type::TreasureRecordSnapshot; -pub use treasure_resolve_input_type::TreasureResolveInput; -pub use unequip_inventory_item_input_type::UnequipInventoryItemInput; -pub use user_browse_history_type::UserBrowseHistory; -pub use ai_result_reference_table::*; -pub use ai_task_table::*; -pub use ai_task_stage_table::*; -pub use ai_text_chunk_table::*; -pub use asset_entity_binding_table::*; -pub use asset_object_table::*; -pub use battle_state_table::*; -pub use big_fish_agent_message_table::*; -pub use big_fish_asset_slot_table::*; -pub use big_fish_creation_session_table::*; -pub use big_fish_runtime_run_table::*; -pub use chapter_progression_table::*; -pub use custom_world_agent_message_table::*; -pub use custom_world_agent_operation_table::*; -pub use custom_world_agent_session_table::*; -pub use custom_world_draft_card_table::*; -pub use custom_world_gallery_entry_table::*; -pub use custom_world_profile_table::*; -pub use custom_world_session_table::*; -pub use inventory_slot_table::*; -pub use npc_state_table::*; -pub use player_progression_table::*; -pub use profile_dashboard_state_table::*; -pub use profile_played_world_table::*; -pub use profile_save_archive_table::*; -pub use profile_wallet_ledger_table::*; -pub use puzzle_agent_message_table::*; -pub use puzzle_agent_session_table::*; -pub use puzzle_runtime_run_table::*; -pub use puzzle_work_profile_table::*; -pub use quest_log_table::*; -pub use quest_record_table::*; -pub use runtime_setting_table::*; -pub use runtime_snapshot_table::*; -pub use story_event_table::*; pub use story_session_table::*; -pub use treasure_record_table::*; -pub use user_browse_history_table::*; -pub use accept_quest_reducer::accept_quest; -pub use acknowledge_quest_completion_reducer::acknowledge_quest_completion; -pub use apply_chapter_progression_ledger_entry_reducer::apply_chapter_progression_ledger_entry; -pub use apply_inventory_mutation_reducer::apply_inventory_mutation; -pub use apply_quest_signal_reducer::apply_quest_signal; -pub use begin_story_session_reducer::begin_story_session; -pub use bind_asset_object_to_entity_reducer::bind_asset_object_to_entity; -pub use confirm_asset_object_reducer::confirm_asset_object; -pub use continue_story_reducer::continue_story; -pub use create_ai_task_reducer::create_ai_task; -pub use create_battle_state_reducer::create_battle_state; -pub use grant_player_progression_experience_reducer::grant_player_progression_experience; -pub use publish_custom_world_profile_reducer::publish_custom_world_profile; -pub use resolve_combat_action_reducer::resolve_combat_action; -pub use resolve_npc_interaction_reducer::resolve_npc_interaction; -pub use resolve_npc_social_action_reducer::resolve_npc_social_action; -pub use resolve_treasure_interaction_reducer::resolve_treasure_interaction; -pub use start_ai_task_reducer::start_ai_task; -pub use start_ai_task_stage_reducer::start_ai_task_stage; -pub use turn_in_quest_reducer::turn_in_quest; -pub use unpublish_custom_world_profile_reducer::unpublish_custom_world_profile; -pub use upsert_chapter_progression_reducer::upsert_chapter_progression; -pub use upsert_custom_world_profile_reducer::upsert_custom_world_profile; -pub use upsert_npc_state_reducer::upsert_npc_state; -pub use advance_puzzle_next_level_procedure::advance_puzzle_next_level; -pub use append_ai_text_chunk_and_return_procedure::append_ai_text_chunk_and_return; -pub use apply_chapter_progression_ledger_entry_and_return_procedure::apply_chapter_progression_ledger_entry_and_return; -pub use attach_ai_result_reference_and_return_procedure::attach_ai_result_reference_and_return; -pub use begin_story_session_and_return_procedure::begin_story_session_and_return; -pub use bind_asset_object_to_entity_and_return_procedure::bind_asset_object_to_entity_and_return; -pub use cancel_ai_task_and_return_procedure::cancel_ai_task_and_return; -pub use clear_platform_browse_history_and_return_procedure::clear_platform_browse_history_and_return; -pub use compile_big_fish_draft_procedure::compile_big_fish_draft; -pub use compile_custom_world_published_profile_procedure::compile_custom_world_published_profile; -pub use compile_puzzle_agent_draft_procedure::compile_puzzle_agent_draft; -pub use complete_ai_stage_and_return_procedure::complete_ai_stage_and_return; -pub use complete_ai_task_and_return_procedure::complete_ai_task_and_return; -pub use confirm_asset_object_and_return_procedure::confirm_asset_object_and_return; -pub use continue_story_and_return_procedure::continue_story_and_return; -pub use create_ai_task_and_return_procedure::create_ai_task_and_return; -pub use create_battle_state_and_return_procedure::create_battle_state_and_return; -pub use create_big_fish_session_procedure::create_big_fish_session; -pub use create_custom_world_agent_session_procedure::create_custom_world_agent_session; -pub use create_puzzle_agent_session_procedure::create_puzzle_agent_session; -pub use delete_runtime_snapshot_and_return_procedure::delete_runtime_snapshot_and_return; -pub use drag_puzzle_piece_or_group_procedure::drag_puzzle_piece_or_group; -pub use execute_custom_world_agent_action_procedure::execute_custom_world_agent_action; -pub use fail_ai_task_and_return_procedure::fail_ai_task_and_return; -pub use generate_big_fish_asset_procedure::generate_big_fish_asset; -pub use get_battle_state_procedure::get_battle_state; -pub use get_big_fish_run_procedure::get_big_fish_run; -pub use get_big_fish_session_procedure::get_big_fish_session; -pub use get_chapter_progression_procedure::get_chapter_progression; -pub use get_custom_world_agent_card_detail_procedure::get_custom_world_agent_card_detail; -pub use get_custom_world_agent_operation_procedure::get_custom_world_agent_operation; -pub use get_custom_world_agent_session_procedure::get_custom_world_agent_session; -pub use get_custom_world_gallery_detail_procedure::get_custom_world_gallery_detail; -pub use get_custom_world_library_detail_procedure::get_custom_world_library_detail; -pub use get_player_progression_or_default_procedure::get_player_progression_or_default; -pub use get_profile_dashboard_procedure::get_profile_dashboard; -pub use get_profile_play_stats_procedure::get_profile_play_stats; -pub use get_puzzle_agent_session_procedure::get_puzzle_agent_session; -pub use get_puzzle_gallery_detail_procedure::get_puzzle_gallery_detail; -pub use get_puzzle_run_procedure::get_puzzle_run; -pub use get_puzzle_work_detail_procedure::get_puzzle_work_detail; -pub use get_runtime_inventory_state_procedure::get_runtime_inventory_state; -pub use get_runtime_setting_or_default_procedure::get_runtime_setting_or_default; -pub use get_runtime_snapshot_procedure::get_runtime_snapshot; -pub use get_story_session_state_procedure::get_story_session_state; -pub use grant_player_progression_experience_and_return_procedure::grant_player_progression_experience_and_return; -pub use list_custom_world_gallery_entries_procedure::list_custom_world_gallery_entries; -pub use list_custom_world_profiles_procedure::list_custom_world_profiles; -pub use list_custom_world_works_procedure::list_custom_world_works; -pub use list_platform_browse_history_procedure::list_platform_browse_history; -pub use list_profile_save_archives_procedure::list_profile_save_archives; -pub use list_profile_wallet_ledger_procedure::list_profile_wallet_ledger; -pub use list_puzzle_gallery_procedure::list_puzzle_gallery; -pub use list_puzzle_works_procedure::list_puzzle_works; -pub use publish_big_fish_game_procedure::publish_big_fish_game; -pub use publish_custom_world_profile_and_return_procedure::publish_custom_world_profile_and_return; -pub use publish_custom_world_world_procedure::publish_custom_world_world; -pub use publish_puzzle_work_procedure::publish_puzzle_work; -pub use resolve_combat_action_and_return_procedure::resolve_combat_action_and_return; -pub use resolve_npc_battle_interaction_and_return_procedure::resolve_npc_battle_interaction_and_return; -pub use resolve_npc_interaction_and_return_procedure::resolve_npc_interaction_and_return; -pub use resolve_npc_social_action_and_return_procedure::resolve_npc_social_action_and_return; -pub use resolve_treasure_interaction_and_return_procedure::resolve_treasure_interaction_and_return; -pub use resume_profile_save_archive_and_return_procedure::resume_profile_save_archive_and_return; -pub use save_puzzle_generated_images_procedure::save_puzzle_generated_images; -pub use select_puzzle_cover_image_procedure::select_puzzle_cover_image; -pub use start_big_fish_run_procedure::start_big_fish_run; -pub use start_puzzle_run_procedure::start_puzzle_run; +pub use story_session_type::StorySession; pub use submit_big_fish_input_procedure::submit_big_fish_input; pub use submit_big_fish_message_procedure::submit_big_fish_message; pub use submit_custom_world_agent_message_procedure::submit_custom_world_agent_message; pub use submit_puzzle_agent_message_procedure::submit_puzzle_agent_message; pub use swap_puzzle_pieces_procedure::swap_puzzle_pieces; +pub use treasure_interaction_action_type::TreasureInteractionAction; +pub use treasure_record_procedure_result_type::TreasureRecordProcedureResult; +pub use treasure_record_snapshot_type::TreasureRecordSnapshot; +pub use treasure_record_table::*; +pub use treasure_record_type::TreasureRecord; +pub use treasure_resolve_input_type::TreasureResolveInput; +pub use turn_in_quest_reducer::turn_in_quest; +pub use unequip_inventory_item_input_type::UnequipInventoryItemInput; pub use unpublish_custom_world_profile_and_return_procedure::unpublish_custom_world_profile_and_return; +pub use unpublish_custom_world_profile_reducer::unpublish_custom_world_profile; pub use update_puzzle_work_procedure::update_puzzle_work; pub use upsert_chapter_progression_and_return_procedure::upsert_chapter_progression_and_return; +pub use upsert_chapter_progression_reducer::upsert_chapter_progression; pub use upsert_custom_world_profile_and_return_procedure::upsert_custom_world_profile_and_return; +pub use upsert_custom_world_profile_reducer::upsert_custom_world_profile; pub use upsert_npc_state_and_return_procedure::upsert_npc_state_and_return; +pub use upsert_npc_state_reducer::upsert_npc_state; pub use upsert_platform_browse_history_and_return_procedure::upsert_platform_browse_history_and_return; pub use upsert_runtime_setting_and_return_procedure::upsert_runtime_setting_and_return; pub use upsert_runtime_snapshot_and_return_procedure::upsert_runtime_snapshot_and_return; +pub use user_browse_history_table::*; +pub use user_browse_history_type::UserBrowseHistory; #[derive(Clone, PartialEq, Debug)] @@ -889,81 +888,80 @@ pub use upsert_runtime_snapshot_and_return_procedure::upsert_runtime_snapshot_an /// to indicate which reducer caused the event. pub enum Reducer { - AcceptQuest { + AcceptQuest { input: QuestRecordInput, -} , + }, AcknowledgeQuestCompletion { input: QuestCompletionAckInput, -} , + }, ApplyChapterProgressionLedgerEntry { input: ChapterProgressionLedgerInput, -} , + }, ApplyInventoryMutation { input: InventoryMutationInput, -} , + }, ApplyQuestSignal { input: QuestSignalApplyInput, -} , + }, BeginStorySession { input: StorySessionInput, -} , + }, BindAssetObjectToEntity { input: AssetEntityBindingInput, -} , + }, ConfirmAssetObject { input: AssetObjectUpsertInput, -} , + }, ContinueStory { input: StoryContinueInput, -} , + }, CreateAiTask { input: AiTaskCreateInput, -} , + }, CreateBattleState { input: BattleStateInput, -} , + }, GrantPlayerProgressionExperience { input: PlayerProgressionGrantInput, -} , + }, PublishCustomWorldProfile { input: CustomWorldProfilePublishInput, -} , + }, ResolveCombatAction { input: ResolveCombatActionInput, -} , + }, ResolveNpcInteraction { input: ResolveNpcInteractionInput, -} , + }, ResolveNpcSocialAction { input: ResolveNpcSocialActionInput, -} , + }, ResolveTreasureInteraction { input: TreasureResolveInput, -} , + }, StartAiTask { input: AiTaskStartInput, -} , + }, StartAiTaskStage { input: AiTaskStageStartInput, -} , + }, TurnInQuest { input: QuestTurnInInput, -} , + }, UnpublishCustomWorldProfile { input: CustomWorldProfileUnpublishInput, -} , + }, UpsertChapterProgression { input: ChapterProgressionInput, -} , + }, UpsertCustomWorldProfile { input: CustomWorldProfileUpsertInput, -} , + }, UpsertNpcState { input: NpcStateUpsertInput, -} , + }, } - impl __sdk::InModule for Reducer { type Module = RemoteModule; } @@ -971,9 +969,11 @@ impl __sdk::InModule for Reducer { impl __sdk::Reducer for Reducer { fn reducer_name(&self) -> &'static str { match self { - Reducer::AcceptQuest { .. } => "accept_quest", + Reducer::AcceptQuest { .. } => "accept_quest", Reducer::AcknowledgeQuestCompletion { .. } => "acknowledge_quest_completion", - Reducer::ApplyChapterProgressionLedgerEntry { .. } => "apply_chapter_progression_ledger_entry", + Reducer::ApplyChapterProgressionLedgerEntry { .. } => { + "apply_chapter_progression_ledger_entry" + } Reducer::ApplyInventoryMutation { .. } => "apply_inventory_mutation", Reducer::ApplyQuestSignal { .. } => "apply_quest_signal", Reducer::BeginStorySession { .. } => "begin_story_session", @@ -982,7 +982,9 @@ impl __sdk::Reducer for Reducer { Reducer::ContinueStory { .. } => "continue_story", Reducer::CreateAiTask { .. } => "create_ai_task", Reducer::CreateBattleState { .. } => "create_battle_state", - Reducer::GrantPlayerProgressionExperience { .. } => "grant_player_progression_experience", + Reducer::GrantPlayerProgressionExperience { .. } => { + "grant_player_progression_experience" + } Reducer::PublishCustomWorldProfile { .. } => "publish_custom_world_profile", Reducer::ResolveCombatAction { .. } => "resolve_combat_action", Reducer::ResolveNpcInteraction { .. } => "resolve_npc_interaction", @@ -996,10 +998,10 @@ impl __sdk::Reducer for Reducer { Reducer::UpsertCustomWorldProfile { .. } => "upsert_custom_world_profile", Reducer::UpsertNpcState { .. } => "upsert_npc_state", _ => unreachable!(), -} -} + } + } #[allow(clippy::clone_on_copy)] -fn args_bsatn(&self) -> Result, __sats::bsatn::EncodeError> { + fn args_bsatn(&self) -> Result, __sats::bsatn::EncodeError> { match self { Reducer::AcceptQuest{ input, @@ -1123,14 +1125,14 @@ fn args_bsatn(&self) -> Result, __sats::bsatn::EncodeError> { }), _ => unreachable!(), } -} + } } #[derive(Default, Debug)] #[allow(non_snake_case)] #[doc(hidden)] pub struct DbUpdate { - ai_result_reference: __sdk::TableUpdate, + ai_result_reference: __sdk::TableUpdate, ai_task: __sdk::TableUpdate, ai_task_stage: __sdk::TableUpdate, ai_text_chunk: __sdk::TableUpdate, @@ -1170,59 +1172,134 @@ pub struct DbUpdate { user_browse_history: __sdk::TableUpdate, } - impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { type Error = __sdk::Error; fn try_from(raw: __ws::v2::TransactionUpdate) -> Result { let mut db_update = DbUpdate::default(); for table_update in __sdk::transaction_update_iter_table_updates(raw) { match &table_update.table_name[..] { - - "ai_result_reference" => db_update.ai_result_reference.append(ai_result_reference_table::parse_table_update(table_update)?), - "ai_task" => db_update.ai_task.append(ai_task_table::parse_table_update(table_update)?), - "ai_task_stage" => db_update.ai_task_stage.append(ai_task_stage_table::parse_table_update(table_update)?), - "ai_text_chunk" => db_update.ai_text_chunk.append(ai_text_chunk_table::parse_table_update(table_update)?), - "asset_entity_binding" => db_update.asset_entity_binding.append(asset_entity_binding_table::parse_table_update(table_update)?), - "asset_object" => db_update.asset_object.append(asset_object_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_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)?), - "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)?), - "inventory_slot" => db_update.inventory_slot.append(inventory_slot_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_dashboard_state" => db_update.profile_dashboard_state.append(profile_dashboard_state_table::parse_table_update(table_update)?), - "profile_played_world" => db_update.profile_played_world.append(profile_played_world_table::parse_table_update(table_update)?), - "profile_save_archive" => db_update.profile_save_archive.append(profile_save_archive_table::parse_table_update(table_update)?), - "profile_wallet_ledger" => db_update.profile_wallet_ledger.append(profile_wallet_ledger_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_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)?), - "runtime_setting" => db_update.runtime_setting.append(runtime_setting_table::parse_table_update(table_update)?), - "runtime_snapshot" => db_update.runtime_snapshot.append(runtime_snapshot_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)?), - "treasure_record" => db_update.treasure_record.append(treasure_record_table::parse_table_update(table_update)?), - "user_browse_history" => db_update.user_browse_history.append(user_browse_history_table::parse_table_update(table_update)?), + "ai_result_reference" => db_update + .ai_result_reference + .append(ai_result_reference_table::parse_table_update(table_update)?), + "ai_task" => db_update + .ai_task + .append(ai_task_table::parse_table_update(table_update)?), + "ai_task_stage" => db_update + .ai_task_stage + .append(ai_task_stage_table::parse_table_update(table_update)?), + "ai_text_chunk" => db_update + .ai_text_chunk + .append(ai_text_chunk_table::parse_table_update(table_update)?), + "asset_entity_binding" => db_update.asset_entity_binding.append( + asset_entity_binding_table::parse_table_update(table_update)?, + ), + "asset_object" => db_update + .asset_object + .append(asset_object_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_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)?), + "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)?, + ), + "inventory_slot" => db_update + .inventory_slot + .append(inventory_slot_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_dashboard_state" => db_update.profile_dashboard_state.append( + profile_dashboard_state_table::parse_table_update(table_update)?, + ), + "profile_played_world" => db_update.profile_played_world.append( + profile_played_world_table::parse_table_update(table_update)?, + ), + "profile_save_archive" => db_update.profile_save_archive.append( + profile_save_archive_table::parse_table_update(table_update)?, + ), + "profile_wallet_ledger" => db_update.profile_wallet_ledger.append( + profile_wallet_ledger_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_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)?), + "runtime_setting" => db_update + .runtime_setting + .append(runtime_setting_table::parse_table_update(table_update)?), + "runtime_snapshot" => db_update + .runtime_snapshot + .append(runtime_snapshot_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)?), + "treasure_record" => db_update + .treasure_record + .append(treasure_record_table::parse_table_update(table_update)?), + "user_browse_history" => db_update + .user_browse_history + .append(user_browse_history_table::parse_table_update(table_update)?), unknown => { return Err(__sdk::InternalError::unknown_name( "table", unknown, "DatabaseUpdate", - ).into()); + ) + .into()); } } } @@ -1235,147 +1312,462 @@ impl __sdk::InModule for DbUpdate { } impl __sdk::DbUpdate for DbUpdate { - fn apply_to_client_cache(&self, cache: &mut __sdk::ClientCache) -> AppliedDiff<'_> { - let mut diff = AppliedDiff::default(); - - diff.ai_result_reference = cache.apply_diff_to_table::("ai_result_reference", &self.ai_result_reference).with_updates_by_pk(|row| &row.result_reference_row_id); - diff.ai_task = cache.apply_diff_to_table::("ai_task", &self.ai_task).with_updates_by_pk(|row| &row.task_id); - diff.ai_task_stage = cache.apply_diff_to_table::("ai_task_stage", &self.ai_task_stage).with_updates_by_pk(|row| &row.task_stage_id); - diff.ai_text_chunk = cache.apply_diff_to_table::("ai_text_chunk", &self.ai_text_chunk).with_updates_by_pk(|row| &row.text_chunk_row_id); - diff.asset_entity_binding = cache.apply_diff_to_table::("asset_entity_binding", &self.asset_entity_binding).with_updates_by_pk(|row| &row.binding_id); - diff.asset_object = cache.apply_diff_to_table::("asset_object", &self.asset_object).with_updates_by_pk(|row| &row.asset_object_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_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.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.inventory_slot = cache.apply_diff_to_table::("inventory_slot", &self.inventory_slot).with_updates_by_pk(|row| &row.slot_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_dashboard_state = cache.apply_diff_to_table::("profile_dashboard_state", &self.profile_dashboard_state).with_updates_by_pk(|row| &row.user_id); - diff.profile_played_world = cache.apply_diff_to_table::("profile_played_world", &self.profile_played_world).with_updates_by_pk(|row| &row.played_world_id); - diff.profile_save_archive = cache.apply_diff_to_table::("profile_save_archive", &self.profile_save_archive).with_updates_by_pk(|row| &row.archive_id); - diff.profile_wallet_ledger = cache.apply_diff_to_table::("profile_wallet_ledger", &self.profile_wallet_ledger).with_updates_by_pk(|row| &row.wallet_ledger_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_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.runtime_setting = cache.apply_diff_to_table::("runtime_setting", &self.runtime_setting).with_updates_by_pk(|row| &row.user_id); - diff.runtime_snapshot = cache.apply_diff_to_table::("runtime_snapshot", &self.runtime_snapshot).with_updates_by_pk(|row| &row.user_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.treasure_record = cache.apply_diff_to_table::("treasure_record", &self.treasure_record).with_updates_by_pk(|row| &row.treasure_record_id); - diff.user_browse_history = cache.apply_diff_to_table::("user_browse_history", &self.user_browse_history).with_updates_by_pk(|row| &row.browse_history_id); + fn apply_to_client_cache( + &self, + cache: &mut __sdk::ClientCache, + ) -> AppliedDiff<'_> { + let mut diff = AppliedDiff::default(); - diff + diff.ai_result_reference = cache + .apply_diff_to_table::( + "ai_result_reference", + &self.ai_result_reference, + ) + .with_updates_by_pk(|row| &row.result_reference_row_id); + diff.ai_task = cache + .apply_diff_to_table::("ai_task", &self.ai_task) + .with_updates_by_pk(|row| &row.task_id); + diff.ai_task_stage = cache + .apply_diff_to_table::("ai_task_stage", &self.ai_task_stage) + .with_updates_by_pk(|row| &row.task_stage_id); + diff.ai_text_chunk = cache + .apply_diff_to_table::("ai_text_chunk", &self.ai_text_chunk) + .with_updates_by_pk(|row| &row.text_chunk_row_id); + diff.asset_entity_binding = cache + .apply_diff_to_table::( + "asset_entity_binding", + &self.asset_entity_binding, + ) + .with_updates_by_pk(|row| &row.binding_id); + diff.asset_object = cache + .apply_diff_to_table::("asset_object", &self.asset_object) + .with_updates_by_pk(|row| &row.asset_object_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_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.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.inventory_slot = cache + .apply_diff_to_table::("inventory_slot", &self.inventory_slot) + .with_updates_by_pk(|row| &row.slot_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_dashboard_state = cache + .apply_diff_to_table::( + "profile_dashboard_state", + &self.profile_dashboard_state, + ) + .with_updates_by_pk(|row| &row.user_id); + diff.profile_played_world = cache + .apply_diff_to_table::( + "profile_played_world", + &self.profile_played_world, + ) + .with_updates_by_pk(|row| &row.played_world_id); + diff.profile_save_archive = cache + .apply_diff_to_table::( + "profile_save_archive", + &self.profile_save_archive, + ) + .with_updates_by_pk(|row| &row.archive_id); + diff.profile_wallet_ledger = cache + .apply_diff_to_table::( + "profile_wallet_ledger", + &self.profile_wallet_ledger, + ) + .with_updates_by_pk(|row| &row.wallet_ledger_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_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.runtime_setting = cache + .apply_diff_to_table::("runtime_setting", &self.runtime_setting) + .with_updates_by_pk(|row| &row.user_id); + diff.runtime_snapshot = cache + .apply_diff_to_table::("runtime_snapshot", &self.runtime_snapshot) + .with_updates_by_pk(|row| &row.user_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.treasure_record = cache + .apply_diff_to_table::("treasure_record", &self.treasure_record) + .with_updates_by_pk(|row| &row.treasure_record_id); + diff.user_browse_history = cache + .apply_diff_to_table::( + "user_browse_history", + &self.user_browse_history, + ) + .with_updates_by_pk(|row| &row.browse_history_id); + + diff + } + fn parse_initial_rows(raw: __ws::v2::QueryRows) -> __sdk::Result { + let mut db_update = DbUpdate::default(); + for table_rows in raw.tables { + match &table_rows.table[..] { + "ai_result_reference" => db_update + .ai_result_reference + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "ai_task" => db_update + .ai_task + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "ai_task_stage" => db_update + .ai_task_stage + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "ai_text_chunk" => db_update + .ai_text_chunk + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "asset_entity_binding" => db_update + .asset_entity_binding + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "asset_object" => db_update + .asset_object + .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_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)?), + "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)?), + "inventory_slot" => db_update + .inventory_slot + .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_dashboard_state" => db_update + .profile_dashboard_state + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "profile_played_world" => db_update + .profile_played_world + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "profile_save_archive" => db_update + .profile_save_archive + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "profile_wallet_ledger" => db_update + .profile_wallet_ledger + .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_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)?), + "runtime_setting" => db_update + .runtime_setting + .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "runtime_snapshot" => db_update + .runtime_snapshot + .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)?), + "treasure_record" => db_update + .treasure_record + .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)?), + unknown => { + return Err( + __sdk::InternalError::unknown_name("table", unknown, "QueryRows").into(), + ); } -fn parse_initial_rows(raw: __ws::v2::QueryRows) -> __sdk::Result { - let mut db_update = DbUpdate::default(); -for table_rows in raw.tables { + } + } + Ok(db_update) + } + fn parse_unsubscribe_rows(raw: __ws::v2::QueryRows) -> __sdk::Result { + let mut db_update = DbUpdate::default(); + for table_rows in raw.tables { match &table_rows.table[..] { - "ai_result_reference" => db_update.ai_result_reference.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "ai_task" => db_update.ai_task.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "ai_task_stage" => db_update.ai_task_stage.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "ai_text_chunk" => db_update.ai_text_chunk.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "asset_entity_binding" => db_update.asset_entity_binding.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "asset_object" => db_update.asset_object.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_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)?), - "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)?), - "inventory_slot" => db_update.inventory_slot.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_dashboard_state" => db_update.profile_dashboard_state.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "profile_played_world" => db_update.profile_played_world.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "profile_save_archive" => db_update.profile_save_archive.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "profile_wallet_ledger" => db_update.profile_wallet_ledger.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_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)?), - "runtime_setting" => db_update.runtime_setting.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "runtime_snapshot" => db_update.runtime_snapshot.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)?), - "treasure_record" => db_update.treasure_record.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)?), - unknown => { return Err(__sdk::InternalError::unknown_name("table", unknown, "QueryRows").into()); } -}} Ok(db_update) -} -fn parse_unsubscribe_rows(raw: __ws::v2::QueryRows) -> __sdk::Result { - let mut db_update = DbUpdate::default(); -for table_rows in raw.tables { - match &table_rows.table[..] { - "ai_result_reference" => db_update.ai_result_reference.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "ai_task" => db_update.ai_task.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "ai_task_stage" => db_update.ai_task_stage.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "ai_text_chunk" => db_update.ai_text_chunk.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "asset_entity_binding" => db_update.asset_entity_binding.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "asset_object" => db_update.asset_object.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_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)?), - "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)?), - "inventory_slot" => db_update.inventory_slot.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_dashboard_state" => db_update.profile_dashboard_state.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "profile_played_world" => db_update.profile_played_world.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "profile_save_archive" => db_update.profile_save_archive.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "profile_wallet_ledger" => db_update.profile_wallet_ledger.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_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)?), - "runtime_setting" => db_update.runtime_setting.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "runtime_snapshot" => db_update.runtime_snapshot.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)?), - "treasure_record" => db_update.treasure_record.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)?), - unknown => { return Err(__sdk::InternalError::unknown_name("table", unknown, "QueryRows").into()); } -}} Ok(db_update) -} + "ai_result_reference" => db_update + .ai_result_reference + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "ai_task" => db_update + .ai_task + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "ai_task_stage" => db_update + .ai_task_stage + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "ai_text_chunk" => db_update + .ai_text_chunk + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "asset_entity_binding" => db_update + .asset_entity_binding + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "asset_object" => db_update + .asset_object + .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_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)?), + "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)?), + "inventory_slot" => db_update + .inventory_slot + .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_dashboard_state" => db_update + .profile_dashboard_state + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "profile_played_world" => db_update + .profile_played_world + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "profile_save_archive" => db_update + .profile_save_archive + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "profile_wallet_ledger" => db_update + .profile_wallet_ledger + .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_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)?), + "runtime_setting" => db_update + .runtime_setting + .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "runtime_snapshot" => db_update + .runtime_snapshot + .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)?), + "treasure_record" => db_update + .treasure_record + .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)?), + unknown => { + return Err( + __sdk::InternalError::unknown_name("table", unknown, "QueryRows").into(), + ); + } + } + } + Ok(db_update) + } } #[derive(Default)] #[allow(non_snake_case)] #[doc(hidden)] pub struct AppliedDiff<'r> { - ai_result_reference: __sdk::TableAppliedDiff<'r, AiResultReference>, + ai_result_reference: __sdk::TableAppliedDiff<'r, AiResultReference>, ai_task: __sdk::TableAppliedDiff<'r, AiTask>, ai_task_stage: __sdk::TableAppliedDiff<'r, AiTaskStage>, ai_text_chunk: __sdk::TableAppliedDiff<'r, AiTextChunk>, @@ -1416,54 +1808,192 @@ pub struct AppliedDiff<'r> { __unused: std::marker::PhantomData<&'r ()>, } - impl __sdk::InModule for AppliedDiff<'_> { type Module = RemoteModule; } impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> { - fn invoke_row_callbacks(&self, event: &EventContext, callbacks: &mut __sdk::DbCallbacks) { - callbacks.invoke_table_row_callbacks::("ai_result_reference", &self.ai_result_reference, event); + fn invoke_row_callbacks( + &self, + event: &EventContext, + callbacks: &mut __sdk::DbCallbacks, + ) { + callbacks.invoke_table_row_callbacks::( + "ai_result_reference", + &self.ai_result_reference, + event, + ); callbacks.invoke_table_row_callbacks::("ai_task", &self.ai_task, event); - callbacks.invoke_table_row_callbacks::("ai_task_stage", &self.ai_task_stage, event); - callbacks.invoke_table_row_callbacks::("ai_text_chunk", &self.ai_text_chunk, event); - callbacks.invoke_table_row_callbacks::("asset_entity_binding", &self.asset_entity_binding, event); - callbacks.invoke_table_row_callbacks::("asset_object", &self.asset_object, 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_runtime_run", &self.big_fish_runtime_run, event); - callbacks.invoke_table_row_callbacks::("chapter_progression", &self.chapter_progression, 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::("inventory_slot", &self.inventory_slot, event); + callbacks.invoke_table_row_callbacks::( + "ai_task_stage", + &self.ai_task_stage, + event, + ); + callbacks.invoke_table_row_callbacks::( + "ai_text_chunk", + &self.ai_text_chunk, + event, + ); + callbacks.invoke_table_row_callbacks::( + "asset_entity_binding", + &self.asset_entity_binding, + event, + ); + callbacks.invoke_table_row_callbacks::( + "asset_object", + &self.asset_object, + 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_runtime_run", + &self.big_fish_runtime_run, + event, + ); + callbacks.invoke_table_row_callbacks::( + "chapter_progression", + &self.chapter_progression, + 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::( + "inventory_slot", + &self.inventory_slot, + 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_dashboard_state", &self.profile_dashboard_state, event); - callbacks.invoke_table_row_callbacks::("profile_played_world", &self.profile_played_world, event); - callbacks.invoke_table_row_callbacks::("profile_save_archive", &self.profile_save_archive, event); - callbacks.invoke_table_row_callbacks::("profile_wallet_ledger", &self.profile_wallet_ledger, 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_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::( + "player_progression", + &self.player_progression, + event, + ); + callbacks.invoke_table_row_callbacks::( + "profile_dashboard_state", + &self.profile_dashboard_state, + event, + ); + callbacks.invoke_table_row_callbacks::( + "profile_played_world", + &self.profile_played_world, + event, + ); + callbacks.invoke_table_row_callbacks::( + "profile_save_archive", + &self.profile_save_archive, + event, + ); + callbacks.invoke_table_row_callbacks::( + "profile_wallet_ledger", + &self.profile_wallet_ledger, + 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_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::("runtime_setting", &self.runtime_setting, event); - callbacks.invoke_table_row_callbacks::("runtime_snapshot", &self.runtime_snapshot, event); + callbacks.invoke_table_row_callbacks::( + "quest_record", + &self.quest_record, + event, + ); + callbacks.invoke_table_row_callbacks::( + "runtime_setting", + &self.runtime_setting, + event, + ); + callbacks.invoke_table_row_callbacks::( + "runtime_snapshot", + &self.runtime_snapshot, + 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::("treasure_record", &self.treasure_record, event); - callbacks.invoke_table_row_callbacks::("user_browse_history", &self.user_browse_history, event); + callbacks.invoke_table_row_callbacks::( + "story_session", + &self.story_session, + event, + ); + callbacks.invoke_table_row_callbacks::( + "treasure_record", + &self.treasure_record, + event, + ); + callbacks.invoke_table_row_callbacks::( + "user_browse_history", + &self.user_browse_history, + event, + ); + } } -} - #[doc(hidden)] #[derive(Debug)] @@ -1512,10 +2042,16 @@ impl __sdk::InModule for RemoteTables { /// /// - [`DbConnection::frame_tick`]. #[cfg_attr(not(target_arch = "wasm32"), doc = "- [`DbConnection::run_threaded`].")] -#[cfg_attr(target_arch = "wasm32", doc = "- [`DbConnection::run_background_task`].")] +#[cfg_attr( + target_arch = "wasm32", + doc = "- [`DbConnection::run_background_task`]." +)] /// - [`DbConnection::run_async`]. /// - [`DbConnection::advance_one_message`]. -#[cfg_attr(not(target_arch = "wasm32"), doc = "- [`DbConnection::advance_one_message_blocking`].")] +#[cfg_attr( + not(target_arch = "wasm32"), + doc = "- [`DbConnection::advance_one_message_blocking`]." +)] /// - [`DbConnection::advance_one_message_async`]. /// /// Which of these methods you should call depends on the specific needs of your application, @@ -1702,7 +2238,6 @@ impl __sdk::SubscriptionHandle for SubscriptionHandle { fn unsubscribe(self) -> __sdk::Result<()> { self.imp.unsubscribe_then(None) } - } /// Alias trait for a [`__sdk::DbContext`] connected to this module, @@ -1710,17 +2245,23 @@ impl __sdk::SubscriptionHandle for SubscriptionHandle { /// /// Users can use this trait as a boundary on definitions which should accept /// either a [`DbConnection`] or an [`EventContext`] and operate on either. -pub trait RemoteDbContext: __sdk::DbContext< - DbView = RemoteTables, - Reducers = RemoteReducers, - SubscriptionBuilder = __sdk::SubscriptionBuilder, -> {} -impl, ->> RemoteDbContext for Ctx {} - +pub trait RemoteDbContext: + __sdk::DbContext< + DbView = RemoteTables, + Reducers = RemoteReducers, + SubscriptionBuilder = __sdk::SubscriptionBuilder, + > +{ +} +impl< + Ctx: __sdk::DbContext< + DbView = RemoteTables, + Reducers = RemoteReducers, + SubscriptionBuilder = __sdk::SubscriptionBuilder, + >, +> RemoteDbContext for Ctx +{ +} /// An [`__sdk::DbContext`] augmented with a [`__sdk::Event`], /// passed to [`__sdk::Table::on_insert`], [`__sdk::Table::on_delete`] and [`__sdk::TableWithPrimaryKey::on_update`] callbacks. @@ -2095,7 +2636,6 @@ impl __sdk::DbContext for ErrorContext { impl __sdk::ErrorContext for ErrorContext {} impl __sdk::SpacetimeModule for RemoteModule { - type DbConnection = DbConnection; type EventContext = EventContext; type ReducerEventContext = ReducerEventContext; @@ -2111,8 +2651,8 @@ impl __sdk::SpacetimeModule for RemoteModule { type SubscriptionHandle = SubscriptionHandle; type QueryBuilder = __sdk::QueryBuilder; -fn register_tables(client_cache: &mut __sdk::ClientCache) { - ai_result_reference_table::register_table(client_cache); + fn register_tables(client_cache: &mut __sdk::ClientCache) { + ai_result_reference_table::register_table(client_cache); ai_task_table::register_table(client_cache); ai_task_stage_table::register_table(client_cache); ai_text_chunk_table::register_table(client_cache); @@ -2150,9 +2690,9 @@ fn register_tables(client_cache: &mut __sdk::ClientCache) { story_session_table::register_table(client_cache); treasure_record_table::register_table(client_cache); user_browse_history_table::register_table(client_cache); -} -const ALL_TABLE_NAMES: &'static [&'static str] = &[ - "ai_result_reference", + } + const ALL_TABLE_NAMES: &'static [&'static str] = &[ + "ai_result_reference", "ai_task", "ai_task_stage", "ai_text_chunk", @@ -2190,5 +2730,5 @@ const ALL_TABLE_NAMES: &'static [&'static str] = &[ "story_session", "treasure_record", "user_browse_history", -]; + ]; } diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_battle_interaction_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_battle_interaction_procedure_result_type.rs index 1682f3ac..d5f16a3f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_battle_interaction_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/npc_battle_interaction_procedure_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::npc_battle_interaction_result_type::NpcBattleInteractionResult; @@ -15,12 +10,10 @@ use super::npc_battle_interaction_result_type::NpcBattleInteractionResult; #[sats(crate = __lib)] pub struct NpcBattleInteractionProcedureResult { pub ok: bool, - pub result: Option::, - pub error_message: Option::, + pub result: Option, + pub error_message: Option, } - impl __sdk::InModule for NpcBattleInteractionProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_battle_interaction_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_battle_interaction_result_type.rs index fc8ca1c9..c276f969 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_battle_interaction_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/npc_battle_interaction_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::battle_state_snapshot_type::BattleStateSnapshot; use super::npc_interaction_result_type::NpcInteractionResult; @@ -19,8 +14,6 @@ pub struct NpcBattleInteractionResult { pub battle_state: BattleStateSnapshot, } - impl __sdk::InModule for NpcBattleInteractionResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_battle_mode_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_battle_mode_type.rs index e891d6a9..dc8e8819 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_battle_mode_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_battle_mode_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,12 +11,8 @@ pub enum NpcInteractionBattleMode { Fight, Spar, - } - - impl __sdk::InModule for NpcInteractionBattleMode { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_procedure_result_type.rs index ef11fa63..383dce2a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_procedure_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::npc_interaction_result_type::NpcInteractionResult; @@ -15,12 +10,10 @@ use super::npc_interaction_result_type::NpcInteractionResult; #[sats(crate = __lib)] pub struct NpcInteractionProcedureResult { pub ok: bool, - pub result: Option::, - pub error_message: Option::, + pub result: Option, + pub error_message: Option, } - impl __sdk::InModule for NpcInteractionProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_result_type.rs index d457b697..83624807 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_result_type.rs @@ -2,16 +2,11 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::npc_state_snapshot_type::NpcStateSnapshot; -use super::npc_interaction_status_type::NpcInteractionStatus; use super::npc_interaction_battle_mode_type::NpcInteractionBattleMode; +use super::npc_interaction_status_type::NpcInteractionStatus; +use super::npc_state_snapshot_type::NpcStateSnapshot; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -20,16 +15,14 @@ pub struct NpcInteractionResult { pub interaction_status: NpcInteractionStatus, pub action_text: String, pub result_text: String, - pub story_text: Option::, - pub battle_mode: Option::, + pub story_text: Option, + pub battle_mode: Option, pub encounter_closed: bool, pub affinity_changed: bool, pub previous_affinity: i32, pub next_affinity: i32, } - impl __sdk::InModule for NpcInteractionResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_status_type.rs index cba6b5ac..8032abf9 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_status_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_status_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -24,12 +19,8 @@ pub enum NpcInteractionStatus { BattlePending, Left, - } - - impl __sdk::InModule for NpcInteractionStatus { type Module = super::RemoteModule; } - 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 index 2a45f52c..48e8ac70 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -22,12 +17,8 @@ pub enum NpcRelationStance { 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 index cccb0cc5..b6bbc07d 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::npc_relation_stance_type::NpcRelationStance; @@ -18,8 +13,6 @@ pub struct NpcRelationState { pub stance: NpcRelationStance, } - impl __sdk::InModule for NpcRelationState { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_social_action_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_social_action_kind_type.rs index cc79b8c5..9c6d2c1e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_social_action_kind_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/npc_social_action_kind_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -22,12 +17,8 @@ pub enum NpcSocialActionKind { Recruit, QuestAccept, - } - - impl __sdk::InModule for NpcSocialActionKind { 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 index 5a0d7497..73177673 100644 --- 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 @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,13 +12,11 @@ pub struct NpcStanceProfile { 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::, + 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_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_state_procedure_result_type.rs index 39a8ed60..c4e60bef 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_state_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/npc_state_procedure_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::npc_state_snapshot_type::NpcStateSnapshot; @@ -15,12 +10,10 @@ use super::npc_state_snapshot_type::NpcStateSnapshot; #[sats(crate = __lib)] pub struct NpcStateProcedureResult { pub ok: bool, - pub record: Option::, - pub error_message: Option::, + pub record: Option, + pub error_message: Option, } - impl __sdk::InModule for NpcStateProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_state_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_state_snapshot_type.rs index c11e0ef8..351b45ae 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_state_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/npc_state_snapshot_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::npc_relation_state_type::NpcRelationState; use super::npc_stance_profile_type::NpcStanceProfile; @@ -25,18 +20,16 @@ pub struct NpcStateSnapshot { 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 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 seen_backstory_chapter_ids: Vec, pub stance_profile: NpcStanceProfile, pub created_at_micros: i64, pub updated_at_micros: i64, } - impl __sdk::InModule for NpcStateSnapshot { 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 index 917742d6..26e7fcf5 100644 --- 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 @@ -2,15 +2,10 @@ // 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_state_type::NpcState; 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`. /// @@ -51,8 +46,12 @@ 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() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = NpcStateInsertCallbackId; @@ -98,39 +97,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for NpcStateTableHandle<'ctx> { } } - /// 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>, - } +/// 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> 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) + } +} - 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); } @@ -140,26 +138,24 @@ 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() + __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") - } - } +#[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 index 9e8f87ae..1ddeec42 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::npc_relation_state_type::NpcRelationState; use super::npc_stance_profile_type::NpcStanceProfile; @@ -25,22 +20,20 @@ pub struct NpcState { 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 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 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. @@ -55,11 +48,11 @@ pub struct NpcStateCols { 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 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 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, @@ -79,15 +72,26 @@ impl __sdk::__query_builder::HasCols for NpcState { 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"), + 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"), + 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"), - } } } @@ -107,11 +111,12 @@ impl __sdk::__query_builder::HasIxCols for NpcState { 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"), - + 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/npc_state_upsert_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_state_upsert_input_type.rs index ff59315a..c31346e7 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_state_upsert_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/npc_state_upsert_input_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::npc_stance_profile_type::NpcStanceProfile; @@ -22,17 +17,15 @@ pub struct NpcStateUpsertInput { 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 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: Option::, + pub seen_backstory_chapter_ids: Vec, + pub stance_profile: Option, pub updated_at_micros: i64, } - impl __sdk::InModule for NpcStateUpsertInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/player_progression_get_input_type.rs index eb031dc3..a4dd27f5 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/player_progression_get_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,8 +10,6 @@ pub struct PlayerProgressionGetInput { pub user_id: String, } - impl __sdk::InModule for PlayerProgressionGetInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_grant_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/player_progression_grant_input_type.rs index 66a8696c..b5761753 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_grant_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/player_progression_grant_input_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::player_progression_grant_source_type::PlayerProgressionGrantSource; @@ -20,8 +15,6 @@ pub struct PlayerProgressionGrantInput { pub updated_at_micros: i64, } - impl __sdk::InModule for PlayerProgressionGrantInput { type Module = super::RemoteModule; } - 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 index c45b9dd6..bf3ae257 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,12 +11,8 @@ 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_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/player_progression_procedure_result_type.rs index 0f3686ec..413c1208 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/player_progression_procedure_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::player_progression_snapshot_type::PlayerProgressionSnapshot; @@ -15,12 +10,10 @@ use super::player_progression_snapshot_type::PlayerProgressionSnapshot; #[sats(crate = __lib)] pub struct PlayerProgressionProcedureResult { pub ok: bool, - pub record: Option::, - pub error_message: Option::, + pub record: Option, + pub error_message: Option, } - impl __sdk::InModule for PlayerProgressionProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/player_progression_snapshot_type.rs index 116938c5..1361178e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/player_progression_snapshot_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::player_progression_grant_source_type::PlayerProgressionGrantSource; @@ -20,13 +15,11 @@ pub struct PlayerProgressionSnapshot { pub total_xp: u32, pub xp_to_next_level: u32, pub pending_level_ups: u32, - pub last_granted_source: Option::, + pub last_granted_source: Option, pub created_at_micros: i64, pub updated_at_micros: i64, } - impl __sdk::InModule for PlayerProgressionSnapshot { 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 index 27262e2f..66961930 100644 --- 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 @@ -2,14 +2,9 @@ // 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_type::PlayerProgression; 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`. /// @@ -37,7 +32,9 @@ pub trait PlayerProgressionTableAccess { impl PlayerProgressionTableAccess for super::RemoteTables { fn player_progression(&self) -> PlayerProgressionTableHandle<'_> { PlayerProgressionTableHandle { - imp: self.imp.get_table::("player_progression"), + imp: self + .imp + .get_table::("player_progression"), ctx: std::marker::PhantomData, } } @@ -50,8 +47,12 @@ 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() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = PlayerProgressionInsertCallbackId; @@ -97,39 +98,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for PlayerProgressionTableHandle<'ctx> { } } - /// 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>, - } +/// 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> 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) + } +} - 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); } @@ -139,26 +139,24 @@ 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() + __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") - } - } +#[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 index 04af99cc..c734d1c2 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::player_progression_grant_source_type::PlayerProgressionGrantSource; @@ -20,17 +15,15 @@ pub struct PlayerProgression { pub total_xp: u32, pub xp_to_next_level: u32, pub pending_level_ups: u32, - pub last_granted_source: Option::, + 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. @@ -41,7 +34,8 @@ pub struct PlayerProgressionCols { 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 last_granted_source: + __sdk::__query_builder::Col>, pub created_at: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, } @@ -56,10 +50,12 @@ impl __sdk::__query_builder::HasCols for PlayerProgression { 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"), + 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"), - } } } @@ -76,10 +72,8 @@ impl __sdk::__query_builder::HasIxCols for PlayerProgression { 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/profile_dashboard_state_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/profile_dashboard_state_table.rs index 4e1d2abd..c79f8b0c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/profile_dashboard_state_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/profile_dashboard_state_table.rs @@ -2,13 +2,8 @@ // 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::profile_dashboard_state_type::ProfileDashboardState; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `profile_dashboard_state`. /// @@ -36,7 +31,9 @@ pub trait ProfileDashboardStateTableAccess { impl ProfileDashboardStateTableAccess for super::RemoteTables { fn profile_dashboard_state(&self) -> ProfileDashboardStateTableHandle<'_> { ProfileDashboardStateTableHandle { - imp: self.imp.get_table::("profile_dashboard_state"), + imp: self + .imp + .get_table::("profile_dashboard_state"), ctx: std::marker::PhantomData, } } @@ -49,8 +46,12 @@ impl<'ctx> __sdk::Table for ProfileDashboardStateTableHandle<'ctx> { type Row = ProfileDashboardState; type EventContext = super::EventContext; - fn count(&self) -> u64 { self.imp.count() } - fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = ProfileDashboardStateInsertCallbackId; @@ -96,39 +97,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for ProfileDashboardStateTableHandle<'ctx> } } - /// Access to the `user_id` unique index on the table `profile_dashboard_state`, - /// which allows point queries on the field of the same name - /// via the [`ProfileDashboardStateUserIdUnique::find`] method. - /// - /// Users are encouraged not to explicitly reference this type, - /// but to directly chain method calls, - /// like `ctx.db.profile_dashboard_state().user_id().find(...)`. - pub struct ProfileDashboardStateUserIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, - } +/// Access to the `user_id` unique index on the table `profile_dashboard_state`, +/// which allows point queries on the field of the same name +/// via the [`ProfileDashboardStateUserIdUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.profile_dashboard_state().user_id().find(...)`. +pub struct ProfileDashboardStateUserIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} - impl<'ctx> ProfileDashboardStateTableHandle<'ctx> { - /// Get a handle on the `user_id` unique index on the table `profile_dashboard_state`. - pub fn user_id(&self) -> ProfileDashboardStateUserIdUnique<'ctx> { - ProfileDashboardStateUserIdUnique { - imp: self.imp.get_unique_constraint::("user_id"), - phantom: std::marker::PhantomData, - } - } +impl<'ctx> ProfileDashboardStateTableHandle<'ctx> { + /// Get a handle on the `user_id` unique index on the table `profile_dashboard_state`. + pub fn user_id(&self) -> ProfileDashboardStateUserIdUnique<'ctx> { + ProfileDashboardStateUserIdUnique { + imp: self.imp.get_unique_constraint::("user_id"), + phantom: std::marker::PhantomData, } + } +} + +impl<'ctx> ProfileDashboardStateUserIdUnique<'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) + } +} - impl<'ctx> ProfileDashboardStateUserIdUnique<'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::("profile_dashboard_state"); _table.add_unique_constraint::("user_id", |row| &row.user_id); } @@ -138,26 +138,24 @@ 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() + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() }) } - #[allow(non_camel_case_types)] - /// Extension trait for query builder access to the table `ProfileDashboardState`. - /// - /// Implemented for [`__sdk::QueryTableAccessor`]. - pub trait profile_dashboard_stateQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `ProfileDashboardState`. - fn profile_dashboard_state(&self) -> __sdk::__query_builder::Table; - } - - impl profile_dashboard_stateQueryTableAccess for __sdk::QueryTableAccessor { - fn profile_dashboard_state(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("profile_dashboard_state") - } - } +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `ProfileDashboardState`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait profile_dashboard_stateQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `ProfileDashboardState`. + fn profile_dashboard_state(&self) -> __sdk::__query_builder::Table; +} +impl profile_dashboard_stateQueryTableAccess for __sdk::QueryTableAccessor { + fn profile_dashboard_state(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("profile_dashboard_state") + } +} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/profile_dashboard_state_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/profile_dashboard_state_type.rs index 3abd8b06..e5124048 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/profile_dashboard_state_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/profile_dashboard_state_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -20,12 +14,10 @@ pub struct ProfileDashboardState { pub updated_at: __sdk::Timestamp, } - impl __sdk::InModule for ProfileDashboardState { type Module = super::RemoteModule; } - /// Column accessor struct for the table `ProfileDashboardState`. /// /// Provides typed access to columns for query building. @@ -46,7 +38,6 @@ impl __sdk::__query_builder::HasCols for ProfileDashboardState { total_play_time_ms: __sdk::__query_builder::Col::new(table_name, "total_play_time_ms"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), - } } } @@ -63,10 +54,8 @@ impl __sdk::__query_builder::HasIxCols for ProfileDashboardState { fn ix_cols(table_name: &'static str) -> Self::IxCols { ProfileDashboardStateIxCols { user_id: __sdk::__query_builder::IxCol::new(table_name, "user_id"), - } } } impl __sdk::__query_builder::CanBeLookupTable for ProfileDashboardState {} - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/profile_played_world_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/profile_played_world_table.rs index 944de27b..0f147bd5 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/profile_played_world_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/profile_played_world_table.rs @@ -2,13 +2,8 @@ // 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::profile_played_world_type::ProfilePlayedWorld; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `profile_played_world`. /// @@ -36,7 +31,9 @@ pub trait ProfilePlayedWorldTableAccess { impl ProfilePlayedWorldTableAccess for super::RemoteTables { fn profile_played_world(&self) -> ProfilePlayedWorldTableHandle<'_> { ProfilePlayedWorldTableHandle { - imp: self.imp.get_table::("profile_played_world"), + imp: self + .imp + .get_table::("profile_played_world"), ctx: std::marker::PhantomData, } } @@ -49,8 +46,12 @@ impl<'ctx> __sdk::Table for ProfilePlayedWorldTableHandle<'ctx> { type Row = ProfilePlayedWorld; type EventContext = super::EventContext; - fn count(&self) -> u64 { self.imp.count() } - fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = ProfilePlayedWorldInsertCallbackId; @@ -96,39 +97,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for ProfilePlayedWorldTableHandle<'ctx> { } } - /// Access to the `played_world_id` unique index on the table `profile_played_world`, - /// which allows point queries on the field of the same name - /// via the [`ProfilePlayedWorldPlayedWorldIdUnique::find`] method. - /// - /// Users are encouraged not to explicitly reference this type, - /// but to directly chain method calls, - /// like `ctx.db.profile_played_world().played_world_id().find(...)`. - pub struct ProfilePlayedWorldPlayedWorldIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, - } +/// Access to the `played_world_id` unique index on the table `profile_played_world`, +/// which allows point queries on the field of the same name +/// via the [`ProfilePlayedWorldPlayedWorldIdUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.profile_played_world().played_world_id().find(...)`. +pub struct ProfilePlayedWorldPlayedWorldIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} - impl<'ctx> ProfilePlayedWorldTableHandle<'ctx> { - /// Get a handle on the `played_world_id` unique index on the table `profile_played_world`. - pub fn played_world_id(&self) -> ProfilePlayedWorldPlayedWorldIdUnique<'ctx> { - ProfilePlayedWorldPlayedWorldIdUnique { - imp: self.imp.get_unique_constraint::("played_world_id"), - phantom: std::marker::PhantomData, - } - } +impl<'ctx> ProfilePlayedWorldTableHandle<'ctx> { + /// Get a handle on the `played_world_id` unique index on the table `profile_played_world`. + pub fn played_world_id(&self) -> ProfilePlayedWorldPlayedWorldIdUnique<'ctx> { + ProfilePlayedWorldPlayedWorldIdUnique { + imp: self.imp.get_unique_constraint::("played_world_id"), + phantom: std::marker::PhantomData, } + } +} + +impl<'ctx> ProfilePlayedWorldPlayedWorldIdUnique<'ctx> { + /// Find the subscribed row whose `played_world_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) + } +} - impl<'ctx> ProfilePlayedWorldPlayedWorldIdUnique<'ctx> { - /// Find the subscribed row whose `played_world_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::("profile_played_world"); _table.add_unique_constraint::("played_world_id", |row| &row.played_world_id); } @@ -138,26 +138,24 @@ 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() + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() }) } - #[allow(non_camel_case_types)] - /// Extension trait for query builder access to the table `ProfilePlayedWorld`. - /// - /// Implemented for [`__sdk::QueryTableAccessor`]. - pub trait profile_played_worldQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `ProfilePlayedWorld`. - fn profile_played_world(&self) -> __sdk::__query_builder::Table; - } - - impl profile_played_worldQueryTableAccess for __sdk::QueryTableAccessor { - fn profile_played_world(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("profile_played_world") - } - } +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `ProfilePlayedWorld`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait profile_played_worldQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `ProfilePlayedWorld`. + fn profile_played_world(&self) -> __sdk::__query_builder::Table; +} +impl profile_played_worldQueryTableAccess for __sdk::QueryTableAccessor { + fn profile_played_world(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("profile_played_world") + } +} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/profile_played_world_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/profile_played_world_type.rs index b58b66c1..3b94036c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/profile_played_world_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/profile_played_world_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,9 +10,9 @@ pub struct ProfilePlayedWorld { pub played_world_id: String, pub user_id: String, pub world_key: String, - pub owner_user_id: Option::, - pub profile_id: Option::, - pub world_type: Option::, + pub owner_user_id: Option, + pub profile_id: Option, + pub world_type: Option, pub world_title: String, pub world_subtitle: String, pub first_played_at: __sdk::Timestamp, @@ -26,12 +20,10 @@ pub struct ProfilePlayedWorld { pub last_observed_play_time_ms: u64, } - impl __sdk::InModule for ProfilePlayedWorld { type Module = super::RemoteModule; } - /// Column accessor struct for the table `ProfilePlayedWorld`. /// /// Provides typed access to columns for query building. @@ -39,9 +31,9 @@ pub struct ProfilePlayedWorldCols { pub played_world_id: __sdk::__query_builder::Col, pub user_id: __sdk::__query_builder::Col, pub world_key: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col>, - pub profile_id: __sdk::__query_builder::Col>, - pub world_type: __sdk::__query_builder::Col>, + pub owner_user_id: __sdk::__query_builder::Col>, + pub profile_id: __sdk::__query_builder::Col>, + pub world_type: __sdk::__query_builder::Col>, pub world_title: __sdk::__query_builder::Col, pub world_subtitle: __sdk::__query_builder::Col, pub first_played_at: __sdk::__query_builder::Col, @@ -63,8 +55,10 @@ impl __sdk::__query_builder::HasCols for ProfilePlayedWorld { world_subtitle: __sdk::__query_builder::Col::new(table_name, "world_subtitle"), first_played_at: __sdk::__query_builder::Col::new(table_name, "first_played_at"), last_played_at: __sdk::__query_builder::Col::new(table_name, "last_played_at"), - last_observed_play_time_ms: __sdk::__query_builder::Col::new(table_name, "last_observed_play_time_ms"), - + last_observed_play_time_ms: __sdk::__query_builder::Col::new( + table_name, + "last_observed_play_time_ms", + ), } } } @@ -83,10 +77,8 @@ impl __sdk::__query_builder::HasIxCols for ProfilePlayedWorld { ProfilePlayedWorldIxCols { played_world_id: __sdk::__query_builder::IxCol::new(table_name, "played_world_id"), user_id: __sdk::__query_builder::IxCol::new(table_name, "user_id"), - } } } impl __sdk::__query_builder::CanBeLookupTable for ProfilePlayedWorld {} - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/profile_save_archive_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/profile_save_archive_table.rs index 4d503269..fc9c83e1 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/profile_save_archive_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/profile_save_archive_table.rs @@ -2,13 +2,8 @@ // 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::profile_save_archive_type::ProfileSaveArchive; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `profile_save_archive`. /// @@ -36,7 +31,9 @@ pub trait ProfileSaveArchiveTableAccess { impl ProfileSaveArchiveTableAccess for super::RemoteTables { fn profile_save_archive(&self) -> ProfileSaveArchiveTableHandle<'_> { ProfileSaveArchiveTableHandle { - imp: self.imp.get_table::("profile_save_archive"), + imp: self + .imp + .get_table::("profile_save_archive"), ctx: std::marker::PhantomData, } } @@ -49,8 +46,12 @@ impl<'ctx> __sdk::Table for ProfileSaveArchiveTableHandle<'ctx> { type Row = ProfileSaveArchive; type EventContext = super::EventContext; - fn count(&self) -> u64 { self.imp.count() } - fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = ProfileSaveArchiveInsertCallbackId; @@ -96,39 +97,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for ProfileSaveArchiveTableHandle<'ctx> { } } - /// Access to the `archive_id` unique index on the table `profile_save_archive`, - /// which allows point queries on the field of the same name - /// via the [`ProfileSaveArchiveArchiveIdUnique::find`] method. - /// - /// Users are encouraged not to explicitly reference this type, - /// but to directly chain method calls, - /// like `ctx.db.profile_save_archive().archive_id().find(...)`. - pub struct ProfileSaveArchiveArchiveIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, - } +/// Access to the `archive_id` unique index on the table `profile_save_archive`, +/// which allows point queries on the field of the same name +/// via the [`ProfileSaveArchiveArchiveIdUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.profile_save_archive().archive_id().find(...)`. +pub struct ProfileSaveArchiveArchiveIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} - impl<'ctx> ProfileSaveArchiveTableHandle<'ctx> { - /// Get a handle on the `archive_id` unique index on the table `profile_save_archive`. - pub fn archive_id(&self) -> ProfileSaveArchiveArchiveIdUnique<'ctx> { - ProfileSaveArchiveArchiveIdUnique { - imp: self.imp.get_unique_constraint::("archive_id"), - phantom: std::marker::PhantomData, - } - } +impl<'ctx> ProfileSaveArchiveTableHandle<'ctx> { + /// Get a handle on the `archive_id` unique index on the table `profile_save_archive`. + pub fn archive_id(&self) -> ProfileSaveArchiveArchiveIdUnique<'ctx> { + ProfileSaveArchiveArchiveIdUnique { + imp: self.imp.get_unique_constraint::("archive_id"), + phantom: std::marker::PhantomData, } + } +} + +impl<'ctx> ProfileSaveArchiveArchiveIdUnique<'ctx> { + /// Find the subscribed row whose `archive_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) + } +} - impl<'ctx> ProfileSaveArchiveArchiveIdUnique<'ctx> { - /// Find the subscribed row whose `archive_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::("profile_save_archive"); _table.add_unique_constraint::("archive_id", |row| &row.archive_id); } @@ -138,26 +138,24 @@ 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() + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() }) } - #[allow(non_camel_case_types)] - /// Extension trait for query builder access to the table `ProfileSaveArchive`. - /// - /// Implemented for [`__sdk::QueryTableAccessor`]. - pub trait profile_save_archiveQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `ProfileSaveArchive`. - fn profile_save_archive(&self) -> __sdk::__query_builder::Table; - } - - impl profile_save_archiveQueryTableAccess for __sdk::QueryTableAccessor { - fn profile_save_archive(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("profile_save_archive") - } - } +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `ProfileSaveArchive`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait profile_save_archiveQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `ProfileSaveArchive`. + fn profile_save_archive(&self) -> __sdk::__query_builder::Table; +} +impl profile_save_archiveQueryTableAccess for __sdk::QueryTableAccessor { + fn profile_save_archive(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("profile_save_archive") + } +} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/profile_save_archive_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/profile_save_archive_type.rs index f11c6024..5244fe4e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/profile_save_archive_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/profile_save_archive_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,27 +10,25 @@ pub struct ProfileSaveArchive { pub archive_id: String, pub user_id: String, pub world_key: String, - pub owner_user_id: Option::, - pub profile_id: Option::, - pub world_type: Option::, + pub owner_user_id: Option, + pub profile_id: Option, + pub world_type: Option, pub world_name: String, pub subtitle: String, pub summary_text: String, - pub cover_image_src: Option::, + pub cover_image_src: Option, pub saved_at: __sdk::Timestamp, pub bottom_tab: String, pub game_state_json: String, - pub current_story_json: Option::, + pub current_story_json: Option, pub created_at: __sdk::Timestamp, pub updated_at: __sdk::Timestamp, } - impl __sdk::InModule for ProfileSaveArchive { type Module = super::RemoteModule; } - /// Column accessor struct for the table `ProfileSaveArchive`. /// /// Provides typed access to columns for query building. @@ -44,17 +36,17 @@ pub struct ProfileSaveArchiveCols { pub archive_id: __sdk::__query_builder::Col, pub user_id: __sdk::__query_builder::Col, pub world_key: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col>, - pub profile_id: __sdk::__query_builder::Col>, - pub world_type: __sdk::__query_builder::Col>, + pub owner_user_id: __sdk::__query_builder::Col>, + pub profile_id: __sdk::__query_builder::Col>, + pub world_type: __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 cover_image_src: __sdk::__query_builder::Col>, pub saved_at: __sdk::__query_builder::Col, pub bottom_tab: __sdk::__query_builder::Col, pub game_state_json: __sdk::__query_builder::Col, - pub current_story_json: __sdk::__query_builder::Col>, + pub current_story_json: __sdk::__query_builder::Col>, pub created_at: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, } @@ -79,7 +71,6 @@ impl __sdk::__query_builder::HasCols for ProfileSaveArchive { current_story_json: __sdk::__query_builder::Col::new(table_name, "current_story_json"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), - } } } @@ -98,10 +89,8 @@ impl __sdk::__query_builder::HasIxCols for ProfileSaveArchive { ProfileSaveArchiveIxCols { archive_id: __sdk::__query_builder::IxCol::new(table_name, "archive_id"), user_id: __sdk::__query_builder::IxCol::new(table_name, "user_id"), - } } } impl __sdk::__query_builder::CanBeLookupTable for ProfileSaveArchive {} - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/profile_wallet_ledger_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/profile_wallet_ledger_table.rs index 1dab9684..48705ae9 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/profile_wallet_ledger_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/profile_wallet_ledger_table.rs @@ -2,14 +2,9 @@ // 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::profile_wallet_ledger_type::ProfileWalletLedger; use super::runtime_profile_wallet_ledger_source_type_type::RuntimeProfileWalletLedgerSourceType; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `profile_wallet_ledger`. /// @@ -37,7 +32,9 @@ pub trait ProfileWalletLedgerTableAccess { impl ProfileWalletLedgerTableAccess for super::RemoteTables { fn profile_wallet_ledger(&self) -> ProfileWalletLedgerTableHandle<'_> { ProfileWalletLedgerTableHandle { - imp: self.imp.get_table::("profile_wallet_ledger"), + imp: self + .imp + .get_table::("profile_wallet_ledger"), ctx: std::marker::PhantomData, } } @@ -50,8 +47,12 @@ impl<'ctx> __sdk::Table for ProfileWalletLedgerTableHandle<'ctx> { type Row = ProfileWalletLedger; type EventContext = super::EventContext; - fn count(&self) -> u64 { self.imp.count() } - fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = ProfileWalletLedgerInsertCallbackId; @@ -97,39 +98,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for ProfileWalletLedgerTableHandle<'ctx> { } } - /// Access to the `wallet_ledger_id` unique index on the table `profile_wallet_ledger`, - /// which allows point queries on the field of the same name - /// via the [`ProfileWalletLedgerWalletLedgerIdUnique::find`] method. - /// - /// Users are encouraged not to explicitly reference this type, - /// but to directly chain method calls, - /// like `ctx.db.profile_wallet_ledger().wallet_ledger_id().find(...)`. - pub struct ProfileWalletLedgerWalletLedgerIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, - } +/// Access to the `wallet_ledger_id` unique index on the table `profile_wallet_ledger`, +/// which allows point queries on the field of the same name +/// via the [`ProfileWalletLedgerWalletLedgerIdUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.profile_wallet_ledger().wallet_ledger_id().find(...)`. +pub struct ProfileWalletLedgerWalletLedgerIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} - impl<'ctx> ProfileWalletLedgerTableHandle<'ctx> { - /// Get a handle on the `wallet_ledger_id` unique index on the table `profile_wallet_ledger`. - pub fn wallet_ledger_id(&self) -> ProfileWalletLedgerWalletLedgerIdUnique<'ctx> { - ProfileWalletLedgerWalletLedgerIdUnique { - imp: self.imp.get_unique_constraint::("wallet_ledger_id"), - phantom: std::marker::PhantomData, - } - } +impl<'ctx> ProfileWalletLedgerTableHandle<'ctx> { + /// Get a handle on the `wallet_ledger_id` unique index on the table `profile_wallet_ledger`. + pub fn wallet_ledger_id(&self) -> ProfileWalletLedgerWalletLedgerIdUnique<'ctx> { + ProfileWalletLedgerWalletLedgerIdUnique { + imp: self.imp.get_unique_constraint::("wallet_ledger_id"), + phantom: std::marker::PhantomData, } + } +} + +impl<'ctx> ProfileWalletLedgerWalletLedgerIdUnique<'ctx> { + /// Find the subscribed row whose `wallet_ledger_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) + } +} - impl<'ctx> ProfileWalletLedgerWalletLedgerIdUnique<'ctx> { - /// Find the subscribed row whose `wallet_ledger_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::("profile_wallet_ledger"); _table.add_unique_constraint::("wallet_ledger_id", |row| &row.wallet_ledger_id); } @@ -139,26 +139,24 @@ 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() + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() }) } - #[allow(non_camel_case_types)] - /// Extension trait for query builder access to the table `ProfileWalletLedger`. - /// - /// Implemented for [`__sdk::QueryTableAccessor`]. - pub trait profile_wallet_ledgerQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `ProfileWalletLedger`. - fn profile_wallet_ledger(&self) -> __sdk::__query_builder::Table; - } - - impl profile_wallet_ledgerQueryTableAccess for __sdk::QueryTableAccessor { - fn profile_wallet_ledger(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("profile_wallet_ledger") - } - } +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `ProfileWalletLedger`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait profile_wallet_ledgerQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `ProfileWalletLedger`. + fn profile_wallet_ledger(&self) -> __sdk::__query_builder::Table; +} +impl profile_wallet_ledgerQueryTableAccess for __sdk::QueryTableAccessor { + fn profile_wallet_ledger(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("profile_wallet_ledger") + } +} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/profile_wallet_ledger_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/profile_wallet_ledger_type.rs index b5535645..78364d5a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/profile_wallet_ledger_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/profile_wallet_ledger_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_profile_wallet_ledger_source_type_type::RuntimeProfileWalletLedgerSourceType; @@ -22,12 +17,10 @@ pub struct ProfileWalletLedger { pub created_at: __sdk::Timestamp, } - impl __sdk::InModule for ProfileWalletLedger { type Module = super::RemoteModule; } - /// Column accessor struct for the table `ProfileWalletLedger`. /// /// Provides typed access to columns for query building. @@ -36,7 +29,8 @@ pub struct ProfileWalletLedgerCols { pub user_id: __sdk::__query_builder::Col, pub amount_delta: __sdk::__query_builder::Col, pub balance_after: __sdk::__query_builder::Col, - pub source_type: __sdk::__query_builder::Col, + pub source_type: + __sdk::__query_builder::Col, pub created_at: __sdk::__query_builder::Col, } @@ -50,7 +44,6 @@ impl __sdk::__query_builder::HasCols for ProfileWalletLedger { balance_after: __sdk::__query_builder::Col::new(table_name, "balance_after"), source_type: __sdk::__query_builder::Col::new(table_name, "source_type"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), - } } } @@ -69,10 +62,8 @@ impl __sdk::__query_builder::HasIxCols for ProfileWalletLedger { ProfileWalletLedgerIxCols { user_id: __sdk::__query_builder::IxCol::new(table_name, "user_id"), wallet_ledger_id: __sdk::__query_builder::IxCol::new(table_name, "wallet_ledger_id"), - } } } impl __sdk::__query_builder::CanBeLookupTable for ProfileWalletLedger {} - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/publish_big_fish_game_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/publish_big_fish_game_procedure.rs index 6a2bfdd8..d4507ad8 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/publish_big_fish_game_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/publish_big_fish_game_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::big_fish_session_procedure_result_type::BigFishSessionProcedureResult; use super::big_fish_publish_input_type::BigFishPublishInput; +use super::big_fish_session_procedure_result_type::BigFishSessionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct PublishBigFishGameArgs { +struct PublishBigFishGameArgs { pub input: BigFishPublishInput, } - impl __sdk::InModule for PublishBigFishGameArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for PublishBigFishGameArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait publish_big_fish_game { - fn publish_big_fish_game(&self, input: BigFishPublishInput, -) { - self.publish_big_fish_game_then(input, |_, _| {}); + fn publish_big_fish_game(&self, input: BigFishPublishInput) { + self.publish_big_fish_game_then(input, |_, _| {}); } fn publish_big_fish_game_then( &self, input: BigFishPublishInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl publish_big_fish_game for super::RemoteProcedures { &self, input: BigFishPublishInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>( - "publish_big_fish_game", - PublishBigFishGameArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>( + "publish_big_fish_game", + PublishBigFishGameArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/publish_custom_world_profile_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/publish_custom_world_profile_and_return_procedure.rs index 2dcaf010..d5741922 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/publish_custom_world_profile_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/publish_custom_world_profile_and_return_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_library_mutation_result_type::CustomWorldLibraryMutationResult; use super::custom_world_profile_publish_input_type::CustomWorldProfilePublishInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct PublishCustomWorldProfileAndReturnArgs { +struct PublishCustomWorldProfileAndReturnArgs { pub input: CustomWorldProfilePublishInput, } - impl __sdk::InModule for PublishCustomWorldProfileAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for PublishCustomWorldProfileAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait publish_custom_world_profile_and_return { - fn publish_custom_world_profile_and_return(&self, input: CustomWorldProfilePublishInput, -) { - self.publish_custom_world_profile_and_return_then(input, |_, _| {}); + fn publish_custom_world_profile_and_return(&self, input: CustomWorldProfilePublishInput) { + self.publish_custom_world_profile_and_return_then(input, |_, _| {}); } fn publish_custom_world_profile_and_return_then( &self, input: CustomWorldProfilePublishInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl publish_custom_world_profile_and_return for super::RemoteProcedures { &self, input: CustomWorldProfilePublishInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, CustomWorldLibraryMutationResult>( - "publish_custom_world_profile_and_return", - PublishCustomWorldProfileAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, CustomWorldLibraryMutationResult>( + "publish_custom_world_profile_and_return", + PublishCustomWorldProfileAndReturnArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/publish_custom_world_profile_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/publish_custom_world_profile_reducer.rs index f6d34d5c..2e2f71f6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/publish_custom_world_profile_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/publish_custom_world_profile_reducer.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_profile_publish_input_type::CustomWorldProfilePublishInput; @@ -19,10 +14,8 @@ pub(super) struct PublishCustomWorldProfileArgs { impl From for super::Reducer { fn from(args: PublishCustomWorldProfileArgs) -> Self { - Self::PublishCustomWorldProfile { - input: args.input, -} -} + Self::PublishCustomWorldProfile { input: args.input } + } } impl __sdk::InModule for PublishCustomWorldProfileArgs { @@ -40,9 +33,11 @@ pub trait publish_custom_world_profile { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`publish_custom_world_profile:publish_custom_world_profile_then`] to run a callback after the reducer completes. - fn publish_custom_world_profile(&self, input: CustomWorldProfilePublishInput, -) -> __sdk::Result<()> { - self.publish_custom_world_profile_then(input, |_, _| {}) + fn publish_custom_world_profile( + &self, + input: CustomWorldProfilePublishInput, + ) -> __sdk::Result<()> { + self.publish_custom_world_profile_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `publish_custom_world_profile` to run as soon as possible, @@ -55,9 +50,11 @@ pub trait publish_custom_world_profile { &self, input: CustomWorldProfilePublishInput, - callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) - + Send - + 'static, + callback: impl FnOnce( + &super::ReducerEventContext, + Result, __sdk::InternalError>, + ) + Send + + 'static, ) -> __sdk::Result<()>; } @@ -66,11 +63,13 @@ impl publish_custom_world_profile for super::RemoteReducers { &self, input: CustomWorldProfilePublishInput, - 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(PublishCustomWorldProfileArgs { input, }, callback) + self.imp + .invoke_reducer_with_callback(PublishCustomWorldProfileArgs { input }, callback) } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/publish_custom_world_world_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/publish_custom_world_world_procedure.rs index 083034b9..42c76aad 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/publish_custom_world_world_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/publish_custom_world_world_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_publish_world_input_type::CustomWorldPublishWorldInput; use super::custom_world_publish_world_result_type::CustomWorldPublishWorldResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct PublishCustomWorldWorldArgs { +struct PublishCustomWorldWorldArgs { pub input: CustomWorldPublishWorldInput, } - impl __sdk::InModule for PublishCustomWorldWorldArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for PublishCustomWorldWorldArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait publish_custom_world_world { - fn publish_custom_world_world(&self, input: CustomWorldPublishWorldInput, -) { - self.publish_custom_world_world_then(input, |_, _| {}); + fn publish_custom_world_world(&self, input: CustomWorldPublishWorldInput) { + self.publish_custom_world_world_then(input, |_, _| {}); } fn publish_custom_world_world_then( &self, input: CustomWorldPublishWorldInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl publish_custom_world_world for super::RemoteProcedures { &self, input: CustomWorldPublishWorldInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, CustomWorldPublishWorldResult>( - "publish_custom_world_world", - PublishCustomWorldWorldArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, CustomWorldPublishWorldResult>( + "publish_custom_world_world", + PublishCustomWorldWorldArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/publish_puzzle_work_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/publish_puzzle_work_procedure.rs index 4592d939..932b66d6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/publish_puzzle_work_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/publish_puzzle_work_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::puzzle_work_procedure_result_type::PuzzleWorkProcedureResult; use super::puzzle_publish_input_type::PuzzlePublishInput; +use super::puzzle_work_procedure_result_type::PuzzleWorkProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct PublishPuzzleWorkArgs { +struct PublishPuzzleWorkArgs { pub input: PuzzlePublishInput, } - impl __sdk::InModule for PublishPuzzleWorkArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for PublishPuzzleWorkArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait publish_puzzle_work { - fn publish_puzzle_work(&self, input: PuzzlePublishInput, -) { - self.publish_puzzle_work_then(input, |_, _| {}); + fn publish_puzzle_work(&self, input: PuzzlePublishInput) { + self.publish_puzzle_work_then(input, |_, _| {}); } fn publish_puzzle_work_then( &self, input: PuzzlePublishInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl publish_puzzle_work for super::RemoteProcedures { &self, input: PuzzlePublishInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, PuzzleWorkProcedureResult>( - "publish_puzzle_work", - PublishPuzzleWorkArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, PuzzleWorkProcedureResult>( + "publish_puzzle_work", + PublishPuzzleWorkArgs { input }, + __callback, + ); } } - 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 index 56f8df2d..ca46edeb 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -20,12 +15,8 @@ pub enum PuzzleAgentMessageKind { 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 index b34f41c4..5dd7eb51 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,12 +13,8 @@ pub enum PuzzleAgentMessageRole { 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 index ceb74765..b0bb85f2 100644 --- 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 @@ -2,15 +2,10 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::puzzle_agent_message_role_type::PuzzleAgentMessageRole; 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)] @@ -23,12 +18,10 @@ pub struct PuzzleAgentMessageRow { 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. @@ -51,7 +44,6 @@ impl __sdk::__query_builder::HasCols for PuzzleAgentMessageRow { 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"), - } } } @@ -70,10 +62,8 @@ impl __sdk::__query_builder::HasIxCols for PuzzleAgentMessageRow { 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_submit_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_submit_input_type.rs index 3a9fa169..93086643 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_submit_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_submit_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -20,8 +14,6 @@ pub struct PuzzleAgentMessageSubmitInput { pub submitted_at_micros: i64, } - impl __sdk::InModule for PuzzleAgentMessageSubmitInput { type Module = super::RemoteModule; } - 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 index e282d9e9..0f54e13b 100644 --- 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 @@ -2,15 +2,10 @@ // 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_row_type::PuzzleAgentMessageRow; -use super::puzzle_agent_message_role_type::PuzzleAgentMessageRole; 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`. /// @@ -38,7 +33,9 @@ pub trait PuzzleAgentMessageTableAccess { impl PuzzleAgentMessageTableAccess for super::RemoteTables { fn puzzle_agent_message(&self) -> PuzzleAgentMessageTableHandle<'_> { PuzzleAgentMessageTableHandle { - imp: self.imp.get_table::("puzzle_agent_message"), + imp: self + .imp + .get_table::("puzzle_agent_message"), ctx: std::marker::PhantomData, } } @@ -51,8 +48,12 @@ 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() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = PuzzleAgentMessageInsertCallbackId; @@ -98,39 +99,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for PuzzleAgentMessageTableHandle<'ctx> { } } - /// 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>, - } +/// 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> 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) + } +} - 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); } @@ -140,26 +140,24 @@ 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() + __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") - } - } +#[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_create_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_create_input_type.rs index f07fcd6b..c3ccc7d2 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_create_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_create_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -21,8 +15,6 @@ pub struct PuzzleAgentSessionCreateInput { pub created_at_micros: i64, } - impl __sdk::InModule for PuzzleAgentSessionCreateInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_get_input_type.rs index e411bead..af4159c6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_get_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +11,6 @@ pub struct PuzzleAgentSessionGetInput { pub owner_user_id: String, } - impl __sdk::InModule for PuzzleAgentSessionGetInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_procedure_result_type.rs index f19f290d..39506659 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_procedure_result_type.rs @@ -2,24 +2,16 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct PuzzleAgentSessionProcedureResult { pub ok: bool, - pub session_json: Option::, - pub error_message: Option::, + pub session_json: Option, + pub error_message: Option, } - impl __sdk::InModule for PuzzleAgentSessionProcedureResult { type Module = super::RemoteModule; } - 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 index 96e98e56..e056ada1 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::puzzle_agent_stage_type::PuzzleAgentStage; @@ -21,19 +16,17 @@ pub struct PuzzleAgentSessionRow { 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 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. @@ -45,9 +38,9 @@ pub struct PuzzleAgentSessionRowCols { 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 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, } @@ -64,11 +57,16 @@ impl __sdk::__query_builder::HasCols for PuzzleAgentSessionRow { 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"), + 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"), - } } } @@ -87,10 +85,8 @@ impl __sdk::__query_builder::HasIxCols for PuzzleAgentSessionRow { 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 index 0272d915..08c05360 100644 --- 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 @@ -2,14 +2,9 @@ // 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_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`. /// @@ -37,7 +32,9 @@ pub trait PuzzleAgentSessionTableAccess { impl PuzzleAgentSessionTableAccess for super::RemoteTables { fn puzzle_agent_session(&self) -> PuzzleAgentSessionTableHandle<'_> { PuzzleAgentSessionTableHandle { - imp: self.imp.get_table::("puzzle_agent_session"), + imp: self + .imp + .get_table::("puzzle_agent_session"), ctx: std::marker::PhantomData, } } @@ -50,8 +47,12 @@ 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() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = PuzzleAgentSessionInsertCallbackId; @@ -97,39 +98,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for PuzzleAgentSessionTableHandle<'ctx> { } } - /// 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>, - } +/// 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> 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) + } +} - 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); } @@ -139,26 +139,24 @@ 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() + __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") - } - } +#[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 index 00cbc81b..9d41ea54 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -22,12 +17,8 @@ pub enum PuzzleAgentStage { ReadyToPublish, Published, - } - - impl __sdk::InModule for PuzzleAgentStage { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_draft_compile_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_draft_compile_input_type.rs index 703538e4..3b5f565f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_draft_compile_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_draft_compile_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,8 +12,6 @@ pub struct PuzzleDraftCompileInput { pub compiled_at_micros: i64, } - impl __sdk::InModule for PuzzleDraftCompileInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_generated_images_save_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_generated_images_save_input_type.rs index 0c2196b4..8c409aed 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_generated_images_save_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_generated_images_save_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -19,8 +13,6 @@ pub struct PuzzleGeneratedImagesSaveInput { pub saved_at_micros: i64, } - impl __sdk::InModule for PuzzleGeneratedImagesSaveInput { type Module = super::RemoteModule; } - 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 index 7ff8b5c6..38ece3cf 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,12 +11,8 @@ 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_publish_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_publish_input_type.rs index d3a5d26d..83cbc37c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_publish_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_publish_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,14 +12,12 @@ pub struct PuzzlePublishInput { pub work_id: String, pub profile_id: String, pub author_display_name: String, - pub level_name: Option::, - pub summary: Option::, - pub theme_tags: Option::>, + pub level_name: Option, + pub summary: Option, + pub theme_tags: Option>, pub published_at_micros: i64, } - impl __sdk::InModule for PuzzlePublishInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_drag_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_drag_input_type.rs index 753e2932..b5036117 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_drag_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_drag_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -21,8 +15,6 @@ pub struct PuzzleRunDragInput { pub dragged_at_micros: i64, } - impl __sdk::InModule for PuzzleRunDragInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_get_input_type.rs index cf15f8b3..b3961e57 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_get_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +11,6 @@ pub struct PuzzleRunGetInput { pub owner_user_id: String, } - impl __sdk::InModule for PuzzleRunGetInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_next_level_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_next_level_input_type.rs index d6a9a285..18258482 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_next_level_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_next_level_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,8 +12,6 @@ pub struct PuzzleRunNextLevelInput { pub advanced_at_micros: i64, } - impl __sdk::InModule for PuzzleRunNextLevelInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_procedure_result_type.rs index 215490dc..54f6349b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_procedure_result_type.rs @@ -2,24 +2,16 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct PuzzleRunProcedureResult { pub ok: bool, - pub run_json: Option::, - pub error_message: Option::, + pub run_json: Option, + pub error_message: Option, } - impl __sdk::InModule for PuzzleRunProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_start_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_start_input_type.rs index 55e0a93e..7b4bed29 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_start_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_start_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -19,8 +13,6 @@ pub struct PuzzleRunStartInput { pub started_at_micros: i64, } - impl __sdk::InModule for PuzzleRunStartInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_swap_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_swap_input_type.rs index 3b5baa18..e92ca711 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_swap_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_swap_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -20,8 +14,6 @@ pub struct PuzzleRunSwapInput { pub swapped_at_micros: i64, } - impl __sdk::InModule for PuzzleRunSwapInput { 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 index daf67f5b..e610dfbf 100644 --- 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 @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -27,12 +21,10 @@ pub struct PuzzleRuntimeRunRow { 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. @@ -59,15 +51,26 @@ impl __sdk::__query_builder::HasCols for PuzzleRuntimeRunRow { 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"), + 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"), + 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"), - } } } @@ -86,10 +89,8 @@ impl __sdk::__query_builder::HasIxCols for PuzzleRuntimeRunRow { 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 index 5447392d..1cd988cc 100644 --- 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 @@ -2,13 +2,8 @@ // 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_runtime_run_row_type::PuzzleRuntimeRunRow; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `puzzle_runtime_run`. /// @@ -36,7 +31,9 @@ pub trait PuzzleRuntimeRunTableAccess { impl PuzzleRuntimeRunTableAccess for super::RemoteTables { fn puzzle_runtime_run(&self) -> PuzzleRuntimeRunTableHandle<'_> { PuzzleRuntimeRunTableHandle { - imp: self.imp.get_table::("puzzle_runtime_run"), + imp: self + .imp + .get_table::("puzzle_runtime_run"), ctx: std::marker::PhantomData, } } @@ -49,8 +46,12 @@ 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() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = PuzzleRuntimeRunInsertCallbackId; @@ -96,39 +97,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for PuzzleRuntimeRunTableHandle<'ctx> { } } - /// 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>, - } +/// 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> 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) + } +} - 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); } @@ -138,26 +138,24 @@ 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() + __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") - } - } +#[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_select_cover_image_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_select_cover_image_input_type.rs index 847ac3a4..516d16b9 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_select_cover_image_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_select_cover_image_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -19,8 +13,6 @@ pub struct PuzzleSelectCoverImageInput { pub selected_at_micros: i64, } - impl __sdk::InModule for PuzzleSelectCoverImageInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_get_input_type.rs index 74cf57a1..5f37e13f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_get_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,8 +10,6 @@ pub struct PuzzleWorkGetInput { pub profile_id: String, } - impl __sdk::InModule for PuzzleWorkGetInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_procedure_result_type.rs index 0da3b49c..d59a56cc 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_procedure_result_type.rs @@ -2,24 +2,16 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct PuzzleWorkProcedureResult { pub ok: bool, - pub item_json: Option::, - pub error_message: Option::, + pub item_json: Option, + pub error_message: Option, } - impl __sdk::InModule for PuzzleWorkProcedureResult { type Module = super::RemoteModule; } - 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 index e5482282..be53fc17 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::puzzle_publication_status_type::PuzzlePublicationStatus; @@ -17,28 +12,26 @@ pub struct PuzzleWorkProfileRow { pub profile_id: String, pub work_id: String, pub owner_user_id: String, - pub source_session_id: Option::, + pub source_session_id: Option, pub author_display_name: String, pub level_name: String, pub summary: String, pub theme_tags_json: String, - pub cover_image_src: Option::, - pub cover_asset_id: Option::, + pub cover_image_src: Option, + pub cover_asset_id: Option, 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 published_at: Option<__sdk::Timestamp>, } - impl __sdk::InModule for PuzzleWorkProfileRow { type Module = super::RemoteModule; } - /// Column accessor struct for the table `PuzzleWorkProfileRow`. /// /// Provides typed access to columns for query building. @@ -46,20 +39,21 @@ 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 source_session_id: __sdk::__query_builder::Col>, pub author_display_name: __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 publication_status: __sdk::__query_builder::Col, + pub cover_image_src: __sdk::__query_builder::Col>, + pub cover_asset_id: __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 published_at: __sdk::__query_builder::Col>, } impl __sdk::__query_builder::HasCols for PuzzleWorkProfileRow { @@ -70,7 +64,10 @@ impl __sdk::__query_builder::HasCols for PuzzleWorkProfileRow { 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"), + author_display_name: __sdk::__query_builder::Col::new( + table_name, + "author_display_name", + ), 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"), @@ -83,7 +80,6 @@ impl __sdk::__query_builder::HasCols for PuzzleWorkProfileRow { 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"), - } } } @@ -94,7 +90,8 @@ impl __sdk::__query_builder::HasCols for PuzzleWorkProfileRow { 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, + pub publication_status: + __sdk::__query_builder::IxCol, } impl __sdk::__query_builder::HasIxCols for PuzzleWorkProfileRow { @@ -103,11 +100,12 @@ impl __sdk::__query_builder::HasIxCols for PuzzleWorkProfileRow { 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"), - + 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 index c5f14f0f..673a9841 100644 --- 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 @@ -2,14 +2,9 @@ // 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_work_profile_row_type::PuzzleWorkProfileRow; 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`. /// @@ -37,7 +32,9 @@ pub trait PuzzleWorkProfileTableAccess { impl PuzzleWorkProfileTableAccess for super::RemoteTables { fn puzzle_work_profile(&self) -> PuzzleWorkProfileTableHandle<'_> { PuzzleWorkProfileTableHandle { - imp: self.imp.get_table::("puzzle_work_profile"), + imp: self + .imp + .get_table::("puzzle_work_profile"), ctx: std::marker::PhantomData, } } @@ -50,8 +47,12 @@ 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() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = PuzzleWorkProfileInsertCallbackId; @@ -97,39 +98,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for PuzzleWorkProfileTableHandle<'ctx> { } } - /// 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>, - } +/// 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> 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) + } +} - 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); } @@ -139,26 +139,24 @@ 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() + __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") - } - } +#[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/puzzle_work_upsert_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_upsert_input_type.rs index ae412d68..809ce64d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_upsert_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_upsert_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,14 +11,12 @@ pub struct PuzzleWorkUpsertInput { pub owner_user_id: String, pub level_name: String, pub summary: String, - pub theme_tags: Vec::, - pub cover_image_src: Option::, - pub cover_asset_id: Option::, + pub theme_tags: Vec, + pub cover_image_src: Option, + pub cover_asset_id: Option, pub updated_at_micros: i64, } - impl __sdk::InModule for PuzzleWorkUpsertInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_works_list_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_works_list_input_type.rs index e1d55a5f..4ad5ef5b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_works_list_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_works_list_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,8 +10,6 @@ pub struct PuzzleWorksListInput { pub owner_user_id: String, } - impl __sdk::InModule for PuzzleWorksListInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_works_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_works_procedure_result_type.rs index 80a1c401..6a34c60f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_works_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_works_procedure_result_type.rs @@ -2,24 +2,16 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct PuzzleWorksProcedureResult { pub ok: bool, - pub items_json: Option::, - pub error_message: Option::, + pub items_json: Option, + pub error_message: Option, } - impl __sdk::InModule for PuzzleWorksProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_completion_ack_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_completion_ack_input_type.rs index dbe06a17..678ec032 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_completion_ack_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_completion_ack_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +11,6 @@ pub struct QuestCompletionAckInput { pub updated_at_micros: i64, } - impl __sdk::InModule for QuestCompletionAckInput { type Module = super::RemoteModule; } - 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 index 08debc1e..d12363ff 100644 --- 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 @@ -2,23 +2,15 @@ // 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 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 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 index 9b69c1f7..4e1d0a5d 100644 --- 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 @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,8 +12,6 @@ pub struct QuestItemDeliveredSignal { 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 index 2e742860..c3176590 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -22,12 +17,8 @@ pub enum QuestLogEventKind { 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 index 069f1084..b1ac8c78 100644 --- 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 @@ -2,17 +2,12 @@ // 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_type::QuestLog; -use super::quest_status_type::QuestStatus; -use super::quest_progress_signal_type::QuestProgressSignal; 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`. /// @@ -53,8 +48,12 @@ 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() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = QuestLogInsertCallbackId; @@ -100,39 +99,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for QuestLogTableHandle<'ctx> { } } - /// 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>, - } +/// 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> 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) + } +} - 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); } @@ -142,26 +140,24 @@ 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() + __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") - } - } +#[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 index d4e28a66..d893857a 100644 --- 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 @@ -2,17 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::quest_status_type::QuestStatus; -use super::quest_progress_signal_type::QuestProgressSignal; 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)] @@ -23,19 +18,17 @@ pub struct QuestLog { 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 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. @@ -46,10 +39,10 @@ pub struct QuestLogCols { 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 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, } @@ -68,7 +61,6 @@ impl __sdk::__query_builder::HasCols for QuestLog { 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"), - } } } @@ -90,11 +82,12 @@ impl __sdk::__query_builder::HasIxCols for QuestLog { 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"), - + 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 index 45c26c18..730e7565 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::quest_narrative_origin_type::QuestNarrativeOrigin; use super::quest_narrative_type_type::QuestNarrativeType; @@ -21,11 +16,9 @@ pub struct QuestNarrativeBindingSnapshot { pub issuer_goal: String, pub player_hook: String, pub world_reason: String, - pub followup_hooks: Vec::, + 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 index 53f324af..34ce63f3 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,12 +11,8 @@ 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 index e390707e..ac5319cd 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -24,12 +19,8 @@ pub enum QuestNarrativeType { 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 index 356ae48e..a0f1f8bb 100644 --- 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 @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,8 +10,6 @@ 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 index a62032a7..39042f37 100644 --- 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 @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,8 +10,6 @@ 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 index 4139db37..665faa30 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -24,12 +19,8 @@ pub enum QuestObjectiveKind { 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 index e617912b..38682e68 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::quest_objective_kind_type::QuestObjectiveKind; @@ -15,15 +10,13 @@ use super::quest_objective_kind_type::QuestObjectiveKind; #[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 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 index b957a0a7..5764d273 100644 --- 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 @@ -2,19 +2,14 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::quest_hostile_npc_defeated_signal_type::QuestHostileNpcDefeatedSignal; -use super::quest_treasure_inspected_signal_type::QuestTreasureInspectedSignal; +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_item_delivered_signal_type::QuestItemDeliveredSignal; +use super::quest_treasure_inspected_signal_type::QuestTreasureInspectedSignal; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -30,12 +25,8 @@ pub enum QuestProgressSignal { 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_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_record_input_type.rs index 6a82982d..d07da423 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_record_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_record_input_type.rs @@ -2,16 +2,11 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::quest_status_type::QuestStatus; -use super::quest_reward_snapshot_type::QuestRewardSnapshot; use super::quest_narrative_binding_snapshot_type::QuestNarrativeBindingSnapshot; +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)] @@ -19,15 +14,15 @@ use super::quest_step_snapshot_type::QuestStepSnapshot; pub struct QuestRecordInput { pub quest_id: String, pub runtime_session_id: String, - pub story_session_id: Option::, + 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 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, @@ -36,18 +31,16 @@ pub struct QuestRecordInput { pub reward: QuestRewardSnapshot, pub reward_text: String, pub narrative_binding: QuestNarrativeBindingSnapshot, - pub steps: Vec::, - pub active_step_id: Option::, + 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 hidden_flags: Vec, + pub discovered_fact_ids: Vec, + pub related_carrier_ids: Vec, + pub consequence_ids: Vec, pub created_at_micros: i64, } - impl __sdk::InModule for QuestRecordInput { 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 index 3ccd7a81..07e6e918 100644 --- 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 @@ -2,18 +2,13 @@ // 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_record_type::QuestRecord; -use super::quest_status_type::QuestStatus; -use super::quest_reward_snapshot_type::QuestRewardSnapshot; use super::quest_narrative_binding_snapshot_type::QuestNarrativeBindingSnapshot; -use super::quest_step_snapshot_type::QuestStepSnapshot; 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`. /// @@ -54,8 +49,12 @@ 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() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = QuestRecordInsertCallbackId; @@ -101,39 +100,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for QuestRecordTableHandle<'ctx> { } } - /// 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>, - } +/// 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> 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) + } +} - 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); } @@ -143,26 +141,24 @@ 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() + __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") - } - } +#[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 index 10f98806..4243e91c 100644 --- 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 @@ -2,33 +2,28 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::quest_status_type::QuestStatus; -use super::quest_reward_snapshot_type::QuestRewardSnapshot; use super::quest_narrative_binding_snapshot_type::QuestNarrativeBindingSnapshot; -use super::quest_step_snapshot_type::QuestStepSnapshot; 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 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 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, @@ -39,40 +34,38 @@ pub struct QuestRecord { pub reward: QuestRewardSnapshot, pub reward_text: String, pub narrative_binding: QuestNarrativeBindingSnapshot, - pub steps: Vec::, - pub active_step_id: Option::, + 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 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>, + 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 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 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, @@ -83,17 +76,17 @@ pub struct QuestRecordCols { 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 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 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>, + pub completed_at: __sdk::__query_builder::Col>, + pub turned_in_at: __sdk::__query_builder::Col>, } impl __sdk::__query_builder::HasCols for QuestRecord { @@ -117,7 +110,10 @@ impl __sdk::__query_builder::HasCols for QuestRecord { 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"), + 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"), @@ -125,14 +121,19 @@ impl __sdk::__query_builder::HasCols for QuestRecord { 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"), + 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"), - } } } @@ -154,11 +155,12 @@ impl __sdk::__query_builder::HasIxCols for QuestRecord { 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"), - + 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 index 333521e0..43a942c4 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,12 +13,8 @@ pub enum QuestRewardEquipmentSlot { 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 index 560847bd..9938686a 100644 --- 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 @@ -2,23 +2,15 @@ // 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 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::, + 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 index 632c46aa..7fc4f7ec 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -22,12 +17,8 @@ pub enum QuestRewardItemRarity { 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 index dc0af611..a62f9d93 100644 --- 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 @@ -2,15 +2,10 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::quest_reward_item_rarity_type::QuestRewardItemRarity; 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)] @@ -18,17 +13,15 @@ pub struct QuestRewardItem { pub item_id: String, pub category: String, pub name: String, - pub description: Option::, + pub description: Option, pub quantity: u32, pub rarity: QuestRewardItemRarity, - pub tags: Vec::, + pub tags: Vec, pub stackable: bool, pub stack_key: String, - pub equipment_slot_id: Option::, + 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 index 55790858..995e84ad 100644 --- 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 @@ -2,29 +2,22 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::quest_reward_item_type::QuestRewardItem; 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::, + 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 index d188fab1..723d9325 100644 --- 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 @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,8 +10,6 @@ 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_apply_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_signal_apply_input_type.rs index 89cc2c6f..d93ff928 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_signal_apply_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_signal_apply_input_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::quest_progress_signal_type::QuestProgressSignal; @@ -19,8 +14,6 @@ pub struct QuestSignalApplyInput { pub updated_at_micros: i64, } - impl __sdk::InModule for QuestSignalApplyInput { 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 index 0d36f2fa..04ea6661 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -24,12 +19,8 @@ pub enum QuestSignalKind { 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 index 3ea098d8..f5defbb7 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -24,12 +19,8 @@ pub enum QuestStatus { 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 index c1e3bc1a..0f27cb9e 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::quest_objective_kind_type::QuestObjectiveKind; @@ -16,10 +11,10 @@ use super::quest_objective_kind_type::QuestObjectiveKind; 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 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, @@ -27,8 +22,6 @@ pub struct QuestStepSnapshot { 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 index 8003e616..51caed77 100644 --- 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 @@ -2,22 +2,14 @@ // 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 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::, + pub scene_id: Option, } - impl __sdk::InModule for QuestTreasureInspectedSignal { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_turn_in_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_turn_in_input_type.rs index 9d87ae49..4f48a44a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_turn_in_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_turn_in_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +11,6 @@ pub struct QuestTurnInInput { pub turned_in_at_micros: i64, } - impl __sdk::InModule for QuestTurnInInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_and_return_procedure.rs index 9b886a0d..7d6fbfd1 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_and_return_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::resolve_combat_action_input_type::ResolveCombatActionInput; use super::resolve_combat_action_procedure_result_type::ResolveCombatActionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct ResolveCombatActionAndReturnArgs { +struct ResolveCombatActionAndReturnArgs { pub input: ResolveCombatActionInput, } - impl __sdk::InModule for ResolveCombatActionAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for ResolveCombatActionAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait resolve_combat_action_and_return { - fn resolve_combat_action_and_return(&self, input: ResolveCombatActionInput, -) { - self.resolve_combat_action_and_return_then(input, |_, _| {}); + fn resolve_combat_action_and_return(&self, input: ResolveCombatActionInput) { + self.resolve_combat_action_and_return_then(input, |_, _| {}); } fn resolve_combat_action_and_return_then( &self, input: ResolveCombatActionInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl resolve_combat_action_and_return for super::RemoteProcedures { &self, input: ResolveCombatActionInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, ResolveCombatActionProcedureResult>( - "resolve_combat_action_and_return", - ResolveCombatActionAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, ResolveCombatActionProcedureResult>( + "resolve_combat_action_and_return", + ResolveCombatActionAndReturnArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_input_type.rs index 72c6524f..7dea1c21 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -24,8 +18,6 @@ pub struct ResolveCombatActionInput { pub updated_at_micros: i64, } - impl __sdk::InModule for ResolveCombatActionInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_procedure_result_type.rs index f21fc0ee..c7a13f85 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_procedure_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::resolve_combat_action_result_type::ResolveCombatActionResult; @@ -15,12 +10,10 @@ use super::resolve_combat_action_result_type::ResolveCombatActionResult; #[sats(crate = __lib)] pub struct ResolveCombatActionProcedureResult { pub ok: bool, - pub result: Option::, - pub error_message: Option::, + pub result: Option, + pub error_message: Option, } - impl __sdk::InModule for ResolveCombatActionProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_reducer.rs index 1c3f29c9..8398db8c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_reducer.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::resolve_combat_action_input_type::ResolveCombatActionInput; @@ -19,10 +14,8 @@ pub(super) struct ResolveCombatActionArgs { impl From for super::Reducer { fn from(args: ResolveCombatActionArgs) -> Self { - Self::ResolveCombatAction { - input: args.input, -} -} + Self::ResolveCombatAction { input: args.input } + } } impl __sdk::InModule for ResolveCombatActionArgs { @@ -40,9 +33,8 @@ pub trait resolve_combat_action { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`resolve_combat_action:resolve_combat_action_then`] to run a callback after the reducer completes. - fn resolve_combat_action(&self, input: ResolveCombatActionInput, -) -> __sdk::Result<()> { - self.resolve_combat_action_then(input, |_, _| {}) + fn resolve_combat_action(&self, input: ResolveCombatActionInput) -> __sdk::Result<()> { + self.resolve_combat_action_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `resolve_combat_action` to run as soon as possible, @@ -55,9 +47,11 @@ pub trait resolve_combat_action { &self, input: ResolveCombatActionInput, - callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) - + Send - + 'static, + callback: impl FnOnce( + &super::ReducerEventContext, + Result, __sdk::InternalError>, + ) + Send + + 'static, ) -> __sdk::Result<()>; } @@ -66,11 +60,13 @@ impl resolve_combat_action for super::RemoteReducers { &self, input: ResolveCombatActionInput, - 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(ResolveCombatActionArgs { input, }, callback) + self.imp + .invoke_reducer_with_callback(ResolveCombatActionArgs { input }, callback) } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_result_type.rs index 8057358f..b47e088c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_result_type.rs @@ -2,15 +2,10 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::combat_outcome_type::CombatOutcome; use super::battle_state_snapshot_type::BattleStateSnapshot; +use super::combat_outcome_type::CombatOutcome; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -21,8 +16,6 @@ pub struct ResolveCombatActionResult { pub outcome: CombatOutcome, } - impl __sdk::InModule for ResolveCombatActionResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_battle_interaction_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_battle_interaction_and_return_procedure.rs index 150fa443..268483bf 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_battle_interaction_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_battle_interaction_and_return_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::resolve_npc_battle_interaction_input_type::ResolveNpcBattleInteractionInput; use super::npc_battle_interaction_procedure_result_type::NpcBattleInteractionProcedureResult; +use super::resolve_npc_battle_interaction_input_type::ResolveNpcBattleInteractionInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct ResolveNpcBattleInteractionAndReturnArgs { +struct ResolveNpcBattleInteractionAndReturnArgs { pub input: ResolveNpcBattleInteractionInput, } - impl __sdk::InModule for ResolveNpcBattleInteractionAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for ResolveNpcBattleInteractionAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait resolve_npc_battle_interaction_and_return { - fn resolve_npc_battle_interaction_and_return(&self, input: ResolveNpcBattleInteractionInput, -) { - self.resolve_npc_battle_interaction_and_return_then(input, |_, _| {}); + fn resolve_npc_battle_interaction_and_return(&self, input: ResolveNpcBattleInteractionInput) { + self.resolve_npc_battle_interaction_and_return_then(input, |_, _| {}); } fn resolve_npc_battle_interaction_and_return_then( &self, input: ResolveNpcBattleInteractionInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl resolve_npc_battle_interaction_and_return for super::RemoteProcedures { &self, input: ResolveNpcBattleInteractionInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, NpcBattleInteractionProcedureResult>( - "resolve_npc_battle_interaction_and_return", - ResolveNpcBattleInteractionAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, NpcBattleInteractionProcedureResult>( + "resolve_npc_battle_interaction_and_return", + ResolveNpcBattleInteractionAndReturnArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_battle_interaction_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_battle_interaction_input_type.rs index 907cc7e2..e8eba7a6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_battle_interaction_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_battle_interaction_input_type.rs @@ -2,15 +2,10 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::runtime_item_reward_item_snapshot_type::RuntimeItemRewardItemSnapshot; use super::resolve_npc_interaction_input_type::ResolveNpcInteractionInput; +use super::runtime_item_reward_item_snapshot_type::RuntimeItemRewardItemSnapshot; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,7 +13,7 @@ pub struct ResolveNpcBattleInteractionInput { pub npc_interaction: ResolveNpcInteractionInput, pub story_session_id: String, pub actor_user_id: String, - pub battle_state_id: Option::, + pub battle_state_id: Option, pub player_hp: i32, pub player_max_hp: i32, pub player_mana: i32, @@ -26,11 +21,9 @@ pub struct ResolveNpcBattleInteractionInput { pub target_hp: i32, pub target_max_hp: i32, pub experience_reward: u32, - pub reward_items: Vec::, + pub reward_items: Vec, } - impl __sdk::InModule for ResolveNpcBattleInteractionInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_interaction_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_interaction_and_return_procedure.rs index 4952a32a..4604fc30 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_interaction_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_interaction_and_return_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::resolve_npc_interaction_input_type::ResolveNpcInteractionInput; use super::npc_interaction_procedure_result_type::NpcInteractionProcedureResult; +use super::resolve_npc_interaction_input_type::ResolveNpcInteractionInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct ResolveNpcInteractionAndReturnArgs { +struct ResolveNpcInteractionAndReturnArgs { pub input: ResolveNpcInteractionInput, } - impl __sdk::InModule for ResolveNpcInteractionAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for ResolveNpcInteractionAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait resolve_npc_interaction_and_return { - fn resolve_npc_interaction_and_return(&self, input: ResolveNpcInteractionInput, -) { - self.resolve_npc_interaction_and_return_then(input, |_, _| {}); + fn resolve_npc_interaction_and_return(&self, input: ResolveNpcInteractionInput) { + self.resolve_npc_interaction_and_return_then(input, |_, _| {}); } fn resolve_npc_interaction_and_return_then( &self, input: ResolveNpcInteractionInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl resolve_npc_interaction_and_return for super::RemoteProcedures { &self, input: ResolveNpcInteractionInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, NpcInteractionProcedureResult>( - "resolve_npc_interaction_and_return", - ResolveNpcInteractionAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, NpcInteractionProcedureResult>( + "resolve_npc_interaction_and_return", + ResolveNpcInteractionAndReturnArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_interaction_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_interaction_input_type.rs index d553ea4e..9a4439ce 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_interaction_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_interaction_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,12 +11,10 @@ pub struct ResolveNpcInteractionInput { pub npc_id: String, pub npc_name: String, pub interaction_function_id: String, - pub release_npc_id: Option::, + pub release_npc_id: Option, pub updated_at_micros: i64, } - impl __sdk::InModule for ResolveNpcInteractionInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_interaction_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_interaction_reducer.rs index 37563788..352f5a93 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_interaction_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_interaction_reducer.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::resolve_npc_interaction_input_type::ResolveNpcInteractionInput; @@ -19,10 +14,8 @@ pub(super) struct ResolveNpcInteractionArgs { impl From for super::Reducer { fn from(args: ResolveNpcInteractionArgs) -> Self { - Self::ResolveNpcInteraction { - input: args.input, -} -} + Self::ResolveNpcInteraction { input: args.input } + } } impl __sdk::InModule for ResolveNpcInteractionArgs { @@ -40,9 +33,8 @@ pub trait resolve_npc_interaction { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`resolve_npc_interaction:resolve_npc_interaction_then`] to run a callback after the reducer completes. - fn resolve_npc_interaction(&self, input: ResolveNpcInteractionInput, -) -> __sdk::Result<()> { - self.resolve_npc_interaction_then(input, |_, _| {}) + fn resolve_npc_interaction(&self, input: ResolveNpcInteractionInput) -> __sdk::Result<()> { + self.resolve_npc_interaction_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `resolve_npc_interaction` to run as soon as possible, @@ -55,9 +47,11 @@ pub trait resolve_npc_interaction { &self, input: ResolveNpcInteractionInput, - callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) - + Send - + 'static, + callback: impl FnOnce( + &super::ReducerEventContext, + Result, __sdk::InternalError>, + ) + Send + + 'static, ) -> __sdk::Result<()>; } @@ -66,11 +60,13 @@ impl resolve_npc_interaction for super::RemoteReducers { &self, input: ResolveNpcInteractionInput, - 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(ResolveNpcInteractionArgs { input, }, callback) + self.imp + .invoke_reducer_with_callback(ResolveNpcInteractionArgs { input }, callback) } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_social_action_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_social_action_and_return_procedure.rs index 2411e620..65b1690e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_social_action_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_social_action_and_return_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::resolve_npc_social_action_input_type::ResolveNpcSocialActionInput; use super::npc_state_procedure_result_type::NpcStateProcedureResult; +use super::resolve_npc_social_action_input_type::ResolveNpcSocialActionInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct ResolveNpcSocialActionAndReturnArgs { +struct ResolveNpcSocialActionAndReturnArgs { pub input: ResolveNpcSocialActionInput, } - impl __sdk::InModule for ResolveNpcSocialActionAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for ResolveNpcSocialActionAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait resolve_npc_social_action_and_return { - fn resolve_npc_social_action_and_return(&self, input: ResolveNpcSocialActionInput, -) { - self.resolve_npc_social_action_and_return_then(input, |_, _| {}); + fn resolve_npc_social_action_and_return(&self, input: ResolveNpcSocialActionInput) { + self.resolve_npc_social_action_and_return_then(input, |_, _| {}); } fn resolve_npc_social_action_and_return_then( &self, input: ResolveNpcSocialActionInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl resolve_npc_social_action_and_return for super::RemoteProcedures { &self, input: ResolveNpcSocialActionInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, NpcStateProcedureResult>( - "resolve_npc_social_action_and_return", - ResolveNpcSocialActionAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, NpcStateProcedureResult>( + "resolve_npc_social_action_and_return", + ResolveNpcSocialActionAndReturnArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_social_action_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_social_action_input_type.rs index 10df08b1..29487297 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_social_action_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_social_action_input_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::npc_social_action_kind_type::NpcSocialActionKind; @@ -18,13 +13,11 @@ pub struct ResolveNpcSocialActionInput { pub npc_id: String, pub npc_name: String, pub action_kind: NpcSocialActionKind, - pub affinity_gain_override: Option::, - pub note: Option::, + pub affinity_gain_override: Option, + pub note: Option, pub updated_at_micros: i64, } - impl __sdk::InModule for ResolveNpcSocialActionInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_social_action_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_social_action_reducer.rs index e8717b6f..9b326931 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_social_action_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_social_action_reducer.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::resolve_npc_social_action_input_type::ResolveNpcSocialActionInput; @@ -19,10 +14,8 @@ pub(super) struct ResolveNpcSocialActionArgs { impl From for super::Reducer { fn from(args: ResolveNpcSocialActionArgs) -> Self { - Self::ResolveNpcSocialAction { - input: args.input, -} -} + Self::ResolveNpcSocialAction { input: args.input } + } } impl __sdk::InModule for ResolveNpcSocialActionArgs { @@ -40,9 +33,8 @@ pub trait resolve_npc_social_action { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`resolve_npc_social_action:resolve_npc_social_action_then`] to run a callback after the reducer completes. - fn resolve_npc_social_action(&self, input: ResolveNpcSocialActionInput, -) -> __sdk::Result<()> { - self.resolve_npc_social_action_then(input, |_, _| {}) + fn resolve_npc_social_action(&self, input: ResolveNpcSocialActionInput) -> __sdk::Result<()> { + self.resolve_npc_social_action_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `resolve_npc_social_action` to run as soon as possible, @@ -55,9 +47,11 @@ pub trait resolve_npc_social_action { &self, input: ResolveNpcSocialActionInput, - callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) - + Send - + 'static, + callback: impl FnOnce( + &super::ReducerEventContext, + Result, __sdk::InternalError>, + ) + Send + + 'static, ) -> __sdk::Result<()>; } @@ -66,11 +60,13 @@ impl resolve_npc_social_action for super::RemoteReducers { &self, input: ResolveNpcSocialActionInput, - 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(ResolveNpcSocialActionArgs { input, }, callback) + self.imp + .invoke_reducer_with_callback(ResolveNpcSocialActionArgs { input }, callback) } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_treasure_interaction_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_treasure_interaction_and_return_procedure.rs index cc50e10f..0b8f6bad 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_treasure_interaction_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_treasure_interaction_and_return_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::treasure_resolve_input_type::TreasureResolveInput; use super::treasure_record_procedure_result_type::TreasureRecordProcedureResult; +use super::treasure_resolve_input_type::TreasureResolveInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct ResolveTreasureInteractionAndReturnArgs { +struct ResolveTreasureInteractionAndReturnArgs { pub input: TreasureResolveInput, } - impl __sdk::InModule for ResolveTreasureInteractionAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for ResolveTreasureInteractionAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait resolve_treasure_interaction_and_return { - fn resolve_treasure_interaction_and_return(&self, input: TreasureResolveInput, -) { - self.resolve_treasure_interaction_and_return_then(input, |_, _| {}); + fn resolve_treasure_interaction_and_return(&self, input: TreasureResolveInput) { + self.resolve_treasure_interaction_and_return_then(input, |_, _| {}); } fn resolve_treasure_interaction_and_return_then( &self, input: TreasureResolveInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl resolve_treasure_interaction_and_return for super::RemoteProcedures { &self, input: TreasureResolveInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, TreasureRecordProcedureResult>( - "resolve_treasure_interaction_and_return", - ResolveTreasureInteractionAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, TreasureRecordProcedureResult>( + "resolve_treasure_interaction_and_return", + ResolveTreasureInteractionAndReturnArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_treasure_interaction_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_treasure_interaction_reducer.rs index 6a830425..221ac39d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_treasure_interaction_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_treasure_interaction_reducer.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::treasure_resolve_input_type::TreasureResolveInput; @@ -19,10 +14,8 @@ pub(super) struct ResolveTreasureInteractionArgs { impl From for super::Reducer { fn from(args: ResolveTreasureInteractionArgs) -> Self { - Self::ResolveTreasureInteraction { - input: args.input, -} -} + Self::ResolveTreasureInteraction { input: args.input } + } } impl __sdk::InModule for ResolveTreasureInteractionArgs { @@ -40,9 +33,8 @@ pub trait resolve_treasure_interaction { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`resolve_treasure_interaction:resolve_treasure_interaction_then`] to run a callback after the reducer completes. - fn resolve_treasure_interaction(&self, input: TreasureResolveInput, -) -> __sdk::Result<()> { - self.resolve_treasure_interaction_then(input, |_, _| {}) + fn resolve_treasure_interaction(&self, input: TreasureResolveInput) -> __sdk::Result<()> { + self.resolve_treasure_interaction_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `resolve_treasure_interaction` to run as soon as possible, @@ -55,9 +47,11 @@ pub trait resolve_treasure_interaction { &self, input: TreasureResolveInput, - callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) - + Send - + 'static, + callback: impl FnOnce( + &super::ReducerEventContext, + Result, __sdk::InternalError>, + ) + Send + + 'static, ) -> __sdk::Result<()>; } @@ -66,11 +60,13 @@ impl resolve_treasure_interaction for super::RemoteReducers { &self, input: TreasureResolveInput, - 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(ResolveTreasureInteractionArgs { input, }, callback) + self.imp + .invoke_reducer_with_callback(ResolveTreasureInteractionArgs { input }, callback) } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resume_profile_save_archive_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/resume_profile_save_archive_and_return_procedure.rs index 8505e52a..73e6d668 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resume_profile_save_archive_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resume_profile_save_archive_and_return_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_profile_save_archive_procedure_result_type::RuntimeProfileSaveArchiveProcedureResult; use super::runtime_profile_save_archive_resume_input_type::RuntimeProfileSaveArchiveResumeInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct ResumeProfileSaveArchiveAndReturnArgs { +struct ResumeProfileSaveArchiveAndReturnArgs { pub input: RuntimeProfileSaveArchiveResumeInput, } - impl __sdk::InModule for ResumeProfileSaveArchiveAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for ResumeProfileSaveArchiveAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait resume_profile_save_archive_and_return { - fn resume_profile_save_archive_and_return(&self, input: RuntimeProfileSaveArchiveResumeInput, -) { - self.resume_profile_save_archive_and_return_then(input, |_, _| {}); + fn resume_profile_save_archive_and_return(&self, input: RuntimeProfileSaveArchiveResumeInput) { + self.resume_profile_save_archive_and_return_then(input, |_, _| {}); } fn resume_profile_save_archive_and_return_then( &self, input: RuntimeProfileSaveArchiveResumeInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl resume_profile_save_archive_and_return for super::RemoteProcedures { &self, input: RuntimeProfileSaveArchiveResumeInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, RuntimeProfileSaveArchiveProcedureResult>( - "resume_profile_save_archive_and_return", - ResumeProfileSaveArchiveAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, RuntimeProfileSaveArchiveProcedureResult>( + "resume_profile_save_archive_and_return", + ResumeProfileSaveArchiveAndReturnArgs { input }, + __callback, + ); } } - 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 index 3888a866..e082dc36 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -32,12 +27,8 @@ pub enum RpgAgentDraftCardKind { 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 index f890218d..391625f5 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -20,12 +15,8 @@ pub enum RpgAgentDraftCardStatus { 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 index 180466b0..fc54a7b1 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -24,12 +19,8 @@ pub enum RpgAgentMessageKind { 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 index ad7e445b..67e383f2 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,12 +13,8 @@ pub enum RpgAgentMessageRole { 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 index 42cd9fc2..555c0439 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -20,12 +15,8 @@ pub enum RpgAgentOperationStatus { 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 index 60ee2ecf..c3e7b8ac 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -38,12 +33,8 @@ pub enum RpgAgentOperationType { 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 index b9d0cf0e..1a94e20f 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -30,12 +25,8 @@ pub enum RpgAgentStage { Published, Error, - } - - impl __sdk::InModule for RpgAgentStage { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_clear_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_clear_input_type.rs index 41fc6954..e5bc78f0 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_clear_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_clear_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,8 +10,6 @@ pub struct RuntimeBrowseHistoryClearInput { pub user_id: String, } - impl __sdk::InModule for RuntimeBrowseHistoryClearInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_list_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_list_input_type.rs index 5795bb3a..cdc31641 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_list_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_list_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,8 +10,6 @@ pub struct RuntimeBrowseHistoryListInput { pub user_id: String, } - impl __sdk::InModule for RuntimeBrowseHistoryListInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_procedure_result_type.rs index 9c02dd59..3721358f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_procedure_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_browse_history_snapshot_type::RuntimeBrowseHistorySnapshot; @@ -15,12 +10,10 @@ use super::runtime_browse_history_snapshot_type::RuntimeBrowseHistorySnapshot; #[sats(crate = __lib)] pub struct RuntimeBrowseHistoryProcedureResult { pub ok: bool, - pub entries: Vec::, - pub error_message: Option::, + pub entries: Vec, + pub error_message: Option, } - impl __sdk::InModule for RuntimeBrowseHistoryProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_snapshot_type.rs index 05c404c1..9222eaed 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_snapshot_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_browse_history_theme_mode_type::RuntimeBrowseHistoryThemeMode; @@ -21,7 +16,7 @@ pub struct RuntimeBrowseHistorySnapshot { pub world_name: String, pub subtitle: String, pub summary_text: String, - pub cover_image_src: Option::, + pub cover_image_src: Option, pub theme_mode: RuntimeBrowseHistoryThemeMode, pub author_display_name: String, pub visited_at_micros: i64, @@ -29,8 +24,6 @@ pub struct RuntimeBrowseHistorySnapshot { pub updated_at_micros: i64, } - impl __sdk::InModule for RuntimeBrowseHistorySnapshot { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_sync_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_sync_input_type.rs index 09c9fb18..0996e66e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_sync_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_sync_input_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_browse_history_write_input_type::RuntimeBrowseHistoryWriteInput; @@ -15,12 +10,10 @@ use super::runtime_browse_history_write_input_type::RuntimeBrowseHistoryWriteInp #[sats(crate = __lib)] pub struct RuntimeBrowseHistorySyncInput { pub user_id: String, - pub entries: Vec::, + pub entries: Vec, pub updated_at_micros: i64, } - impl __sdk::InModule for RuntimeBrowseHistorySyncInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_theme_mode_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_theme_mode_type.rs index de120fac..fc8a1b11 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_theme_mode_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_theme_mode_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -24,12 +19,8 @@ pub enum RuntimeBrowseHistoryThemeMode { Rift, Mythic, - } - - impl __sdk::InModule for RuntimeBrowseHistoryThemeMode { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_write_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_write_input_type.rs index fb087aac..9a54bd81 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_write_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_write_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,16 +10,14 @@ pub struct RuntimeBrowseHistoryWriteInput { pub owner_user_id: String, pub profile_id: String, pub world_name: String, - pub subtitle: Option::, - pub summary_text: Option::, - pub cover_image_src: Option::, - pub theme_mode: Option::, - pub author_display_name: Option::, - pub visited_at: Option::, + pub subtitle: Option, + pub summary_text: Option, + pub cover_image_src: Option, + pub theme_mode: Option, + pub author_display_name: Option, + pub visited_at: Option, } - impl __sdk::InModule for RuntimeBrowseHistoryWriteInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_inventory_state_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_inventory_state_procedure_result_type.rs index 09374d4c..bf0e3103 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_inventory_state_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_inventory_state_procedure_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_inventory_state_snapshot_type::RuntimeInventoryStateSnapshot; @@ -15,12 +10,10 @@ use super::runtime_inventory_state_snapshot_type::RuntimeInventoryStateSnapshot; #[sats(crate = __lib)] pub struct RuntimeInventoryStateProcedureResult { pub ok: bool, - pub snapshot: Option::, - pub error_message: Option::, + pub snapshot: Option, + pub error_message: Option, } - impl __sdk::InModule for RuntimeInventoryStateProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_inventory_state_query_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_inventory_state_query_input_type.rs index 75c93962..e6b02ed3 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_inventory_state_query_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_inventory_state_query_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +11,6 @@ pub struct RuntimeInventoryStateQueryInput { pub actor_user_id: String, } - impl __sdk::InModule for RuntimeInventoryStateQueryInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_inventory_state_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_inventory_state_snapshot_type.rs index 7ab3ebea..624e66c6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_inventory_state_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_inventory_state_snapshot_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::inventory_slot_snapshot_type::InventorySlotSnapshot; @@ -16,12 +11,10 @@ use super::inventory_slot_snapshot_type::InventorySlotSnapshot; pub struct RuntimeInventoryStateSnapshot { pub runtime_session_id: String, pub actor_user_id: String, - pub backpack_items: Vec::, - pub equipment_items: Vec::, + pub backpack_items: Vec, + pub equipment_items: Vec, } - impl __sdk::InModule for RuntimeInventoryStateSnapshot { 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 index 01cd4888..b539d4f3 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,12 +13,8 @@ pub enum RuntimeItemEquipmentSlot { 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 index a3316ea0..dc4250ab 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -22,12 +17,8 @@ pub enum RuntimeItemRewardItemRarity { 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 index 65bcb55c..4df1f248 100644 --- 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 @@ -2,15 +2,10 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::runtime_item_reward_item_rarity_type::RuntimeItemRewardItemRarity; 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)] @@ -18,17 +13,15 @@ pub struct RuntimeItemRewardItemSnapshot { pub item_id: String, pub category: String, pub item_name: String, - pub description: Option::, + pub description: Option, pub quantity: u32, pub rarity: RuntimeItemRewardItemRarity, - pub tags: Vec::, + pub tags: Vec, pub stackable: bool, pub stack_key: String, - pub equipment_slot_id: Option::, + 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/runtime_platform_theme_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_platform_theme_type.rs index 7eef5e97..cbb36c5d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_platform_theme_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_platform_theme_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,12 +11,8 @@ pub enum RuntimePlatformTheme { Light, Dark, - } - - impl __sdk::InModule for RuntimePlatformTheme { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_dashboard_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_dashboard_get_input_type.rs index 9be0a158..47af88ec 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_dashboard_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_dashboard_get_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,8 +10,6 @@ pub struct RuntimeProfileDashboardGetInput { pub user_id: String, } - impl __sdk::InModule for RuntimeProfileDashboardGetInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_dashboard_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_dashboard_procedure_result_type.rs index a04facbb..fa80a719 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_dashboard_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_dashboard_procedure_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_profile_dashboard_snapshot_type::RuntimeProfileDashboardSnapshot; @@ -15,12 +10,10 @@ use super::runtime_profile_dashboard_snapshot_type::RuntimeProfileDashboardSnaps #[sats(crate = __lib)] pub struct RuntimeProfileDashboardProcedureResult { pub ok: bool, - pub record: Option::, - pub error_message: Option::, + pub record: Option, + pub error_message: Option, } - impl __sdk::InModule for RuntimeProfileDashboardProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_dashboard_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_dashboard_snapshot_type.rs index 6a54e5ff..a3e97b05 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_dashboard_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_dashboard_snapshot_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,11 +11,9 @@ pub struct RuntimeProfileDashboardSnapshot { pub wallet_balance: u64, pub total_play_time_ms: u64, pub played_world_count: u32, - pub updated_at_micros: Option::, + pub updated_at_micros: Option, } - impl __sdk::InModule for RuntimeProfileDashboardSnapshot { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_play_stats_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_play_stats_get_input_type.rs index 99665ea0..825a6707 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_play_stats_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_play_stats_get_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,8 +10,6 @@ pub struct RuntimeProfilePlayStatsGetInput { pub user_id: String, } - impl __sdk::InModule for RuntimeProfilePlayStatsGetInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_play_stats_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_play_stats_procedure_result_type.rs index 24044b8b..5572f438 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_play_stats_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_play_stats_procedure_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_profile_play_stats_snapshot_type::RuntimeProfilePlayStatsSnapshot; @@ -15,12 +10,10 @@ use super::runtime_profile_play_stats_snapshot_type::RuntimeProfilePlayStatsSnap #[sats(crate = __lib)] pub struct RuntimeProfilePlayStatsProcedureResult { pub ok: bool, - pub record: Option::, - pub error_message: Option::, + pub record: Option, + pub error_message: Option, } - impl __sdk::InModule for RuntimeProfilePlayStatsProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_play_stats_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_play_stats_snapshot_type.rs index e99d2e72..472a99c0 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_play_stats_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_play_stats_snapshot_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_profile_played_world_snapshot_type::RuntimeProfilePlayedWorldSnapshot; @@ -16,12 +11,10 @@ use super::runtime_profile_played_world_snapshot_type::RuntimeProfilePlayedWorld pub struct RuntimeProfilePlayStatsSnapshot { pub user_id: String, pub total_play_time_ms: u64, - pub played_works: Vec::, - pub updated_at_micros: Option::, + pub played_works: Vec, + pub updated_at_micros: Option, } - impl __sdk::InModule for RuntimeProfilePlayStatsSnapshot { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_played_world_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_played_world_snapshot_type.rs index f642a84d..fa6c1d2c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_played_world_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_played_world_snapshot_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,9 +10,9 @@ pub struct RuntimeProfilePlayedWorldSnapshot { pub played_world_id: String, pub user_id: String, pub world_key: String, - pub owner_user_id: Option::, - pub profile_id: Option::, - pub world_type: Option::, + pub owner_user_id: Option, + pub profile_id: Option, + pub world_type: Option, pub world_title: String, pub world_subtitle: String, pub first_played_at_micros: i64, @@ -26,8 +20,6 @@ pub struct RuntimeProfilePlayedWorldSnapshot { pub last_observed_play_time_ms: u64, } - impl __sdk::InModule for RuntimeProfilePlayedWorldSnapshot { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_list_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_list_input_type.rs index 89524eb1..29eea52e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_list_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_list_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,8 +10,6 @@ pub struct RuntimeProfileSaveArchiveListInput { pub user_id: String, } - impl __sdk::InModule for RuntimeProfileSaveArchiveListInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_procedure_result_type.rs index 7c8e7b07..4f4d5c0c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_procedure_result_type.rs @@ -2,28 +2,21 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::runtime_snapshot_type::RuntimeSnapshot; use super::runtime_profile_save_archive_snapshot_type::RuntimeProfileSaveArchiveSnapshot; +use super::runtime_snapshot_type::RuntimeSnapshot; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct RuntimeProfileSaveArchiveProcedureResult { pub ok: bool, - pub entries: Vec::, - pub record: Option::, - pub current_snapshot: Option::, - pub error_message: Option::, + pub entries: Vec, + pub record: Option, + pub current_snapshot: Option, + pub error_message: Option, } - impl __sdk::InModule for RuntimeProfileSaveArchiveProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_resume_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_resume_input_type.rs index a290bf1f..186de3e0 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_resume_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_resume_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +11,6 @@ pub struct RuntimeProfileSaveArchiveResumeInput { pub world_key: String, } - impl __sdk::InModule for RuntimeProfileSaveArchiveResumeInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_snapshot_type.rs index d88a1fab..9843ec8c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_snapshot_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,23 +10,21 @@ pub struct RuntimeProfileSaveArchiveSnapshot { pub archive_id: String, pub user_id: String, pub world_key: String, - pub owner_user_id: Option::, - pub profile_id: Option::, - pub world_type: Option::, + pub owner_user_id: Option, + pub profile_id: Option, + pub world_type: Option, pub world_name: String, pub subtitle: String, pub summary_text: String, - pub cover_image_src: Option::, + pub cover_image_src: Option, pub saved_at_micros: i64, pub bottom_tab: String, pub game_state_json: String, - pub current_story_json: Option::, + pub current_story_json: Option, pub created_at_micros: i64, pub updated_at_micros: i64, } - impl __sdk::InModule for RuntimeProfileSaveArchiveSnapshot { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_entry_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_entry_snapshot_type.rs index e4aa66b2..8513884e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_entry_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_entry_snapshot_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_profile_wallet_ledger_source_type_type::RuntimeProfileWalletLedgerSourceType; @@ -22,8 +17,6 @@ pub struct RuntimeProfileWalletLedgerEntrySnapshot { pub created_at_micros: i64, } - impl __sdk::InModule for RuntimeProfileWalletLedgerEntrySnapshot { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_list_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_list_input_type.rs index 10d9d0ff..e8a1c111 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_list_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_list_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,8 +10,6 @@ pub struct RuntimeProfileWalletLedgerListInput { pub user_id: String, } - impl __sdk::InModule for RuntimeProfileWalletLedgerListInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_procedure_result_type.rs index 809092ae..1c0a2b05 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_procedure_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_profile_wallet_ledger_entry_snapshot_type::RuntimeProfileWalletLedgerEntrySnapshot; @@ -15,12 +10,10 @@ use super::runtime_profile_wallet_ledger_entry_snapshot_type::RuntimeProfileWall #[sats(crate = __lib)] pub struct RuntimeProfileWalletLedgerProcedureResult { pub ok: bool, - pub entries: Vec::, - pub error_message: Option::, + pub entries: Vec, + pub error_message: Option, } - impl __sdk::InModule for RuntimeProfileWalletLedgerProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_source_type_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_source_type_type.rs index 23e8f759..2b98f5ef 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_source_type_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_source_type_type.rs @@ -2,24 +2,15 @@ // 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 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 RuntimeProfileWalletLedgerSourceType { SnapshotSync, - } - - impl __sdk::InModule for RuntimeProfileWalletLedgerSourceType { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_get_input_type.rs index 555c7863..1b83318a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_get_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,8 +10,6 @@ pub struct RuntimeSettingGetInput { pub user_id: String, } - impl __sdk::InModule for RuntimeSettingGetInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_procedure_result_type.rs index e823af97..792e33d4 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_procedure_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_setting_snapshot_type::RuntimeSettingSnapshot; @@ -15,12 +10,10 @@ use super::runtime_setting_snapshot_type::RuntimeSettingSnapshot; #[sats(crate = __lib)] pub struct RuntimeSettingProcedureResult { pub ok: bool, - pub record: Option::, - pub error_message: Option::, + pub record: Option, + pub error_message: Option, } - impl __sdk::InModule for RuntimeSettingProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_snapshot_type.rs index 6d6ebae1..5d92990f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_snapshot_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_platform_theme_type::RuntimePlatformTheme; @@ -21,8 +16,6 @@ pub struct RuntimeSettingSnapshot { pub updated_at_micros: i64, } - impl __sdk::InModule for RuntimeSettingSnapshot { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_table.rs index cc7fac56..dc1ed5bb 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_table.rs @@ -2,14 +2,9 @@ // 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_setting_type::RuntimeSetting; use super::runtime_platform_theme_type::RuntimePlatformTheme; +use super::runtime_setting_type::RuntimeSetting; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `runtime_setting`. /// @@ -50,8 +45,12 @@ impl<'ctx> __sdk::Table for RuntimeSettingTableHandle<'ctx> { type Row = RuntimeSetting; type EventContext = super::EventContext; - fn count(&self) -> u64 { self.imp.count() } - fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = RuntimeSettingInsertCallbackId; @@ -97,39 +96,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for RuntimeSettingTableHandle<'ctx> { } } - /// Access to the `user_id` unique index on the table `runtime_setting`, - /// which allows point queries on the field of the same name - /// via the [`RuntimeSettingUserIdUnique::find`] method. - /// - /// Users are encouraged not to explicitly reference this type, - /// but to directly chain method calls, - /// like `ctx.db.runtime_setting().user_id().find(...)`. - pub struct RuntimeSettingUserIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, - } +/// Access to the `user_id` unique index on the table `runtime_setting`, +/// which allows point queries on the field of the same name +/// via the [`RuntimeSettingUserIdUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.runtime_setting().user_id().find(...)`. +pub struct RuntimeSettingUserIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} - impl<'ctx> RuntimeSettingTableHandle<'ctx> { - /// Get a handle on the `user_id` unique index on the table `runtime_setting`. - pub fn user_id(&self) -> RuntimeSettingUserIdUnique<'ctx> { - RuntimeSettingUserIdUnique { - imp: self.imp.get_unique_constraint::("user_id"), - phantom: std::marker::PhantomData, - } - } +impl<'ctx> RuntimeSettingTableHandle<'ctx> { + /// Get a handle on the `user_id` unique index on the table `runtime_setting`. + pub fn user_id(&self) -> RuntimeSettingUserIdUnique<'ctx> { + RuntimeSettingUserIdUnique { + imp: self.imp.get_unique_constraint::("user_id"), + phantom: std::marker::PhantomData, } + } +} + +impl<'ctx> RuntimeSettingUserIdUnique<'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) + } +} - impl<'ctx> RuntimeSettingUserIdUnique<'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::("runtime_setting"); _table.add_unique_constraint::("user_id", |row| &row.user_id); } @@ -139,26 +137,24 @@ 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() + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() }) } - #[allow(non_camel_case_types)] - /// Extension trait for query builder access to the table `RuntimeSetting`. - /// - /// Implemented for [`__sdk::QueryTableAccessor`]. - pub trait runtime_settingQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `RuntimeSetting`. - fn runtime_setting(&self) -> __sdk::__query_builder::Table; - } - - impl runtime_settingQueryTableAccess for __sdk::QueryTableAccessor { - fn runtime_setting(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("runtime_setting") - } - } +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `RuntimeSetting`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait runtime_settingQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `RuntimeSetting`. + fn runtime_setting(&self) -> __sdk::__query_builder::Table; +} +impl runtime_settingQueryTableAccess for __sdk::QueryTableAccessor { + fn runtime_setting(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("runtime_setting") + } +} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_type.rs index f3c72f73..5a7b61b0 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_platform_theme_type::RuntimePlatformTheme; @@ -21,12 +16,10 @@ pub struct RuntimeSetting { pub updated_at: __sdk::Timestamp, } - impl __sdk::InModule for RuntimeSetting { type Module = super::RemoteModule; } - /// Column accessor struct for the table `RuntimeSetting`. /// /// Provides typed access to columns for query building. @@ -47,7 +40,6 @@ impl __sdk::__query_builder::HasCols for RuntimeSetting { platform_theme: __sdk::__query_builder::Col::new(table_name, "platform_theme"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), - } } } @@ -64,10 +56,8 @@ impl __sdk::__query_builder::HasIxCols for RuntimeSetting { fn ix_cols(table_name: &'static str) -> Self::IxCols { RuntimeSettingIxCols { user_id: __sdk::__query_builder::IxCol::new(table_name, "user_id"), - } } } impl __sdk::__query_builder::CanBeLookupTable for RuntimeSetting {} - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_upsert_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_upsert_input_type.rs index 347e1675..7091bc8d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_upsert_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_upsert_input_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_platform_theme_type::RuntimePlatformTheme; @@ -20,8 +15,6 @@ pub struct RuntimeSettingUpsertInput { pub updated_at_micros: i64, } - impl __sdk::InModule for RuntimeSettingUpsertInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_delete_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_delete_input_type.rs index 251417e4..53bb194c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_delete_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_delete_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,8 +10,6 @@ pub struct RuntimeSnapshotDeleteInput { pub user_id: String, } - impl __sdk::InModule for RuntimeSnapshotDeleteInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_get_input_type.rs index 7340dbf6..c19034c6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_get_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,8 +10,6 @@ pub struct RuntimeSnapshotGetInput { pub user_id: String, } - impl __sdk::InModule for RuntimeSnapshotGetInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_procedure_result_type.rs index 466a3e41..4066d915 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_procedure_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_snapshot_type::RuntimeSnapshot; @@ -15,12 +10,10 @@ use super::runtime_snapshot_type::RuntimeSnapshot; #[sats(crate = __lib)] pub struct RuntimeSnapshotProcedureResult { pub ok: bool, - pub record: Option::, - pub error_message: Option::, + pub record: Option, + pub error_message: Option, } - impl __sdk::InModule for RuntimeSnapshotProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_row_type.rs index 8eec233a..da66941e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_row_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_row_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,17 +12,15 @@ pub struct RuntimeSnapshotRow { pub saved_at: __sdk::Timestamp, pub bottom_tab: String, pub game_state_json: String, - pub current_story_json: Option::, + pub current_story_json: Option, pub created_at: __sdk::Timestamp, pub updated_at: __sdk::Timestamp, } - impl __sdk::InModule for RuntimeSnapshotRow { type Module = super::RemoteModule; } - /// Column accessor struct for the table `RuntimeSnapshotRow`. /// /// Provides typed access to columns for query building. @@ -38,7 +30,7 @@ pub struct RuntimeSnapshotRowCols { pub saved_at: __sdk::__query_builder::Col, pub bottom_tab: __sdk::__query_builder::Col, pub game_state_json: __sdk::__query_builder::Col, - pub current_story_json: __sdk::__query_builder::Col>, + pub current_story_json: __sdk::__query_builder::Col>, pub created_at: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, } @@ -55,7 +47,6 @@ impl __sdk::__query_builder::HasCols for RuntimeSnapshotRow { current_story_json: __sdk::__query_builder::Col::new(table_name, "current_story_json"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), - } } } @@ -72,10 +63,8 @@ impl __sdk::__query_builder::HasIxCols for RuntimeSnapshotRow { fn ix_cols(table_name: &'static str) -> Self::IxCols { RuntimeSnapshotRowIxCols { user_id: __sdk::__query_builder::IxCol::new(table_name, "user_id"), - } } } impl __sdk::__query_builder::CanBeLookupTable for RuntimeSnapshotRow {} - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_table.rs index ea6106d1..9d105016 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_table.rs @@ -2,13 +2,8 @@ // 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_snapshot_row_type::RuntimeSnapshotRow; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `runtime_snapshot`. /// @@ -49,8 +44,12 @@ impl<'ctx> __sdk::Table for RuntimeSnapshotTableHandle<'ctx> { type Row = RuntimeSnapshotRow; type EventContext = super::EventContext; - fn count(&self) -> u64 { self.imp.count() } - fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = RuntimeSnapshotInsertCallbackId; @@ -96,39 +95,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for RuntimeSnapshotTableHandle<'ctx> { } } - /// Access to the `user_id` unique index on the table `runtime_snapshot`, - /// which allows point queries on the field of the same name - /// via the [`RuntimeSnapshotUserIdUnique::find`] method. - /// - /// Users are encouraged not to explicitly reference this type, - /// but to directly chain method calls, - /// like `ctx.db.runtime_snapshot().user_id().find(...)`. - pub struct RuntimeSnapshotUserIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, - } +/// Access to the `user_id` unique index on the table `runtime_snapshot`, +/// which allows point queries on the field of the same name +/// via the [`RuntimeSnapshotUserIdUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.runtime_snapshot().user_id().find(...)`. +pub struct RuntimeSnapshotUserIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} - impl<'ctx> RuntimeSnapshotTableHandle<'ctx> { - /// Get a handle on the `user_id` unique index on the table `runtime_snapshot`. - pub fn user_id(&self) -> RuntimeSnapshotUserIdUnique<'ctx> { - RuntimeSnapshotUserIdUnique { - imp: self.imp.get_unique_constraint::("user_id"), - phantom: std::marker::PhantomData, - } - } +impl<'ctx> RuntimeSnapshotTableHandle<'ctx> { + /// Get a handle on the `user_id` unique index on the table `runtime_snapshot`. + pub fn user_id(&self) -> RuntimeSnapshotUserIdUnique<'ctx> { + RuntimeSnapshotUserIdUnique { + imp: self.imp.get_unique_constraint::("user_id"), + phantom: std::marker::PhantomData, } + } +} + +impl<'ctx> RuntimeSnapshotUserIdUnique<'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) + } +} - impl<'ctx> RuntimeSnapshotUserIdUnique<'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::("runtime_snapshot"); _table.add_unique_constraint::("user_id", |row| &row.user_id); } @@ -138,26 +136,24 @@ 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() + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() }) } - #[allow(non_camel_case_types)] - /// Extension trait for query builder access to the table `RuntimeSnapshotRow`. - /// - /// Implemented for [`__sdk::QueryTableAccessor`]. - pub trait runtime_snapshotQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `RuntimeSnapshotRow`. - fn runtime_snapshot(&self) -> __sdk::__query_builder::Table; - } - - impl runtime_snapshotQueryTableAccess for __sdk::QueryTableAccessor { - fn runtime_snapshot(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("runtime_snapshot") - } - } +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `RuntimeSnapshotRow`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait runtime_snapshotQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `RuntimeSnapshotRow`. + fn runtime_snapshot(&self) -> __sdk::__query_builder::Table; +} +impl runtime_snapshotQueryTableAccess for __sdk::QueryTableAccessor { + fn runtime_snapshot(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("runtime_snapshot") + } +} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_type.rs index e8ede33b..1e9e14ad 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,13 +12,11 @@ pub struct RuntimeSnapshot { pub saved_at_micros: i64, pub bottom_tab: String, pub game_state_json: String, - pub current_story_json: Option::, + pub current_story_json: Option, pub created_at_micros: i64, pub updated_at_micros: i64, } - impl __sdk::InModule for RuntimeSnapshot { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_upsert_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_upsert_input_type.rs index 2379473f..9b3c75df 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_upsert_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_upsert_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,12 +11,10 @@ pub struct RuntimeSnapshotUpsertInput { pub saved_at_micros: i64, pub bottom_tab: String, pub game_state_json: String, - pub current_story_json: Option::, + pub current_story_json: Option, pub updated_at_micros: i64, } - impl __sdk::InModule for RuntimeSnapshotUpsertInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/save_puzzle_generated_images_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/save_puzzle_generated_images_procedure.rs index 15ccc81f..870d6d51 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/save_puzzle_generated_images_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/save_puzzle_generated_images_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::puzzle_agent_session_procedure_result_type::PuzzleAgentSessionProcedureResult; use super::puzzle_generated_images_save_input_type::PuzzleGeneratedImagesSaveInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct SavePuzzleGeneratedImagesArgs { +struct SavePuzzleGeneratedImagesArgs { pub input: PuzzleGeneratedImagesSaveInput, } - impl __sdk::InModule for SavePuzzleGeneratedImagesArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for SavePuzzleGeneratedImagesArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait save_puzzle_generated_images { - fn save_puzzle_generated_images(&self, input: PuzzleGeneratedImagesSaveInput, -) { - self.save_puzzle_generated_images_then(input, |_, _| {}); + fn save_puzzle_generated_images(&self, input: PuzzleGeneratedImagesSaveInput) { + self.save_puzzle_generated_images_then(input, |_, _| {}); } fn save_puzzle_generated_images_then( &self, input: PuzzleGeneratedImagesSaveInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl save_puzzle_generated_images for super::RemoteProcedures { &self, input: PuzzleGeneratedImagesSaveInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>( - "save_puzzle_generated_images", - SavePuzzleGeneratedImagesArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>( + "save_puzzle_generated_images", + SavePuzzleGeneratedImagesArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/select_puzzle_cover_image_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/select_puzzle_cover_image_procedure.rs index b12bb89a..fd4dd93c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/select_puzzle_cover_image_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/select_puzzle_cover_image_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::puzzle_agent_session_procedure_result_type::PuzzleAgentSessionProcedureResult; use super::puzzle_select_cover_image_input_type::PuzzleSelectCoverImageInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct SelectPuzzleCoverImageArgs { +struct SelectPuzzleCoverImageArgs { pub input: PuzzleSelectCoverImageInput, } - impl __sdk::InModule for SelectPuzzleCoverImageArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for SelectPuzzleCoverImageArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait select_puzzle_cover_image { - fn select_puzzle_cover_image(&self, input: PuzzleSelectCoverImageInput, -) { - self.select_puzzle_cover_image_then(input, |_, _| {}); + fn select_puzzle_cover_image(&self, input: PuzzleSelectCoverImageInput) { + self.select_puzzle_cover_image_then(input, |_, _| {}); } fn select_puzzle_cover_image_then( &self, input: PuzzleSelectCoverImageInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl select_puzzle_cover_image for super::RemoteProcedures { &self, input: PuzzleSelectCoverImageInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>( - "select_puzzle_cover_image", - SelectPuzzleCoverImageArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>( + "select_puzzle_cover_image", + SelectPuzzleCoverImageArgs { input }, + __callback, + ); } } - 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 44e89238..c5cc5256 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::ai_task_start_input_type::AiTaskStartInput; @@ -19,10 +14,8 @@ pub(super) struct StartAiTaskArgs { impl From for super::Reducer { fn from(args: StartAiTaskArgs) -> Self { - Self::StartAiTask { - input: args.input, -} -} + Self::StartAiTask { input: args.input } + } } impl __sdk::InModule for StartAiTaskArgs { @@ -40,9 +33,8 @@ pub trait start_ai_task { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`start_ai_task:start_ai_task_then`] to run a callback after the reducer completes. - fn start_ai_task(&self, input: AiTaskStartInput, -) -> __sdk::Result<()> { - self.start_ai_task_then(input, |_, _| {}) + fn start_ai_task(&self, input: AiTaskStartInput) -> __sdk::Result<()> { + self.start_ai_task_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `start_ai_task` to run as soon as possible, @@ -55,9 +47,11 @@ 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<()>; } @@ -66,11 +60,13 @@ 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) + 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 74b85d62..24ed5b3f 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::ai_task_stage_start_input_type::AiTaskStageStartInput; @@ -19,10 +14,8 @@ pub(super) struct StartAiTaskStageArgs { impl From for super::Reducer { fn from(args: StartAiTaskStageArgs) -> Self { - Self::StartAiTaskStage { - input: args.input, -} -} + Self::StartAiTaskStage { input: args.input } + } } impl __sdk::InModule for StartAiTaskStageArgs { @@ -40,9 +33,8 @@ pub trait start_ai_task_stage { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`start_ai_task_stage:start_ai_task_stage_then`] to run a callback after the reducer completes. - fn start_ai_task_stage(&self, input: AiTaskStageStartInput, -) -> __sdk::Result<()> { - self.start_ai_task_stage_then(input, |_, _| {}) + fn start_ai_task_stage(&self, input: AiTaskStageStartInput) -> __sdk::Result<()> { + self.start_ai_task_stage_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `start_ai_task_stage` to run as soon as possible, @@ -55,9 +47,11 @@ 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<()>; } @@ -66,11 +60,13 @@ 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) + self.imp + .invoke_reducer_with_callback(StartAiTaskStageArgs { input }, callback) } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/start_big_fish_run_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/start_big_fish_run_procedure.rs index b9b3b28c..6a149f03 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/start_big_fish_run_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/start_big_fish_run_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::big_fish_run_procedure_result_type::BigFishRunProcedureResult; use super::big_fish_run_start_input_type::BigFishRunStartInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct StartBigFishRunArgs { +struct StartBigFishRunArgs { pub input: BigFishRunStartInput, } - impl __sdk::InModule for StartBigFishRunArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for StartBigFishRunArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait start_big_fish_run { - fn start_big_fish_run(&self, input: BigFishRunStartInput, -) { - self.start_big_fish_run_then(input, |_, _| {}); + fn start_big_fish_run(&self, input: BigFishRunStartInput) { + self.start_big_fish_run_then(input, |_, _| {}); } fn start_big_fish_run_then( &self, input: BigFishRunStartInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl start_big_fish_run for super::RemoteProcedures { &self, input: BigFishRunStartInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, BigFishRunProcedureResult>( - "start_big_fish_run", - StartBigFishRunArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, BigFishRunProcedureResult>( + "start_big_fish_run", + StartBigFishRunArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/start_puzzle_run_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/start_puzzle_run_procedure.rs index 849856c8..c3d6d457 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/start_puzzle_run_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/start_puzzle_run_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::puzzle_run_procedure_result_type::PuzzleRunProcedureResult; use super::puzzle_run_start_input_type::PuzzleRunStartInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct StartPuzzleRunArgs { +struct StartPuzzleRunArgs { pub input: PuzzleRunStartInput, } - impl __sdk::InModule for StartPuzzleRunArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for StartPuzzleRunArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait start_puzzle_run { - fn start_puzzle_run(&self, input: PuzzleRunStartInput, -) { - self.start_puzzle_run_then(input, |_, _| {}); + fn start_puzzle_run(&self, input: PuzzleRunStartInput) { + self.start_puzzle_run_then(input, |_, _| {}); } fn start_puzzle_run_then( &self, input: PuzzleRunStartInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl start_puzzle_run for super::RemoteProcedures { &self, input: PuzzleRunStartInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, PuzzleRunProcedureResult>( - "start_puzzle_run", - StartPuzzleRunArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, PuzzleRunProcedureResult>( + "start_puzzle_run", + StartPuzzleRunArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/story_continue_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_continue_input_type.rs index d84dde42..e0b3f730 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_continue_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/story_continue_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,12 +10,10 @@ pub struct StoryContinueInput { pub story_session_id: String, pub event_id: String, pub narrative_text: String, - pub choice_function_id: Option::, + pub choice_function_id: Option, pub updated_at_micros: i64, } - impl __sdk::InModule for StoryContinueInput { type Module = super::RemoteModule; } - 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 index 1072867e..29836b4a 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,12 +11,8 @@ 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_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_event_snapshot_type.rs index 4afacc4a..881799d5 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_event_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/story_event_snapshot_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::story_event_kind_type::StoryEventKind; @@ -18,12 +13,10 @@ pub struct StoryEventSnapshot { pub story_session_id: String, pub event_kind: StoryEventKind, pub narrative_text: String, - pub choice_function_id: Option::, + pub choice_function_id: Option, pub created_at_micros: i64, } - impl __sdk::InModule for StoryEventSnapshot { 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 index b702797b..232a554e 100644 --- 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 @@ -2,14 +2,9 @@ // 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_type::StoryEvent; 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`. /// @@ -50,8 +45,12 @@ 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() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = StoryEventInsertCallbackId; @@ -97,39 +96,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for StoryEventTableHandle<'ctx> { } } - /// 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>, - } +/// 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> 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) + } +} - 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); } @@ -139,26 +137,24 @@ 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() + __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") - } - } +#[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 index 3c9c102d..4d3bdd9f 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::story_event_kind_type::StoryEventKind; @@ -18,16 +13,14 @@ pub struct StoryEvent { pub story_session_id: String, pub event_kind: StoryEventKind, pub narrative_text: String, - pub choice_function_id: Option::, + 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. @@ -36,7 +29,7 @@ pub struct StoryEventCols { 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 choice_function_id: __sdk::__query_builder::Col>, pub created_at: __sdk::__query_builder::Col, } @@ -50,7 +43,6 @@ impl __sdk::__query_builder::HasCols for StoryEvent { 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"), - } } } @@ -69,10 +61,8 @@ impl __sdk::__query_builder::HasIxCols for StoryEvent { 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_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_session_input_type.rs index 260fc1e4..bebf3267 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_session_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/story_session_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,12 +12,10 @@ pub struct StorySessionInput { pub actor_user_id: String, pub world_profile_id: String, pub initial_prompt: String, - pub opening_summary: Option::, + pub opening_summary: Option, pub created_at_micros: i64, } - impl __sdk::InModule for StorySessionInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/story_session_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_session_procedure_result_type.rs index 3e1cfa4f..4548d9cc 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_session_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/story_session_procedure_result_type.rs @@ -2,27 +2,20 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::story_session_snapshot_type::StorySessionSnapshot; use super::story_event_snapshot_type::StoryEventSnapshot; +use super::story_session_snapshot_type::StorySessionSnapshot; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct StorySessionProcedureResult { pub ok: bool, - pub session: Option::, - pub event: Option::, - pub error_message: Option::, + pub session: Option, + pub event: Option, + pub error_message: Option, } - impl __sdk::InModule for StorySessionProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/story_session_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_session_snapshot_type.rs index 46f1072f..b8d2daf6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_session_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/story_session_snapshot_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::story_session_status_type::StorySessionStatus; @@ -19,17 +14,15 @@ pub struct StorySessionSnapshot { pub actor_user_id: String, pub world_profile_id: String, pub initial_prompt: String, - pub opening_summary: Option::, + pub opening_summary: Option, pub latest_narrative_text: String, - pub latest_choice_function_id: Option::, + pub latest_choice_function_id: Option, pub status: StorySessionStatus, pub version: u32, pub created_at_micros: i64, pub updated_at_micros: i64, } - impl __sdk::InModule for StorySessionSnapshot { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/story_session_state_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_session_state_input_type.rs index 5e4e1476..d860b7db 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_session_state_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/story_session_state_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,8 +10,6 @@ pub struct StorySessionStateInput { pub story_session_id: String, } - impl __sdk::InModule for StorySessionStateInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/story_session_state_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_session_state_procedure_result_type.rs index c33c4c77..cf2148d6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_session_state_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/story_session_state_procedure_result_type.rs @@ -2,27 +2,20 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::story_session_snapshot_type::StorySessionSnapshot; use super::story_event_snapshot_type::StoryEventSnapshot; +use super::story_session_snapshot_type::StorySessionSnapshot; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct StorySessionStateProcedureResult { pub ok: bool, - pub session: Option::, - pub events: Vec::, - pub error_message: Option::, + pub session: Option, + pub events: Vec, + pub error_message: Option, } - impl __sdk::InModule for StorySessionStateProcedureResult { type Module = super::RemoteModule; } - 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 index 334433fa..f04aae19 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,12 +13,8 @@ pub enum StorySessionStatus { 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 index d3b4dd67..142f7fa1 100644 --- 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 @@ -2,14 +2,9 @@ // 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_type::StorySession; 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`. /// @@ -50,8 +45,12 @@ 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() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = StorySessionInsertCallbackId; @@ -97,39 +96,38 @@ impl<'ctx> __sdk::TableWithPrimaryKey for StorySessionTableHandle<'ctx> { } } - /// 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>, - } +/// 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> 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) + } +} - 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); } @@ -139,26 +137,24 @@ 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() + __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") - } - } +#[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 index 7fd0c7e9..f9534179 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::story_session_status_type::StorySessionStatus; @@ -19,21 +14,19 @@ pub struct StorySession { pub actor_user_id: String, pub world_profile_id: String, pub initial_prompt: String, - pub opening_summary: Option::, + pub opening_summary: Option, pub latest_narrative_text: String, - pub latest_choice_function_id: Option::, + 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. @@ -43,9 +36,9 @@ pub struct StorySessionCols { 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 opening_summary: __sdk::__query_builder::Col>, pub latest_narrative_text: __sdk::__query_builder::Col, - pub latest_choice_function_id: __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, @@ -62,13 +55,18 @@ impl __sdk::__query_builder::HasCols for StorySession { 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"), + 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"), - } } } @@ -87,12 +85,13 @@ impl __sdk::__query_builder::HasIxCols for StorySession { 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"), + 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_big_fish_input_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/submit_big_fish_input_procedure.rs index b6e481b4..e09583f4 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/submit_big_fish_input_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/submit_big_fish_input_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::big_fish_run_procedure_result_type::BigFishRunProcedureResult; use super::big_fish_run_input_submit_input_type::BigFishRunInputSubmitInput; +use super::big_fish_run_procedure_result_type::BigFishRunProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct SubmitBigFishInputArgs { +struct SubmitBigFishInputArgs { pub input: BigFishRunInputSubmitInput, } - impl __sdk::InModule for SubmitBigFishInputArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for SubmitBigFishInputArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait submit_big_fish_input { - fn submit_big_fish_input(&self, input: BigFishRunInputSubmitInput, -) { - self.submit_big_fish_input_then(input, |_, _| {}); + fn submit_big_fish_input(&self, input: BigFishRunInputSubmitInput) { + self.submit_big_fish_input_then(input, |_, _| {}); } fn submit_big_fish_input_then( &self, input: BigFishRunInputSubmitInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl submit_big_fish_input for super::RemoteProcedures { &self, input: BigFishRunInputSubmitInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, BigFishRunProcedureResult>( - "submit_big_fish_input", - SubmitBigFishInputArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, BigFishRunProcedureResult>( + "submit_big_fish_input", + SubmitBigFishInputArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/submit_big_fish_message_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/submit_big_fish_message_procedure.rs index 0fd8dc0d..307d7755 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/submit_big_fish_message_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/submit_big_fish_message_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::big_fish_session_procedure_result_type::BigFishSessionProcedureResult; use super::big_fish_message_submit_input_type::BigFishMessageSubmitInput; +use super::big_fish_session_procedure_result_type::BigFishSessionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct SubmitBigFishMessageArgs { +struct SubmitBigFishMessageArgs { pub input: BigFishMessageSubmitInput, } - impl __sdk::InModule for SubmitBigFishMessageArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for SubmitBigFishMessageArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait submit_big_fish_message { - fn submit_big_fish_message(&self, input: BigFishMessageSubmitInput, -) { - self.submit_big_fish_message_then(input, |_, _| {}); + fn submit_big_fish_message(&self, input: BigFishMessageSubmitInput) { + self.submit_big_fish_message_then(input, |_, _| {}); } fn submit_big_fish_message_then( &self, input: BigFishMessageSubmitInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl submit_big_fish_message for super::RemoteProcedures { &self, input: BigFishMessageSubmitInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>( - "submit_big_fish_message", - SubmitBigFishMessageArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>( + "submit_big_fish_message", + SubmitBigFishMessageArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/submit_custom_world_agent_message_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/submit_custom_world_agent_message_procedure.rs index efb1c0b3..5debac19 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/submit_custom_world_agent_message_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/submit_custom_world_agent_message_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::custom_world_agent_operation_procedure_result_type::CustomWorldAgentOperationProcedureResult; use super::custom_world_agent_message_submit_input_type::CustomWorldAgentMessageSubmitInput; +use super::custom_world_agent_operation_procedure_result_type::CustomWorldAgentOperationProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct SubmitCustomWorldAgentMessageArgs { +struct SubmitCustomWorldAgentMessageArgs { pub input: CustomWorldAgentMessageSubmitInput, } - impl __sdk::InModule for SubmitCustomWorldAgentMessageArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for SubmitCustomWorldAgentMessageArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait submit_custom_world_agent_message { - fn submit_custom_world_agent_message(&self, input: CustomWorldAgentMessageSubmitInput, -) { - self.submit_custom_world_agent_message_then(input, |_, _| {}); + fn submit_custom_world_agent_message(&self, input: CustomWorldAgentMessageSubmitInput) { + self.submit_custom_world_agent_message_then(input, |_, _| {}); } fn submit_custom_world_agent_message_then( &self, input: CustomWorldAgentMessageSubmitInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl submit_custom_world_agent_message for super::RemoteProcedures { &self, input: CustomWorldAgentMessageSubmitInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, CustomWorldAgentOperationProcedureResult>( - "submit_custom_world_agent_message", - SubmitCustomWorldAgentMessageArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, CustomWorldAgentOperationProcedureResult>( + "submit_custom_world_agent_message", + SubmitCustomWorldAgentMessageArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/submit_puzzle_agent_message_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/submit_puzzle_agent_message_procedure.rs index 4bca696e..0d9e94e5 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/submit_puzzle_agent_message_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/submit_puzzle_agent_message_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::puzzle_agent_session_procedure_result_type::PuzzleAgentSessionProcedureResult; use super::puzzle_agent_message_submit_input_type::PuzzleAgentMessageSubmitInput; +use super::puzzle_agent_session_procedure_result_type::PuzzleAgentSessionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct SubmitPuzzleAgentMessageArgs { +struct SubmitPuzzleAgentMessageArgs { pub input: PuzzleAgentMessageSubmitInput, } - impl __sdk::InModule for SubmitPuzzleAgentMessageArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for SubmitPuzzleAgentMessageArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait submit_puzzle_agent_message { - fn submit_puzzle_agent_message(&self, input: PuzzleAgentMessageSubmitInput, -) { - self.submit_puzzle_agent_message_then(input, |_, _| {}); + fn submit_puzzle_agent_message(&self, input: PuzzleAgentMessageSubmitInput) { + self.submit_puzzle_agent_message_then(input, |_, _| {}); } fn submit_puzzle_agent_message_then( &self, input: PuzzleAgentMessageSubmitInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl submit_puzzle_agent_message for super::RemoteProcedures { &self, input: PuzzleAgentMessageSubmitInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>( - "submit_puzzle_agent_message", - SubmitPuzzleAgentMessageArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>( + "submit_puzzle_agent_message", + SubmitPuzzleAgentMessageArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/swap_puzzle_pieces_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/swap_puzzle_pieces_procedure.rs index dfcb2750..f5835607 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/swap_puzzle_pieces_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/swap_puzzle_pieces_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::puzzle_run_procedure_result_type::PuzzleRunProcedureResult; use super::puzzle_run_swap_input_type::PuzzleRunSwapInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct SwapPuzzlePiecesArgs { +struct SwapPuzzlePiecesArgs { pub input: PuzzleRunSwapInput, } - impl __sdk::InModule for SwapPuzzlePiecesArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for SwapPuzzlePiecesArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait swap_puzzle_pieces { - fn swap_puzzle_pieces(&self, input: PuzzleRunSwapInput, -) { - self.swap_puzzle_pieces_then(input, |_, _| {}); + fn swap_puzzle_pieces(&self, input: PuzzleRunSwapInput) { + self.swap_puzzle_pieces_then(input, |_, _| {}); } fn swap_puzzle_pieces_then( &self, input: PuzzleRunSwapInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl swap_puzzle_pieces for super::RemoteProcedures { &self, input: PuzzleRunSwapInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, PuzzleRunProcedureResult>( - "swap_puzzle_pieces", - SwapPuzzlePiecesArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, PuzzleRunProcedureResult>( + "swap_puzzle_pieces", + SwapPuzzlePiecesArgs { input }, + __callback, + ); } } - 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 index 77e48673..a9b61b0e 100644 --- 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 @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,12 +13,8 @@ pub enum TreasureInteractionAction { Leave, Secure, - } - - impl __sdk::InModule for TreasureInteractionAction { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_procedure_result_type.rs index 212c4042..d0ac0175 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_procedure_result_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::treasure_record_snapshot_type::TreasureRecordSnapshot; @@ -15,12 +10,10 @@ use super::treasure_record_snapshot_type::TreasureRecordSnapshot; #[sats(crate = __lib)] pub struct TreasureRecordProcedureResult { pub ok: bool, - pub record: Option::, - pub error_message: Option::, + pub record: Option, + pub error_message: Option, } - impl __sdk::InModule for TreasureRecordProcedureResult { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_snapshot_type.rs index 29677339..8d69d10e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_snapshot_type.rs @@ -2,12 +2,7 @@ // 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 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; @@ -21,20 +16,18 @@ pub struct TreasureRecordSnapshot { pub actor_user_id: String, pub encounter_id: String, pub encounter_name: String, - pub scene_id: Option::, - pub scene_name: Option::, + pub scene_id: Option, + pub scene_name: Option, pub action: TreasureInteractionAction, - pub reward_items: Vec::, + pub reward_items: Vec, pub reward_hp: u32, pub reward_mana: u32, pub reward_currency: u32, - pub story_hint: Option::, + pub story_hint: Option, pub created_at_micros: i64, pub updated_at_micros: i64, } - impl __sdk::InModule for TreasureRecordSnapshot { 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 index c4e7b6cd..927e3256 100644 --- 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 @@ -2,15 +2,10 @@ // 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::treasure_record_type::TreasureRecord; 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`. /// @@ -51,8 +46,12 @@ 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() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = TreasureRecordInsertCallbackId; @@ -98,39 +97,40 @@ impl<'ctx> __sdk::TableWithPrimaryKey for TreasureRecordTableHandle<'ctx> { } } - /// 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>, - } +/// 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> 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) + } +} - 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); } @@ -140,26 +140,24 @@ 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() + __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") - } - } +#[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 index e757734f..9bcd8f6d 100644 --- 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 @@ -2,12 +2,7 @@ // 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 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; @@ -21,24 +16,22 @@ pub struct TreasureRecord { pub actor_user_id: String, pub encounter_id: String, pub encounter_name: String, - pub scene_id: Option::, - pub scene_name: Option::, + pub scene_id: Option, + pub scene_name: Option, pub action: TreasureInteractionAction, - pub reward_items: Vec::, + pub reward_items: Vec, pub reward_hp: u32, pub reward_mana: u32, pub reward_currency: u32, - pub story_hint: Option::, + 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. @@ -49,14 +42,15 @@ pub struct TreasureRecordCols { 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 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_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 story_hint: __sdk::__query_builder::Col>, pub created_at: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, } @@ -81,7 +75,6 @@ impl __sdk::__query_builder::HasCols for TreasureRecord { 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"), - } } } @@ -103,13 +96,17 @@ impl __sdk::__query_builder::HasIxCols for TreasureRecord { 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"), + 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"), - + 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/treasure_resolve_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/treasure_resolve_input_type.rs index 9893c678..ef1083df 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/treasure_resolve_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/treasure_resolve_input_type.rs @@ -2,12 +2,7 @@ // 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 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; @@ -21,20 +16,18 @@ pub struct TreasureResolveInput { pub actor_user_id: String, pub encounter_id: String, pub encounter_name: String, - pub scene_id: Option::, - pub scene_name: Option::, + pub scene_id: Option, + pub scene_name: Option, pub action: TreasureInteractionAction, - pub reward_items: Vec::, + pub reward_items: Vec, pub reward_hp: u32, pub reward_mana: u32, pub reward_currency: u32, - pub story_hint: Option::, + pub story_hint: Option, pub created_at_micros: i64, pub updated_at_micros: i64, } - impl __sdk::InModule for TreasureResolveInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/turn_in_quest_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/turn_in_quest_reducer.rs index 2e9e88fd..08727f04 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/turn_in_quest_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/turn_in_quest_reducer.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::quest_turn_in_input_type::QuestTurnInInput; @@ -19,10 +14,8 @@ pub(super) struct TurnInQuestArgs { impl From for super::Reducer { fn from(args: TurnInQuestArgs) -> Self { - Self::TurnInQuest { - input: args.input, -} -} + Self::TurnInQuest { input: args.input } + } } impl __sdk::InModule for TurnInQuestArgs { @@ -40,9 +33,8 @@ pub trait turn_in_quest { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`turn_in_quest:turn_in_quest_then`] to run a callback after the reducer completes. - fn turn_in_quest(&self, input: QuestTurnInInput, -) -> __sdk::Result<()> { - self.turn_in_quest_then(input, |_, _| {}) + fn turn_in_quest(&self, input: QuestTurnInInput) -> __sdk::Result<()> { + self.turn_in_quest_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `turn_in_quest` to run as soon as possible, @@ -55,9 +47,11 @@ pub trait turn_in_quest { &self, input: QuestTurnInInput, - callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) - + Send - + 'static, + callback: impl FnOnce( + &super::ReducerEventContext, + Result, __sdk::InternalError>, + ) + Send + + 'static, ) -> __sdk::Result<()>; } @@ -66,11 +60,13 @@ impl turn_in_quest for super::RemoteReducers { &self, input: QuestTurnInInput, - 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(TurnInQuestArgs { input, }, callback) + self.imp + .invoke_reducer_with_callback(TurnInQuestArgs { input }, callback) } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/unequip_inventory_item_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/unequip_inventory_item_input_type.rs index 20ca72d7..227f40ec 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/unequip_inventory_item_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/unequip_inventory_item_input_type.rs @@ -2,13 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,8 +10,6 @@ pub struct UnequipInventoryItemInput { pub slot_id: String, } - impl __sdk::InModule for UnequipInventoryItemInput { type Module = super::RemoteModule; } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/unpublish_custom_world_profile_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/unpublish_custom_world_profile_and_return_procedure.rs index 45e7a4a1..31acccce 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/unpublish_custom_world_profile_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/unpublish_custom_world_profile_and_return_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_library_mutation_result_type::CustomWorldLibraryMutationResult; use super::custom_world_profile_unpublish_input_type::CustomWorldProfileUnpublishInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct UnpublishCustomWorldProfileAndReturnArgs { +struct UnpublishCustomWorldProfileAndReturnArgs { pub input: CustomWorldProfileUnpublishInput, } - impl __sdk::InModule for UnpublishCustomWorldProfileAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for UnpublishCustomWorldProfileAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait unpublish_custom_world_profile_and_return { - fn unpublish_custom_world_profile_and_return(&self, input: CustomWorldProfileUnpublishInput, -) { - self.unpublish_custom_world_profile_and_return_then(input, |_, _| {}); + fn unpublish_custom_world_profile_and_return(&self, input: CustomWorldProfileUnpublishInput) { + self.unpublish_custom_world_profile_and_return_then(input, |_, _| {}); } fn unpublish_custom_world_profile_and_return_then( &self, input: CustomWorldProfileUnpublishInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl unpublish_custom_world_profile_and_return for super::RemoteProcedures { &self, input: CustomWorldProfileUnpublishInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, CustomWorldLibraryMutationResult>( - "unpublish_custom_world_profile_and_return", - UnpublishCustomWorldProfileAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, CustomWorldLibraryMutationResult>( + "unpublish_custom_world_profile_and_return", + UnpublishCustomWorldProfileAndReturnArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/unpublish_custom_world_profile_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/unpublish_custom_world_profile_reducer.rs index adedc423..51af927f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/unpublish_custom_world_profile_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/unpublish_custom_world_profile_reducer.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_profile_unpublish_input_type::CustomWorldProfileUnpublishInput; @@ -19,10 +14,8 @@ pub(super) struct UnpublishCustomWorldProfileArgs { impl From for super::Reducer { fn from(args: UnpublishCustomWorldProfileArgs) -> Self { - Self::UnpublishCustomWorldProfile { - input: args.input, -} -} + Self::UnpublishCustomWorldProfile { input: args.input } + } } impl __sdk::InModule for UnpublishCustomWorldProfileArgs { @@ -40,9 +33,11 @@ pub trait unpublish_custom_world_profile { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`unpublish_custom_world_profile:unpublish_custom_world_profile_then`] to run a callback after the reducer completes. - fn unpublish_custom_world_profile(&self, input: CustomWorldProfileUnpublishInput, -) -> __sdk::Result<()> { - self.unpublish_custom_world_profile_then(input, |_, _| {}) + fn unpublish_custom_world_profile( + &self, + input: CustomWorldProfileUnpublishInput, + ) -> __sdk::Result<()> { + self.unpublish_custom_world_profile_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `unpublish_custom_world_profile` to run as soon as possible, @@ -55,9 +50,11 @@ pub trait unpublish_custom_world_profile { &self, input: CustomWorldProfileUnpublishInput, - callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) - + Send - + 'static, + callback: impl FnOnce( + &super::ReducerEventContext, + Result, __sdk::InternalError>, + ) + Send + + 'static, ) -> __sdk::Result<()>; } @@ -66,11 +63,13 @@ impl unpublish_custom_world_profile for super::RemoteReducers { &self, input: CustomWorldProfileUnpublishInput, - 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(UnpublishCustomWorldProfileArgs { input, }, callback) + self.imp + .invoke_reducer_with_callback(UnpublishCustomWorldProfileArgs { input }, callback) } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/update_puzzle_work_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/update_puzzle_work_procedure.rs index 14a134df..80571241 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/update_puzzle_work_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/update_puzzle_work_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::puzzle_work_procedure_result_type::PuzzleWorkProcedureResult; use super::puzzle_work_upsert_input_type::PuzzleWorkUpsertInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct UpdatePuzzleWorkArgs { +struct UpdatePuzzleWorkArgs { pub input: PuzzleWorkUpsertInput, } - impl __sdk::InModule for UpdatePuzzleWorkArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for UpdatePuzzleWorkArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait update_puzzle_work { - fn update_puzzle_work(&self, input: PuzzleWorkUpsertInput, -) { - self.update_puzzle_work_then(input, |_, _| {}); + fn update_puzzle_work(&self, input: PuzzleWorkUpsertInput) { + self.update_puzzle_work_then(input, |_, _| {}); } fn update_puzzle_work_then( &self, input: PuzzleWorkUpsertInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl update_puzzle_work for super::RemoteProcedures { &self, input: PuzzleWorkUpsertInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, PuzzleWorkProcedureResult>( - "update_puzzle_work", - UpdatePuzzleWorkArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, PuzzleWorkProcedureResult>( + "update_puzzle_work", + UpdatePuzzleWorkArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/upsert_chapter_progression_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/upsert_chapter_progression_and_return_procedure.rs index 2182ec5a..be3ff473 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/upsert_chapter_progression_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/upsert_chapter_progression_and_return_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; -use super::chapter_progression_procedure_result_type::ChapterProgressionProcedureResult; use super::chapter_progression_input_type::ChapterProgressionInput; +use super::chapter_progression_procedure_result_type::ChapterProgressionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct UpsertChapterProgressionAndReturnArgs { +struct UpsertChapterProgressionAndReturnArgs { pub input: ChapterProgressionInput, } - impl __sdk::InModule for UpsertChapterProgressionAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for UpsertChapterProgressionAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait upsert_chapter_progression_and_return { - fn upsert_chapter_progression_and_return(&self, input: ChapterProgressionInput, -) { - self.upsert_chapter_progression_and_return_then(input, |_, _| {}); + fn upsert_chapter_progression_and_return(&self, input: ChapterProgressionInput) { + self.upsert_chapter_progression_and_return_then(input, |_, _| {}); } fn upsert_chapter_progression_and_return_then( &self, input: ChapterProgressionInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl upsert_chapter_progression_and_return for super::RemoteProcedures { &self, input: ChapterProgressionInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, ChapterProgressionProcedureResult>( - "upsert_chapter_progression_and_return", - UpsertChapterProgressionAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, ChapterProgressionProcedureResult>( + "upsert_chapter_progression_and_return", + UpsertChapterProgressionAndReturnArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/upsert_chapter_progression_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/upsert_chapter_progression_reducer.rs index a01fe892..de37e994 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/upsert_chapter_progression_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/upsert_chapter_progression_reducer.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::chapter_progression_input_type::ChapterProgressionInput; @@ -19,10 +14,8 @@ pub(super) struct UpsertChapterProgressionArgs { impl From for super::Reducer { fn from(args: UpsertChapterProgressionArgs) -> Self { - Self::UpsertChapterProgression { - input: args.input, -} -} + Self::UpsertChapterProgression { input: args.input } + } } impl __sdk::InModule for UpsertChapterProgressionArgs { @@ -40,9 +33,8 @@ pub trait upsert_chapter_progression { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`upsert_chapter_progression:upsert_chapter_progression_then`] to run a callback after the reducer completes. - fn upsert_chapter_progression(&self, input: ChapterProgressionInput, -) -> __sdk::Result<()> { - self.upsert_chapter_progression_then(input, |_, _| {}) + fn upsert_chapter_progression(&self, input: ChapterProgressionInput) -> __sdk::Result<()> { + self.upsert_chapter_progression_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `upsert_chapter_progression` to run as soon as possible, @@ -55,9 +47,11 @@ pub trait upsert_chapter_progression { &self, input: ChapterProgressionInput, - callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) - + Send - + 'static, + callback: impl FnOnce( + &super::ReducerEventContext, + Result, __sdk::InternalError>, + ) + Send + + 'static, ) -> __sdk::Result<()>; } @@ -66,11 +60,13 @@ impl upsert_chapter_progression for super::RemoteReducers { &self, input: ChapterProgressionInput, - 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(UpsertChapterProgressionArgs { input, }, callback) + self.imp + .invoke_reducer_with_callback(UpsertChapterProgressionArgs { input }, callback) } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/upsert_custom_world_profile_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/upsert_custom_world_profile_and_return_procedure.rs index e7720c06..a761ab95 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/upsert_custom_world_profile_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/upsert_custom_world_profile_and_return_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_library_mutation_result_type::CustomWorldLibraryMutationResult; use super::custom_world_profile_upsert_input_type::CustomWorldProfileUpsertInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct UpsertCustomWorldProfileAndReturnArgs { +struct UpsertCustomWorldProfileAndReturnArgs { pub input: CustomWorldProfileUpsertInput, } - impl __sdk::InModule for UpsertCustomWorldProfileAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for UpsertCustomWorldProfileAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait upsert_custom_world_profile_and_return { - fn upsert_custom_world_profile_and_return(&self, input: CustomWorldProfileUpsertInput, -) { - self.upsert_custom_world_profile_and_return_then(input, |_, _| {}); + fn upsert_custom_world_profile_and_return(&self, input: CustomWorldProfileUpsertInput) { + self.upsert_custom_world_profile_and_return_then(input, |_, _| {}); } fn upsert_custom_world_profile_and_return_then( &self, input: CustomWorldProfileUpsertInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl upsert_custom_world_profile_and_return for super::RemoteProcedures { &self, input: CustomWorldProfileUpsertInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, CustomWorldLibraryMutationResult>( - "upsert_custom_world_profile_and_return", - UpsertCustomWorldProfileAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, CustomWorldLibraryMutationResult>( + "upsert_custom_world_profile_and_return", + UpsertCustomWorldProfileAndReturnArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/upsert_custom_world_profile_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/upsert_custom_world_profile_reducer.rs index 353bc46f..91ca2652 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/upsert_custom_world_profile_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/upsert_custom_world_profile_reducer.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::custom_world_profile_upsert_input_type::CustomWorldProfileUpsertInput; @@ -19,10 +14,8 @@ pub(super) struct UpsertCustomWorldProfileArgs { impl From for super::Reducer { fn from(args: UpsertCustomWorldProfileArgs) -> Self { - Self::UpsertCustomWorldProfile { - input: args.input, -} -} + Self::UpsertCustomWorldProfile { input: args.input } + } } impl __sdk::InModule for UpsertCustomWorldProfileArgs { @@ -40,9 +33,11 @@ pub trait upsert_custom_world_profile { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`upsert_custom_world_profile:upsert_custom_world_profile_then`] to run a callback after the reducer completes. - fn upsert_custom_world_profile(&self, input: CustomWorldProfileUpsertInput, -) -> __sdk::Result<()> { - self.upsert_custom_world_profile_then(input, |_, _| {}) + fn upsert_custom_world_profile( + &self, + input: CustomWorldProfileUpsertInput, + ) -> __sdk::Result<()> { + self.upsert_custom_world_profile_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `upsert_custom_world_profile` to run as soon as possible, @@ -55,9 +50,11 @@ pub trait upsert_custom_world_profile { &self, input: CustomWorldProfileUpsertInput, - callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) - + Send - + 'static, + callback: impl FnOnce( + &super::ReducerEventContext, + Result, __sdk::InternalError>, + ) + Send + + 'static, ) -> __sdk::Result<()>; } @@ -66,11 +63,13 @@ impl upsert_custom_world_profile for super::RemoteReducers { &self, input: CustomWorldProfileUpsertInput, - 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(UpsertCustomWorldProfileArgs { input, }, callback) + self.imp + .invoke_reducer_with_callback(UpsertCustomWorldProfileArgs { input }, callback) } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/upsert_npc_state_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/upsert_npc_state_and_return_procedure.rs index 46ad5903..91ba0d0e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/upsert_npc_state_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/upsert_npc_state_and_return_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::npc_state_procedure_result_type::NpcStateProcedureResult; use super::npc_state_upsert_input_type::NpcStateUpsertInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct UpsertNpcStateAndReturnArgs { +struct UpsertNpcStateAndReturnArgs { pub input: NpcStateUpsertInput, } - impl __sdk::InModule for UpsertNpcStateAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for UpsertNpcStateAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait upsert_npc_state_and_return { - fn upsert_npc_state_and_return(&self, input: NpcStateUpsertInput, -) { - self.upsert_npc_state_and_return_then(input, |_, _| {}); + fn upsert_npc_state_and_return(&self, input: NpcStateUpsertInput) { + self.upsert_npc_state_and_return_then(input, |_, _| {}); } fn upsert_npc_state_and_return_then( &self, input: NpcStateUpsertInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl upsert_npc_state_and_return for super::RemoteProcedures { &self, input: NpcStateUpsertInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, NpcStateProcedureResult>( - "upsert_npc_state_and_return", - UpsertNpcStateAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, NpcStateProcedureResult>( + "upsert_npc_state_and_return", + UpsertNpcStateAndReturnArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/upsert_npc_state_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/upsert_npc_state_reducer.rs index 1a6f10c7..afbe61f8 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/upsert_npc_state_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/upsert_npc_state_reducer.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::npc_state_upsert_input_type::NpcStateUpsertInput; @@ -19,10 +14,8 @@ pub(super) struct UpsertNpcStateArgs { impl From for super::Reducer { fn from(args: UpsertNpcStateArgs) -> Self { - Self::UpsertNpcState { - input: args.input, -} -} + Self::UpsertNpcState { input: args.input } + } } impl __sdk::InModule for UpsertNpcStateArgs { @@ -40,9 +33,8 @@ pub trait upsert_npc_state { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`upsert_npc_state:upsert_npc_state_then`] to run a callback after the reducer completes. - fn upsert_npc_state(&self, input: NpcStateUpsertInput, -) -> __sdk::Result<()> { - self.upsert_npc_state_then(input, |_, _| {}) + fn upsert_npc_state(&self, input: NpcStateUpsertInput) -> __sdk::Result<()> { + self.upsert_npc_state_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `upsert_npc_state` to run as soon as possible, @@ -55,9 +47,11 @@ pub trait upsert_npc_state { &self, input: NpcStateUpsertInput, - callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) - + Send - + 'static, + callback: impl FnOnce( + &super::ReducerEventContext, + Result, __sdk::InternalError>, + ) + Send + + 'static, ) -> __sdk::Result<()>; } @@ -66,11 +60,13 @@ impl upsert_npc_state for super::RemoteReducers { &self, input: NpcStateUpsertInput, - 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(UpsertNpcStateArgs { input, }, callback) + self.imp + .invoke_reducer_with_callback(UpsertNpcStateArgs { input }, callback) } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/upsert_platform_browse_history_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/upsert_platform_browse_history_and_return_procedure.rs index eb863a2d..36e5f464 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/upsert_platform_browse_history_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/upsert_platform_browse_history_and_return_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_browse_history_procedure_result_type::RuntimeBrowseHistoryProcedureResult; use super::runtime_browse_history_sync_input_type::RuntimeBrowseHistorySyncInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct UpsertPlatformBrowseHistoryAndReturnArgs { +struct UpsertPlatformBrowseHistoryAndReturnArgs { pub input: RuntimeBrowseHistorySyncInput, } - impl __sdk::InModule for UpsertPlatformBrowseHistoryAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for UpsertPlatformBrowseHistoryAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait upsert_platform_browse_history_and_return { - fn upsert_platform_browse_history_and_return(&self, input: RuntimeBrowseHistorySyncInput, -) { - self.upsert_platform_browse_history_and_return_then(input, |_, _| {}); + fn upsert_platform_browse_history_and_return(&self, input: RuntimeBrowseHistorySyncInput) { + self.upsert_platform_browse_history_and_return_then(input, |_, _| {}); } fn upsert_platform_browse_history_and_return_then( &self, input: RuntimeBrowseHistorySyncInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl upsert_platform_browse_history_and_return for super::RemoteProcedures { &self, input: RuntimeBrowseHistorySyncInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, RuntimeBrowseHistoryProcedureResult>( - "upsert_platform_browse_history_and_return", - UpsertPlatformBrowseHistoryAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, RuntimeBrowseHistoryProcedureResult>( + "upsert_platform_browse_history_and_return", + UpsertPlatformBrowseHistoryAndReturnArgs { input }, + __callback, + ); } } - 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 f820971c..f8fa0351 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 @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_setting_procedure_result_type::RuntimeSettingProcedureResult; use super::runtime_setting_upsert_input_type::RuntimeSettingUpsertInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct UpsertRuntimeSettingAndReturnArgs { +struct UpsertRuntimeSettingAndReturnArgs { pub input: RuntimeSettingUpsertInput, } - impl __sdk::InModule for UpsertRuntimeSettingAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for UpsertRuntimeSettingAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait upsert_runtime_setting_and_return { - fn upsert_runtime_setting_and_return(&self, input: RuntimeSettingUpsertInput, -) { - self.upsert_runtime_setting_and_return_then(input, |_, _| {}); + fn upsert_runtime_setting_and_return(&self, input: RuntimeSettingUpsertInput) { + self.upsert_runtime_setting_and_return_then(input, |_, _| {}); } fn upsert_runtime_setting_and_return_then( &self, input: RuntimeSettingUpsertInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl upsert_runtime_setting_and_return for super::RemoteProcedures { &self, input: RuntimeSettingUpsertInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, RuntimeSettingProcedureResult>( - "upsert_runtime_setting_and_return", - UpsertRuntimeSettingAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, RuntimeSettingProcedureResult>( + "upsert_runtime_setting_and_return", + UpsertRuntimeSettingAndReturnArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/upsert_runtime_snapshot_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/upsert_runtime_snapshot_and_return_procedure.rs index f86a0f7d..fe0746ba 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/upsert_runtime_snapshot_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/upsert_runtime_snapshot_and_return_procedure.rs @@ -2,23 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_snapshot_procedure_result_type::RuntimeSnapshotProcedureResult; use super::runtime_snapshot_upsert_input_type::RuntimeSnapshotUpsertInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] - struct UpsertRuntimeSnapshotAndReturnArgs { +struct UpsertRuntimeSnapshotAndReturnArgs { pub input: RuntimeSnapshotUpsertInput, } - impl __sdk::InModule for UpsertRuntimeSnapshotAndReturnArgs { type Module = super::RemoteModule; } @@ -28,16 +22,19 @@ impl __sdk::InModule for UpsertRuntimeSnapshotAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait upsert_runtime_snapshot_and_return { - fn upsert_runtime_snapshot_and_return(&self, input: RuntimeSnapshotUpsertInput, -) { - self.upsert_runtime_snapshot_and_return_then(input, |_, _| {}); + fn upsert_runtime_snapshot_and_return(&self, input: RuntimeSnapshotUpsertInput) { + self.upsert_runtime_snapshot_and_return_then(input, |_, _| {}); } fn upsert_runtime_snapshot_and_return_then( &self, input: RuntimeSnapshotUpsertInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ); } @@ -46,13 +43,17 @@ impl upsert_runtime_snapshot_and_return for super::RemoteProcedures { &self, input: RuntimeSnapshotUpsertInput, - __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + __callback: impl FnOnce( + &super::ProcedureEventContext, + Result, + ) + Send + + 'static, ) { - self.imp.invoke_procedure_with_callback::<_, RuntimeSnapshotProcedureResult>( - "upsert_runtime_snapshot_and_return", - UpsertRuntimeSnapshotAndReturnArgs { input, }, - __callback, - ); + self.imp + .invoke_procedure_with_callback::<_, RuntimeSnapshotProcedureResult>( + "upsert_runtime_snapshot_and_return", + UpsertRuntimeSnapshotAndReturnArgs { input }, + __callback, + ); } } - diff --git a/server-rs/crates/spacetime-client/src/module_bindings/user_browse_history_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/user_browse_history_table.rs index 933556ca..2341921d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/user_browse_history_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/user_browse_history_table.rs @@ -2,14 +2,9 @@ // 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::user_browse_history_type::UserBrowseHistory; use super::runtime_browse_history_theme_mode_type::RuntimeBrowseHistoryThemeMode; +use super::user_browse_history_type::UserBrowseHistory; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `user_browse_history`. /// @@ -37,7 +32,9 @@ pub trait UserBrowseHistoryTableAccess { impl UserBrowseHistoryTableAccess for super::RemoteTables { fn user_browse_history(&self) -> UserBrowseHistoryTableHandle<'_> { UserBrowseHistoryTableHandle { - imp: self.imp.get_table::("user_browse_history"), + imp: self + .imp + .get_table::("user_browse_history"), ctx: std::marker::PhantomData, } } @@ -50,8 +47,12 @@ impl<'ctx> __sdk::Table for UserBrowseHistoryTableHandle<'ctx> { type Row = UserBrowseHistory; type EventContext = super::EventContext; - fn count(&self) -> u64 { self.imp.count() } - fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } type InsertCallbackId = UserBrowseHistoryInsertCallbackId; @@ -97,39 +98,40 @@ impl<'ctx> __sdk::TableWithPrimaryKey for UserBrowseHistoryTableHandle<'ctx> { } } - /// Access to the `browse_history_id` unique index on the table `user_browse_history`, - /// which allows point queries on the field of the same name - /// via the [`UserBrowseHistoryBrowseHistoryIdUnique::find`] method. - /// - /// Users are encouraged not to explicitly reference this type, - /// but to directly chain method calls, - /// like `ctx.db.user_browse_history().browse_history_id().find(...)`. - pub struct UserBrowseHistoryBrowseHistoryIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, - } +/// Access to the `browse_history_id` unique index on the table `user_browse_history`, +/// which allows point queries on the field of the same name +/// via the [`UserBrowseHistoryBrowseHistoryIdUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.user_browse_history().browse_history_id().find(...)`. +pub struct UserBrowseHistoryBrowseHistoryIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} - impl<'ctx> UserBrowseHistoryTableHandle<'ctx> { - /// Get a handle on the `browse_history_id` unique index on the table `user_browse_history`. - pub fn browse_history_id(&self) -> UserBrowseHistoryBrowseHistoryIdUnique<'ctx> { - UserBrowseHistoryBrowseHistoryIdUnique { - imp: self.imp.get_unique_constraint::("browse_history_id"), - phantom: std::marker::PhantomData, - } - } +impl<'ctx> UserBrowseHistoryTableHandle<'ctx> { + /// Get a handle on the `browse_history_id` unique index on the table `user_browse_history`. + pub fn browse_history_id(&self) -> UserBrowseHistoryBrowseHistoryIdUnique<'ctx> { + UserBrowseHistoryBrowseHistoryIdUnique { + imp: self + .imp + .get_unique_constraint::("browse_history_id"), + phantom: std::marker::PhantomData, } + } +} + +impl<'ctx> UserBrowseHistoryBrowseHistoryIdUnique<'ctx> { + /// Find the subscribed row whose `browse_history_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) + } +} - impl<'ctx> UserBrowseHistoryBrowseHistoryIdUnique<'ctx> { - /// Find the subscribed row whose `browse_history_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::("user_browse_history"); _table.add_unique_constraint::("browse_history_id", |row| &row.browse_history_id); } @@ -139,26 +141,24 @@ 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() + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() }) } - #[allow(non_camel_case_types)] - /// Extension trait for query builder access to the table `UserBrowseHistory`. - /// - /// Implemented for [`__sdk::QueryTableAccessor`]. - pub trait user_browse_historyQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `UserBrowseHistory`. - fn user_browse_history(&self) -> __sdk::__query_builder::Table; - } - - impl user_browse_historyQueryTableAccess for __sdk::QueryTableAccessor { - fn user_browse_history(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("user_browse_history") - } - } +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `UserBrowseHistory`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait user_browse_historyQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `UserBrowseHistory`. + fn user_browse_history(&self) -> __sdk::__query_builder::Table; +} +impl user_browse_historyQueryTableAccess for __sdk::QueryTableAccessor { + fn user_browse_history(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("user_browse_history") + } +} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/user_browse_history_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/user_browse_history_type.rs index 85e114be..3a6cf1ae 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/user_browse_history_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/user_browse_history_type.rs @@ -2,12 +2,7 @@ // 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 spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; use super::runtime_browse_history_theme_mode_type::RuntimeBrowseHistoryThemeMode; @@ -21,7 +16,7 @@ pub struct UserBrowseHistory { pub world_name: String, pub subtitle: String, pub summary_text: String, - pub cover_image_src: Option::, + pub cover_image_src: Option, pub theme_mode: RuntimeBrowseHistoryThemeMode, pub author_display_name: String, pub visited_at: __sdk::Timestamp, @@ -29,12 +24,10 @@ pub struct UserBrowseHistory { pub updated_at: __sdk::Timestamp, } - impl __sdk::InModule for UserBrowseHistory { type Module = super::RemoteModule; } - /// Column accessor struct for the table `UserBrowseHistory`. /// /// Provides typed access to columns for query building. @@ -46,7 +39,7 @@ pub struct UserBrowseHistoryCols { 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 cover_image_src: __sdk::__query_builder::Col>, pub theme_mode: __sdk::__query_builder::Col, pub author_display_name: __sdk::__query_builder::Col, pub visited_at: __sdk::__query_builder::Col, @@ -67,11 +60,13 @@ impl __sdk::__query_builder::HasCols for UserBrowseHistory { 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"), - author_display_name: __sdk::__query_builder::Col::new(table_name, "author_display_name"), + author_display_name: __sdk::__query_builder::Col::new( + table_name, + "author_display_name", + ), visited_at: __sdk::__query_builder::Col::new(table_name, "visited_at"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), - } } } @@ -90,10 +85,8 @@ impl __sdk::__query_builder::HasIxCols for UserBrowseHistory { UserBrowseHistoryIxCols { browse_history_id: __sdk::__query_builder::IxCol::new(table_name, "browse_history_id"), user_id: __sdk::__query_builder::IxCol::new(table_name, "user_id"), - } } } impl __sdk::__query_builder::CanBeLookupTable for UserBrowseHistory {} - diff --git a/server-rs/crates/spacetime-module/src/custom_world/mod.rs b/server-rs/crates/spacetime-module/src/custom_world/mod.rs index f3211780..c66eb3db 100644 --- a/server-rs/crates/spacetime-module/src/custom_world/mod.rs +++ b/server-rs/crates/spacetime-module/src/custom_world/mod.rs @@ -23,6 +23,8 @@ pub struct CustomWorldProfile { landmark_count: u32, author_display_name: String, published_at: Option, + // 软删除后保留 profile 真相,供审计与幂等删除使用。 + deleted_at: Option, created_at: Timestamp, updated_at: Timestamp, } @@ -701,6 +703,34 @@ pub fn unpublish_custom_world_profile_and_return( } } +// 删除入口继续走 owner-only 软删除,不直接物理删除 profile 真相。 +#[spacetimedb::procedure] +pub fn delete_custom_world_profile_and_return( + ctx: &mut ProcedureContext, + input: CustomWorldProfileDeleteInput, +) -> CustomWorldProfileListResult { + match ctx.try_with_tx(|tx| { + delete_custom_world_profile_record(tx, input.clone())?; + list_custom_world_profile_snapshots( + tx, + CustomWorldProfileListInput { + owner_user_id: input.owner_user_id.clone(), + }, + ) + }) { + Ok(entries) => CustomWorldProfileListResult { + ok: true, + entries, + error_message: None, + }, + Err(message) => CustomWorldProfileListResult { + ok: false, + entries: Vec::new(), + error_message: Some(message), + }, + } +} + #[spacetimedb::procedure] pub fn list_custom_world_profiles( ctx: &mut ProcedureContext, @@ -986,6 +1016,7 @@ fn upsert_custom_world_profile_record( landmark_count: input.landmark_count, author_display_name: input.author_display_name.clone(), published_at: existing.published_at, + deleted_at: None, created_at: existing.created_at, updated_at, } @@ -1005,6 +1036,7 @@ fn upsert_custom_world_profile_record( landmark_count: input.landmark_count, author_display_name: input.author_display_name.clone(), published_at: None, + deleted_at: None, created_at: updated_at, updated_at, }, @@ -1139,6 +1171,7 @@ fn publish_custom_world_profile_record( landmark_count: existing.landmark_count, author_display_name: input.author_display_name.clone(), published_at: Some(published_at), + deleted_at: None, created_at: existing.created_at, updated_at: published_at, }; @@ -1199,6 +1232,7 @@ fn unpublish_custom_world_profile_record( landmark_count: existing.landmark_count, author_display_name: input.author_display_name.clone(), published_at: None, + deleted_at: None, created_at: existing.created_at, updated_at, }; @@ -1208,6 +1242,62 @@ fn unpublish_custom_world_profile_record( Ok((build_custom_world_profile_snapshot(&inserted), None)) } +fn delete_custom_world_profile_record( + ctx: &ReducerContext, + input: CustomWorldProfileDeleteInput, +) -> Result<(), String> { + validate_custom_world_profile_delete_input(&input).map_err(|error| error.to_string())?; + + let Some(existing) = ctx + .db + .custom_world_profile() + .profile_id() + .find(&input.profile_id) + .filter(|row| row.owner_user_id == input.owner_user_id) + else { + return Ok(()); + }; + + if existing.deleted_at.is_some() { + return Ok(()); + } + + let deleted_at = Timestamp::from_micros_since_unix_epoch(input.deleted_at_micros); + + ctx.db + .custom_world_profile() + .profile_id() + .delete(&existing.profile_id); + + ctx.db + .custom_world_gallery_entry() + .profile_id() + .delete(&existing.profile_id); + + let next_row = CustomWorldProfile { + profile_id: existing.profile_id.clone(), + owner_user_id: existing.owner_user_id.clone(), + source_agent_session_id: existing.source_agent_session_id.clone(), + publication_status: CustomWorldPublicationStatus::Draft, + world_name: existing.world_name.clone(), + subtitle: existing.subtitle.clone(), + summary_text: existing.summary_text.clone(), + theme_mode: existing.theme_mode, + cover_image_src: existing.cover_image_src.clone(), + profile_payload_json: existing.profile_payload_json.clone(), + playable_npc_count: existing.playable_npc_count, + landmark_count: existing.landmark_count, + author_display_name: existing.author_display_name.clone(), + published_at: None, + deleted_at: Some(deleted_at), + created_at: existing.created_at, + updated_at: deleted_at, + }; + + let _ = ctx.db.custom_world_profile().insert(next_row); + Ok(()) +} + fn list_custom_world_profile_snapshots( ctx: &ReducerContext, input: CustomWorldProfileListInput, @@ -1218,7 +1308,7 @@ fn list_custom_world_profile_snapshots( .db .custom_world_profile() .iter() - .filter(|row| row.owner_user_id == input.owner_user_id) + .filter(|row| row.owner_user_id == input.owner_user_id && row.deleted_at.is_none()) .map(|row| build_custom_world_profile_snapshot(&row)) .collect::>(); @@ -1264,7 +1354,7 @@ fn get_custom_world_library_detail_record( .custom_world_profile() .profile_id() .find(&input.profile_id) - .filter(|row| row.owner_user_id == input.owner_user_id); + .filter(|row| row.owner_user_id == input.owner_user_id && row.deleted_at.is_none()); let gallery_entry = profile .as_ref() @@ -1305,6 +1395,7 @@ fn get_custom_world_gallery_detail_record( .filter(|row| { row.owner_user_id == input.owner_user_id && row.publication_status == CustomWorldPublicationStatus::Published + && row.deleted_at.is_none() }); let gallery_entry = ctx @@ -1377,7 +1468,7 @@ fn list_custom_world_work_snapshots( .db .custom_world_profile() .iter() - .filter(|row| row.owner_user_id == input.owner_user_id) + .filter(|row| row.owner_user_id == input.owner_user_id && row.deleted_at.is_none()) { items.push(CustomWorldWorkSummarySnapshot { work_id: format!("published:{}", profile.profile_id), @@ -3107,6 +3198,9 @@ fn build_custom_world_profile_snapshot(row: &CustomWorldProfile) -> CustomWorldP published_at_micros: row .published_at .map(|value| value.to_micros_since_unix_epoch()), + deleted_at_micros: row + .deleted_at + .map(|value| value.to_micros_since_unix_epoch()), created_at_micros: row.created_at.to_micros_since_unix_epoch(), updated_at_micros: row.updated_at.to_micros_since_unix_epoch(), } diff --git a/server-rs/crates/spacetime-module/src/lib.rs b/server-rs/crates/spacetime-module/src/lib.rs index 9e864ba5..d0574408 100644 --- a/server-rs/crates/spacetime-module/src/lib.rs +++ b/server-rs/crates/spacetime-module/src/lib.rs @@ -65,10 +65,10 @@ use module_custom_world::{ validate_custom_world_agent_operation_get_input, validate_custom_world_agent_session_create_input, validate_custom_world_agent_session_get_input, validate_custom_world_gallery_detail_input, - validate_custom_world_library_detail_input, validate_custom_world_profile_list_input, - validate_custom_world_profile_publish_input, validate_custom_world_profile_unpublish_input, - validate_custom_world_profile_upsert_input, validate_custom_world_publish_world_input, - validate_custom_world_works_list_input, + validate_custom_world_library_detail_input, validate_custom_world_profile_delete_input, + validate_custom_world_profile_list_input, validate_custom_world_profile_publish_input, + validate_custom_world_profile_unpublish_input, validate_custom_world_profile_upsert_input, + validate_custom_world_publish_world_input, validate_custom_world_works_list_input, }; use module_inventory::{ GrantInventoryItemInput, INVENTORY_MUTATION_ID_PREFIX, INVENTORY_SLOT_ID_PREFIX, @@ -799,6 +799,8 @@ pub struct CustomWorldProfile { landmark_count: u32, author_display_name: String, published_at: Option, + // 软删除后保留 profile 真相,供审计与幂等删除使用。 + deleted_at: Option, created_at: Timestamp, updated_at: Timestamp, } @@ -3353,6 +3355,34 @@ pub fn unpublish_custom_world_profile_and_return( } } +// 删除入口继续走 owner-only 软删除,不直接物理删除 profile 真相。 +#[spacetimedb::procedure] +pub fn delete_custom_world_profile_and_return( + ctx: &mut ProcedureContext, + input: module_custom_world::CustomWorldProfileDeleteInput, +) -> CustomWorldProfileListResult { + match ctx.try_with_tx(|tx| { + delete_custom_world_profile_record(tx, input.clone())?; + list_custom_world_profile_snapshots( + tx, + CustomWorldProfileListInput { + owner_user_id: input.owner_user_id.clone(), + }, + ) + }) { + Ok(entries) => CustomWorldProfileListResult { + ok: true, + entries, + error_message: None, + }, + Err(message) => CustomWorldProfileListResult { + ok: false, + entries: Vec::new(), + error_message: Some(message), + }, + } +} + #[spacetimedb::procedure] pub fn list_custom_world_profiles( ctx: &mut ProcedureContext, @@ -3894,6 +3924,7 @@ fn upsert_custom_world_profile_record( landmark_count: input.landmark_count, author_display_name: input.author_display_name.clone(), published_at: existing.published_at, + deleted_at: None, created_at: existing.created_at, updated_at, } @@ -3913,6 +3944,7 @@ fn upsert_custom_world_profile_record( landmark_count: input.landmark_count, author_display_name: input.author_display_name.clone(), published_at: None, + deleted_at: None, created_at: updated_at, updated_at, }, @@ -4047,6 +4079,7 @@ fn publish_custom_world_profile_record( landmark_count: existing.landmark_count, author_display_name: input.author_display_name.clone(), published_at: Some(published_at), + deleted_at: None, created_at: existing.created_at, updated_at: published_at, }; @@ -4107,6 +4140,7 @@ fn unpublish_custom_world_profile_record( landmark_count: existing.landmark_count, author_display_name: input.author_display_name.clone(), published_at: None, + deleted_at: None, created_at: existing.created_at, updated_at, }; @@ -4116,6 +4150,62 @@ fn unpublish_custom_world_profile_record( Ok((build_custom_world_profile_snapshot(&inserted), None)) } +fn delete_custom_world_profile_record( + ctx: &ReducerContext, + input: module_custom_world::CustomWorldProfileDeleteInput, +) -> Result<(), String> { + validate_custom_world_profile_delete_input(&input).map_err(|error| error.to_string())?; + + let Some(existing) = ctx + .db + .custom_world_profile() + .profile_id() + .find(&input.profile_id) + .filter(|row| row.owner_user_id == input.owner_user_id) + else { + return Ok(()); + }; + + if existing.deleted_at.is_some() { + return Ok(()); + } + + let deleted_at = Timestamp::from_micros_since_unix_epoch(input.deleted_at_micros); + + ctx.db + .custom_world_profile() + .profile_id() + .delete(&existing.profile_id); + + ctx.db + .custom_world_gallery_entry() + .profile_id() + .delete(&existing.profile_id); + + let next_row = CustomWorldProfile { + profile_id: existing.profile_id.clone(), + owner_user_id: existing.owner_user_id.clone(), + source_agent_session_id: existing.source_agent_session_id.clone(), + publication_status: CustomWorldPublicationStatus::Draft, + world_name: existing.world_name.clone(), + subtitle: existing.subtitle.clone(), + summary_text: existing.summary_text.clone(), + theme_mode: existing.theme_mode, + cover_image_src: existing.cover_image_src.clone(), + profile_payload_json: existing.profile_payload_json.clone(), + playable_npc_count: existing.playable_npc_count, + landmark_count: existing.landmark_count, + author_display_name: existing.author_display_name.clone(), + published_at: None, + deleted_at: Some(deleted_at), + created_at: existing.created_at, + updated_at: deleted_at, + }; + + let _ = ctx.db.custom_world_profile().insert(next_row); + Ok(()) +} + fn list_custom_world_profile_snapshots( ctx: &ReducerContext, input: CustomWorldProfileListInput, @@ -4126,7 +4216,7 @@ fn list_custom_world_profile_snapshots( .db .custom_world_profile() .iter() - .filter(|row| row.owner_user_id == input.owner_user_id) + .filter(|row| row.owner_user_id == input.owner_user_id && row.deleted_at.is_none()) .map(|row| build_custom_world_profile_snapshot(&row)) .collect::>(); @@ -4172,7 +4262,7 @@ fn get_custom_world_library_detail_record( .custom_world_profile() .profile_id() .find(&input.profile_id) - .filter(|row| row.owner_user_id == input.owner_user_id); + .filter(|row| row.owner_user_id == input.owner_user_id && row.deleted_at.is_none()); let gallery_entry = profile .as_ref() @@ -4213,6 +4303,7 @@ fn get_custom_world_gallery_detail_record( .filter(|row| { row.owner_user_id == input.owner_user_id && row.publication_status == CustomWorldPublicationStatus::Published + && row.deleted_at.is_none() }); let gallery_entry = ctx @@ -4283,7 +4374,7 @@ fn list_custom_world_work_snapshots( .db .custom_world_profile() .iter() - .filter(|row| row.owner_user_id == input.owner_user_id) + .filter(|row| row.owner_user_id == input.owner_user_id && row.deleted_at.is_none()) { items.push(CustomWorldWorkSummarySnapshot { work_id: format!("published:{}", profile.profile_id), @@ -6104,6 +6195,9 @@ fn build_custom_world_profile_snapshot(row: &CustomWorldProfile) -> CustomWorldP published_at_micros: row .published_at .map(|value| value.to_micros_since_unix_epoch()), + deleted_at_micros: row + .deleted_at + .map(|value| value.to_micros_since_unix_epoch()), created_at_micros: row.created_at.to_micros_since_unix_epoch(), updated_at_micros: row.updated_at.to_micros_since_unix_epoch(), } diff --git a/src/components/auth/AuthGate.test.tsx b/src/components/auth/AuthGate.test.tsx index 32c6f48e..d81b8e70 100644 --- a/src/components/auth/AuthGate.test.tsx +++ b/src/components/auth/AuthGate.test.tsx @@ -1,7 +1,8 @@ /* @vitest-environment jsdom */ -import { render, screen, waitFor, within } from '@testing-library/react'; +import { act, render, screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; +import { useState } from 'react'; import { beforeEach, expect, test, vi } from 'vitest'; import type { AuthUser } from '../../services/authService'; @@ -113,6 +114,19 @@ function ProtectedActionButton({ onAuthenticated }: { onAuthenticated: () => voi ); } +function PlatformTabStateProbe() { + const [tab, setTab] = useState<'home' | 'create'>('home'); + + return ( +
+
当前Tab:{tab === 'home' ? '首页' : '创作'}
+ +
+ ); +} + test('auth gate keeps platform content visible when phone login is available', async () => { authMocks.getAuthLoginOptions.mockResolvedValue({ availableLoginMethods: ['phone'], @@ -208,6 +222,48 @@ test('auth gate opens a login modal for protected actions and resumes after logi expect(screen.queryByRole('dialog', { name: '登录账号' })).toBeNull(); }); +test('auth state refresh keeps mounted platform content and local tab state', async () => { + const user = userEvent.setup(); + authMocks.getCurrentAuthUser.mockResolvedValue({ + user: mockUser, + availableLoginMethods: ['phone'], + }); + + render( + + + , + ); + + expect(await screen.findByText('当前Tab:首页')).toBeTruthy(); + + await user.click(screen.getByRole('button', { name: '创作' })); + expect(screen.getByText('当前Tab:创作')).toBeTruthy(); + + let resolveToken!: (token: string) => void; + const tokenPromise = new Promise((resolve) => { + resolveToken = resolve; + }); + authMocks.ensureStoredAccessToken.mockReturnValueOnce(tokenPromise); + + act(() => { + window.dispatchEvent(new Event('genarrative-auth-state-changed')); + }); + + expect(screen.queryByText('正在校验登录状态...')).toBeNull(); + expect(screen.getByText('当前Tab:创作')).toBeTruthy(); + + await act(async () => { + resolveToken('jwt-refreshed-token'); + await tokenPromise; + }); + + await waitFor(() => { + expect(authMocks.getCurrentAuthUser).toHaveBeenCalledTimes(2); + }); + expect(screen.getByText('当前Tab:创作')).toBeTruthy(); +}); + test('auth gate shows sms send feedback in the login modal', async () => { const user = userEvent.setup(); @@ -239,7 +295,7 @@ test('auth gate shows sms send feedback in the login modal', async () => { }); expect( - within(dialog).getByText('验证码已发送,有效期约 5 分钟。'), + within(dialog).getByText('短信请求已提交,请留意手机短信。验证码有效期约 5 分钟。'), ).toBeTruthy(); expect(within(dialog).getByRole('button', { name: '60s' })).toBeTruthy(); }); diff --git a/src/components/auth/AuthGate.tsx b/src/components/auth/AuthGate.tsx index 297c57e8..d8b71d6c 100644 --- a/src/components/auth/AuthGate.tsx +++ b/src/components/auth/AuthGate.tsx @@ -90,10 +90,19 @@ export function AuthGate({ children }: AuthGateProps) { const [changePhoneCaptchaChallenge, setChangePhoneCaptchaChallenge] = useState(null); const pendingProtectedActionRef = useRef<(() => void) | null>(null); - const readyUser = status === 'ready' ? user : null; + const hasRenderedPlatformContentRef = useRef(false); + const canKeepPlatformContentMounted = + hasRenderedPlatformContentRef.current && + (status === 'checking' || status === 'recovering'); + const readyUser = + status === 'ready' || canKeepPlatformContentMounted ? user : null; const settings = useGameSettings(readyUser?.id ?? null); const platformThemeClass = `platform-theme--${settings.platformTheme}`; + if (status === 'ready' || status === 'unauthenticated') { + hasRenderedPlatformContentRef.current = true; + } + const activateReadyUser = useCallback((nextUser: AuthUser) => { // 受保护业务 hook 只在 readyUser 暴露后启动,必须先保证请求层能带 Bearer token。 setUser(nextUser); @@ -380,6 +389,9 @@ export function AuthGate({ children }: AuthGateProps) { const authUiValue = useMemo( () => ({ user: readyUser, + // 平台内容在 checking/recovering 阶段可以继续挂载,避免闪烁; + // 但受保护请求只能在真实 ready 且存在用户时再启动。 + canAccessProtectedData: status === 'ready' && Boolean(readyUser), openLoginModal, requireAuth, openSettingsModal, @@ -402,6 +414,7 @@ export function AuthGate({ children }: AuthGateProps) { openSettingsModal, readyUser, requireAuth, + status, settings.isHydratingSettings, settings.isPersistingSettings, settings.musicVolume, @@ -412,7 +425,7 @@ export function AuthGate({ children }: AuthGateProps) { ], ); - if (status === 'checking') { + if (status === 'checking' && !canKeepPlatformContentMounted) { return (
正在校验登录状态... @@ -420,7 +433,7 @@ export function AuthGate({ children }: AuthGateProps) { ); } - if (status === 'recovering') { + if (status === 'recovering' && !canKeepPlatformContentMounted) { return (
正在自动创建或恢复账号... @@ -485,7 +498,11 @@ export function AuthGate({ children }: AuthGateProps) { ); } - if (status !== 'ready' && status !== 'unauthenticated') { + if ( + status !== 'ready' && + status !== 'unauthenticated' && + !canKeepPlatformContentMounted + ) { return (
diff --git a/src/components/auth/AuthUiContext.ts b/src/components/auth/AuthUiContext.ts index 1c2c2f0d..34ffba99 100644 --- a/src/components/auth/AuthUiContext.ts +++ b/src/components/auth/AuthUiContext.ts @@ -12,6 +12,7 @@ export type PlatformSettingsSection = type AuthUiContextValue = { user: AuthUser | null; + canAccessProtectedData: boolean; openLoginModal: (postLoginAction?: (() => void) | null) => void; requireAuth: (action: () => void) => void; openSettingsModal: (section?: PlatformSettingsSection) => void; diff --git a/src/components/creation-agent/CreationAgentWorkspace.test.tsx b/src/components/creation-agent/CreationAgentWorkspace.test.tsx index 1ddebd93..234fa038 100644 --- a/src/components/creation-agent/CreationAgentWorkspace.test.tsx +++ b/src/components/creation-agent/CreationAgentWorkspace.test.tsx @@ -3,7 +3,10 @@ import { render, screen } from '@testing-library/react'; import { afterEach, expect, test, vi } from 'vitest'; -import { type CreationAgentTheme,CreationAgentWorkspace } from './CreationAgentWorkspace'; +import { + type CreationAgentTheme, + CreationAgentWorkspace, +} from './CreationAgentWorkspace'; const testTheme: CreationAgentTheme = { accentTextClass: 'text-emerald-100', @@ -110,3 +113,95 @@ test('creation agent workspace renders streaming assistant text', () => { expect(screen.getByText(/那我先顺着这个方向收一下/u)).toBeTruthy(); }); + +test('creation agent workspace hides anchors and primary action before completed progress', () => { + if (!Element.prototype.scrollIntoView) { + Element.prototype.scrollIntoView = () => {}; + } + + render( + {}} + onSubmitText={() => {}} + onPrimaryAction={() => {}} + />, + ); + + expect(screen.queryByRole('button', { name: '生成结果页' })).toBeNull(); + expect(screen.queryByText('世界承诺')).toBeNull(); + expect(screen.queryByText('一个被潮雾改写航线秩序的群岛世界。')).toBeNull(); +}); + +test('creation agent workspace shows primary and progress actions at completed progress', () => { + if (!Element.prototype.scrollIntoView) { + Element.prototype.scrollIntoView = () => {}; + } + + render( + {}} + onSubmitText={() => {}} + onPrimaryAction={() => {}} + />, + ); + + expect(screen.getByRole('button', { name: '生成结果页' })).toBeTruthy(); + expect(screen.getByRole('button', { name: '总结当前设定' })).toBeTruthy(); + expect(screen.getByRole('button', { name: '补全剩余设定' })).toBeTruthy(); +}); diff --git a/src/components/creation-agent/CreationAgentWorkspace.tsx b/src/components/creation-agent/CreationAgentWorkspace.tsx index 1ce8ad26..c66257a6 100644 --- a/src/components/creation-agent/CreationAgentWorkspace.tsx +++ b/src/components/creation-agent/CreationAgentWorkspace.tsx @@ -5,7 +5,6 @@ import { type CreationAgentProgressCopy, normalizeCreationAgentProgress, resolveCreationAgentProgressHint, - resolveCreationAnchorStatusLabel, } from '../../services/creation-agent'; export type CreationAgentAnchorView = { @@ -209,32 +208,6 @@ function CreationAgentMessageBubble({ ); } -function CreationAgentAnchorChip({ - anchor, - theme, -}: { - anchor: CreationAgentAnchorView; - theme: CreationAgentTheme; -}) { - return ( -
-
- - {anchor.label} - - - {resolveCreationAnchorStatusLabel(anchor.status)} - -
-
- {anchor.value || '等待补齐'} -
-
- ); -} - function shouldShowQuickAction( action: CreationAgentQuickAction, session: CreationAgentSessionView, @@ -244,10 +217,6 @@ function shouldShowQuickAction( return false; } - if (!action.showWhenComplete && progress >= 100 && action.minProgress !== 100) { - return false; - } - if (typeof action.minTurn === 'number' && session.currentTurn < action.minTurn) { return false; } @@ -298,6 +267,7 @@ export function CreationAgentWorkspace({ } const progress = normalizeCreationAgentProgress(session.progressPercent); + const canShowPrimaryAction = progress >= 100; const visibleQuickActions = quickActions.filter((action) => shouldShowQuickAction(action, session, progress), ); @@ -330,15 +300,17 @@ export function CreationAgentWorkspace({ > - + {canShowPrimaryAction ? ( + + ) : null}
@@ -389,18 +361,6 @@ export function CreationAgentWorkspace({ ) : null}
- {session.anchors.length > 0 ? ( -
- {session.anchors.map((anchor) => ( - - ))} -
- ) : null} -
diff --git a/src/components/custom-world-agent/CustomWorldAgentWorkspace.interaction.test.tsx b/src/components/custom-world-agent/CustomWorldAgentWorkspace.interaction.test.tsx index a3df63ef..ba2f3886 100644 --- a/src/components/custom-world-agent/CustomWorldAgentWorkspace.interaction.test.tsx +++ b/src/components/custom-world-agent/CustomWorldAgentWorkspace.interaction.test.tsx @@ -160,6 +160,25 @@ test('workspace exposes draft action when progress reaches 100', async () => { }); }); +test('workspace hides draft action before progress reaches 100', () => { + render( + {}} + onSubmitMessage={() => {}} + onExecuteAction={() => {}} + />, + ); + + expect( + screen.queryByRole('button', { name: '生成游戏设定草稿' }), + ).toBeNull(); +}); + test('workspace submits recommended reply from thread', async () => { const user = userEvent.setup(); const onSubmitMessage = vi.fn(); diff --git a/src/components/custom-world-home/CustomWorldCreationHub.tsx b/src/components/custom-world-home/CustomWorldCreationHub.tsx index f605304c..e6240860 100644 --- a/src/components/custom-world-home/CustomWorldCreationHub.tsx +++ b/src/components/custom-world-home/CustomWorldCreationHub.tsx @@ -23,8 +23,12 @@ type CustomWorldCreationHubProps = { onCreateType: (type: PlatformCreationTypeId) => void; onOpenDraft: (item: CustomWorldWorkSummary) => void; onEnterPublished: (profileId: string) => void; + onDeletePublished?: ((item: CustomWorldWorkSummary) => void) | null; + deletingWorkId?: string | null; + onExperienceRpg?: ((item: CustomWorldWorkSummary) => void) | null; puzzleItems?: PuzzleWorkSummary[]; onOpenPuzzleDetail?: (profileId: string) => void; + onExperiencePuzzle?: ((profileId: string) => void) | null; }; function EmptyState({ title }: { title: string }) { @@ -47,8 +51,12 @@ export function CustomWorldCreationHub({ onCreateType, onOpenDraft, onEnterPublished, + onDeletePublished = null, + deletingWorkId = null, + onExperienceRpg = null, puzzleItems = [], onOpenPuzzleDetail, + onExperiencePuzzle = null, }: CustomWorldCreationHubProps) { const [activeFilter, setActiveFilter] = useState('all'); @@ -134,7 +142,7 @@ export function CustomWorldCreationHub({ { + onOpen={() => { if (item.kind === 'puzzle') { onOpenPuzzleDetail?.(item.item.profileId); return; @@ -152,6 +160,29 @@ export function CustomWorldCreationHub({ onEnterPublished(item.item.profileId); } }} + onExperience={ + item.kind === 'puzzle' + ? item.item.publicationStatus === 'published' + ? () => { + onExperiencePuzzle?.(item.item.profileId); + } + : null + : item.item.status === 'published' && item.item.canEnterWorld + ? () => { + onExperienceRpg?.(item.item); + } + : null + } + onDelete={ + item.kind === 'rpg' && + item.item.status === 'published' && + item.item.profileId + ? () => { + onDeletePublished?.(item.item); + } + : null + } + deleteBusy={deletingWorkId === item.item.workId} /> ))}
diff --git a/src/components/custom-world-home/CustomWorldWorkCard.tsx b/src/components/custom-world-home/CustomWorldWorkCard.tsx index b9d2af57..8168152a 100644 --- a/src/components/custom-world-home/CustomWorldWorkCard.tsx +++ b/src/components/custom-world-home/CustomWorldWorkCard.tsx @@ -28,25 +28,31 @@ export type UnifiedCreationWorkItem = type CustomWorldWorkCardProps = { item: UnifiedCreationWorkItem; - onClick: () => void; + onOpen: () => void; + onExperience?: (() => void) | null; + onDelete?: (() => void) | null; + deleteBusy?: boolean; }; export function CustomWorldWorkCard({ item, - onClick, + onOpen, + onExperience = null, + onDelete = null, + deleteBusy = false, }: CustomWorldWorkCardProps) { const isPuzzle = item.kind === 'puzzle'; const isDraft = item.kind === 'puzzle' ? item.item.publicationStatus === 'draft' : item.item.status === 'draft'; - const actionLabel = isPuzzle + const openActionLabel = isPuzzle ? '查看详情' : isDraft ? item.item.playableNpcCount > 0 || item.item.landmarkCount > 0 ? '继续完善' : '继续创作' - : '进入世界'; + : '查看详情'; const title = isPuzzle ? item.item.levelName : item.item.title; const subtitle = isPuzzle ? item.item.authorDisplayName : item.item.subtitle; const summary = item.item.summary; @@ -153,13 +159,34 @@ export function CustomWorldWorkCard({ )}
- +
+ + {onExperience ? ( + + ) : null} + {onDelete ? ( + + ) : null} +
diff --git a/src/components/platform-entry/PlatformEntryFlowShellImpl.tsx b/src/components/platform-entry/PlatformEntryFlowShellImpl.tsx index e54e396f..923413c0 100644 --- a/src/components/platform-entry/PlatformEntryFlowShellImpl.tsx +++ b/src/components/platform-entry/PlatformEntryFlowShellImpl.tsx @@ -45,9 +45,7 @@ import { getPuzzleAgentSession, streamPuzzleAgentMessage, } from '../../services/puzzle-agent'; -import { - getPuzzleGalleryDetail, -} from '../../services/puzzle-gallery'; +import { getPuzzleGalleryDetail } from '../../services/puzzle-gallery'; import { advancePuzzleNextLevel, dragPuzzlePieceOrGroup, @@ -55,6 +53,7 @@ import { swapPuzzlePieces, } from '../../services/puzzle-runtime'; import { listPuzzleWorks } from '../../services/puzzle-works'; +import { deleteRpgEntryWorldProfile } from '../../services/rpg-entry'; import { rpgCreationPreviewAdapter } from '../../services/rpg-creation/rpgCreationPreviewAdapter'; import type { CustomWorldProfile } from '../../types'; import { useAuthUi } from '../auth/AuthUiContext'; @@ -105,9 +104,7 @@ const CustomWorldAgentWorkspace = lazy(async () => { }); const BigFishAgentWorkspace = lazy(async () => { - const module = await import( - '../big-fish-creation/BigFishAgentWorkspace' - ); + const module = await import('../big-fish-creation/BigFishAgentWorkspace'); return { default: module.BigFishAgentWorkspace, }; @@ -148,9 +145,8 @@ export function PlatformEntryFlowShellImpl({ }: PlatformEntryFlowShellProps) { const authUi = useAuthUi(); const [showCreationTypeModal, setShowCreationTypeModal] = useState(false); - const [selectedDetailEntry, setSelectedDetailEntry] = useState< - CustomWorldLibraryEntry | null - >(null); + const [selectedDetailEntry, setSelectedDetailEntry] = + useState | null>(null); const [bigFishSession, setBigFishSession] = useState(null); const [bigFishRun, setBigFishRun] = @@ -172,6 +168,9 @@ export function PlatformEntryFlowShellImpl({ const [puzzleError, setPuzzleError] = useState(null); const [isPuzzleBusy, setIsPuzzleBusy] = useState(false); const [isPuzzleLoadingLibrary, setIsPuzzleLoadingLibrary] = useState(false); + const [deletingCreationWorkId, setDeletingCreationWorkId] = useState< + string | null + >(null); const [streamingPuzzleReplyText, setStreamingPuzzleReplyText] = useState(''); const [isStreamingPuzzleReply, setIsStreamingPuzzleReply] = useState(false); const hasInitialAgentSession = Boolean( @@ -180,6 +179,7 @@ export function PlatformEntryFlowShellImpl({ const platformBootstrap = usePlatformEntryBootstrap({ user: authUi?.user, + canAccessProtectedData: authUi?.canAccessProtectedData, getProfileDashboard: getPlatformProfileDashboard, handleContinueGame, hasInitialAgentSession, @@ -241,8 +241,10 @@ export function PlatformEntryFlowShellImpl({ setGeneratedCustomWorldProfile: sessionController.setGeneratedCustomWorldProfile, setCustomWorldError: sessionController.setCustomWorldError, - setCustomWorldAutoSaveError: autosaveCoordinator.setCustomWorldAutoSaveError, - setCustomWorldAutoSaveState: autosaveCoordinator.setCustomWorldAutoSaveState, + setCustomWorldAutoSaveError: + autosaveCoordinator.setCustomWorldAutoSaveError, + setCustomWorldAutoSaveState: + autosaveCoordinator.setCustomWorldAutoSaveState, setCustomWorldGenerationViewSource: sessionController.setCustomWorldGenerationViewSource, setCustomWorldResultViewSource: @@ -261,7 +263,8 @@ export function PlatformEntryFlowShellImpl({ sessionController.suppressAgentDraftResultAutoOpen, releaseAgentDraftResultAutoOpenSuppression: sessionController.releaseAgentDraftResultAutoOpenSuppression, - resetAutoSaveTrackingToIdle: autosaveCoordinator.resetAutoSaveTrackingToIdle, + resetAutoSaveTrackingToIdle: + autosaveCoordinator.resetAutoSaveTrackingToIdle, markAutoSavedProfile: autosaveCoordinator.markAutoSavedProfile, }); @@ -276,7 +279,8 @@ export function PlatformEntryFlowShellImpl({ autosaveCoordinator.executeAgentActionAndWait({ action: 'publish_world', }), - syncAgentDraftResultProfile: autosaveCoordinator.syncAgentDraftResultProfile, + syncAgentDraftResultProfile: + autosaveCoordinator.syncAgentDraftResultProfile, setGeneratedCustomWorldProfile: sessionController.setGeneratedCustomWorldProfile, }); @@ -290,7 +294,8 @@ export function PlatformEntryFlowShellImpl({ : [], [sessionController.generatedCustomWorldProfile], ); - const agentResultPreview = sessionController.agentSession?.resultPreview ?? null; + const agentResultPreview = + sessionController.agentSession?.resultPreview ?? null; const agentResultPreviewBlockers = useMemo( () => agentResultPreview?.blockers?.map((entry) => entry.message) ?? [], [agentResultPreview], @@ -320,7 +325,9 @@ export function PlatformEntryFlowShellImpl({ const creationHubItems = platformBootstrap.customWorldWorkEntries.length > 0 ? platformBootstrap.customWorldWorkEntries - : buildCreationHubFallbackItems(platformBootstrap.savedCustomWorldEntries); + : buildCreationHubFallbackItems( + platformBootstrap.savedCustomWorldEntries, + ); const resultViewError = autosaveCoordinator.customWorldAutoSaveError ?? sessionController.customWorldError; @@ -346,9 +353,7 @@ export function PlatformEntryFlowShellImpl({ ); } if (selectionStage === 'big-fish-runtime' && !bigFishRun) { - setSelectionStage( - bigFishSession?.draft ? 'big-fish-result' : 'platform', - ); + setSelectionStage(bigFishSession?.draft ? 'big-fish-result' : 'platform'); } }, [bigFishRun, bigFishSession, selectionStage, setSelectionStage]); @@ -375,11 +380,7 @@ export function PlatformEntryFlowShellImpl({ sessionController.setCreationTypeError(null); return true; - }, [ - handleStartNewGame, - hasSavedGame, - sessionController, - ]); + }, [handleStartNewGame, hasSavedGame, sessionController]); const openCreationTypePicker = useCallback(() => { if (!prepareCreationLaunch()) { @@ -626,11 +627,7 @@ export function PlatformEntryFlowShellImpl({ setIsStreamingPuzzleReply(false); } }, - [ - isStreamingPuzzleReply, - puzzleSession, - resolvePuzzleErrorMessage, - ], + [isStreamingPuzzleReply, puzzleSession, resolvePuzzleErrorMessage], ); const executeBigFishAction = useCallback( @@ -687,13 +684,18 @@ export function PlatformEntryFlowShellImpl({ await refreshPuzzleShelf(); } - const { session } = await getPuzzleAgentSession(puzzleSession.sessionId); + const { session } = await getPuzzleAgentSession( + puzzleSession.sessionId, + ); setPuzzleSession(session); if (payload.action === 'compile_puzzle_draft') { setSelectionStage('puzzle-result'); } - if (payload.action === 'publish_puzzle_work' && session.publishedProfileId) { + if ( + payload.action === 'publish_puzzle_work' && + session.publishedProfileId + ) { const galleryDetail = await getPuzzleGalleryDetail( session.publishedProfileId, ); @@ -701,9 +703,7 @@ export function PlatformEntryFlowShellImpl({ setSelectionStage('puzzle-gallery-detail'); } } catch (error) { - setPuzzleError( - resolvePuzzleErrorMessage(error, '执行拼图操作失败。'), - ); + setPuzzleError(resolvePuzzleErrorMessage(error, '执行拼图操作失败。')); } finally { setIsPuzzleBusy(false); } @@ -757,9 +757,7 @@ export function PlatformEntryFlowShellImpl({ setPuzzleRun(run); setSelectionStage('puzzle-runtime'); } catch (error) { - setPuzzleError( - resolvePuzzleErrorMessage(error, '启动拼图玩法失败。'), - ); + setPuzzleError(resolvePuzzleErrorMessage(error, '启动拼图玩法失败。')); } finally { setIsPuzzleBusy(false); } @@ -803,9 +801,7 @@ export function PlatformEntryFlowShellImpl({ const { run } = await swapPuzzlePieces(puzzleRun.runId, payload); setPuzzleRun(run); } catch (error) { - setPuzzleError( - resolvePuzzleErrorMessage(error, '交换拼图块失败。'), - ); + setPuzzleError(resolvePuzzleErrorMessage(error, '交换拼图块失败。')); } finally { setIsPuzzleBusy(false); } @@ -830,9 +826,7 @@ export function PlatformEntryFlowShellImpl({ const { run } = await dragPuzzlePieceOrGroup(puzzleRun.runId, payload); setPuzzleRun(run); } catch (error) { - setPuzzleError( - resolvePuzzleErrorMessage(error, '拖动拼图块失败。'), - ); + setPuzzleError(resolvePuzzleErrorMessage(error, '拖动拼图块失败。')); } finally { setIsPuzzleBusy(false); } @@ -852,9 +846,7 @@ export function PlatformEntryFlowShellImpl({ const { run } = await advancePuzzleNextLevel(puzzleRun.runId); setPuzzleRun(run); } catch (error) { - setPuzzleError( - resolvePuzzleErrorMessage(error, '进入下一关失败。'), - ); + setPuzzleError(resolvePuzzleErrorMessage(error, '进入下一关失败。')); } finally { setIsPuzzleBusy(false); } @@ -927,6 +919,68 @@ export function PlatformEntryFlowShellImpl({ }); }, [handleCustomWorldSelect, runProtectedAction, selectedDetailEntry]); + const handleExperienceRpgWork = useCallback( + (work: (typeof creationHubItems)[number]) => { + if (!work.profileId) { + return; + } + + runProtectedAction(() => { + const matchedEntry = platformBootstrap.savedCustomWorldEntries.find( + (entry) => entry.profileId === work.profileId, + ); + if (!matchedEntry) { + platformBootstrap.setPlatformError('未找到可体验的作品,请刷新后重试。'); + return; + } + + handleCustomWorldSelect(matchedEntry.profile); + }); + }, + [ + handleCustomWorldSelect, + platformBootstrap, + platformBootstrap.savedCustomWorldEntries, + runProtectedAction, + ], + ); + + const handleDeletePublishedWork = useCallback( + (work: (typeof creationHubItems)[number]) => { + if (!work.profileId || deletingCreationWorkId) { + return; + } + + runProtectedAction(() => { + const confirmed = window.confirm( + `确认删除作品《${work.title}》吗?删除后会从你的作品列表和公开广场中移除。`, + ); + if (!confirmed) { + return; + } + + setDeletingCreationWorkId(work.workId); + platformBootstrap.setPlatformError(null); + + void deleteRpgEntryWorldProfile(work.profileId) + .then(async (entries) => { + platformBootstrap.setSavedCustomWorldEntries(entries); + await platformBootstrap.refreshCustomWorldWorks().catch(() => []); + await platformBootstrap.refreshPublishedGallery().catch(() => []); + }) + .catch((error) => { + platformBootstrap.setPlatformError( + resolveRpgCreationErrorMessage(error, '删除自定义世界失败。'), + ); + }) + .finally(() => { + setDeletingCreationWorkId(null); + }); + }); + }, + [deletingCreationWorkId, platformBootstrap, runProtectedAction], + ); + const openPuzzleDetail = useCallback( async (profileId: string) => { setIsPuzzleBusy(true); @@ -938,9 +992,7 @@ export function PlatformEntryFlowShellImpl({ enterCreateTab(); setSelectionStage('puzzle-gallery-detail'); } catch (error) { - setPuzzleError( - resolvePuzzleErrorMessage(error, '读取拼图详情失败。'), - ); + setPuzzleError(resolvePuzzleErrorMessage(error, '读取拼图详情失败。')); } finally { setIsPuzzleBusy(false); } @@ -950,13 +1002,14 @@ export function PlatformEntryFlowShellImpl({ useEffect(() => { if ( - (platformBootstrap.platformTab === 'create' || selectionStage === 'platform') && - authUi?.user?.id + (platformBootstrap.platformTab === 'create' || + selectionStage === 'platform') && + platformBootstrap.canReadProtectedData ) { void refreshPuzzleShelf(); } }, [ - authUi?.user?.id, + platformBootstrap.canReadProtectedData, platformBootstrap.platformTab, refreshPuzzleShelf, selectionStage, @@ -969,9 +1022,9 @@ export function PlatformEntryFlowShellImpl({ error={ platformBootstrap.isLoadingPlatform || isPuzzleLoadingLibrary ? null - : platformBootstrap.platformError ?? - sessionController.creationTypeError ?? - puzzleError + : (platformBootstrap.platformError ?? + sessionController.agentWorkspaceRestoreError ?? + puzzleError) } onRetry={() => { platformBootstrap.setPlatformError(null); @@ -981,9 +1034,13 @@ export function PlatformEntryFlowShellImpl({ ); }); }} - createError={sessionController.creationTypeError ?? bigFishError ?? puzzleError} + createError={ + sessionController.creationTypeError ?? bigFishError ?? puzzleError + } createBusy={ - sessionController.isCreatingAgentSession || isBigFishBusy || isPuzzleBusy + sessionController.isCreatingAgentSession || + isBigFishBusy || + isPuzzleBusy } onCreateType={handleCreationHubCreateType} onOpenDraft={(item) => { @@ -1002,12 +1059,24 @@ export function PlatformEntryFlowShellImpl({ void detailNavigation.handleOpenCreationWork(matchedWork); }); }} + onDeletePublished={(item) => { + handleDeletePublishedWork(item); + }} + deletingWorkId={deletingCreationWorkId} + onExperienceRpg={(item) => { + handleExperienceRpgWork(item); + }} puzzleItems={puzzleWorks} onOpenPuzzleDetail={(profileId) => { runProtectedAction(() => { void openPuzzleDetail(profileId); }); }} + onExperiencePuzzle={(profileId) => { + runProtectedAction(() => { + void startPuzzleRunFromProfile(profileId); + }); + }} /> ); @@ -1040,8 +1109,8 @@ export function PlatformEntryFlowShellImpl({ platformError={ platformBootstrap.isLoadingPlatform ? null - : platformBootstrap.platformError ?? - sessionController.creationTypeError + : (platformBootstrap.platformError ?? + sessionController.agentWorkspaceRestoreError) } dashboardError={ platformBootstrap.isLoadingDashboard @@ -1175,7 +1244,8 @@ export function PlatformEntryFlowShellImpl({
{sessionController.isLoadingAgentSession ? '正在准备 Agent 共创工作区...' - : sessionController.creationTypeError || '正在恢复创作工作区...'} + : sessionController.agentWorkspaceRestoreError || + '正在恢复创作工作区...'}
)} @@ -1472,7 +1542,9 @@ export function PlatformEntryFlowShellImpl({ }); }} readOnly={false} - compactAgentResultMode={sessionController.isAgentDraftResultView} + compactAgentResultMode={ + sessionController.isAgentDraftResultView + } backLabel={ sessionController.isAgentDraftResultView ? '返回创作' @@ -1515,10 +1587,12 @@ export function PlatformEntryFlowShellImpl({ { if ( diff --git a/src/components/rpg-entry/RpgEntryFlowShell.agent.interaction.test.tsx b/src/components/rpg-entry/RpgEntryFlowShell.agent.interaction.test.tsx index a8d0aa28..d543b472 100644 --- a/src/components/rpg-entry/RpgEntryFlowShell.agent.interaction.test.tsx +++ b/src/components/rpg-entry/RpgEntryFlowShell.agent.interaction.test.tsx @@ -1,6 +1,6 @@ /* @vitest-environment jsdom */ -import { render, screen, waitFor } from '@testing-library/react'; +import { render, screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { useState } from 'react'; import { beforeEach, expect, test, vi } from 'vitest'; @@ -32,6 +32,9 @@ import { unpublishRpgEntryWorldProfile, upsertRpgProfileBrowseHistory as upsertProfileBrowseHistory, } from '../../services/rpg-entry'; +import { createBigFishCreationSession } from '../../services/big-fish-creation'; +import { createPuzzleAgentSession } from '../../services/puzzle-agent'; +import { listPuzzleWorks } from '../../services/puzzle-works'; import type { GameState } from '../../types'; import { AuthUiContext, @@ -39,6 +42,7 @@ import { } from '../auth/AuthUiContext'; import { RpgEntryFlowShell, + type RpgEntryFlowShellProps, type SelectionStage, } from './RpgEntryFlowShell'; @@ -63,13 +67,20 @@ async function openCreationHub(user: ReturnType) { expect(await screen.findByText('角色扮演 RPG')).toBeTruthy(); } -async function openNewRpgCreation( - user: ReturnType, -) { +async function openNewRpgCreation(user: ReturnType) { await openCreationHub(user); await user.click(screen.getByRole('button', { name: /角色扮演 RPG/u })); } +function getPlatformTabPanel(tab: string) { + const panel = document.getElementById(`platform-tab-panel-${tab}`); + if (!panel) { + throw new Error(`Missing platform tab panel: ${tab}`); + } + + return panel; +} + vi.mock('../../services/rpg-creation', () => ({ createRpgCreationSession: vi.fn(), executeRpgCreationAction: vi.fn(), @@ -96,6 +107,23 @@ vi.mock('../../services/rpg-entry', () => ({ upsertRpgProfileBrowseHistory: vi.fn(), })); +vi.mock('../../services/puzzle-works', () => ({ + listPuzzleWorks: vi.fn(), +})); + +vi.mock('../../services/big-fish-creation', () => ({ + createBigFishCreationSession: vi.fn(), + executeBigFishCreationAction: vi.fn(), + streamBigFishCreationMessage: vi.fn(), +})); + +vi.mock('../../services/puzzle-agent', () => ({ + createPuzzleAgentSession: vi.fn(), + executePuzzleAgentAction: vi.fn(), + getPuzzleAgentSession: vi.fn(), + streamPuzzleAgentMessage: vi.fn(), +})); + vi.mock('../custom-world-agent/CustomWorldAgentWorkspace', () => ({ CustomWorldAgentWorkspace: ({ session, @@ -379,6 +407,7 @@ const compiledAgentDraftSession: CustomWorldAgentSessionSnapshot = { type TestAuthValue = { user: AuthUser | null; + canAccessProtectedData: boolean; openLoginModal: (postLoginAction?: (() => void) | null) => void; requireAuth: (action: () => void) => void; openSettingsModal: (section?: PlatformSettingsSection) => void; @@ -393,9 +422,12 @@ type TestAuthValue = { settingsError: string | null; }; -function createAuthValue(overrides: Partial = {}): TestAuthValue { +function createAuthValue( + overrides: Partial = {}, +): TestAuthValue { return { user: mockAuthUser, + canAccessProtectedData: true, openLoginModal: () => {}, requireAuth: (action) => action(), openSettingsModal: () => {}, @@ -416,10 +448,12 @@ function TestWrapper({ withAuth = false, authValue, onContinueGame, + onSelectWorld, }: { withAuth?: boolean; authValue?: TestAuthValue; onContinueGame?: (snapshot?: HydratedSavedGameSnapshot | null) => void; + onSelectWorld?: RpgEntryFlowShellProps['handleCustomWorldSelect']; } = {}) { const [selectionStage, setSelectionStage] = useState('platform'); @@ -433,7 +467,7 @@ function TestWrapper({ savedSnapshot={null} handleContinueGame={onContinueGame ?? (() => {})} handleStartNewGame={() => {}} - handleCustomWorldSelect={() => {}} + handleCustomWorldSelect={onSelectWorld ?? (() => {})} /> ); @@ -442,9 +476,7 @@ function TestWrapper({ } return ( - + {content} ); @@ -513,8 +545,106 @@ beforeEach(() => { vi.mocked(createRpgCreationSession).mockResolvedValue({ session: mockSession, }); + vi.mocked(createBigFishCreationSession).mockResolvedValue({ + session: { + sessionId: 'big-fish-session-1', + currentTurn: 0, + progressPercent: 0, + stage: 'clarifying', + anchorPack: { + gameplayPromise: { + key: 'gameplay_promise', + label: '核心玩法', + value: '', + status: 'missing', + }, + ecologyVisualTheme: { + key: 'ecology_visual_theme', + label: '生态视觉', + value: '', + status: 'missing', + }, + growthLadder: { + key: 'growth_ladder', + label: '成长阶梯', + value: '', + status: 'missing', + }, + riskTempo: { + key: 'risk_tempo', + label: '风险节奏', + value: '', + status: 'missing', + }, + }, + draft: null, + assetSlots: [], + assetCoverage: { + levelMainImageReadyCount: 0, + levelMotionReadyCount: 0, + backgroundReady: false, + requiredLevelCount: 0, + publishReady: false, + blockers: [], + }, + messages: [], + lastAssistantReply: '先说说你想要什么样的大鱼生态。', + publishReady: false, + updatedAt: '2026-04-22T12:00:00.000Z', + }, + }); + vi.mocked(createPuzzleAgentSession).mockResolvedValue({ + session: { + sessionId: 'puzzle-session-1', + currentTurn: 0, + progressPercent: 0, + stage: 'clarifying', + anchorPack: { + themePromise: { + key: 'theme_promise', + label: '主题承诺', + value: '', + status: 'missing', + }, + visualSubject: { + key: 'visual_subject', + label: '视觉主体', + value: '', + status: 'missing', + }, + visualMood: { + key: 'visual_mood', + label: '视觉气质', + value: '', + status: 'missing', + }, + compositionHooks: { + key: 'composition_hooks', + label: '构图钩子', + value: '', + status: 'missing', + }, + tagsAndForbidden: { + key: 'tags_and_forbidden', + label: '标签与禁区', + value: '', + status: 'missing', + }, + }, + draft: null, + messages: [], + lastAssistantReply: '先说一个你最想做成拼图的画面。', + publishedProfileId: null, + suggestedActions: [], + resultPreview: null, + updatedAt: '2026-04-22T12:00:00.000Z', + }, + }); vi.mocked(getRpgCreationSession).mockResolvedValue(mockSession); vi.mocked(listRpgCreationWorks).mockResolvedValue([]); + vi.mocked(listPuzzleWorks).mockResolvedValue({ + items: [], + }); vi.mocked(executeRpgCreationAction).mockResolvedValue({ operation: { operationId: 'operation-draft-foundation-1', @@ -594,9 +724,7 @@ test('create tab opens compiled agent draft in result refinement page', async () canEnterWorld: false, }, ]); - vi.mocked(getRpgCreationSession).mockResolvedValue( - compiledAgentDraftSession, - ); + vi.mocked(getRpgCreationSession).mockResolvedValue(compiledAgentDraftSession); render(); @@ -606,12 +734,19 @@ test('create tab opens compiled agent draft in result refinement page', async () await user.click(await screen.findByRole('button', { name: /继续完善/u })); - await waitFor(() => { - expect(screen.queryByText('正在加载世界编辑器...')).toBeNull(); - }, { timeout: 5000 }); + await waitFor( + () => { + expect(screen.queryByText('正在加载世界编辑器...')).toBeNull(); + }, + { timeout: 5000 }, + ); - expect(await screen.findByText('世界档案', {}, { timeout: 5000 })).toBeTruthy(); - expect(screen.queryByText('Agent工作区:custom-world-agent-session-1')).toBeNull(); + expect( + await screen.findByText('世界档案', {}, { timeout: 5000 }), + ).toBeTruthy(); + expect( + screen.queryByText('Agent工作区:custom-world-agent-session-1'), + ).toBeNull(); expect(screen.getByRole('button', { name: /返回创作/u })).toBeTruthy(); }); @@ -706,7 +841,7 @@ test('opening a compiled draft with a missing agent session falls back to create await waitFor(() => { expect( - screen.getByText( + within(getPlatformTabPanel('create')).getByText( '这份共创草稿已失效,已为你返回创作中心,请重新开始创作。', ), ).toBeTruthy(); @@ -807,6 +942,88 @@ test('restoring an agent workspace while logged out opens login modal before loa expect(getRpgCreationSession).not.toHaveBeenCalled(); }); +test('new creation entry maps raw bearer token errors to user-facing auth copy', async () => { + const user = userEvent.setup(); + + vi.mocked(createRpgCreationSession).mockRejectedValueOnce( + new ApiClientError({ + message: '缺少 Authorization Bearer Token', + status: 401, + code: 'UNAUTHORIZED', + }), + ); + + render(); + + await openCreationHub(user); + await user.click(screen.getByRole('button', { name: /角色扮演 RPG/u })); + + await waitFor(() => { + expect( + within(getPlatformTabPanel('create')).getByText( + '当前登录状态已失效,请重新登录后继续。', + ), + ).toBeTruthy(); + }); + + expect(listPuzzleWorks).toHaveBeenCalled(); + expect(screen.queryByText('缺少 Authorization Bearer Token')).toBeNull(); +}); + +test('big fish creation timeout exits busy state and shows a readable error', async () => { + const user = userEvent.setup(); + + vi.mocked(createBigFishCreationSession).mockRejectedValueOnce( + Object.assign(new Error('请求超时:15000ms'), { + name: 'TimeoutError', + }), + ); + + render(); + + await openCreationHub(user); + + const button = screen.getByRole('button', { name: /大鱼吃小鱼/u }); + await user.click(button); + + await waitFor(() => { + expect( + within(getPlatformTabPanel('create')).getAllByText( + '开启大鱼吃小鱼创作工作台超时,请确认运行时后端已启动后重试。', + ).length, + ).toBeGreaterThan(0); + }); + expect((button as HTMLButtonElement).disabled).toBe(false); + expect(screen.queryByText(/正在加载大鱼吃小鱼共创工作区/u)).toBeNull(); +}); + +test('puzzle creation timeout exits busy state and shows a readable error', async () => { + const user = userEvent.setup(); + + vi.mocked(createPuzzleAgentSession).mockRejectedValueOnce( + Object.assign(new Error('请求超时:15000ms'), { + name: 'TimeoutError', + }), + ); + + render(); + + await openCreationHub(user); + + const button = screen.getByRole('button', { name: /拼图玩法/u }); + await user.click(button); + + await waitFor(() => { + expect( + within(getPlatformTabPanel('create')).getAllByText( + '开启拼图创作工作台超时,请确认运行时后端已启动后重试。', + ).length, + ).toBeGreaterThan(0); + }); + expect((button as HTMLButtonElement).disabled).toBe(false); + expect(screen.queryByText(/正在准备拼图共创工作区/u)).toBeNull(); +}); + test('starting draft generation leaves the agent workspace and shows the generation progress view', async () => { const user = userEvent.setup(); @@ -851,9 +1068,7 @@ test('existing draft sessions open result page refinement instead of agent dialo progress: 100, error: null, }); - vi.mocked(getRpgCreationSession).mockResolvedValue( - compiledAgentDraftSession, - ); + vi.mocked(getRpgCreationSession).mockResolvedValue(compiledAgentDraftSession); render(); @@ -913,9 +1128,7 @@ test('agent result view shows publish blockers and disables publish-enter action await openNewRpgCreation(user); - expect( - await screen.findByText(/当前还有 1 个发布阻断项/u), - ).toBeTruthy(); + expect(await screen.findByText(/当前还有 1 个发布阻断项/u)).toBeTruthy(); const actionButton = screen.getByRole('button', { name: /发布并进入世界/u, }); @@ -991,7 +1204,7 @@ test('agent draft result publishes before entering world and uses published prev return ( - - sessionId === 'custom-world-agent-session-1' && - payload?.action === 'sync_result_profile', - ), + vi + .mocked(executeRpgCreationAction) + .mock.calls.some( + ([sessionId, payload]) => + sessionId === 'custom-world-agent-session-1' && + payload?.action === 'sync_result_profile', + ), ).toBe(false); await waitFor(() => { expect(handleCustomWorldSelect).toHaveBeenCalledWith( @@ -1219,11 +1434,13 @@ test('agent draft result back button returns to creation hub without redundant s }); expect( - vi.mocked(executeRpgCreationAction).mock.calls.some( - ([sessionId, payload]) => - sessionId === 'custom-world-agent-session-1' && - payload?.action === 'sync_result_profile', - ), + vi + .mocked(executeRpgCreationAction) + .mock.calls.some( + ([sessionId, payload]) => + sessionId === 'custom-world-agent-session-1' && + payload?.action === 'sync_result_profile', + ), ).toBe(false); expect(screen.queryByText('世界档案')).toBeNull(); }); @@ -1366,7 +1583,9 @@ test('agent draft result auto-save persists the latest profile rebuilt from sync expect(upsertRpgWorldProfile).toHaveBeenCalled(); }); - const latestSavedProfile = vi.mocked(upsertRpgWorldProfile).mock.calls.at(-1)?.[0]; + const latestSavedProfile = vi + .mocked(upsertRpgWorldProfile) + .mock.calls.at(-1)?.[0]; expect(latestSavedProfile?.name).toBe('潮雾列岛·session最新版'); expect(latestSavedProfile?.summary).toBe( '作品库应该保存这份同步后的最新快照。', @@ -1391,7 +1610,8 @@ test('agent draft result can open from server result preview without embedded le settingText: '被海雾吞没的旧航路群岛', name: '潮雾列岛·服务端预览', subtitle: '结果页改为优先消费 session.resultPreview', - summary: '即使 draft 中没有 legacyResultProfile,也应该正常打开结果页。', + summary: + '即使 draft 中没有 legacyResultProfile,也应该正常打开结果页。', tone: '压抑、潮湿、悬疑', playerGoal: '查清沉船与禁航区异动的真相。', templateWorldType: 'WUXIA', @@ -1420,9 +1640,7 @@ test('agent draft result can open from server result preview without embedded le await waitFor( async () => { expect(await screen.findByText('世界档案')).toBeTruthy(); - expect( - screen.getByText('潮雾列岛·服务端预览'), - ).toBeTruthy(); + expect(screen.getByText('潮雾列岛·服务端预览')).toBeTruthy(); expect( screen.getByText('结果页改为优先消费 session.resultPreview'), ).toBeTruthy(); @@ -1454,6 +1672,37 @@ test('authenticated users with save archives default into the saves tab', async expect(screen.queryByText('SAVE ARCHIVE')).toBeNull(); }); +test('manual tab switch is preserved after platform bootstrap requests finish', async () => { + const user = userEvent.setup(); + + let resolveGalleryRequest!: (value: []) => void; + const delayedGalleryRequest = new Promise<[]>((resolve) => { + resolveGalleryRequest = resolve; + }); + + vi.mocked(listRpgEntryWorldGallery).mockReturnValueOnce( + delayedGalleryRequest as Promise<[]>, + ); + + render(); + + await clickFirstButtonByName(user, '创作'); + expect(await screen.findByText('角色扮演 RPG')).toBeTruthy(); + + resolveGalleryRequest([]); + + await waitFor(() => { + expect( + within(getPlatformTabPanel('create')).getByText('角色扮演 RPG'), + ).toBeTruthy(); + }); + + expect(getPlatformTabPanel('create').getAttribute('aria-hidden')).toBe( + 'false', + ); + expect(getPlatformTabPanel('home').getAttribute('aria-hidden')).toBe('true'); +}); + test('save tab can resume a selected archive directly into the game', async () => { const user = userEvent.setup(); const handleContinueGame = vi.fn(); @@ -1504,7 +1753,7 @@ test('save tab can resume a selected archive directly into the game', async () = }); }); -test('owned world detail can delete a work and return to the create tab list', async () => { +test('creation hub published work can open detail view before deleting from detail page', async () => { const user = userEvent.setup(); vi.spyOn(window, 'confirm').mockReturnValue(true); @@ -1572,7 +1821,7 @@ test('owned world detail can delete a work and return to the create tab list', a render(); await openCreationHub(user); - await user.click(await screen.findByRole('button', { name: /进入世界/u })); + await user.click(await screen.findByRole('button', { name: /查看详情/u })); await user.click(await screen.findByRole('button', { name: '删除作品' })); await waitFor(() => { @@ -1650,9 +1899,168 @@ test('creation hub published work enters existing detail view', async () => { render(); await openCreationHub(user); - await user.click(await screen.findByRole('button', { name: /进入世界/u })); + await user.click(await screen.findByRole('button', { name: /查看详情/u })); expect(await screen.findByText('世界信息')).toBeTruthy(); expect(screen.getByRole('button', { name: '开始游戏' })).toBeTruthy(); expect(screen.getByText('已发布')).toBeTruthy(); }); + +test('creation hub published work experience button enters world directly', async () => { + const user = userEvent.setup(); + const handleCustomWorldSelect = vi.fn(); + + vi.mocked(listRpgCreationWorks).mockResolvedValue([ + { + workId: 'published:world-experience-1', + sourceType: 'published_profile', + status: 'published', + title: '潮雾列岛', + subtitle: '旧灯塔与失控航路', + summary: '已经发布的群岛世界作品。', + coverImageSrc: null, + coverRenderMode: 'image', + coverCharacterImageSrcs: [], + updatedAt: '2026-04-20T10:00:00.000Z', + publishedAt: '2026-04-20T10:00:00.000Z', + stage: null, + stageLabel: '已发布', + playableNpcCount: 3, + landmarkCount: 4, + roleVisualReadyCount: 1, + roleAnimationReadyCount: 0, + roleAssetSummaryLabel: null, + sessionId: null, + profileId: 'world-experience-1', + canResume: false, + canEnterWorld: true, + }, + ]); + vi.mocked(listRpgEntryWorldLibrary).mockResolvedValue([ + { + ownerUserId: 'user-1', + profileId: 'world-experience-1', + profile: { + id: 'world-experience-1', + name: '潮雾列岛', + subtitle: '旧灯塔与失控航路', + summary: '已经发布的群岛世界作品。', + tone: '压抑、潮湿、悬疑', + playerGoal: '查清群岛旧案。', + majorFactions: ['守灯会'], + coreConflicts: ['假航灯正在扰乱航线'], + playableNpcs: [], + storyNpcs: [], + landmarks: [], + } as never, + visibility: 'published', + publishedAt: '2026-04-20T10:00:00.000Z', + updatedAt: '2026-04-20T10:00:00.000Z', + authorDisplayName: '测试玩家', + worldName: '潮雾列岛', + subtitle: '旧灯塔与失控航路', + summaryText: '已经发布的群岛世界作品。', + coverImageSrc: null, + themeMode: 'tide', + playableNpcCount: 3, + landmarkCount: 4, + }, + ]); + + render( + , + ); + + await openCreationHub(user); + await user.click(await screen.findByRole('button', { name: '体验' })); + + await waitFor(() => { + expect(handleCustomWorldSelect).toHaveBeenCalledWith( + expect.objectContaining({ + id: 'world-experience-1', + name: '潮雾列岛', + }), + ); + }); + expect(screen.queryByText('世界信息')).toBeNull(); +}); + +test('creation hub published work delete button removes the work directly from card list', async () => { + const user = userEvent.setup(); + vi.spyOn(window, 'confirm').mockReturnValue(true); + + const publishedWork = { + workId: 'published:world-card-delete-1', + sourceType: 'published_profile' as const, + status: 'published' as const, + title: '潮雾列岛', + subtitle: '旧灯塔与失控航路', + summary: '用于测试卡片删除流程的作品。', + coverImageSrc: null, + coverRenderMode: 'image' as const, + coverCharacterImageSrcs: [], + updatedAt: '2026-04-16T12:00:00.000Z', + publishedAt: '2026-04-16T12:00:00.000Z', + stage: null, + stageLabel: '已发布', + playableNpcCount: 0, + landmarkCount: 0, + roleVisualReadyCount: 0, + roleAnimationReadyCount: 0, + roleAssetSummaryLabel: null, + sessionId: null, + profileId: 'world-card-delete-1', + canResume: false, + canEnterWorld: true, + }; + const publishedLibraryEntry = { + ownerUserId: 'user-1', + profileId: 'world-card-delete-1', + profile: { + id: 'world-card-delete-1', + name: '潮雾列岛', + subtitle: '旧灯塔与失控航路', + summary: '用于测试卡片删除流程的作品。', + tone: '压抑、潮湿、悬疑', + playerGoal: '查清旧案。', + majorFactions: ['守灯会'], + coreConflicts: ['雾潮正在逼近港口'], + playableNpcs: [], + storyNpcs: [], + landmarks: [], + } as never, + visibility: 'published' as const, + publishedAt: '2026-04-16T12:00:00.000Z', + updatedAt: '2026-04-16T12:00:00.000Z', + authorDisplayName: '测试玩家', + worldName: '潮雾列岛', + subtitle: '旧灯塔与失控航路', + summaryText: '用于测试卡片删除流程的作品。', + coverImageSrc: null, + themeMode: 'tide' as const, + playableNpcCount: 0, + landmarkCount: 0, + }; + + vi.mocked(listRpgCreationWorks) + .mockResolvedValueOnce([publishedWork]) + .mockResolvedValue([]); + vi.mocked(listRpgEntryWorldLibrary) + .mockResolvedValueOnce([publishedLibraryEntry]) + .mockResolvedValue([]); + vi.mocked(deleteRpgEntryWorldProfile).mockResolvedValue([]); + + render(); + + await openCreationHub(user); + await user.click(await screen.findByRole('button', { name: '删除' })); + + await waitFor(() => { + expect(deleteRpgEntryWorldProfile).toHaveBeenCalledWith( + 'world-card-delete-1', + ); + }); + await waitFor(() => { + expect(screen.getByText('还没有作品')).toBeTruthy(); + }); +}); diff --git a/src/components/rpg-entry/RpgEntryHomeView.tsx b/src/components/rpg-entry/RpgEntryHomeView.tsx index 3081e987..c54b6dde 100644 --- a/src/components/rpg-entry/RpgEntryHomeView.tsx +++ b/src/components/rpg-entry/RpgEntryHomeView.tsx @@ -88,6 +88,12 @@ const MOBILE_PAGE_STAGE_CLASS = const DESKTOP_PAGE_STAGE_CLASS = 'platform-page-stage platform-remap-surface space-y-5 pb-4'; const DESKTOP_LAYOUT_QUERY = '(min-width: 1024px)'; +const PLATFORM_HOME_TABS: PlatformHomeTab[] = [ + 'home', + 'create', + 'saves', + 'profile', +]; function usePlatformDesktopLayout() { const [isDesktopLayout, setIsDesktopLayout] = useState(() => { @@ -490,6 +496,29 @@ function DesktopTabButton({ ); } +function PlatformTabPanel({ + tab, + activeTab, + children, +}: { + tab: PlatformHomeTab; + activeTab: PlatformHomeTab; + children: ReactNode; +}) { + const active = activeTab === tab; + + // 主 Tab 保持挂载,只切换可见性,避免重页面卸载重建造成首帧闪烁。 + return ( +
+ {children} +
+ ); +} + function DesktopTrendingItem({ entry, rank, @@ -805,7 +834,7 @@ export function RpgEntryHomeView({ const desktopReleaseGrid = latestEntries.slice(0, 6); const desktopLibraryPreview = myEntries.slice(0, 2); - let content: ReactNode = ( + const mobileHomeContent: ReactNode = (
+
+ 选择类型并继续 + +
+
+ + -
- +
+ + {isLoadingPlatform ? ( + + ) : myEntries.length > 0 ? ( +
+ {myEntries.map( + (entry: CustomWorldLibraryEntry) => ( + onOpenLibraryDetail(entry)} + /> + ), + )} +
+ ) : ( + + )} +
+ + ); + + const savesContent: ReactNode = ( +
+ {authUi?.user ? ( + <> + {saveError ? ( +
+ {saveError} +
+ ) : null} + +
+ {isLoadingPlatform ? ( - - ) : myEntries.length > 0 ? ( -
- {myEntries.map( - (entry: CustomWorldLibraryEntry) => ( - onOpenLibraryDetail(entry)} - /> - ), - )} + + ) : saveEntries.length > 0 ? ( +
+ {saveEntries.map((entry) => ( + onResumeSave(entry)} + /> + ))}
) : ( - + )}
-
- ); - } - - if (activeTab === 'saves') { - content = ( -
- {authUi?.user ? ( - <> - {saveError ? ( -
- {saveError} -
- ) : null} - -
- - {isLoadingPlatform ? ( - - ) : saveEntries.length > 0 ? ( -
- {saveEntries.map((entry) => ( - onResumeSave(entry)} - /> - ))} -
- ) : ( - - )} -
- - ) : ( -
-
-
- 尚未登录 -
- + + ) : ( +
+
+
+ 尚未登录
-
- )} -
- ); - } - - if (activeTab === 'profile') { - content = ( -
- {authUi?.user ? ( - <> -
-
-
- - -
-
-
- {authUi.user.displayName} -
- -
-
- 叙世号 {publicUserCode} - -
-
- - {describeLoginMethod(authUi.user.loginMethod)} - - - {describeBindingStatus(authUi.user.bindingStatus)} - -
-
-
+ +
+
+ )} +
+ ); + const profileContent: ReactNode = ( +
+ {authUi?.user ? ( + <> +
+
+
-
-
-
-
- {isLoadingDashboard ? ( - <> - - - - - ) : dashboardError ? ( - <> - - - - - ) : ( - <> - - - - - )} -
-
- {dashboardError - ? dashboardError - : `更新于 ${formatDashboardUpdatedAt(profileDashboard?.updatedAt)}`} -
-
- -
- -
- - - -
-
- -
-
-
-
- 设置 -
-
- 主题与账号 -
+
+ 叙世号 {publicUserCode} + +
+
+ + {describeLoginMethod(authUi.user.loginMethod)} + + + {describeBindingStatus(authUi.user.bindingStatus)} +
- - -
- - ) : ( -
-
-
- 尚未登录
+
- )} -
- ); - } - const desktopContent: ReactNode = - activeTab === 'home' ? ( -
- {platformError ? ( -
- {platformError} +
+
+ {isLoadingDashboard ? ( + <> + + + + + ) : dashboardError ? ( + <> + + + + + ) : ( + <> + + + + + )} +
+
+ {dashboardError + ? dashboardError + : `更新于 ${formatDashboardUpdatedAt(profileDashboard?.updatedAt)}`} +
+
+ +
+ +
+ + + +
+
+ +
+ +
+ + ) : ( +
+
+
+ 尚未登录 +
+
- ) : null} +
+ )} +
+ ); -
+ const desktopHomeContent: ReactNode = ( +
+ {platformError ? ( +
+ {platformError} +
+ ) : null} + +
+ + +
+
+ + + LIVE + +
+ {isLoadingPlatform ? ( + + ) : desktopTrendingEntries.length > 0 ? ( +
+ {desktopTrendingEntries.map((entry, index) => ( + onOpenGalleryDetail(entry)} + /> + ))} +
+ ) : ( + + )} +
+
+ +
+
+ + {isLoadingPlatform ? ( + + ) : desktopFeaturedGrid.length > 0 ? ( +
+ {desktopFeaturedGrid.map((entry) => ( + onOpenGalleryDetail(entry)} + className="h-[16rem] w-full min-w-0" + /> + ))} +
+ ) : ( + + )} +
+ +
+ -
-
- - - LIVE - +
+
+ {desktopLibraryPreview.length > 0 + ? '最近作品' + : historyEntries.length > 0 + ? '最近浏览' + : isAuthenticated + ? '创作状态' + : '账户状态'}
- {isLoadingPlatform ? ( - - ) : desktopTrendingEntries.length > 0 ? ( -
- {desktopTrendingEntries.map((entry, index) => ( - onOpenGalleryDetail(entry)} - /> + + {desktopLibraryPreview.length > 0 ? ( +
+ {desktopLibraryPreview.map((entry) => ( + + ))} +
+ ) : historyEntries.length > 0 ? ( +
+ {historyEntries.slice(0, 2).map((entry) => ( + ))}
) : ( - +
+ {isAuthenticated + ? '创建一个草稿后,这里会出现你最近保存的作品。' + : '登录后可同步你的创作、游玩进度与平台资料。'} +
)} -
-
- -
-
- - {isLoadingPlatform ? ( - - ) : desktopFeaturedGrid.length > 0 ? ( -
- {desktopFeaturedGrid.map((entry) => ( - onOpenGalleryDetail(entry)} - className="h-[16rem] w-full min-w-0" - /> - ))} -
- ) : ( - - )} -
- -
- - - -
-
- {desktopLibraryPreview.length > 0 - ? '最近作品' - : historyEntries.length > 0 - ? '最近浏览' - : isAuthenticated - ? '创作状态' - : '账户状态'} -
- - {desktopLibraryPreview.length > 0 ? ( -
- {desktopLibraryPreview.map((entry) => ( - - ))} -
- ) : historyEntries.length > 0 ? ( -
- {historyEntries.slice(0, 2).map((entry) => ( - - ))} -
- ) : ( -
- {isAuthenticated - ? '创建一个草稿后,这里会出现你最近保存的作品。' - : '登录后可同步你的创作、游玩进度与平台资料。'} -
- )} -
-
-
- -
- - {isLoadingPlatform ? ( - - ) : desktopReleaseGrid.length > 0 ? ( -
- {desktopReleaseGrid.map((entry) => ( - onOpenGalleryDetail(entry)} - className="h-[17rem] w-full min-w-0" - /> - ))} -
- ) : ( - - )} +
- ) : ( - content - ); + +
+ + {isLoadingPlatform ? ( + + ) : desktopReleaseGrid.length > 0 ? ( +
+ {desktopReleaseGrid.map((entry) => ( + onOpenGalleryDetail(entry)} + className="h-[17rem] w-full min-w-0" + /> + ))} +
+ ) : ( + + )} +
+ + ); + + const tabContentById = { + home: isDesktopLayout ? desktopHomeContent : mobileHomeContent, + create: createContent, + saves: savesContent, + profile: profileContent, + } satisfies Record; + const tabPanels = PLATFORM_HOME_TABS.map((tab) => ( + + {tabContentById[tab]} + + )); if (!isDesktopLayout) { return ( @@ -1498,9 +1523,7 @@ export function RpgEntryHomeView({ -
- {content} -
+
{tabPanels}
-
- {desktopContent} +
+ {tabPanels}
diff --git a/src/components/rpg-entry/rpgEntryShared.ts b/src/components/rpg-entry/rpgEntryShared.ts index fb4b2917..65df4fc5 100644 --- a/src/components/rpg-entry/rpgEntryShared.ts +++ b/src/components/rpg-entry/rpgEntryShared.ts @@ -4,6 +4,7 @@ import type { CustomWorldWorkSummary, } from '../../../packages/shared/src/contracts/customWorldAgent'; import type { CustomWorldLibraryEntry } from '../../../packages/shared/src/contracts/runtime'; +import { ApiClientError, isTimeoutError } from '../../services/apiClient'; import { buildCustomWorldCreatorIntentFoundationText } from '../../services/customWorldCreatorIntent'; import type { CustomWorldProfile } from '../../types'; @@ -11,6 +12,28 @@ export function resolveRpgEntryErrorMessage( error: unknown, fallback: string, ) { + if (isTimeoutError(error)) { + if (/拼图/u.test(fallback)) { + return '开启拼图创作工作台超时,请确认运行时后端已启动后重试。'; + } + if (/大鱼吃小鱼/u.test(fallback)) { + return '开启大鱼吃小鱼创作工作台超时,请确认运行时后端已启动后重试。'; + } + if (/共创工作台/u.test(fallback)) { + return '开启创作工作台超时,请确认运行时后端已启动后重试。'; + } + return '请求超时,请稍后重试。'; + } + + if ( + error instanceof ApiClientError && + error.status === 401 && + (error.code === 'UNAUTHORIZED' || + error.message.includes('Authorization Bearer Token')) + ) { + return '当前登录状态已失效,请重新登录后继续。'; + } + return error instanceof Error ? error.message : fallback; } diff --git a/src/components/rpg-entry/useRpgCreationSessionController.ts b/src/components/rpg-entry/useRpgCreationSessionController.ts index 3b65c4cf..5e0ca6b6 100644 --- a/src/components/rpg-entry/useRpgCreationSessionController.ts +++ b/src/components/rpg-entry/useRpgCreationSessionController.ts @@ -58,6 +58,9 @@ export function useRpgCreationSessionController( onSessionOpened, } = params; const initialAgentUiStateRef = useRef(readCustomWorldAgentUiState()); + const isHydratingInitialAgentWorkspaceRef = useRef( + Boolean(initialAgentUiStateRef.current.activeSessionId), + ); const hasAppliedInitialAgentWorkspaceRef = useRef(false); const hasRequestedInitialAgentWorkspaceAuthRef = useRef(false); const isAgentDraftResultAutoOpenSuppressedRef = useRef(false); @@ -77,6 +80,8 @@ export function useRpgCreationSessionController( const [isStreamingAgentReply, setIsStreamingAgentReply] = useState(false); const [isLoadingAgentSession, setIsLoadingAgentSession] = useState(false); const [creationTypeError, setCreationTypeError] = useState(null); + const [agentWorkspaceRestoreError, setAgentWorkspaceRestoreError] = + useState(null); const [generatedCustomWorldProfile, setGeneratedCustomWorldProfile] = useState(null); const [customWorldError, setCustomWorldError] = useState(null); @@ -135,6 +140,8 @@ export function useRpgCreationSessionController( setIsLoadingAgentSession(false); setStreamingAgentReplyText(''); setIsStreamingAgentReply(false); + setAgentWorkspaceRestoreError(null); + isHydratingInitialAgentWorkspaceRef.current = false; return; } @@ -144,16 +151,22 @@ export function useRpgCreationSessionController( setIsLoadingAgentSession(false); setStreamingAgentReplyText(''); setIsStreamingAgentReply(false); + setAgentWorkspaceRestoreError(null); return; } let cancelled = false; + const isInitialWorkspaceRestore = + isHydratingInitialAgentWorkspaceRef.current && + activeAgentSessionId === initialAgentUiStateRef.current.activeSessionId; setIsLoadingAgentSession(true); void syncAgentSessionSnapshot(activeAgentSessionId) .then(() => { if (!cancelled) { setCreationTypeError(null); + setAgentWorkspaceRestoreError(null); + isHydratingInitialAgentWorkspaceRef.current = false; } }) .catch((error) => { @@ -161,13 +174,20 @@ export function useRpgCreationSessionController( return; } - setCreationTypeError( - resolveRpgCreationErrorMessage(error, '读取 Agent 共创工作区失败。'), - ); + // 登录后自动恢复的是“上一次残留的工作区指针”, + // 这里失败时应优先静默清理,避免把旧恢复错误冒充成当前登录已失效。 + if (isInitialWorkspaceRestore) { + setAgentWorkspaceRestoreError(null); + } else { + setAgentWorkspaceRestoreError( + resolveRpgCreationErrorMessage(error, '读取 Agent 共创工作区失败。'), + ); + } setAgentSession(null); setAgentOperation(null); setStreamingAgentReplyText(''); setIsStreamingAgentReply(false); + isHydratingInitialAgentWorkspaceRef.current = false; persistAgentUiState(null, null); enterCreateTab?.(); setSelectionStage('platform'); @@ -353,6 +373,7 @@ export function useRpgCreationSessionController( const { session } = await createRpgCreationSession( seedText ? { seedText } : {}, ); + isHydratingInitialAgentWorkspaceRef.current = false; setAgentSession(session); setAgentOperation(null); setGeneratedCustomWorldProfile(null); @@ -539,6 +560,7 @@ export function useRpgCreationSessionController( isLoadingAgentSession, creationTypeError, setCreationTypeError, + agentWorkspaceRestoreError, customWorldError, setCustomWorldError, generatedCustomWorldProfile, diff --git a/src/components/rpg-entry/useRpgEntryBootstrap.ts b/src/components/rpg-entry/useRpgEntryBootstrap.ts index 462bb6e2..0f3d7a30 100644 --- a/src/components/rpg-entry/useRpgEntryBootstrap.ts +++ b/src/components/rpg-entry/useRpgEntryBootstrap.ts @@ -28,6 +28,7 @@ import { resolveRpgEntryErrorMessage } from './rpgEntryShared'; type UseRpgEntryBootstrapParams = { user: AuthUser | null | undefined; + canAccessProtectedData?: boolean | undefined; getProfileDashboard: () => Promise; handleContinueGame: ( snapshot?: HydratedSavedGameSnapshot | null, @@ -38,12 +39,19 @@ type UseRpgEntryBootstrapParams = { export function useRpgEntryBootstrap( params: UseRpgEntryBootstrapParams, ) { - const { user, getProfileDashboard, handleContinueGame, hasInitialAgentSession } = - params; + const { + user, + canAccessProtectedData = Boolean(user), + getProfileDashboard, + handleContinueGame, + hasInitialAgentSession, + } = params; const isAuthenticated = Boolean(user); + const canReadProtectedData = Boolean(user) && canAccessProtectedData; const platformTabBootstrapUserIdRef = useRef( undefined, ); + const hasExplicitPlatformTabSelectionRef = useRef(false); const [savedCustomWorldEntries, setSavedCustomWorldEntries] = useState< CustomWorldLibraryEntry[] @@ -58,7 +66,7 @@ export function useRpgEntryBootstrap( PlatformBrowseHistoryEntry[] >([]); const [saveEntries, setSaveEntries] = useState([]); - const [platformTab, setPlatformTab] = useState('home'); + const [platformTab, setPlatformTabState] = useState('home'); const [platformError, setPlatformError] = useState(null); const [dashboardError, setDashboardError] = useState(null); const [historyError, setHistoryError] = useState(null); @@ -71,8 +79,15 @@ export function useRpgEntryBootstrap( const [profileDashboard, setProfileDashboard] = useState(null); + const setPlatformTab = useCallback((nextTab: PlatformHomeTab) => { + // 区分“平台首屏默认落点”和“用户/流程显式切换”。 + // 一旦显式切过 Tab,就不能再被首屏异步请求回刷成首页或存档。 + hasExplicitPlatformTabSelectionRef.current = true; + setPlatformTabState(nextTab); + }, []); + const refreshProfileDashboard = useCallback(async () => { - if (!user) { + if (!user || !canReadProtectedData) { setProfileDashboard(null); setDashboardError(null); setIsLoadingDashboard(false); @@ -91,10 +106,10 @@ export function useRpgEntryBootstrap( } finally { setIsLoadingDashboard(false); } - }, [getProfileDashboard, user]); + }, [canReadProtectedData, getProfileDashboard, user]); const refreshCustomWorldWorks = useCallback(async () => { - if (!user) { + if (!user || !canReadProtectedData) { setCustomWorldWorkEntries([]); return []; } @@ -102,7 +117,7 @@ export function useRpgEntryBootstrap( const nextItems = await listRpgCreationWorks(); setCustomWorldWorkEntries(nextItems); return nextItems; - }, [user]); + }, [canReadProtectedData, user]); const refreshPublishedGallery = useCallback(async () => { const nextEntries = await listRpgEntryWorldGallery(); @@ -111,7 +126,7 @@ export function useRpgEntryBootstrap( }, []); const refreshSavedCustomWorldLibrary = useCallback(async () => { - if (!user) { + if (!user || !canReadProtectedData) { setSavedCustomWorldEntries([]); return []; } @@ -119,7 +134,7 @@ export function useRpgEntryBootstrap( const nextEntries = await listRpgEntryWorldLibrary(); setSavedCustomWorldEntries(nextEntries); return nextEntries; - }, [user]); + }, [canReadProtectedData, user]); const appendBrowseHistoryEntry = useCallback( async (entry: PlatformBrowseHistoryWriteEntry) => { @@ -139,7 +154,7 @@ export function useRpgEntryBootstrap( const handleResumeSaveEntry = useCallback( async (entry: ProfileSaveArchiveSummary) => { - if (!user || isResumingSaveWorldKey) { + if (!user || !canReadProtectedData || isResumingSaveWorldKey) { return; } @@ -162,11 +177,20 @@ export function useRpgEntryBootstrap( setIsResumingSaveWorldKey(null); } }, - [handleContinueGame, isResumingSaveWorldKey, user], + [canReadProtectedData, handleContinueGame, isResumingSaveWorldKey, user], ); useEffect(() => { let isActive = true; + const nextPlatformBootstrapUserId = user?.id ?? null; + const shouldApplyInitialPlatformTab = + platformTabBootstrapUserIdRef.current !== nextPlatformBootstrapUserId; + + if (shouldApplyInitialPlatformTab) { + // 在请求发出前先占位,避免首屏请求未完成时用户切了 Tab, + // 返回结果又被误判成“还没初始化过”并强制跳回默认页。 + platformTabBootstrapUserIdRef.current = nextPlatformBootstrapUserId; + } void (async () => { setHistoryEntries([]); @@ -174,9 +198,9 @@ export function useRpgEntryBootstrap( setSaveError(null); setIsLoadingPlatform(true); setPlatformError(null); - setIsLoadingDashboard(isAuthenticated); + setIsLoadingDashboard(canReadProtectedData); setDashboardError(null); - if (!isAuthenticated) { + if (!canReadProtectedData) { setSavedCustomWorldEntries([]); setCustomWorldWorkEntries([]); setSaveEntries([]); @@ -192,16 +216,20 @@ export function useRpgEntryBootstrap( historyResult, saveArchivesResult, ] = await Promise.allSettled([ - isAuthenticated + canReadProtectedData ? listRpgEntryWorldLibrary() : Promise.resolve([]), - isAuthenticated + canReadProtectedData ? listRpgCreationWorks() : Promise.resolve([]), listRpgEntryWorldGallery(), - isAuthenticated ? getProfileDashboard() : Promise.resolve(null), - isAuthenticated ? listRpgProfileBrowseHistory() : Promise.resolve([]), - isAuthenticated ? listRpgProfileSaveArchives() : Promise.resolve([]), + canReadProtectedData ? getProfileDashboard() : Promise.resolve(null), + canReadProtectedData + ? listRpgProfileBrowseHistory() + : Promise.resolve([]), + canReadProtectedData + ? listRpgProfileSaveArchives() + : Promise.resolve([]), ]); if (!isActive) { @@ -227,8 +255,10 @@ export function useRpgEntryBootstrap( } if ( - (isAuthenticated && libraryEntriesResult.status === 'rejected') || - (isAuthenticated && workEntriesResult.status === 'rejected') || + (canReadProtectedData && + libraryEntriesResult.status === 'rejected') || + (canReadProtectedData && + workEntriesResult.status === 'rejected') || galleryEntriesResult.status === 'rejected' ) { const platformFailure = @@ -246,7 +276,7 @@ export function useRpgEntryBootstrap( if (dashboardResult.status === 'fulfilled') { setProfileDashboard(dashboardResult.value); - } else if (isAuthenticated) { + } else if (canReadProtectedData) { setProfileDashboard(null); setDashboardError( resolveRpgEntryErrorMessage( @@ -258,7 +288,7 @@ export function useRpgEntryBootstrap( if (historyResult.status === 'fulfilled') { setHistoryEntries(historyResult.value); - } else if (isAuthenticated) { + } else if (canReadProtectedData) { setHistoryError( resolveRpgEntryErrorMessage(historyResult.reason, '读取浏览历史失败。'), ); @@ -266,7 +296,7 @@ export function useRpgEntryBootstrap( if (saveArchivesResult.status === 'fulfilled') { setSaveEntries(saveArchivesResult.value); - } else if (isAuthenticated) { + } else if (canReadProtectedData) { setSaveEntries([]); setSaveError( resolveRpgEntryErrorMessage( @@ -276,20 +306,19 @@ export function useRpgEntryBootstrap( ); } - const nextPlatformBootstrapUserId = user?.id ?? null; if ( - platformTabBootstrapUserIdRef.current !== nextPlatformBootstrapUserId + shouldApplyInitialPlatformTab && + !hasInitialAgentSession && + !hasExplicitPlatformTabSelectionRef.current ) { - platformTabBootstrapUserIdRef.current = nextPlatformBootstrapUserId; - if (!hasInitialAgentSession) { - setPlatformTab( - isAuthenticated && - saveArchivesResult.status === 'fulfilled' && - saveArchivesResult.value.length > 0 - ? 'saves' - : 'home', - ); - } + setPlatformTabState( + isAuthenticated && + canReadProtectedData && + saveArchivesResult.status === 'fulfilled' && + saveArchivesResult.value.length > 0 + ? 'saves' + : 'home', + ); } } finally { if (isActive) { @@ -302,10 +331,17 @@ export function useRpgEntryBootstrap( return () => { isActive = false; }; - }, [getProfileDashboard, hasInitialAgentSession, isAuthenticated, user]); + }, [ + canReadProtectedData, + getProfileDashboard, + hasInitialAgentSession, + isAuthenticated, + user, + ]); return { isAuthenticated, + canReadProtectedData, platformTab, setPlatformTab, savedCustomWorldEntries, diff --git a/src/index.css b/src/index.css index c151f45b..da71a5e1 100644 --- a/src/index.css +++ b/src/index.css @@ -589,6 +589,27 @@ body { backdrop-filter: blur(18px); } +.platform-tab-panel-stack { + position: relative; + min-height: 0; + overflow: hidden; +} + +.platform-tab-panel { + min-height: 0; + height: 100%; + overflow-y: auto; + padding-right: 0.25rem; +} + +.platform-tab-panel--hidden { + display: none; +} + +.platform-tab-panel--active { + display: block; +} + .platform-surface { position: relative; overflow: hidden; @@ -1151,12 +1172,6 @@ body { box-shadow: var(--platform-desktop-hover-shadow); } -.platform-desktop-scroll { - min-height: 0; - overflow-y: auto; - padding-right: 0.25rem; -} - .platform-auth-card { border: 1px solid var(--platform-modal-border); background: var(--platform-modal-fill); @@ -1532,17 +1547,32 @@ body { .platform-theme--light .platform-subpanel:where([class*='bg-black/18'], [class*='bg-black/24']), .platform-theme--light - .platform-remap-surface:where([class*='bg-black/18'], [class*='bg-black/24']) { + .platform-remap-surface:where( + [class*='bg-black/18'], + [class*='bg-black/24'] + ) { background: var(--platform-subpanel-fill) !important; } .platform-theme--light .platform-surface:not(.platform-surface--hero) - :where([class*='border-white/10'], [class*='border-white/12'], [class*='border-white/15']), + :where( + [class*='border-white/10'], + [class*='border-white/12'], + [class*='border-white/15'] + ), .platform-theme--light - .platform-subpanel:where([class*='border-white/10'], [class*='border-white/12'], [class*='border-white/15']), + .platform-subpanel:where( + [class*='border-white/10'], + [class*='border-white/12'], + [class*='border-white/15'] + ), .platform-theme--light - .platform-remap-surface:where([class*='border-white/10'], [class*='border-white/12'], [class*='border-white/15']) { + .platform-remap-surface:where( + [class*='border-white/10'], + [class*='border-white/12'], + [class*='border-white/15'] + ) { border-color: var(--platform-subpanel-border) !important; } @@ -2412,10 +2442,8 @@ button { } .platform-main-shell { - padding-inline: max(0.75rem, env(safe-area-inset-left)) max( - 0.75rem, - env(safe-area-inset-right) - ); + padding-inline: max(0.75rem, env(safe-area-inset-left)) + max(0.75rem, env(safe-area-inset-right)); padding-top: max(0.75rem, env(safe-area-inset-top)); padding-bottom: 0.5rem; } diff --git a/src/services/apiClient.test.ts b/src/services/apiClient.test.ts index f3930667..03cd1e46 100644 --- a/src/services/apiClient.test.ts +++ b/src/services/apiClient.test.ts @@ -6,6 +6,7 @@ import { clearStoredAccessToken, fetchWithApiAuth, getStoredAccessToken, + isTimeoutError, requestJson, setStoredAccessToken, } from './apiClient'; @@ -150,6 +151,68 @@ describe('apiClient', () => { expect(getStoredAccessToken()).toBe('fresh-token'); }); + it('hydrates a missing local bearer token before the first protected request', async () => { + fetchMock + .mockResolvedValueOnce( + createResponseMock({ + status: 200, + body: JSON.stringify({ + ok: true, + data: { + ok: true, + token: 'fresh-token', + }, + error: null, + meta: { + apiVersion: '2026-04-08', + }, + }), + }), + ) + .mockResolvedValueOnce( + createResponseMock({ + status: 200, + body: JSON.stringify({ + ok: true, + data: { + value: 9, + }, + error: null, + meta: { + apiVersion: '2026-04-08', + }, + }), + }), + ); + + const result = await requestJson<{ value: number }>( + '/api/runtime/protected', + { method: 'GET' }, + '读取受保护数据失败', + ); + + expect(result).toEqual({ value: 9 }); + expect(fetchMock).toHaveBeenCalledTimes(2); + expect(fetchMock).toHaveBeenNthCalledWith( + 1, + '/api/auth/refresh', + expect.objectContaining({ + method: 'POST', + credentials: 'same-origin', + }), + ); + expect(fetchMock).toHaveBeenNthCalledWith( + 2, + '/api/runtime/protected', + expect.objectContaining({ + headers: expect.objectContaining({ + Authorization: 'Bearer fresh-token', + }), + }), + ); + expect(getStoredAccessToken()).toBe('fresh-token'); + }); + it('does not emit auth change events when 401 probe requests opt into silent mode', async () => { fetchMock.mockResolvedValueOnce(createResponseMock({ status: 401 })); @@ -185,6 +248,38 @@ describe('apiClient', () => { expect(getStoredAccessToken()).toBe(''); }); + it('keeps the refreshed token when the retried protected request is still unauthorized', async () => { + setStoredAccessToken('expired-token', { emit: false }); + fetchMock + .mockResolvedValueOnce(createResponseMock({ status: 401 })) + .mockResolvedValueOnce( + createResponseMock({ + status: 200, + body: JSON.stringify({ + ok: true, + data: { + ok: true, + token: 'fresh-token', + }, + error: null, + meta: { + apiVersion: '2026-04-08', + }, + }), + }), + ) + .mockResolvedValueOnce(createResponseMock({ status: 401 })); + + const response = await fetchWithApiAuth('/api/runtime/puzzle/works', { + method: 'GET', + }); + + expect(response.status).toBe(401); + expect(fetchMock).toHaveBeenCalledTimes(3); + expect(getStoredAccessToken()).toBe('fresh-token'); + expect(dispatchEventMock).toHaveBeenCalledTimes(1); + }); + it('rejects refresh responses that do not return a renewed bearer token', async () => { setStoredAccessToken('expired-token', { emit: false }); fetchMock @@ -280,7 +375,43 @@ describe('apiClient', () => { expect(result).toEqual({ value: 42 }); }); + it('aborts requests when timeoutMs is reached', async () => { + setStoredAccessToken('timeout-token', { emit: false }); + fetchMock.mockImplementation( + async (_input: string, init?: RequestInit) => + new Promise((_resolve, reject) => { + init?.signal?.addEventListener( + 'abort', + () => { + reject(init.signal?.reason); + }, + { once: true }, + ); + }), + ); + + let capturedError: unknown; + try { + await requestJson( + '/api/runtime/protected', + { method: 'POST' }, + '创建会话失败', + { + timeoutMs: 20, + skipRefresh: true, + }, + ); + } catch (error) { + capturedError = error; + } + + expect(fetchMock).toHaveBeenCalledTimes(1); + expect(isTimeoutError(capturedError)).toBe(true); + expect(capturedError).toBeInstanceOf(Error); + }); + it('surfaces response metadata through ApiClientError', async () => { + setStoredAccessToken('metadata-token', { emit: false }); fetchMock.mockResolvedValueOnce( createResponseMock({ status: 503, diff --git a/src/services/apiClient.ts b/src/services/apiClient.ts index 4f045264..2c4b4641 100644 --- a/src/services/apiClient.ts +++ b/src/services/apiClient.ts @@ -30,6 +30,7 @@ export type ApiRetryOptions = { export type ApiRequestOptions = { retry?: ApiRetryOptions; + timeoutMs?: number; skipAuth?: boolean; omitEnvelopeHeader?: boolean; skipRefresh?: boolean; @@ -172,6 +173,57 @@ function createAbortError() { return error; } +function createTimeoutError(timeoutMs: number) { + const error = new Error(`请求超时:${timeoutMs}ms`); + error.name = 'TimeoutError'; + return error; +} + +function composeAbortSignal( + signal: AbortSignal | undefined, + timeoutMs: number | undefined, +) { + const shouldUseTimeout = + typeof timeoutMs === 'number' && Number.isFinite(timeoutMs) && timeoutMs > 0; + + if (!shouldUseTimeout) { + return { + signal, + cleanup: () => {}, + }; + } + + const controller = new AbortController(); + const timeoutId = setTimeout(() => { + controller.abort(createTimeoutError(timeoutMs)); + }, timeoutMs); + + const cleanup = () => { + clearTimeout(timeoutId); + signal?.removeEventListener('abort', onAbort); + }; + + const onAbort = () => { + controller.abort(signal?.reason ?? createAbortError()); + }; + + if (signal?.aborted) { + cleanup(); + controller.abort(signal.reason ?? createAbortError()); + return { + signal: controller.signal, + cleanup, + }; + } + + signal?.addEventListener('abort', onAbort, { once: true }); + + return { + signal: controller.signal, + cleanup, + }; +} + async function waitForRetry(ms: number, signal?: AbortSignal) { if (ms <= 0) { return; @@ -268,6 +320,10 @@ export function isAbortError(error: unknown) { ); } +export function isTimeoutError(error: unknown) { + return error instanceof Error && error.name === 'TimeoutError'; +} + function shouldRetryError(error: unknown, attempt: number, retry: ResolvedRetryOptions) { if (attempt >= retry.maxRetries || isAbortError(error)) { return false; @@ -505,21 +561,48 @@ export async function fetchWithApiAuth( const method = (init.method ?? 'GET').toUpperCase(); const retry = resolveRetryOptions(method, options.retry); const shouldNotifyAuthStateChange = options.notifyAuthStateChange !== false; + const requestSignal = init.signal ?? undefined; let attempt = 0; let refreshAttempted = false; for (;;) { try { - const requestHeaders = withAuthorizationHeaders(init.headers, options); - const hasAuthHeader = Boolean( + let requestHeaders = withAuthorizationHeaders(init.headers, options); + let hasAuthHeader = Boolean( requestHeaders.Authorization?.trim() || requestHeaders.authorization?.trim(), ); - const response = await fetch(input, { - credentials: 'same-origin', - ...init, - headers: requestHeaders, - }); + + if (!hasAuthHeader && !options.skipAuth && !options.skipRefresh) { + try { + // 受保护请求在本地 access token 缺失时,先尝试用 refresh cookie 静默补票, + // 避免把后端原始 “缺少 Bearer Token” 直接暴露给业务 UI。 + await ensureStoredAccessToken(); + requestHeaders = withAuthorizationHeaders(init.headers, options); + hasAuthHeader = Boolean( + requestHeaders.Authorization?.trim() || + requestHeaders.authorization?.trim(), + ); + } catch { + // 补票失败时继续走原始请求,让调用方按真实 401 分支处理。 + } + } + + const timedRequest = composeAbortSignal( + requestSignal, + options.timeoutMs, + ); + let response: Response; + try { + response = await fetch(input, { + credentials: 'same-origin', + ...init, + signal: timedRequest.signal, + headers: requestHeaders, + }); + } finally { + timedRequest.cleanup(); + } if ( response.status === 401 && @@ -543,7 +626,12 @@ export async function fetchWithApiAuth( emitAuthStateChange(); } } - } else if (response.status === 401 && hasAuthHeader && !options.skipAuth) { + } else if ( + response.status === 401 && + hasAuthHeader && + !options.skipAuth && + !refreshAttempted + ) { clearStoredAccessToken({ emit: false }); if (shouldNotifyAuthStateChange) { emitAuthStateChange(); @@ -562,7 +650,7 @@ export async function fetchWithApiAuth( attempt += 1; await waitForRetry( buildRetryDelayMs(attempt, retry), - init.signal ?? undefined, + requestSignal, ); } } diff --git a/src/services/assetReadUrlService.test.ts b/src/services/assetReadUrlService.test.ts index 6d707475..b7ea1f60 100644 --- a/src/services/assetReadUrlService.test.ts +++ b/src/services/assetReadUrlService.test.ts @@ -1,18 +1,45 @@ import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'; +import { clearStoredAccessToken, setStoredAccessToken } from './apiClient'; import { clearSignedAssetReadUrlCache, getSignedAssetReadUrl, resolveAssetReadUrl, } from './assetReadUrlService'; +function createLocalStorageMock() { + const store = new Map(); + + return { + getItem(key: string) { + return store.has(key) ? store.get(key)! : null; + }, + setItem(key: string, value: string) { + store.set(key, String(value)); + }, + removeItem(key: string) { + store.delete(key); + }, + clear() { + store.clear(); + }, + }; +} + describe('assetReadUrlService', () => { beforeEach(() => { + vi.stubGlobal('window', { + localStorage: createLocalStorageMock(), + dispatchEvent: vi.fn(), + }); clearSignedAssetReadUrlCache(); + clearStoredAccessToken({ emit: false }); + setStoredAccessToken('test-access-token', { emit: false }); vi.restoreAllMocks(); }); afterEach(() => { + clearStoredAccessToken({ emit: false }); vi.useRealTimers(); }); @@ -110,4 +137,44 @@ describe('assetReadUrlService', () => { expect(second).toBe(first); expect(globalThis.fetch).toHaveBeenCalledTimes(1); }); + + test('getSignedAssetReadUrl caches not-found failures for the same legacy path', async () => { + vi.spyOn(globalThis, 'fetch').mockResolvedValue( + new Response( + JSON.stringify({ + ok: false, + data: null, + error: { + code: 'NOT_FOUND', + message: '对象不存在', + }, + meta: { + apiVersion: '2026-04-08', + routeVersion: '2026-04-08', + latencyMs: 1, + timestamp: '2099-01-01T00:00:00Z', + }, + }), + { + status: 404, + headers: { + 'Content-Type': 'application/json', + }, + }, + ), + ); + + await expect( + getSignedAssetReadUrl({ + legacyPublicPath: '/generated-characters/hero/missing/master.png', + }), + ).rejects.toThrow(); + await expect( + getSignedAssetReadUrl({ + legacyPublicPath: '/generated-characters/hero/missing/master.png', + }), + ).rejects.toThrow('资源不存在或暂时不可读取'); + + expect(globalThis.fetch).toHaveBeenCalledTimes(1); + }); }); diff --git a/src/services/assetReadUrlService.ts b/src/services/assetReadUrlService.ts index 2b90fd91..76068ca4 100644 --- a/src/services/assetReadUrlService.ts +++ b/src/services/assetReadUrlService.ts @@ -1,4 +1,4 @@ -import { requestJson } from './apiClient'; +import { ApiClientError, requestJson } from './apiClient'; export type AssetReadUrlRequest = { objectKey?: string; @@ -22,9 +22,15 @@ type CachedReadUrlEntry = { expiresAtMs: number; }; +type CachedReadUrlFailureEntry = { + expiresAtMs: number; +}; + const ASSET_READ_URL_API_PATH = '/api/assets/read-url'; const DEFAULT_CACHE_SAFETY_WINDOW_MS = 30 * 1000; +const DEFAULT_FAILURE_CACHE_WINDOW_MS = 60 * 1000; const signedReadUrlCache = new Map(); +const signedReadUrlFailureCache = new Map(); const pendingSignedReadUrlRequests = new Map>(); export function isGeneratedLegacyPath(value: string) { @@ -81,6 +87,16 @@ function shouldReuseCachedReadUrl(entry: CachedReadUrlEntry | undefined) { return entry.expiresAtMs - DEFAULT_CACHE_SAFETY_WINDOW_MS > Date.now(); } +function shouldReuseCachedReadUrlFailure( + entry: CachedReadUrlFailureEntry | undefined, +) { + if (!entry) { + return false; + } + + return entry.expiresAtMs > Date.now(); +} + export async function getSignedAssetReadUrl( request: AssetReadUrlRequest, signal?: AbortSignal, @@ -91,6 +107,13 @@ export async function getSignedAssetReadUrl( return cached.signedUrl; } + const cachedFailure = cacheKey + ? signedReadUrlFailureCache.get(cacheKey) + : undefined; + if (cachedFailure && shouldReuseCachedReadUrlFailure(cachedFailure)) { + throw new Error('资源不存在或暂时不可读取'); + } + if (cacheKey) { const pendingRequest = pendingSignedReadUrlRequests.get(cacheKey); if (pendingRequest) { @@ -117,25 +140,42 @@ export async function getSignedAssetReadUrl( searchParams.set('expireSeconds', String(Math.floor(request.expireSeconds))); } - const response = await requestJson( - `${ASSET_READ_URL_API_PATH}?${searchParams.toString()}`, - { - method: 'GET', - signal, - }, - '获取资源访问地址失败', - ); - const payload = resolveSignedReadPayload(response); - const expiresAtMs = parseExpiresAtMs(payload.expiresAt); + try { + const response = await requestJson( + `${ASSET_READ_URL_API_PATH}?${searchParams.toString()}`, + { + method: 'GET', + signal, + }, + '获取资源访问地址失败', + ); + const payload = resolveSignedReadPayload(response); + const expiresAtMs = parseExpiresAtMs(payload.expiresAt); - if (cacheKey && expiresAtMs > 0) { - signedReadUrlCache.set(cacheKey, { - signedUrl: payload.signedUrl, - expiresAtMs, - }); + if (cacheKey) { + signedReadUrlFailureCache.delete(cacheKey); + } + + if (cacheKey && expiresAtMs > 0) { + signedReadUrlCache.set(cacheKey, { + signedUrl: payload.signedUrl, + expiresAtMs, + }); + } + + return payload.signedUrl; + } catch (error) { + if ( + cacheKey && + error instanceof ApiClientError && + error.status === 404 + ) { + signedReadUrlFailureCache.set(cacheKey, { + expiresAtMs: Date.now() + DEFAULT_FAILURE_CACHE_WINDOW_MS, + }); + } + throw error; } - - return payload.signedUrl; })(); if (cacheKey) { @@ -187,5 +227,6 @@ export async function resolveAssetReadUrl( export function clearSignedAssetReadUrlCache() { signedReadUrlCache.clear(); + signedReadUrlFailureCache.clear(); pendingSignedReadUrlRequests.clear(); } diff --git a/src/services/authService.test.ts b/src/services/authService.test.ts index 74c5a07f..393bc850 100644 --- a/src/services/authService.test.ts +++ b/src/services/authService.test.ts @@ -116,6 +116,10 @@ describe('authService', () => { }), }), '登录失败', + { + skipAuth: true, + skipRefresh: true, + }, ); expect(getStoredAccessToken()).toBe('jwt-entry-token'); expect(window.dispatchEvent).not.toHaveBeenCalled(); @@ -195,6 +199,10 @@ describe('authService', () => { }), }), '发送验证码失败', + { + skipAuth: true, + skipRefresh: true, + }, ); }); @@ -249,6 +257,10 @@ describe('authService', () => { }), }), '登录失败', + { + skipAuth: true, + skipRefresh: true, + }, ); expect(getStoredAccessToken()).toBe('jwt-phone-token'); expect(window.dispatchEvent).not.toHaveBeenCalled(); @@ -319,6 +331,10 @@ describe('authService', () => { method: 'GET', }), '微信登录暂不可用', + { + skipAuth: true, + skipRefresh: true, + }, ); expect(assignMock).toHaveBeenCalledWith( '/api/auth/wechat/callback?mock_code=wx-user&state=state123', @@ -339,6 +355,10 @@ describe('authService', () => { method: 'GET', }), '读取登录方式失败', + { + skipAuth: true, + skipRefresh: true, + }, ); }); diff --git a/src/services/authService.ts b/src/services/authService.ts index d28934aa..079a51f9 100644 --- a/src/services/authService.ts +++ b/src/services/authService.ts @@ -22,6 +22,7 @@ import type { LogoutResponse, } from '../../packages/shared/src/contracts/auth'; import { + type ApiRequestOptions, ApiClientError, clearStoredAccessToken, clearStoredAutoAuthCredentials, @@ -60,6 +61,13 @@ let pendingAutoAuthUser: Promise<{ credentials: AutoAuthCredentials; }> | null = null; +// 登录前公开认证入口不能误带旧 token,也不能先触发 refresh 探测, +// 否则无会话用户点击“获取验证码”时会先打出一条无意义的 /auth/refresh 401。 +const PUBLIC_AUTH_REQUEST_OPTIONS = { + skipAuth: true, + skipRefresh: true, +} satisfies ApiRequestOptions; + export function normalizePhoneInput(phoneInput: string) { return phoneInput.replace(/[^\d+]/gu, '').trim(); } @@ -147,6 +155,7 @@ export async function sendPhoneLoginCode( }), }, '发送验证码失败', + PUBLIC_AUTH_REQUEST_OPTIONS, ); return response; @@ -164,6 +173,7 @@ export async function loginWithPhoneCode(phone: string, code: string) { }), }, '登录失败', + PUBLIC_AUTH_REQUEST_OPTIONS, ); setStoredAccessToken(response.token, { emit: false }); @@ -212,6 +222,7 @@ export async function startWechatLogin() { method: 'GET', }, '微信登录暂不可用', + PUBLIC_AUTH_REQUEST_OPTIONS, ); window.location.assign(response.authorizationUrl); @@ -224,6 +235,7 @@ export async function getAuthLoginOptions() { method: 'GET', }, '读取登录方式失败', + PUBLIC_AUTH_REQUEST_OPTIONS, ); } @@ -237,6 +249,7 @@ export async function authEntry(username: string, password: string) { body: JSON.stringify(credentials), }, '登录失败', + PUBLIC_AUTH_REQUEST_OPTIONS, ); setStoredAccessToken(response.token, { emit: false }); diff --git a/src/services/big-fish-creation/bigFishCreationClient.ts b/src/services/big-fish-creation/bigFishCreationClient.ts index 221ee537..0a40af8b 100644 --- a/src/services/big-fish-creation/bigFishCreationClient.ts +++ b/src/services/big-fish-creation/bigFishCreationClient.ts @@ -16,6 +16,7 @@ import { import { readCreationAgentSessionFromSse } from '../creation-agent'; const BIG_FISH_AGENT_API_BASE = '/api/runtime/big-fish/agent/sessions'; +const BIG_FISH_SESSION_START_TIMEOUT_MS = 15000; const BIG_FISH_READ_RETRY: ApiRetryOptions = { maxRetries: 1, baseDelayMs: 180, @@ -41,6 +42,7 @@ export async function createBigFishCreationSession( '创建大鱼吃小鱼共创会话失败', { retry: BIG_FISH_WRITE_RETRY, + timeoutMs: BIG_FISH_SESSION_START_TIMEOUT_MS, }, ); } diff --git a/src/services/puzzle-agent/puzzleAgentClient.ts b/src/services/puzzle-agent/puzzleAgentClient.ts index b2c71b9d..db6e2272 100644 --- a/src/services/puzzle-agent/puzzleAgentClient.ts +++ b/src/services/puzzle-agent/puzzleAgentClient.ts @@ -18,6 +18,7 @@ import { import { readCreationAgentSessionFromSse } from '../creation-agent'; const PUZZLE_AGENT_API_BASE = '/api/runtime/puzzle/agent/sessions'; +const PUZZLE_AGENT_SESSION_START_TIMEOUT_MS = 15000; const PUZZLE_AGENT_READ_RETRY: ApiRetryOptions = { maxRetries: 1, baseDelayMs: 180, @@ -47,6 +48,7 @@ export async function createPuzzleAgentSession( '创建拼图共创会话失败', { retry: PUZZLE_AGENT_WRITE_RETRY, + timeoutMs: PUZZLE_AGENT_SESSION_START_TIMEOUT_MS, }, ); } diff --git a/src/services/rpg-creation/rpgCreationAgentClient.ts b/src/services/rpg-creation/rpgCreationAgentClient.ts index 3afde286..377ad81b 100644 --- a/src/services/rpg-creation/rpgCreationAgentClient.ts +++ b/src/services/rpg-creation/rpgCreationAgentClient.ts @@ -17,6 +17,7 @@ import { import { requestRpgCreationRuntimeJson } from './rpgCreationRuntimeClient'; const RPG_AGENT_API_BASE = '/custom-world/agent/sessions'; +const CREATION_SESSION_START_TIMEOUT_MS = 15000; export async function createRpgCreationSession( payload: CreateRpgAgentSessionRequest, @@ -29,6 +30,9 @@ export async function createRpgCreationSession( body: JSON.stringify(payload), }, '创建世界共创会话失败', + { + timeoutMs: CREATION_SESSION_START_TIMEOUT_MS, + }, ); }