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

FbObjImageProvider:
model: alias
docs: Represents an street level image provider for a project
type:
type: object
fields:
name:
type: string
url:
type: string
optional: true
5 changes: 4 additions & 1 deletion functions/definition/project/project_types/street.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ FbProjectStreetCreateOnlyInput:
type:
type: list
elementType: FbObjCustomOption
imageProvider:
optional: true
type: FbObjImageProvider
numberOfGroups:
type: int

Expand All @@ -30,6 +33,6 @@ FbMappingTaskStreetCreateOnlyInput:
type: object
fields:
taskId:
type: int
type: string
groupId:
type: string
3 changes: 3 additions & 0 deletions functions/definition/tutorial/project_types/street.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ FbStreetTutorial:
type:
type: list
elementType: FbObjCustomOption
imageProvider:
optional: true
type: FbObjImageProvider

FbStreetTutorialTask:
model: alias
Expand Down
25 changes: 24 additions & 1 deletion functions/generated/pyfirebase/pyfirebase_mapswipe/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,23 @@ def __setattr__(self, name: str, value: typing.Any) -> None:
super().__setattr__(name, value)


class FbObjImageProvider(TypesyncModel):
"""Represents an street level image provider for a project"""

name: str
url: str | TypesyncUndefined | None = UNDEFINED

class Config:
use_enum_values = False
extra = "forbid"

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


class FbMappingTaskCompareCreateOnlyInput(TypesyncModel):
"""Represents COMPARE mapping task fields that are valid while creating a task"""

Expand Down Expand Up @@ -360,6 +377,7 @@ class FbProjectStreetCreateOnlyInput(TypesyncModel):
"""Represents STREET project fields that are valid while creating a project"""

customOptions: list[FbObjCustomOption] | TypesyncUndefined | None = UNDEFINED
imageProvider: FbObjImageProvider | TypesyncUndefined | None = UNDEFINED
numberOfGroups: int

class Config:
Expand All @@ -370,6 +388,8 @@ class Config:
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")
if name == "imageProvider" and value is None:
raise ValueError("'imageProvider' field cannot be set to None")
super().__setattr__(name, value)


Expand All @@ -390,7 +410,7 @@ def __setattr__(self, name: str, value: typing.Any) -> None:
class FbMappingTaskStreetCreateOnlyInput(TypesyncModel):
"""Represents STREET mapping task fields that are valid while creating a task"""

taskId: int
taskId: str
groupId: str

class Config:
Expand Down Expand Up @@ -943,6 +963,7 @@ def __setattr__(self, name: str, value: typing.Any) -> None:
class FbStreetTutorial(TypesyncModel):
projectType: typing.Literal[7]
customOptions: list[FbObjCustomOption] | TypesyncUndefined | None = UNDEFINED
imageProvider: FbObjImageProvider | TypesyncUndefined | None = UNDEFINED

class Config:
use_enum_values = False
Expand All @@ -952,6 +973,8 @@ class Config:
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")
if name == "imageProvider" and value is None:
raise ValueError("'imageProvider' field cannot be set to None")
super().__setattr__(name, value)


Expand Down
Loading