Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

protos api

svcfmtm edited this page Dec 13, 2023 · 1 revision

Protocol Documentation

Table of Contents

Top

services.proto

notification

Field Type Label Description
note Notification

tmrequest

Field Type Label Description
cmd Command
id int64
name string

tmresponse

Field Type Label Description
error_code int32
error_msg string
data tmresponse.DataEntry repeated message Data { map<string, string> pairs = 3; } repeated Data data = 4;

tmresponse.DataEntry

Field Type Label Description
key string
value string

TMAdmin

The greeting service definition.

Method Name Request Type Response Type Description
doRequest tmrequest tmresponse These are for handling tmrequest for profile data from the database
doNotification notification tmresponse
updateUserProfile users users
updateProjectProfile projects projects
updateTeamProfile teams teams
updateTask tasks tasks
updateOrganizationProfile organizations organizations

Top

types_tm.proto

Bannertype

Name Number Description
INFO 0
WARNING 1

Command

Name Number Description
GET_USER 0
GET_ORG 1
GET_PROJECT 2
GET_TEAM 3

Editors

Name Number Description
ID 0
JOSM 1
POTLATCH_2 2
FIELD_PAPERS 3
CUSTOM 4
RAPID 5

Encouragingemailtype

Name Number Description
PROJECT_PROGRESS 0
PROJECT_COMPLETE 1
BEEN_SOME_TIME 2

Mappinglevel

Name Number Description
BEGINNER 0
INTERMEDIATE 1
ADVANCED 2

Mappingnotallowed

Name Number Description
USER_ALREADY_HAS_TASK_LOCKED 0
USER_NOT_CORRECT_MAPPING_LEVEL 1
USER_NOT_ACCEPTED_LICENSE 2
USER_NOT_ALLOWED 3
PROJECT_NOT_PUBLISHED 4
USER_NOT_TEAM_MEMBER 5
PROJECT_HAS_NO_OSM_TEAM 6
NOT_A_MAPPING_TEAM 7

Mappingtypes

Name Number Description
ROADS 0
BUILDINGS 1
WATERWAYS 2
LAND_USE 3
OTHER 4

Notification

Name Number Description
BAD_DATA 0
BLOCKED_USER 1
PROJECT_FINISHED 2

Organizationtype

Name Number Description
FREE 0
DISCOUNTED 1
FULL_FEE 2

Permissions

Name Number Description
ANY_PERMISSIONS 0
LEVEL 1
TEAMS 2
TEAMS_LEVEL 3

Projectdifficulty

Name Number Description
EASY 0
MODERATE 1
CHALLENGING 2

Projectpriority

Name Number Description
URGENT 0
HIGH 1
MEDIUM 2
LOW 3

Projectstatus

Name Number Description
ARCHIVED 0
PUBLISHED 1
DRAFT 2

Taskaction

Name Number Description
RELEASED_FOR_MAPPING 0
LOCKED_FOR_MAPPING 1
MARKED_MAPPED 2
LOCKED_FOR_VALIDATION 3
VALIDATED 4
MARKED_INVALID 5
MARKED_BAD 6
SPLIT_NEEDED 7
RECREATED 8
COMMENT 9

Taskcreationmode

Name Number Description
GRID 0
CREATE_ROADS 1
UPLOAD 2

Taskstatus

Name Number Description
READY 0
TASK_LOCKED_FOR_MAPPING 1
TASK_STATUS_MAPPED 2
TASK_LOCKED_FOR_VALIDATION 3
TASK_VALIDATED 4
TASK_INVALIDATED 5
BAD 6
SPLIT 7
TASK_ARCHIVED 8

Teamjoinmethod

Name Number Description
ANY_METHOD 0
BY_REQUEST 1
BY_INVITE 2

Teammemberfunctions

Name Number Description
MANAGER 0
MEMBER 1

Teamroles

Name Number Description
TEAM_READ_ONLY 0
TEAM_MAPPER 1
VALIDATOR 2
PROJECT_MANAGER 3

Teamvisibility

Name Number Description
PUBLIC 0
PRIVATE 1

Usergender

Name Number Description
MALE 0
FEMALE 1
SELF_DESCRIBE 2
PREFER_NOT 3

Userrole

Name Number Description
USER_READ_ONLY 0
USER_MAPPER 1
ADMIN 2

Validatingnotallowed

Name Number Description
USER_NOT_VALIDATOR 0
USER_LICENSE_NOT_ACCEPTED 1
USER_NOT_ON_ALLOWED_LIST 2
PROJECT_NOT_YET_PUBLISHED 3
USER_IS_BEGINNER 4
NOT_A_VALIDATION_TEAM 5
USER_NOT_IN_TEAM 6
PROJECT_HAS_NO_TEAM 7
USER_ALREADY_LOCKED_TASK 8

Top

organizations/organizations.proto

organizations

Field Type Label Description
id int64
name string
slug string
logo string
description string
url string
orgtype Organizationtype

Top

projects/projects.proto

projects

Field Type Label Description
id int64
odkid int64
author_id int64
created google.protobuf.Timestamp
project_name_prefix string
task_type_prefix string
location_str string
outline bytes
status Projectstatus
private bool
mapper_level Mappinglevel
priority Projectpriority
centroid bytes
hashtags string repeated

Top

tasks/tasks.proto

tasks

Field Type Label Description
id int64
project_task_name string
outline bytes
geometry_geojson string

Top

teams/teams.proto

teams

Field Type Label Description
id int64
name string
logo string
description string
invite_only bool
visibility Teamvisibility

Top

users/users.proto

users

Field Type Label Description
id int64
username string
name string
city string
country string
tasks_mapped int32
tasks_invalidated int32
projects_mapped int32 repeated
date_registered google.protobuf.Timestamp
last_validation_date google.protobuf.Timestamp
password string
osm_id int64
facebook_id int64
irc_id int64
skype_id int64
slack_id int64
linkedin_id int64
twitter_id int64
picture_url string
gender int32

Scalar Value Types

.proto Type Notes C++ Java Python Go C# PHP Ruby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)