scratchattach 3.0.0b0__py3-none-any.whl → 3.0.0b2__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.
Files changed (80) hide show
  1. scratchattach/cli/__about__.py +1 -0
  2. scratchattach/cli/__init__.py +26 -0
  3. scratchattach/cli/cmd/__init__.py +4 -0
  4. scratchattach/cli/cmd/group.py +127 -0
  5. scratchattach/cli/cmd/login.py +60 -0
  6. scratchattach/cli/cmd/profile.py +7 -0
  7. scratchattach/cli/cmd/sessions.py +5 -0
  8. scratchattach/cli/context.py +142 -0
  9. scratchattach/cli/db.py +66 -0
  10. scratchattach/cli/namespace.py +14 -0
  11. scratchattach/cloud/__init__.py +2 -0
  12. scratchattach/cloud/_base.py +483 -0
  13. scratchattach/cloud/cloud.py +183 -0
  14. scratchattach/editor/__init__.py +22 -0
  15. scratchattach/editor/asset.py +265 -0
  16. scratchattach/editor/backpack_json.py +115 -0
  17. scratchattach/editor/base.py +191 -0
  18. scratchattach/editor/block.py +584 -0
  19. scratchattach/editor/blockshape.py +357 -0
  20. scratchattach/editor/build_defaulting.py +51 -0
  21. scratchattach/editor/code_translation/__init__.py +0 -0
  22. scratchattach/editor/code_translation/parse.py +177 -0
  23. scratchattach/editor/comment.py +80 -0
  24. scratchattach/editor/commons.py +145 -0
  25. scratchattach/editor/extension.py +50 -0
  26. scratchattach/editor/field.py +99 -0
  27. scratchattach/editor/inputs.py +138 -0
  28. scratchattach/editor/meta.py +117 -0
  29. scratchattach/editor/monitor.py +185 -0
  30. scratchattach/editor/mutation.py +381 -0
  31. scratchattach/editor/pallete.py +88 -0
  32. scratchattach/editor/prim.py +174 -0
  33. scratchattach/editor/project.py +381 -0
  34. scratchattach/editor/sprite.py +609 -0
  35. scratchattach/editor/twconfig.py +114 -0
  36. scratchattach/editor/vlb.py +134 -0
  37. scratchattach/eventhandlers/__init__.py +0 -0
  38. scratchattach/eventhandlers/_base.py +101 -0
  39. scratchattach/eventhandlers/cloud_events.py +130 -0
  40. scratchattach/eventhandlers/cloud_recorder.py +26 -0
  41. scratchattach/eventhandlers/cloud_requests.py +544 -0
  42. scratchattach/eventhandlers/cloud_server.py +249 -0
  43. scratchattach/eventhandlers/cloud_storage.py +135 -0
  44. scratchattach/eventhandlers/combine.py +30 -0
  45. scratchattach/eventhandlers/filterbot.py +163 -0
  46. scratchattach/eventhandlers/message_events.py +42 -0
  47. scratchattach/other/__init__.py +0 -0
  48. scratchattach/other/other_apis.py +598 -0
  49. scratchattach/other/project_json_capabilities.py +475 -0
  50. scratchattach/site/__init__.py +0 -0
  51. scratchattach/site/_base.py +93 -0
  52. scratchattach/site/activity.py +426 -0
  53. scratchattach/site/alert.py +226 -0
  54. scratchattach/site/backpack_asset.py +119 -0
  55. scratchattach/site/browser_cookie3_stub.py +17 -0
  56. scratchattach/site/browser_cookies.py +61 -0
  57. scratchattach/site/classroom.py +454 -0
  58. scratchattach/site/cloud_activity.py +121 -0
  59. scratchattach/site/comment.py +228 -0
  60. scratchattach/site/forum.py +436 -0
  61. scratchattach/site/placeholder.py +132 -0
  62. scratchattach/site/project.py +932 -0
  63. scratchattach/site/session.py +1323 -0
  64. scratchattach/site/studio.py +704 -0
  65. scratchattach/site/typed_dicts.py +151 -0
  66. scratchattach/site/user.py +1252 -0
  67. scratchattach/utils/__init__.py +0 -0
  68. scratchattach/utils/commons.py +263 -0
  69. scratchattach/utils/encoder.py +161 -0
  70. scratchattach/utils/enums.py +237 -0
  71. scratchattach/utils/exceptions.py +277 -0
  72. scratchattach/utils/optional_async.py +154 -0
  73. scratchattach/utils/requests.py +306 -0
  74. {scratchattach-3.0.0b0.dist-info → scratchattach-3.0.0b2.dist-info}/METADATA +1 -1
  75. scratchattach-3.0.0b2.dist-info/RECORD +81 -0
  76. scratchattach-3.0.0b0.dist-info/RECORD +0 -8
  77. {scratchattach-3.0.0b0.dist-info → scratchattach-3.0.0b2.dist-info}/WHEEL +0 -0
  78. {scratchattach-3.0.0b0.dist-info → scratchattach-3.0.0b2.dist-info}/entry_points.txt +0 -0
  79. {scratchattach-3.0.0b0.dist-info → scratchattach-3.0.0b2.dist-info}/licenses/LICENSE +0 -0
  80. {scratchattach-3.0.0b0.dist-info → scratchattach-3.0.0b2.dist-info}/top_level.txt +0 -0
@@ -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]