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
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# 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:
Expand All @@ -10,9 +9,6 @@ FbStreetTutorial:
type:
type: literal
value: 7
zoomLevel:
type: int
deprecated: true
customOptions:
optional: true
type:
Expand All @@ -24,6 +20,10 @@ FbStreetTutorialTask:
type:
type: object
fields:
projectId:
type: string
groupId:
type: int
taskId:
type: string
geometry: # NOTE: geometry as WKT
Expand Down
63 changes: 32 additions & 31 deletions functions/generated/pyfirebase/pyfirebase_mapswipe/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -925,6 +925,38 @@ def __setattr__(self, name: str, value: typing.Any) -> None:
super().__setattr__(name, value)


class FbStreetTutorial(TypesyncModel):
projectType: typing.Literal[7]
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):
projectId: str
groupId: int
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 FbTileMapServiceTutorialGroup(TypesyncModel):
xMax: int
xMin: int
Expand Down Expand Up @@ -1056,37 +1088,6 @@ 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