Skip to content

Commit f261606

Browse files
committed
Merge branch 'feature/street-project' into develop
2 parents dec49b7 + c3053f5 commit f261606

File tree

4 files changed

+149
-0
lines changed

4 files changed

+149
-0
lines changed

functions/definition/project/common.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ FbEnumProjectType:
3636
value: 3
3737
- label: 'COMPLETENESS'
3838
value: 4
39+
- label: 'STREET'
40+
value: 7
3941

4042
FbProjectReadonlyType:
4143
model: alias
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/toggle-corp/typesync/refs/tags/v1.0.0/schema.local.json
2+
3+
FbProjectStreetCreateOnlyInput:
4+
model: alias
5+
docs: Represents STREET project fields that are valid while creating a project
6+
type:
7+
type: object
8+
fields:
9+
customOptions:
10+
optional: true
11+
type:
12+
type: list
13+
elementType: FbObjCustomOption
14+
numberOfGroups:
15+
type: int
16+
17+
FbMappingGroupStreetCreateOnlyInput:
18+
model: alias
19+
docs: Represents STREET mapping group fields that are valid while creating a mapping group
20+
type:
21+
type: object
22+
fields:
23+
groupId:
24+
type: string
25+
26+
FbMappingTaskStreetCreateOnlyInput:
27+
model: alias
28+
docs: Represents STREET mapping task fields that are valid while creating a task
29+
type:
30+
type: object
31+
fields:
32+
taskId:
33+
type: string
34+
groupId:
35+
type: string
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/toggle-corp/typesync/refs/tags/v1.0.0/schema.local.json
2+
3+
# NOTE: This is not finalized
4+
FbStreetTutorial:
5+
model: alias
6+
type:
7+
type: object
8+
fields:
9+
projectType:
10+
type:
11+
type: literal
12+
value: 7
13+
zoomLevel:
14+
type: int
15+
deprecated: true
16+
customOptions:
17+
optional: true
18+
type:
19+
type: list
20+
elementType: FbObjCustomOption
21+
22+
FbStreetTutorialTask:
23+
model: alias
24+
type:
25+
type: object
26+
fields:
27+
taskId:
28+
type: string
29+
geometry: # NOTE: geometry as WKT
30+
type: string
31+
referenceAnswer:
32+
type: int
33+
screen:
34+
type: int

functions/generated/pyfirebase/pyfirebase_mapswipe/models.py

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ class FbEnumProjectType(enum.Enum):
120120
VALIDATE_IMAGE = 10
121121
COMPARE = 3
122122
COMPLETENESS = 4
123+
STREET = 7
123124

124125

125126
class FbProjectReadonlyType(TypesyncModel):
@@ -339,6 +340,52 @@ class FbEnumOverlayTileServerType(enum.Enum):
339340
VECTOR = "vector"
340341

341342

343+
class FbProjectStreetCreateOnlyInput(TypesyncModel):
344+
"""Represents STREET project fields that are valid while creating a project"""
345+
346+
customOptions: list[FbObjCustomOption] | TypesyncUndefined | None = UNDEFINED
347+
numberOfGroups: int
348+
349+
class Config:
350+
use_enum_values = False
351+
extra = "forbid"
352+
353+
@typing.override
354+
def __setattr__(self, name: str, value: typing.Any) -> None:
355+
if name == "customOptions" and value is None:
356+
raise ValueError("'customOptions' field cannot be set to None")
357+
super().__setattr__(name, value)
358+
359+
360+
class FbMappingGroupStreetCreateOnlyInput(TypesyncModel):
361+
"""Represents STREET mapping group fields that are valid while creating a mapping group"""
362+
363+
groupId: str
364+
365+
class Config:
366+
use_enum_values = False
367+
extra = "forbid"
368+
369+
@typing.override
370+
def __setattr__(self, name: str, value: typing.Any) -> None:
371+
super().__setattr__(name, value)
372+
373+
374+
class FbMappingTaskStreetCreateOnlyInput(TypesyncModel):
375+
"""Represents STREET mapping task fields that are valid while creating a task"""
376+
377+
taskId: str
378+
groupId: str
379+
380+
class Config:
381+
use_enum_values = False
382+
extra = "forbid"
383+
384+
@typing.override
385+
def __setattr__(self, name: str, value: typing.Any) -> None:
386+
super().__setattr__(name, value)
387+
388+
342389
class FbMappingGroupTileMapServiceCreateOnlyInput(TypesyncModel):
343390
"""Represents TILE_MAP_SERVICE mapping group fields that are valid while creating a mapping group"""
344391

@@ -1008,6 +1055,37 @@ def __setattr__(self, name: str, value: typing.Any) -> None:
10081055
super().__setattr__(name, value)
10091056

10101057

1058+
class FbStreetTutorial(TypesyncModel):
1059+
projectType: typing.Literal[7]
1060+
zoomLevel: typing.Annotated[int, pydantic.Field(deprecated=True)]
1061+
customOptions: list[FbObjCustomOption] | TypesyncUndefined | None = UNDEFINED
1062+
1063+
class Config:
1064+
use_enum_values = False
1065+
extra = "forbid"
1066+
1067+
@typing.override
1068+
def __setattr__(self, name: str, value: typing.Any) -> None:
1069+
if name == "customOptions" and value is None:
1070+
raise ValueError("'customOptions' field cannot be set to None")
1071+
super().__setattr__(name, value)
1072+
1073+
1074+
class FbStreetTutorialTask(TypesyncModel):
1075+
taskId: str
1076+
geometry: str
1077+
referenceAnswer: int
1078+
screen: int
1079+
1080+
class Config:
1081+
use_enum_values = False
1082+
extra = "forbid"
1083+
1084+
@typing.override
1085+
def __setattr__(self, name: str, value: typing.Any) -> None:
1086+
super().__setattr__(name, value)
1087+
1088+
10111089
class FbUserReadonlyType(TypesyncModel):
10121090
"""Represents user fields that cannot be updated from backend"""
10131091

0 commit comments

Comments
 (0)