Type Alias IndexedQuery<T, TType, TDepth>

IndexedQuery<T, TType, TDepth>: [TDepth] extends [never]
    ? never
    : {
        [K in keyof T[TType] | typeof INDEX_ID_KEY]?: ValueType<T[TType][K]> | (T[TType][K] extends `${typeof INDEX_ID_KEY}:${infer U}`
            ? IndexedQuery<T, U, Prev[TDepth]>
            : never)
    }

Object that represents a valid query starting from a specific type on an IndexedStorage. The keys of the object need to be one or more keys from the starting type, with the values being corresponding valid values of an object of that type. If the value definition of a key is one that contains the identifier of a different type, the value in the query can also be a nested object that has the same IndexedQuery requirements for that type. This can be done recursively.

E.g., if the storage has the following definition:

 {
account: {},
pod: { baseUrl: 'string', account: 'id:account' },
pod: { owner: 'string', pod: 'id:pod' },
}

A valid query on the pod type could be { pod: '123456' }, but also { pod: { baseUrl: 'http://example.com/pod/', account: { id: '789' }}}.

Type Parameters