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
25 changes: 25 additions & 0 deletions functions/definition/tutorial/project_types/locate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/toggle-corp/typesync/refs/tags/v1.0.0/schema.local.json

FbLocateTutorial:
model: alias
type:
type: object
fields:
projectType:
type:
type: literal
value: 9
tileServer:
type: FbObjRasterTileServer
subGridSize:
type: FBEnumSubGridSize
zoomLevel:
type: int
Comment thread
susilnem marked this conversation as resolved.

FbLocateTutorialTask:
model: alias
type:
type: object
fields:
url:
type: string
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ FbTileMapServiceTutorialTask:
type: string
referenceAnswer:
type: int
taskPartitionIndex:
type: int
optional: true
screen:
type: int
taskId:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,13 @@ class Config: # type: ignore[reportIncompatibleVariableOverride]
use_enum_values = True
frozen = True
extra = "forbid"


class FbLocateTutorialTaskComplete(
models.FbTileMapServiceTutorialTask,
models.FbLocateTutorialTask,
):
class Config: # type: ignore[reportIncompatibleVariableOverride]
use_enum_values = True
frozen = True
extra = "forbid"
30 changes: 30 additions & 0 deletions functions/generated/pyfirebase/pyfirebase_mapswipe/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,33 @@ def __setattr__(self, name: str, value: typing.Any) -> None:
super().__setattr__(name, value)


class FbLocateTutorial(TypesyncModel):
projectType: typing.Literal[9]
tileServer: FbObjRasterTileServer
subGridSize: FBEnumSubGridSize
zoomLevel: 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 FbLocateTutorialTask(TypesyncModel):
url: 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 FbStreetTutorial(TypesyncModel):
projectType: typing.Literal[7]
customOptions: list[FbObjCustomOption] | TypesyncUndefined | None = UNDEFINED
Expand Down Expand Up @@ -1020,6 +1047,7 @@ class FbTileMapServiceTutorialTask(TypesyncModel):
groupId: int
projectId: str
referenceAnswer: int
taskPartitionIndex: int | TypesyncUndefined | None = UNDEFINED
screen: int
taskId: str
taskId_real: str
Expand All @@ -1032,6 +1060,8 @@ class Config:

@typing.override
def __setattr__(self, name: str, value: typing.Any) -> None:
if name == "taskPartitionIndex" and value is None:
raise ValueError("'taskPartitionIndex' field cannot be set to None")
super().__setattr__(name, value)


Expand Down
Loading