feat(scum): rebuild plugin-owned management data
This commit is contained in:
@@ -1,6 +1,24 @@
|
||||
import type { PluginBridgeExecuteEnvelope, PluginBridgeExecutionResult } from "./pluginBridge";
|
||||
import type { GameClientBridgeCommandFilterRequest, GameClientBridgeQueueRequest, GameClientBridgeSnapshotQuery } from "../api/types";
|
||||
|
||||
export interface PluginDataMutation {
|
||||
operation: "put" | "delete";
|
||||
key: string;
|
||||
value?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export interface PluginPageWorkspaceActions {
|
||||
pluginData?: {
|
||||
list: (collection: string, key?: string) => Promise<unknown>;
|
||||
put: (collection: string, key: string, value: Record<string, unknown>) => Promise<unknown>;
|
||||
delete: (collection: string, key: string) => Promise<void>;
|
||||
transact: (collection: string, mutations: PluginDataMutation[]) => Promise<unknown>;
|
||||
};
|
||||
gameClient?: {
|
||||
queue: (request: GameClientBridgeQueueRequest) => Promise<unknown>;
|
||||
get: (commandId: string) => Promise<unknown>;
|
||||
list: (filter?: GameClientBridgeCommandFilterRequest) => Promise<unknown>;
|
||||
snapshots: (query?: GameClientBridgeSnapshotQuery) => Promise<unknown>;
|
||||
};
|
||||
dispatch?: (envelope: PluginBridgeExecuteEnvelope, signal?: AbortSignal) => Promise<PluginBridgeExecutionResult>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user