Skip to content

Commit e0fcfd5

Browse files
committed
refactor: use typesync-cli from tc fork
- remove patch package and patches
1 parent 38ffc10 commit e0fcfd5

File tree

4 files changed

+48
-461
lines changed

4 files changed

+48
-461
lines changed

functions/generated/pyfirebase/pyfirebase_mapswipe/models.py

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class FbObjCustomOption(TypesyncModel):
158158
description: str
159159
icon: str
160160
iconColor: str
161-
subOptions: TypesyncUndefined | list[FbBaseObjCustomSubOption] = UNDEFINED
161+
subOptions: TypesyncUndefined | None | list[FbBaseObjCustomSubOption] = UNDEFINED
162162

163163
class Config:
164164
use_enum_values = True
@@ -173,8 +173,8 @@ def __setattr__(self, name: str, value: typing.Any) -> None:
173173
class FbObjRasterTileServer(TypesyncModel):
174174
"""Represents a raster tile server configuration"""
175175

176-
apiKey: TypesyncUndefined | str = UNDEFINED
177-
wmtsLayerName: TypesyncUndefined | str = UNDEFINED
176+
apiKey: TypesyncUndefined | None | str = UNDEFINED
177+
wmtsLayerName: TypesyncUndefined | None | str = UNDEFINED
178178
credits: str
179179
name: FbEnumRasterTileServerName
180180
url: str
@@ -249,8 +249,8 @@ class FbObjUnifiedOverlayTileServer(TypesyncModel):
249249
"""Represents an overlay layer"""
250250

251251
type: FbEnumOverlayTileServerType
252-
raster: TypesyncUndefined | FbObjRasterTileServerOverlay = UNDEFINED
253-
vector: TypesyncUndefined | FbObjVectorTileServerOverlay = UNDEFINED
252+
raster: TypesyncUndefined | None | FbObjRasterTileServerOverlay = UNDEFINED
253+
vector: TypesyncUndefined | None | FbObjVectorTileServerOverlay = UNDEFINED
254254

255255
class Config:
256256
use_enum_values = True
@@ -282,7 +282,7 @@ def __setattr__(self, name: str, value: typing.Any) -> None:
282282
class FbProjectUpdateInput(TypesyncModel):
283283
"""Represents project fields that are valid while updating a project"""
284284

285-
image: TypesyncUndefined | str = UNDEFINED
285+
image: TypesyncUndefined | None | str = UNDEFINED
286286
isFeatured: bool
287287
lookFor: str
288288
name: str
@@ -294,8 +294,8 @@ class FbProjectUpdateInput(TypesyncModel):
294294
requestingOrganisation: str
295295
tutorialId: str
296296
language: str
297-
manualUrl: TypesyncUndefined | str = UNDEFINED
298-
teamId: TypesyncUndefined | str = UNDEFINED
297+
manualUrl: TypesyncUndefined | None | str = UNDEFINED
298+
teamId: TypesyncUndefined | None | str = UNDEFINED
299299
status: FbEnumProjectStatus
300300

301301
class Config:
@@ -319,7 +319,7 @@ class FbProjectCreateOnlyInput(TypesyncModel):
319319
createdBy: str
320320
groupMaxSize: int
321321
groupSize: int
322-
maxTasksPerUser: TypesyncUndefined | int = UNDEFINED
322+
maxTasksPerUser: TypesyncUndefined | None | int = UNDEFINED
323323
projectId: str
324324
projectType: FbEnumProjectType
325325
requiredResults: int
@@ -383,11 +383,11 @@ def __setattr__(self, name: str, value: typing.Any) -> None:
383383
class FbProjectValidateCreateOnlyInput(TypesyncModel):
384384
"""Represents VALIDATE project fields that are valid while creating a project"""
385385

386-
customOptions: TypesyncUndefined | list[FbObjCustomOption] = UNDEFINED
386+
customOptions: TypesyncUndefined | None | list[FbObjCustomOption] = UNDEFINED
387387
tileServer: FbObjRasterTileServer
388388
inputType: FbEnumValidateInputType
389-
filter: TypesyncUndefined | str = UNDEFINED
390-
TMId: TypesyncUndefined | str = UNDEFINED
389+
filter: TypesyncUndefined | None | str = UNDEFINED
390+
TMId: TypesyncUndefined | None | str = UNDEFINED
391391

392392
class Config:
393393
use_enum_values = True
@@ -406,7 +406,7 @@ def __setattr__(self, name: str, value: typing.Any) -> None:
406406
class FbProjectValidateImageCreateOnlyInput(TypesyncModel):
407407
"""Represents VALIDATE_IMAGE project fields that are valid while creating a project"""
408408

409-
customOptions: TypesyncUndefined | list[FbObjCustomOption] = UNDEFINED
409+
customOptions: TypesyncUndefined | None | list[FbObjCustomOption] = UNDEFINED
410410

411411
class Config:
412412
use_enum_values = True
@@ -521,7 +521,7 @@ class FbMappingTaskValidateImageCreateOnlyInput(TypesyncModel):
521521
"""Represents VALIDATE_IMAGE mapping task fields that are valid while creating a task"""
522522

523523
taskId: str
524-
question: TypesyncUndefined | str = UNDEFINED
524+
question: TypesyncUndefined | None | str = UNDEFINED
525525

526526
class Config:
527527
use_enum_values = True
@@ -538,10 +538,10 @@ class FbMappingTaskCompareCreateOnlyInput(TypesyncModel):
538538

