scratchattach 3.0.0b0__py3-none-any.whl → 3.0.0b1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cli/__about__.py +1 -0
- cli/__init__.py +26 -0
- cli/cmd/__init__.py +4 -0
- cli/cmd/group.py +127 -0
- cli/cmd/login.py +60 -0
- cli/cmd/profile.py +7 -0
- cli/cmd/sessions.py +5 -0
- cli/context.py +142 -0
- cli/db.py +66 -0
- cli/namespace.py +14 -0
- cloud/__init__.py +2 -0
- cloud/_base.py +483 -0
- cloud/cloud.py +183 -0
- editor/__init__.py +22 -0
- editor/asset.py +265 -0
- editor/backpack_json.py +115 -0
- editor/base.py +191 -0
- editor/block.py +584 -0
- editor/blockshape.py +357 -0
- editor/build_defaulting.py +51 -0
- editor/code_translation/__init__.py +0 -0
- editor/code_translation/parse.py +177 -0
- editor/comment.py +80 -0
- editor/commons.py +145 -0
- editor/extension.py +50 -0
- editor/field.py +99 -0
- editor/inputs.py +138 -0
- editor/meta.py +117 -0
- editor/monitor.py +185 -0
- editor/mutation.py +381 -0
- editor/pallete.py +88 -0
- editor/prim.py +174 -0
- editor/project.py +381 -0
- editor/sprite.py +609 -0
- editor/twconfig.py +114 -0
- editor/vlb.py +134 -0
- eventhandlers/__init__.py +0 -0
- eventhandlers/_base.py +101 -0
- eventhandlers/cloud_events.py +130 -0
- eventhandlers/cloud_recorder.py +26 -0
- eventhandlers/cloud_requests.py +544 -0
- eventhandlers/cloud_server.py +249 -0
- eventhandlers/cloud_storage.py +135 -0
- eventhandlers/combine.py +30 -0
- eventhandlers/filterbot.py +163 -0
- eventhandlers/message_events.py +42 -0
- other/__init__.py +0 -0
- other/other_apis.py +598 -0
- other/project_json_capabilities.py +475 -0
- {scratchattach-3.0.0b0.dist-info → scratchattach-3.0.0b1.dist-info}/METADATA +1 -1
- scratchattach-3.0.0b1.dist-info/RECORD +79 -0
- scratchattach-3.0.0b1.dist-info/top_level.txt +7 -0
- site/__init__.py +0 -0
- site/_base.py +93 -0
- site/activity.py +426 -0
- site/alert.py +226 -0
- site/backpack_asset.py +119 -0
- site/browser_cookie3_stub.py +17 -0
- site/browser_cookies.py +61 -0
- site/classroom.py +454 -0
- site/cloud_activity.py +121 -0
- site/comment.py +228 -0
- site/forum.py +436 -0
- site/placeholder.py +132 -0
- site/project.py +932 -0
- site/session.py +1323 -0
- site/studio.py +704 -0
- site/typed_dicts.py +151 -0
- site/user.py +1252 -0
- utils/__init__.py +0 -0
- utils/commons.py +263 -0
- utils/encoder.py +161 -0
- utils/enums.py +237 -0
- utils/exceptions.py +277 -0
- utils/optional_async.py +154 -0
- utils/requests.py +306 -0
- scratchattach/__init__.py +0 -37
- scratchattach/__main__.py +0 -93
- scratchattach-3.0.0b0.dist-info/RECORD +0 -8
- scratchattach-3.0.0b0.dist-info/top_level.txt +0 -1
- {scratchattach-3.0.0b0.dist-info → scratchattach-3.0.0b1.dist-info}/WHEEL +0 -0
- {scratchattach-3.0.0b0.dist-info → scratchattach-3.0.0b1.dist-info}/entry_points.txt +0 -0
- {scratchattach-3.0.0b0.dist-info → scratchattach-3.0.0b1.dist-info}/licenses/LICENSE +0 -0
site/typed_dicts.py
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing_extensions import OrderedDict
|
|
4
|
+
|
|
5
|
+
from scratchattach.cloud import _base
|
|
6
|
+
from typing import TypedDict, Union, Optional, Required, NotRequired
|
|
7
|
+
|
|
8
|
+
class SessionUserDict(TypedDict):
|
|
9
|
+
id: int
|
|
10
|
+
banned: bool
|
|
11
|
+
should_vpn: bool
|
|
12
|
+
username: str
|
|
13
|
+
token: str
|
|
14
|
+
thumbnailUrl: str
|
|
15
|
+
dateJoined: str
|
|
16
|
+
email: str
|
|
17
|
+
birthYear: int
|
|
18
|
+
birthMonth: int
|
|
19
|
+
gender: str
|
|
20
|
+
|
|
21
|
+
class SessionOffenseDict(TypedDict):
|
|
22
|
+
expiresAt: float
|
|
23
|
+
messageType: str
|
|
24
|
+
createdAt: float
|
|
25
|
+
|
|
26
|
+
class SessionOffensesDict(TypedDict):
|
|
27
|
+
offenses: list[SessionOffenseDict]
|
|
28
|
+
showWarning: bool
|
|
29
|
+
muteExpiresAt: float
|
|
30
|
+
currentMessageType: str
|
|
31
|
+
|
|
32
|
+
class SessionPermissionsDict(TypedDict):
|
|
33
|
+
admin: bool
|
|
34
|
+
scratcher: bool
|
|
35
|
+
new_scratcher: bool
|
|
36
|
+
invited_scratcher: bool
|
|
37
|
+
social: bool
|
|
38
|
+
educator: bool
|
|
39
|
+
educator_invitee: bool
|
|
40
|
+
student: bool
|
|
41
|
+
mute_status: Union[dict, SessionOffensesDict]
|
|
42
|
+
|
|
43
|
+
class SessionFlagsDict(TypedDict):
|
|
44
|
+
must_reset_password: bool
|
|
45
|
+
must_complete_registration: bool
|
|
46
|
+
has_outstanding_email_confirmation: bool
|
|
47
|
+
show_welcome: bool
|
|
48
|
+
confirm_email_banner: bool
|
|
49
|
+
unsupported_browser_banner: bool
|
|
50
|
+
with_parent_email: bool
|
|
51
|
+
project_comments_enabled: bool
|
|
52
|
+
gallery_comments_enabled: bool
|
|
53
|
+
userprofile_comments_enabled: bool
|
|
54
|
+
everything_is_totally_normal: bool
|
|
55
|
+
|
|
56
|
+
class SessionDict(TypedDict):
|
|
57
|
+
user: SessionUserDict
|
|
58
|
+
permissions: SessionPermissionsDict
|
|
59
|
+
flags: SessionFlagsDict
|
|
60
|
+
|
|
61
|
+
class OcularUserMetaDict(TypedDict):
|
|
62
|
+
updated: str
|
|
63
|
+
updatedBy: str
|
|
64
|
+
|
|
65
|
+
class OcularUserDict(TypedDict):
|
|
66
|
+
_id: str
|
|
67
|
+
name: str
|
|
68
|
+
status: str
|
|
69
|
+
color: str
|
|
70
|
+
meta: OcularUserMetaDict
|
|
71
|
+
|
|
72
|
+
class UserHistoryDict(TypedDict):
|
|
73
|
+
joined: str
|
|
74
|
+
|
|
75
|
+
class UserProfileDict(TypedDict):
|
|
76
|
+
id: int
|
|
77
|
+
status: str
|
|
78
|
+
bio: str
|
|
79
|
+
country: str
|
|
80
|
+
images: dict[str, str]
|
|
81
|
+
membership_label: NotRequired[int]
|
|
82
|
+
membership_avatar_badge: NotRequired[int]
|
|
83
|
+
|
|
84
|
+
class UserDict(TypedDict):
|
|
85
|
+
id: NotRequired[int]
|
|
86
|
+
username: NotRequired[str]
|
|
87
|
+
scratchteam: NotRequired[bool]
|
|
88
|
+
history: NotRequired[UserHistoryDict]
|
|
89
|
+
profile: NotRequired[UserProfileDict]
|
|
90
|
+
|
|
91
|
+
class CloudLogActivityDict(TypedDict):
|
|
92
|
+
user: str
|
|
93
|
+
verb: str
|
|
94
|
+
name: str
|
|
95
|
+
value: Union[str, float, int]
|
|
96
|
+
timestamp: int
|
|
97
|
+
cloud: _base.AnyCloud
|
|
98
|
+
|
|
99
|
+
class CloudActivityDict(TypedDict):
|
|
100
|
+
method: str
|
|
101
|
+
name: str
|
|
102
|
+
value: Union[str, float, int]
|
|
103
|
+
project_id: int
|
|
104
|
+
cloud: _base.AnyCloud
|
|
105
|
+
|
|
106
|
+
class ClassroomDict(TypedDict):
|
|
107
|
+
id: int
|
|
108
|
+
title: str
|
|
109
|
+
description: str
|
|
110
|
+
status: str
|
|
111
|
+
date_start: NotRequired[str]
|
|
112
|
+
date_end: NotRequired[Optional[str]]
|
|
113
|
+
images: NotRequired[dict[str, str]]
|
|
114
|
+
educator: UserDict
|
|
115
|
+
is_closed: NotRequired[bool]
|
|
116
|
+
|
|
117
|
+
class StudioHistoryDict(TypedDict):
|
|
118
|
+
created: str
|
|
119
|
+
modified: str
|
|
120
|
+
|
|
121
|
+
class StudioStatsDict(TypedDict):
|
|
122
|
+
followers: int
|
|
123
|
+
managers: int
|
|
124
|
+
projects: int
|
|
125
|
+
|
|
126
|
+
class StudioDict(TypedDict):
|
|
127
|
+
id: int
|
|
128
|
+
title: str
|
|
129
|
+
description: str
|
|
130
|
+
host: int
|
|
131
|
+
open_to_all: bool
|
|
132
|
+
comments_allowed: bool
|
|
133
|
+
image: str
|
|
134
|
+
history: StudioHistoryDict
|
|
135
|
+
stats: NotRequired[StudioStatsDict]
|
|
136
|
+
|
|
137
|
+
class StudioRoleDict(TypedDict):
|
|
138
|
+
manager: bool
|
|
139
|
+
curator: bool
|
|
140
|
+
invited: bool
|
|
141
|
+
following: bool
|
|
142
|
+
|
|
143
|
+
class PlaceholderProjectDataMetadataDict(TypedDict):
|
|
144
|
+
title: str
|
|
145
|
+
description: str
|
|
146
|
+
|
|
147
|
+
# https://github.com/GarboMuffin/placeholder/blob/e1e98953342a40abbd626a111f621711f74e783b/src/routes/projects/%5Bproject%5D/%2Bpage.server.ts#L19
|
|
148
|
+
class PlaceholderProjectDataDict(TypedDict):
|
|
149
|
+
metadata: PlaceholderProjectDataMetadataDict
|
|
150
|
+
md5extsToSha256: OrderedDict[str, str]
|
|
151
|
+
adminOwnershipToken: Optional[str]
|