Remove pre-1.0 bridge governance scaffolding
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import type {
|
||||
GameClientBridgeApprovalState,
|
||||
GameClientBridgeCancelResponse,
|
||||
GameClientBridgeCommandCancellationResponse,
|
||||
GameClientBridgeCommandListResponse,
|
||||
@@ -16,7 +15,6 @@ import type {
|
||||
} from "../api/types";
|
||||
|
||||
const commandStates = new Set<GameClientBridgeCommandState>(["pending", "claimed", "succeeded", "failed", "cancelled", "expired", "unknown"]);
|
||||
const approvalStates = new Set<GameClientBridgeApprovalState>(["not_required", "pending", "approved", "rejected"]);
|
||||
const resultStatuses = new Set<GameClientBridgeResultStatus>(["succeeded", "failed", "cancelled", "unknown"]);
|
||||
const forbiddenKeys = new Set([
|
||||
"apikey",
|
||||
@@ -84,7 +82,6 @@ export function parseSafeGameClientBridgeCommand(value: unknown): GameClientBrid
|
||||
commandType: string(record.commandType, "commandType"),
|
||||
priority: number(record.priority, "priority"),
|
||||
state: commandState(record.state),
|
||||
approvalState: approvalState(record.approvalState),
|
||||
expiresAt: string(record.expiresAt, "expiresAt"),
|
||||
createdAt: string(record.createdAt, "createdAt"),
|
||||
updatedAt: string(record.updatedAt, "updatedAt")
|
||||
@@ -284,12 +281,6 @@ function commandState(value: unknown): GameClientBridgeCommandState {
|
||||
return parsed;
|
||||
}
|
||||
|
||||
function approvalState(value: unknown): GameClientBridgeApprovalState {
|
||||
const parsed = string(value, "approvalState") as GameClientBridgeApprovalState;
|
||||
if (!approvalStates.has(parsed)) throw new Error("Game Client Bridge approval state is invalid");
|
||||
return parsed;
|
||||
}
|
||||
|
||||
function resultStatus(value: unknown): GameClientBridgeResultStatus {
|
||||
const parsed = string(value, "result.status") as GameClientBridgeResultStatus;
|
||||
if (!resultStatuses.has(parsed)) throw new Error("Game Client Bridge result status is invalid");
|
||||
|
||||
Reference in New Issue
Block a user