539539
groupId: str
540540
taskId: str
541-
taskX: TypesyncUndefined | int = UNDEFINED
542-
taskY: TypesyncUndefined | int = UNDEFINED
543-
url: TypesyncUndefined | str = UNDEFINED
544-
urlB: TypesyncUndefined | str = UNDEFINED
541+
taskX: TypesyncUndefined | None | int = UNDEFINED
542+
taskY: TypesyncUndefined | None | int = UNDEFINED
543+
url: TypesyncUndefined | None | str = UNDEFINED
544+
urlB: TypesyncUndefined | None | str = UNDEFINED
545545

546546
class Config:
547547
use_enum_values = True
@@ -563,11 +563,11 @@ class FbMappingResult(TypesyncModel):
563563
"""Represents a mapswipe project"""
564564

565565
appVersion: str
566-
clientType: TypesyncUndefined | str = UNDEFINED
566+
clientType: TypesyncUndefined | None | str = UNDEFINED
567567
endTime: datetime.datetime
568568
startTime: datetime.datetime
569569
results: dict[str, int]
570-
usergroups: TypesyncUndefined | dict[str, bool] = UNDEFINED
570+
usergroups: TypesyncUndefined | None | dict[str, bool] = UNDEFINED
571571

572572
class Config:
573573
use_enum_values = True
@@ -585,9 +585,9 @@ class FbOrganisation(TypesyncModel):
585585
"""Represents the requesting organisation."""
586586

587587
name: str
588-
description: TypesyncUndefined | str = UNDEFINED
588+
description: TypesyncUndefined | None | str = UNDEFINED
589589
nameKey: str
590-
abbreviation: TypesyncUndefined | str = UNDEFINED
590+
abbreviation: TypesyncUndefined | None | str = UNDEFINED
591591
isArchived: bool
592592

593593
class Config:
@@ -625,8 +625,8 @@ class FbEnumInformationPageBlockType(enum.Enum):
625625
class FbInformationPageBlock(TypesyncModel):
626626
blockNumber: int
627627
blockType: FbEnumInformationPageBlockType
628-
textDescription: TypesyncUndefined | str = UNDEFINED
629-
image: TypesyncUndefined | str = UNDEFINED
628+
textDescription: TypesyncUndefined | None | str = UNDEFINED
629+
image: TypesyncUndefined | None | str = UNDEFINED
630630

631631
class Config:
632632
use_enum_values = True
@@ -680,8 +680,8 @@ def __setattr__(self, name: str, value: typing.Any) -> None:
680680

681681

682682
class FbBaseTutorial(TypesyncModel):
683-
exampleImage1: TypesyncUndefined | str = UNDEFINED
684-
exampleImage2: TypesyncUndefined | str = UNDEFINED
683+
exampleImage1: TypesyncUndefined | None | str = UNDEFINED
684+
exampleImage2: TypesyncUndefined | None | str = UNDEFINED
685685
contributorCount: int
686686
informationPages: list[FbInformationPage]
687687
lookFor: str
@@ -876,7 +876,7 @@ class FbValidateTutorial(TypesyncModel):
876876
tileServer: FbObjRasterTileServer
877877
zoomLevel: int
878878
screens: list[FbScreen]
879-
customOptions: TypesyncUndefined | list[FbObjCustomOption] = UNDEFINED
879+
customOptions: TypesyncUndefined | None | list[FbObjCustomOption] = UNDEFINED
880880

881881
class Config:
882882
use_enum_values = True
@@ -926,8 +926,8 @@ class FbUserReadonlyType(TypesyncModel):
926926
userNameKey: str
927927
username: str
928928
usernameKey: str
929-
accessibility: TypesyncUndefined | bool = UNDEFINED
930-
userGroups: TypesyncUndefined | dict[str, typing.Any] = UNDEFINED
929+
accessibility: TypesyncUndefined | None | bool = UNDEFINED
930+
userGroups: TypesyncUndefined | None | dict[str, typing.Any] = UNDEFINED
931931

932932
class Config:
933933
use_enum_values = True
@@ -944,7 +944,7 @@ def __setattr__(self, name: str, value: typing.Any) -> None:
944944
class FbUserUpdateInput(TypesyncModel):
945945
"""Represents a user"""
946946

947-
teamId: TypesyncUndefined | str = UNDEFINED
947+
teamId: TypesyncUndefined | None | str = UNDEFINED
948948

949949
class Config:
950950
use_enum_values = True

functions/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"description": "Cloud Functions for Firebase",
44
"packageManager": "[email protected]",
55
"scripts": {
6-
"postinstall": "patch-package",
76
"lint": "eslint --ext .js,.ts .",
87
"build": "tsc",
98
"build:watch": "tsc --watch",
@@ -37,9 +36,7 @@
3736
"eslint-plugin-import": "^2.25.4",
3837
"eslint-plugin-promise": "^4.0.1",
3938
"firebase-functions-test": "^0.2.0",
40-
"patch-package": "^8.0.0",
41-
"typescript": "^4.5.4",
42-
"typesync-cli": "^0.13.0"
39+
"typesync-cli": "https://github.com/toggle-corp/typesync#1c7c517"
4340
},
4441
"engines": {
4542
"node": "22",

functions/patches/typesync-cli+0.13.0.patch

Lines changed: 0 additions & 176 deletions
This file was deleted.

0 commit comments

Comments
 (0)