<think>
Okay, I need to implement the functions flip_one and flip_all according to the given interface. Let me start by understanding the problem.

The function flip_one takes a pair (which is a list with two elements) and returns a new list where the two elements are swapped. So, if the input is [a, b], the output should be [b, a]. But wait, the problem says that a pair holds other than two members. Wait, the original task says that flip_one returns a pair with its two members the other way round. So, the input is a pair, which is a list with exactly two elements. So, the function is supposed to swap those two elements.

So, for flip_one, the input is a list of two elements. The output is a new list with those two elements reversed. So, for example, flip_one([1, 2]) should return [2, 1]. But what if the input is not a list with exactly two elements? The problem says that the function is supposed to handle pairs, so maybe the input is always a valid pair. However, the contract says that the function should raise a ValueError for invalid arguments. So, if the input is not a list with exactly two elements, we need to raise an error.

So, in the function flip_one, first check if the input is a list with exactly two elements. If not, raise ValueError. Then, return a new list with the two elements swapped.

Now, for flip_all, the function takes a list of pairs (each pair is a list of two elements) and returns a new list where each pair is flipped. The order of the pairs should be preserved, and the original list should not be modified. So, flip_all should create a new list where each element is the result of applying flip_one to the corresponding pair in the input list.

So, for each pair in the input list, apply flip_one to it, and collect all those flipped pairs into a new list. Also, the original list must not be modified. So, we need to create a new list, not modify the original.

So, the steps for flip_all are:

1. Iterate over each pair in the input list.
2. For each pair, apply flip_one to it.
3. Collect all the flipped pairs into a new list.
4. Return that new list.

Now, implementing these functions.

First, the flip_one function:

def flip_one(pair: list) -> list:
    if len(pair) != 2:
        raise ValueError("Input must be a pair with exactly two elements")
    return [pair[1], pair[0]]

Wait, but the input is a list. So, if the input is [a, b], then swapping gives [b, a]. So, the function returns a new list with the two elements swapped.

For flip_all:

def flip_all(pairs: list) -> list:
    return [[pair[1], pair[0]] for pair in pairs]

Wait, but again, we need to check that each pair in the input list is a valid pair (has exactly two elements). But according to the problem statement, the function should raise ValueError for invalid arguments. So, in the flip_all function, we need to check that each pair in the input list is a valid pair.

Wait, the problem says that flip_all does that to every pair in a list, keeping the pairs in the order they came and leaving the list it was given untouched. So, the input list is a list of pairs, each of which is a list with exactly two elements. So, in the flip_all function, we need to check that each pair in the input list is a valid pair. Otherwise, raise ValueError.

But how