Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions functions/definition/project/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ FbEnumProjectType:
value: 3
- label: 'COMPLETENESS'
value: 4
- label: 'STREET'
value: 7

FbProjectReadonlyType:
model: alias
Expand Down
35 changes: 35 additions & 0 deletions functions/definition/project/project_types/street.yaml
Original file line number Diff line number Diff line change
@@ -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
34 changes: 34 additions & 0 deletions functions/definition/tutorial/street.yaml
Original file line number Diff line number Diff line change
@@ -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
Comment on lines +4 to +34
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a NOTE that this is not finalized.

78 changes: 78 additions & 0 deletions functions/generated/pyfirebase/pyfirebase_mapswipe/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ class FbEnumProjectType(enum.Enum):
VALIDATE_IMAGE = 10
COMPARE = 3
COMPLETENESS = 4
STREET = 7


class FbProjectReadonlyType(TypesyncModel):
Expand Down Expand Up @@ -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"""

Expand Down Expand Up @@ -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"""

Expand Down