function toRuntimeProjectionRequest(input) {
    return {
        worldId: input.worldId,
        ...(input.agentId !== undefined ? { agentId: input.agentId } : {}),
        ...(input.releaseAnchor !== undefined ? { releaseAnchor: input.releaseAnchor } : {}),
        ...(input.contextEnvelope !== undefined ? { contextEnvelope: input.contextEnvelope } : {}),
    };
}
function toWorldRuntimeProjectionResult(value) {
    return {
        worldId: value.worldId,
        ...(value.agentId !== undefined ? { agentId: value.agentId } : {}),
        consumerSurface: value.consumerSurface,
        ...(value.releaseAnchor !== undefined ? { releaseAnchor: value.releaseAnchor } : {}),
        checksum: value.checksum,
        selectedInputs: value.selectedInputs,
        trace: value.trace,
        payload: value.payload,
    };
}
export async function projectWorldRuntimePayload(client, input) {
    const response = await client.realm.services.RuntimeProjectionsService.projectRuntimePayload(toRuntimeProjectionRequest(input));
    return toWorldRuntimeProjectionResult(response);
}
export const projection = {
    projectRuntimePayload: projectWorldRuntimePayload,
};
//# sourceMappingURL=projection.js.map