const rolePermissions = { creator: '*', owner: '*', guest: {}, editor: { smartSheet: true, xcDatatableEditable: true, column: true, tableAttachment: true, tableRowUpdate: true, dataInsert: true, rowComments: true, gridViewOptions: true, sortSync: true, fieldsSync: true, gridColUpdate: true, filterSync: true, csvImport: true, apiDocs: true, projectSettings: true, newUser: false, }, commenter: { smartSheet: true, column: true, rowComments: true, projectSettings: true, }, viewer: { smartSheet: true, column: true, projectSettings: true, }, user: { projectCreate: true, projectActions: true, projectSettings: true, }, } as const export default rolePermissions type GetKeys = T extends Record ? keyof T : never export type Permission = K extends | 'creator' | 'owner' ? T[K] : never | T[K] extends Record ? GetKeys : never