added typing for some API structures