Close DDD refactor and remove generated asset proxy
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { JsonObject } from './common';
|
||||
import type { SavedGameSnapshotInput } from './runtime';
|
||||
|
||||
/**
|
||||
* story session 主链共享契约。
|
||||
@@ -12,12 +13,32 @@ export type BeginStorySessionRequest = {
|
||||
openingSummary?: string | null;
|
||||
};
|
||||
|
||||
export type BeginStoryRuntimeSessionRequest<
|
||||
TProfile = JsonObject,
|
||||
TCharacter = JsonObject,
|
||||
> = {
|
||||
worldType: string;
|
||||
customWorldProfile?: TProfile | null;
|
||||
character: TCharacter;
|
||||
runtimeMode?: 'play' | 'preview' | 'test';
|
||||
disablePersistence?: boolean;
|
||||
};
|
||||
|
||||
export type ContinueStoryRequest = {
|
||||
storySessionId: string;
|
||||
narrativeText: string;
|
||||
choiceFunctionId?: string | null;
|
||||
};
|
||||
|
||||
export type ResolveStoryRuntimeActionRequest = {
|
||||
storySessionId: string;
|
||||
clientVersion?: number;
|
||||
functionId: string;
|
||||
actionText: string;
|
||||
targetId?: string | null;
|
||||
payload?: JsonObject | null;
|
||||
};
|
||||
|
||||
export type StorySessionPayload = {
|
||||
storySessionId: string;
|
||||
runtimeSessionId: string;
|
||||
@@ -52,6 +73,11 @@ export type StorySessionStateResponse = {
|
||||
storyEvents: StoryEventPayload[];
|
||||
};
|
||||
|
||||
export type StoryRuntimeSnapshotPayload<
|
||||
TGameState = JsonObject,
|
||||
TCurrentStory = JsonObject,
|
||||
> = SavedGameSnapshotInput<TGameState, string, TCurrentStory>;
|
||||
|
||||
export type StoryRuntimeProjectionRequest = {
|
||||
storySessionId: string;
|
||||
clientVersion?: number;
|
||||
@@ -94,6 +120,7 @@ export type StoryRuntimeProjectionResponse = {
|
||||
storySession: StorySessionPayload;
|
||||
storyEvents: StoryEventPayload[];
|
||||
serverVersion: number;
|
||||
gameState: JsonObject;
|
||||
actor: StoryRuntimeActorProjection;
|
||||
inventory: StoryRuntimeInventoryProjection;
|
||||
options: StoryRuntimeOptionProjection[];
|
||||
@@ -102,3 +129,7 @@ export type StoryRuntimeProjectionResponse = {
|
||||
actionResultText?: string | null;
|
||||
toast?: string | null;
|
||||
};
|
||||
|
||||
export type StoryRuntimeMutationResponse = {
|
||||
projection: StoryRuntimeProjectionResponse;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user