getMyInvitations method
Implementation
Future<List<OrgInvitationModel>> getMyInvitations() async {
final response = await _client
.from('org_invitations')
.select(
'*, organizations(name), profiles!org_invitations_invited_by_profiles_fk(display_name, email, username)',
)
.eq('invited_user_id', _userId)
.eq('status', 'pending')
.order('created_at', ascending: false);
return (response as List<dynamic>)
.map((row) => OrgInvitationModel.fromJson(row as Map<String, dynamic>))
.toList();
}