diff --git a/functions/definition/project/common.yaml b/functions/definition/project/common.yaml index 763026d..1f68822 100644 --- a/functions/definition/project/common.yaml +++ b/functions/definition/project/common.yaml @@ -36,6 +36,8 @@ FbEnumProjectType: value: 3 - label: 'COMPLETENESS' value: 4 + - label: 'STREET' + value: 7 FbProjectReadonlyType: model: alias diff --git a/functions/definition/project/project_types/street.yaml b/functions/definition/project/project_types/street.yaml new file mode 100644 index 0000000..374ede9 --- /dev/null +++ b/functions/definition/project/project_types/street.yaml @@ -0,0 +1,35 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/toggle-corp/typesync/refs/tags/v1.0.0/schema.local.json + +FbProjectStreetCreateOnlyInput: + model: alias + docs: Represents STREET project fields that are valid while creating a project + type: + type: object + fields: + customOptions: + optional: true + type: + type: list + elementType: FbObjCustomOption + numberOfGroups: + type: int + +FbMappingGroupStreetCreateOnlyInput: + model: alias + docs: Represents STREET mapping group fields that are valid while creating a mapping group + type: + type: object + fields: + groupId: + type: string + +FbMappingTaskStreetCreateOnlyInput: + model: alias + docs: Represents STREET mapping task fields that are valid while creating a task + type: + type: object + fields: + taskId: + type: string + groupId: + type: string diff --git a/functions/definition/tutorial/street.yaml b/functions/definition/tutorial/street.yaml new file mode 100644 index 0000000..7da8da3 --- /dev/null +++ b/functions/definition/tutorial/street.yaml @@ -0,0 +1,34 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/toggle-corp/typesync/refs/tags/v1.0.0/schema.local.json + +# NOTE: This is not finalized +FbStreetTutorial: + model: alias + type: + type: object + fields: + projectType: + type: + type: literal + value: 7 + zoomLevel: + type: int + deprecated: true + customOptions: + optional: true + type: + type: list + elementType: FbObjCustomOption + +FbStreetTutorialTask: + model: alias + type: + type: object + fields: + taskId: + type: string + geometry: # NOTE: geometry as WKT + type: string + referenceAnswer: + type: int + screen: + type: int diff --git a/functions/generated/pyfirebase/pyfirebase_mapswipe/models.py b/functions/generated/pyfirebase/pyfirebase_mapswipe/models.py index 6ff24b4..c81ab73 100644 --- a/functions/generated/pyfirebase/pyfirebase_mapswipe/models.py +++ b/functions/generated/pyfirebase/pyfirebase_mapswipe/models.py @@ -120,6 +120,7 @@ class FbEnumProjectType(enum.Enum): VALIDATE_IMAGE = 10 COMPARE = 3 COMPLETENESS = 4 + STREET = 7 class FbProjectReadonlyType(TypesyncModel): @@ -339,6 +340,52 @@ class FbEnumOverlayTileServerType(enum.Enum): VECTOR = "vector" +class FbProjectStreetCreateOnlyInput(TypesyncModel): + """Represents STREET project fields that are valid while creating a project""" + + customOptions: list[FbObjCustomOption] | TypesyncUndefined | None = UNDEFINED + numberOfGroups: int + + class Config: + use_enum_values = False + extra = "forbid" + + @typing.override + def __setattr__(self, name: str, value: typing.Any) -> None: + if name == "customOptions" and value is None: + raise ValueError("'customOptions' field cannot be set to None") + super().__setattr__(name, value) + + +class FbMappingGroupStreetCreateOnlyInput(TypesyncModel): + """Represents STREET mapping group fields that are valid while creating a mapping group""" + + groupId: str + + class Config: + use_enum_values = False + extra = "forbid" + + @typing.override + def __setattr__(self, name: str, value: typing.Any) -> None: + super().__setattr__(name, value) + + +class FbMappingTaskStreetCreateOnlyInput(TypesyncModel): + """Represents STREET mapping task fields that are valid while creating a task""" + + taskId: str + groupId: str + + class Config: + use_enum_values = False + extra = "forbid" + + @typing.override + def __setattr__(self, name: str, value: typing.Any) -> None: + super().__setattr__(name, value) + + class FbMappingGroupTileMapServiceCreateOnlyInput(TypesyncModel): """Represents TILE_MAP_SERVICE mapping group fields that are valid while creating a mapping group""" @@ -1008,6 +1055,37 @@ def __setattr__(self, name: str, value: typing.Any) -> None: super().__setattr__(name, value) +class FbStreetTutorial(TypesyncModel): + projectType: typing.Literal[7] + zoomLevel: typing.Annotated[int, pydantic.Field(deprecated=True)] + customOptions: list[FbObjCustomOption] | TypesyncUndefined | None = UNDEFINED + + class Config: + use_enum_values = False + extra = "forbid" + + @typing.override + def __setattr__(self, name: str, value: typing.Any) -> None: + if name == "customOptions" and value is None: + raise ValueError("'customOptions' field cannot be set to None") + super().__setattr__(name, value) + + +class FbStreetTutorialTask(TypesyncModel): + taskId: str + geometry: str + referenceAnswer: int + screen: int + + class Config: + use_enum_values = False + extra = "forbid" + + @typing.override + def __setattr__(self, name: str, value: typing.Any) -> None: + super().__setattr__(name, value) + + class FbUserReadonlyType(TypesyncModel): """Represents user fields that cannot be updated from backend"""