I want to have some sort of runtime validation for my use of indexes. I can do a describe table but I think arc/functions might be an interesting place to do the discovery like it does for tables.
The index name and fields would be nice.
const tables = await arc.tables()
const tableName = tables.name('users')
const indexes = tables.indexes('users)
// { "email-index": { hash: 'email', sort: 'createdAt' } }
I'm not sure I nailed the result object but it's close.