Add: struct ws_object type

Re-submitted from #27
Please rename this to `type` or something.