pixelarraythirdparty 1.1.0__py3-none-any.whl → 1.1.2__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.
- pixelarraythirdparty/__init__.py +1 -1
- pixelarraythirdparty/client.py +19 -0
- pixelarraythirdparty/cron/cron.py +62 -105
- pixelarraythirdparty/order/order.py +119 -199
- pixelarraythirdparty/product/product.py +84 -165
- pixelarraythirdparty/unified_login/__init__.py +2 -14
- pixelarraythirdparty/unified_login/unified_login.py +264 -12
- pixelarraythirdparty/user/user.py +72 -138
- {pixelarraythirdparty-1.1.0.dist-info → pixelarraythirdparty-1.1.2.dist-info}/METADATA +1 -1
- pixelarraythirdparty-1.1.2.dist-info/RECORD +17 -0
- pixelarraythirdparty-1.1.0.dist-info/RECORD +0 -17
- {pixelarraythirdparty-1.1.0.dist-info → pixelarraythirdparty-1.1.2.dist-info}/WHEEL +0 -0
- {pixelarraythirdparty-1.1.0.dist-info → pixelarraythirdparty-1.1.2.dist-info}/licenses/LICENSE +0 -0
- {pixelarraythirdparty-1.1.0.dist-info → pixelarraythirdparty-1.1.2.dist-info}/top_level.txt +0 -0
|
@@ -12,37 +12,20 @@ class UserManagerAsync(AsyncClient):
|
|
|
12
12
|
is_active: Optional[bool] = None,
|
|
13
13
|
):
|
|
14
14
|
"""
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
功能说明:
|
|
15
|
+
description:
|
|
18
16
|
分页查询用户列表,支持按角色和状态进行筛选。仅管理员可访问。
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
- id (int): 用户ID
|
|
32
|
-
- username (str): 用户名
|
|
33
|
-
- email (str): 邮箱地址
|
|
34
|
-
- role (str): 用户角色
|
|
35
|
-
- is_active (bool): 是否激活
|
|
36
|
-
- created_at (str): 用户创建时间
|
|
37
|
-
- last_login_at (str): 最后登录时间
|
|
38
|
-
- total (int): 总用户数量
|
|
39
|
-
- page (int): 当前页码
|
|
40
|
-
- page_size (int): 每页数量
|
|
41
|
-
success (bool): 操作是否成功
|
|
42
|
-
|
|
43
|
-
异常情况:
|
|
44
|
-
- 权限不足:返回错误信息"权限不足"
|
|
45
|
-
- 获取用户列表失败:返回错误信息"获取用户列表失败"
|
|
17
|
+
parameters:
|
|
18
|
+
page(int): 页码
|
|
19
|
+
page_size(int): 每页数量
|
|
20
|
+
role(str): 用户角色筛选,可选值:"admin"(管理员)、"user"(普通用户)
|
|
21
|
+
is_active(bool): 用户状态筛选,True为激活,False为禁用
|
|
22
|
+
return:
|
|
23
|
+
data(dict): 用户列表信息
|
|
24
|
+
- users(list): 用户列表
|
|
25
|
+
- total(int): 总用户数量
|
|
26
|
+
- page(int): 当前页码
|
|
27
|
+
- page_size(int): 每页数量
|
|
28
|
+
success(bool): 操作是否成功
|
|
46
29
|
"""
|
|
47
30
|
params = {"page": page, "page_size": page_size}
|
|
48
31
|
if role is not None:
|
|
@@ -56,34 +39,22 @@ class UserManagerAsync(AsyncClient):
|
|
|
56
39
|
|
|
57
40
|
async def create_user(self, username: str, password: str, email: str, role: str):
|
|
58
41
|
"""
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
功能说明:
|
|
42
|
+
description:
|
|
62
43
|
创建新的用户账户,仅管理员可访问。
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
|
|
77
|
-
- role (str): 用户角色
|
|
78
|
-
- is_active (bool): 是否激活,默认为True
|
|
79
|
-
- created_at (str): 用户创建时间
|
|
80
|
-
success (bool): 操作是否成功
|
|
81
|
-
|
|
82
|
-
异常情况:
|
|
83
|
-
- 权限不足:返回错误信息"权限不足"
|
|
84
|
-
- 用户名已存在:返回错误信息"用户名已存在"
|
|
85
|
-
- 邮箱已存在:返回错误信息"邮箱已存在"
|
|
86
|
-
- 用户创建失败:返回错误信息"用户创建失败"
|
|
44
|
+
parameters:
|
|
45
|
+
username(str): 用户名
|
|
46
|
+
password(str): 密码
|
|
47
|
+
email(str): 邮箱地址
|
|
48
|
+
role(str): 用户角色,可选值:"admin"(管理员)、"user"(普通用户)
|
|
49
|
+
return:
|
|
50
|
+
data(dict): 用户信息
|
|
51
|
+
- id(int): 用户ID
|
|
52
|
+
- username(str): 用户名
|
|
53
|
+
- email(str): 邮箱地址
|
|
54
|
+
- role(str): 用户角色
|
|
55
|
+
- is_active(bool): 是否激活,默认为True
|
|
56
|
+
- created_at(str): 用户创建时间
|
|
57
|
+
success(bool): 操作是否成功
|
|
87
58
|
"""
|
|
88
59
|
data = {
|
|
89
60
|
"username": username,
|
|
@@ -100,37 +71,27 @@ class UserManagerAsync(AsyncClient):
|
|
|
100
71
|
self, user_id: int, username: str, email: str, role: str, is_active: bool
|
|
101
72
|
):
|
|
102
73
|
"""
|
|
103
|
-
|
|
74
|
+
description:
|
|
75
|
+
更新指定用户的信息,包括用户名、邮箱、角色和状态。仅管理员可访问。
|
|
104
76
|
|
|
105
77
|
功能说明:
|
|
106
78
|
更新指定用户的信息,包括用户名、邮箱、角色和状态。仅管理员可访问。
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
|
|
123
|
-
- is_active (bool): 是否激活
|
|
124
|
-
- created_at (str): 用户创建时间
|
|
125
|
-
- updated_at (str): 用户信息更新时间
|
|
126
|
-
success (bool): 操作是否成功
|
|
127
|
-
|
|
128
|
-
异常情况:
|
|
129
|
-
- 权限不足:返回错误信息"权限不足"
|
|
130
|
-
- 用户不存在:返回错误信息"用户不存在"
|
|
131
|
-
- 用户名已存在:返回错误信息"用户名已存在"
|
|
132
|
-
- 邮箱已存在:返回错误信息"邮箱已存在"
|
|
133
|
-
- 用户信息更新失败:返回错误信息"用户信息更新失败"
|
|
79
|
+
parameters:
|
|
80
|
+
user_id(int): 用户ID
|
|
81
|
+
username(str): 用户名
|
|
82
|
+
email(str): 邮箱地址
|
|
83
|
+
role(str): 用户角色,可选值:"admin"(管理员)、"user"(普通用户)
|
|
84
|
+
is_active(bool): 是否激活
|
|
85
|
+
return:
|
|
86
|
+
data(dict): 更新后的用户信息
|
|
87
|
+
- id(int): 用户ID
|
|
88
|
+
- username(str): 用户名
|
|
89
|
+
- email(str): 邮箱地址
|
|
90
|
+
- role(str): 用户角色
|
|
91
|
+
- is_active(bool): 是否激活
|
|
92
|
+
- created_at(str): 用户创建时间
|
|
93
|
+
- updated_at(str): 用户信息更新时间
|
|
94
|
+
success(bool): 操作是否成功
|
|
134
95
|
"""
|
|
135
96
|
data = {
|
|
136
97
|
"username": username,
|
|
@@ -145,22 +106,13 @@ class UserManagerAsync(AsyncClient):
|
|
|
145
106
|
|
|
146
107
|
async def delete_user(self, user_id: int):
|
|
147
108
|
"""
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
功能说明:
|
|
109
|
+
description:
|
|
151
110
|
根据用户ID删除指定的用户记录。仅管理员可访问。
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
data (None): 删除成功时返回None
|
|
158
|
-
success (bool): 操作是否成功
|
|
159
|
-
|
|
160
|
-
异常情况:
|
|
161
|
-
- 权限不足:返回错误信息"权限不足"
|
|
162
|
-
- 用户不存在:返回错误信息"用户不存在"
|
|
163
|
-
- 删除用户失败:返回错误信息"删除用户失败"
|
|
111
|
+
parameters:
|
|
112
|
+
user_id(int): 用户ID
|
|
113
|
+
return:
|
|
114
|
+
data(None): 删除成功时返回None
|
|
115
|
+
success(bool): 操作是否成功
|
|
164
116
|
"""
|
|
165
117
|
data, success = await self._request("DELETE", f"/api/users/{user_id}")
|
|
166
118
|
if not success:
|
|
@@ -169,29 +121,20 @@ class UserManagerAsync(AsyncClient):
|
|
|
169
121
|
|
|
170
122
|
async def get_user_detail(self, user_id: int):
|
|
171
123
|
"""
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
功能说明:
|
|
124
|
+
description:
|
|
175
125
|
根据用户ID获取用户的详细信息。仅管理员可访问。
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
-
|
|
183
|
-
-
|
|
184
|
-
-
|
|
185
|
-
-
|
|
186
|
-
-
|
|
187
|
-
|
|
188
|
-
- last_login_at (str): 最后登录时间
|
|
189
|
-
success (bool): 操作是否成功
|
|
190
|
-
|
|
191
|
-
异常情况:
|
|
192
|
-
- 权限不足:返回错误信息"权限不足"
|
|
193
|
-
- 用户不存在:返回错误信息"用户不存在"
|
|
194
|
-
- 获取用户详情失败:返回错误信息"获取用户详情失败"
|
|
126
|
+
parameters:
|
|
127
|
+
user_id(int): 用户ID
|
|
128
|
+
return:
|
|
129
|
+
data(dict): 用户详细信息
|
|
130
|
+
- id(int): 用户ID
|
|
131
|
+
- username(str): 用户名
|
|
132
|
+
- email(str): 邮箱地址
|
|
133
|
+
- role(str): 用户角色
|
|
134
|
+
- is_active(bool): 是否激活
|
|
135
|
+
- created_at(str): 用户创建时间
|
|
136
|
+
- last_login_at(str): 最后登录时间
|
|
137
|
+
success(bool): 操作是否成功
|
|
195
138
|
"""
|
|
196
139
|
data, success = await self._request("GET", f"/api/users/{user_id}")
|
|
197
140
|
if not success:
|
|
@@ -200,23 +143,14 @@ class UserManagerAsync(AsyncClient):
|
|
|
200
143
|
|
|
201
144
|
async def reset_user_password(self, user_id: int, new_password: str):
|
|
202
145
|
"""
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
功能说明:
|
|
146
|
+
description:
|
|
206
147
|
重置指定用户的密码。仅管理员可访问。
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
data (None): 重置成功时返回None
|
|
214
|
-
success (bool): 操作是否成功
|
|
215
|
-
|
|
216
|
-
异常情况:
|
|
217
|
-
- 权限不足:返回错误信息"权限不足"
|
|
218
|
-
- 用户不存在:返回错误信息"用户不存在"
|
|
219
|
-
- 密码重置失败:返回错误信息"密码重置失败"
|
|
148
|
+
parameters:
|
|
149
|
+
user_id(int): 用户ID
|
|
150
|
+
new_password(str): 新密码
|
|
151
|
+
return:
|
|
152
|
+
data(None): 重置成功时返回None
|
|
153
|
+
success(bool): 操作是否成功
|
|
220
154
|
"""
|
|
221
155
|
data = {"new_password": new_password}
|
|
222
156
|
data, success = await self._request(
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
pixelarraythirdparty/__init__.py,sha256=6Gb-EBJU0w8cIVBjgIA6hIcCmeY_PMAEutBpNtmTcyI,490
|
|
2
|
+
pixelarraythirdparty/client.py,sha256=DY8w2DYsoGQ6cZYqT-FfoovmVd3Ry-aJbJls2Cxat8M,2006
|
|
3
|
+
pixelarraythirdparty/cron/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
pixelarraythirdparty/cron/cron.py,sha256=2oxnIJvRY0A-ynhKSHJvZmJLj1EWzYcqSIl8r9yh9a0,4402
|
|
5
|
+
pixelarraythirdparty/order/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
pixelarraythirdparty/order/order.py,sha256=rk9O73m5kOhjzavq3wIfN-JKj3cLwAItHVTJ21PiFh0,11333
|
|
7
|
+
pixelarraythirdparty/product/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
+
pixelarraythirdparty/product/product.py,sha256=5fgv2Ck860epYXxipY83vePziubCIlocFu43mGt_bhM,7497
|
|
9
|
+
pixelarraythirdparty/unified_login/__init__.py,sha256=2ejSpO0gp-J-XkT5p19V45FlYOW7-NO_aCExukfUTIo,123
|
|
10
|
+
pixelarraythirdparty/unified_login/unified_login.py,sha256=em5qBdAWPS4Fs4SO2oEOBF2XQlR5drlDK8NQ0RyKAnc,8032
|
|
11
|
+
pixelarraythirdparty/user/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
|
+
pixelarraythirdparty/user/user.py,sha256=v018iisB5AQNs7AtrHIGfu8YIorX0vflDClsKrt3ZMU,5898
|
|
13
|
+
pixelarraythirdparty-1.1.2.dist-info/licenses/LICENSE,sha256=O-g1dUr0U50rSIvmWE9toiVkSgFpVt72_MHITbWvAqA,1067
|
|
14
|
+
pixelarraythirdparty-1.1.2.dist-info/METADATA,sha256=7wSIsvbQQ8pQdVKqhxquRxfSg4IdxVcJ8zK5Qa2QpCw,993
|
|
15
|
+
pixelarraythirdparty-1.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
16
|
+
pixelarraythirdparty-1.1.2.dist-info/top_level.txt,sha256=dzG2Ut8j7noUqj_0ZQjcIDAeHYCh_9WtlxjAxtoyufo,21
|
|
17
|
+
pixelarraythirdparty-1.1.2.dist-info/RECORD,,
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
pixelarraythirdparty/__init__.py,sha256=78ji4zyF0ETARuxiv6ayfOY4Ae8tWxFMznipV0VR2kw,490
|
|
2
|
-
pixelarraythirdparty/client.py,sha256=hYLLzW8uhw6Qe0rLN1j0qx1HOUMSiclrr6nHjmzJwUw,1305
|
|
3
|
-
pixelarraythirdparty/cron/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
pixelarraythirdparty/cron/cron.py,sha256=2g2Js23X5fINmyq41H3wosDuCbUbHjKqFpBK9EqSEeY,5661
|
|
5
|
-
pixelarraythirdparty/order/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
pixelarraythirdparty/order/order.py,sha256=EamnHxiZqXxDVctb44T6fwWtJhTgLpzgGArxQRSvR14,14178
|
|
7
|
-
pixelarraythirdparty/product/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
-
pixelarraythirdparty/product/product.py,sha256=a6BFUnq0D-s8fVlWV3RKyCsBNE_5sqgwq5W5GmmRNto,10521
|
|
9
|
-
pixelarraythirdparty/unified_login/__init__.py,sha256=JRIBS9vwCXAJWzxTusb2Pt2f5m3u0braB9YeLYJpkEE,351
|
|
10
|
-
pixelarraythirdparty/unified_login/unified_login.py,sha256=OngSCSYL738JJaX9RaxaEq2ilGSkcc7gtbwXxq-0HV4,405
|
|
11
|
-
pixelarraythirdparty/user/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
|
-
pixelarraythirdparty/user/user.py,sha256=1Dna4-St7AnDZRbjVuOuI84ho5wcnL7Hr3sq8oXo3bo,8383
|
|
13
|
-
pixelarraythirdparty-1.1.0.dist-info/licenses/LICENSE,sha256=O-g1dUr0U50rSIvmWE9toiVkSgFpVt72_MHITbWvAqA,1067
|
|
14
|
-
pixelarraythirdparty-1.1.0.dist-info/METADATA,sha256=kV6Qc9Ie8ViUwvI8iF0bcEyLC0xMQGLFAnyQhTr56Uw,993
|
|
15
|
-
pixelarraythirdparty-1.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
16
|
-
pixelarraythirdparty-1.1.0.dist-info/top_level.txt,sha256=dzG2Ut8j7noUqj_0ZQjcIDAeHYCh_9WtlxjAxtoyufo,21
|
|
17
|
-
pixelarraythirdparty-1.1.0.dist-info/RECORD,,
|
|
File without changes
|
{pixelarraythirdparty-1.1.0.dist-info → pixelarraythirdparty-1.1.2.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|