vtexpy 0.0.0b41__py3-none-any.whl → 0.0.0b43__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.
Potentially problematic release.
This version of vtexpy might be problematic. Click here for more details.
- vtex/_api/custom.py +4 -5
- vtex/_api/license_manager.py +3 -3
- vtex/_api/types/license_manager.py +1 -31
- {vtexpy-0.0.0b41.dist-info → vtexpy-0.0.0b43.dist-info}/METADATA +1 -1
- {vtexpy-0.0.0b41.dist-info → vtexpy-0.0.0b43.dist-info}/RECORD +7 -7
- {vtexpy-0.0.0b41.dist-info → vtexpy-0.0.0b43.dist-info}/WHEEL +1 -1
- {vtexpy-0.0.0b41.dist-info → vtexpy-0.0.0b43.dist-info}/licenses/LICENSE +0 -0
vtex/_api/custom.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from datetime import datetime
|
|
2
|
-
from typing import Any, List, Type, Union
|
|
2
|
+
from typing import Any, List, Type, Union, cast
|
|
3
3
|
|
|
4
4
|
from httpx._types import (
|
|
5
5
|
CookieTypes,
|
|
@@ -16,7 +16,6 @@ from .._types import HTTPMethodType
|
|
|
16
16
|
from .._utils import to_datetime
|
|
17
17
|
from .base import BaseAPI
|
|
18
18
|
from .types.catalog import Seller
|
|
19
|
-
from .types.license_manager import AccountSite
|
|
20
19
|
|
|
21
20
|
|
|
22
21
|
class CustomAPI(BaseAPI):
|
|
@@ -56,15 +55,15 @@ class CustomAPI(BaseAPI):
|
|
|
56
55
|
)
|
|
57
56
|
|
|
58
57
|
def get_account_name(self) -> str:
|
|
59
|
-
return self.client.license_manager.get_account().data["account_name"]
|
|
58
|
+
return cast(str, self.client.license_manager.get_account().data["account_name"])
|
|
60
59
|
|
|
61
60
|
def get_creation_date(self) -> datetime:
|
|
62
61
|
return to_datetime(
|
|
63
62
|
self.client.license_manager.get_account().data["creation_date"],
|
|
64
63
|
).replace(hour=0, minute=0, second=0, microsecond=0)
|
|
65
64
|
|
|
66
|
-
def list_sites(self) -> List[
|
|
67
|
-
return self.client.license_manager.get_account().data["sites"]
|
|
65
|
+
def list_sites(self) -> List[Any]:
|
|
66
|
+
return cast(list[Any], self.client.license_manager.get_account().data["sites"])
|
|
68
67
|
|
|
69
68
|
def get_main_seller(self) -> Seller:
|
|
70
69
|
for seller in self.client.catalog.list_sellers(seller_type=1).items:
|
vtex/_api/license_manager.py
CHANGED
|
@@ -12,7 +12,7 @@ from .._dto import VTEXDataResponse, VTEXItemsResponse, VTEXPaginatedItemsRespon
|
|
|
12
12
|
from .._sentinels import UNDEFINED, UndefinedSentinel
|
|
13
13
|
from .._types import OrderingDirectionType
|
|
14
14
|
from .base import BaseAPI
|
|
15
|
-
from .types.license_manager import
|
|
15
|
+
from .types.license_manager import ListRolesData, Role, UserRole
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
class LicenseManagerAPI(BaseAPI):
|
|
@@ -24,13 +24,13 @@ class LicenseManagerAPI(BaseAPI):
|
|
|
24
24
|
ENVIRONMENT = "vtexcommercestable"
|
|
25
25
|
|
|
26
26
|
@cached(TTLCache(maxsize=1024, ttl=HOUR))
|
|
27
|
-
def get_account(self, **kwargs: Any) -> VTEXDataResponse[
|
|
27
|
+
def get_account(self, **kwargs: Any) -> VTEXDataResponse[Any]:
|
|
28
28
|
return self._request(
|
|
29
29
|
method="GET",
|
|
30
30
|
endpoint="/api/vlm/account",
|
|
31
31
|
environment=self.ENVIRONMENT,
|
|
32
32
|
config=self.client.config.with_overrides(**kwargs),
|
|
33
|
-
response_class=VTEXDataResponse[
|
|
33
|
+
response_class=VTEXDataResponse[Any],
|
|
34
34
|
)
|
|
35
35
|
|
|
36
36
|
def get_user_roles(
|
|
@@ -1,39 +1,9 @@
|
|
|
1
|
-
from typing import List
|
|
1
|
+
from typing import List
|
|
2
2
|
|
|
3
3
|
from ..._types import TypedDict
|
|
4
4
|
from .generic import PagePagination
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
class AccountAppKey(TypedDict):
|
|
8
|
-
app_key: str
|
|
9
|
-
id: str
|
|
10
|
-
is_active: bool
|
|
11
|
-
is_blocked: bool
|
|
12
|
-
label: str
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class AccountSite(TypedDict):
|
|
16
|
-
name: str
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class GetAccountData(TypedDict):
|
|
20
|
-
account_name: str
|
|
21
|
-
app_keys: List[AccountAppKey]
|
|
22
|
-
company_name: str
|
|
23
|
-
creation_date: str
|
|
24
|
-
have_parent_account: bool
|
|
25
|
-
id: str
|
|
26
|
-
inactivation_date: Union[str, None]
|
|
27
|
-
is_active: bool
|
|
28
|
-
is_operating: bool
|
|
29
|
-
name: str
|
|
30
|
-
operation_date: Union[str, None]
|
|
31
|
-
parent_account_id: Union[str, None]
|
|
32
|
-
parent_account_name: Union[str, None]
|
|
33
|
-
sites: List[AccountSite]
|
|
34
|
-
trading_name: str
|
|
35
|
-
|
|
36
|
-
|
|
37
7
|
class UserRole(TypedDict):
|
|
38
8
|
id: int
|
|
39
9
|
name: str
|
|
@@ -13,8 +13,8 @@ vtex/_api/__init__.py,sha256=If5RrL74DVKisrllDNjMDrf-hGsgBe7uHu8xxXh1EnY,415
|
|
|
13
13
|
vtex/_api/base.py,sha256=Pjww58gnM31C7Oo0AC_TNOcqLM8mSmfk2kQfnVyaQnQ,7079
|
|
14
14
|
vtex/_api/catalog.py,sha256=vfUHWd6lbRyivszzgIIexJB-bt2mpBLZLfQZAJAcngg,4667
|
|
15
15
|
vtex/_api/checkout.py,sha256=ViFJq2GZRAA6yyjaFC3rz0oMYKxzBIsi8tzGKCWRxQ0,1693
|
|
16
|
-
vtex/_api/custom.py,sha256=
|
|
17
|
-
vtex/_api/license_manager.py,sha256=
|
|
16
|
+
vtex/_api/custom.py,sha256=gFdOUSrdn_Ag4bGo1u6Xea_1FyayRHzxnxVrYcNuQCc,2909
|
|
17
|
+
vtex/_api/license_manager.py,sha256=H5rgt2NbX6l2a8v0XbQ9SbEW5gDJBVcSeAxIt37NHv0,2767
|
|
18
18
|
vtex/_api/logistics.py,sha256=bd55wipbnql3OFnDCBsjP0-jp7OY6FP10Yz5acOsG2o,5052
|
|
19
19
|
vtex/_api/master_data.py,sha256=HGoWr908iQYb0kzq_KNvKyWKtaNQ9vTv7CXxvKey0AM,2046
|
|
20
20
|
vtex/_api/orders.py,sha256=XvT40L9_MDzzxGS45TOuqGLjk7HiPhUIp7aSs30GPmI,5161
|
|
@@ -25,8 +25,8 @@ vtex/_api/search.py,sha256=6PCe0lLqPgx8azk2zsV_D9kbmLF8OjQBD7giooADzAE,782
|
|
|
25
25
|
vtex/_api/types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
26
|
vtex/_api/types/catalog.py,sha256=O_qLoiGMyBxRdmxPclbbPobUxJSzViqzHiKf8tgfm_I,394
|
|
27
27
|
vtex/_api/types/generic.py,sha256=m1lFTPeyBNi-K0shvK4uxE5SUyvhTTX_5Ls2VockkdI,344
|
|
28
|
-
vtex/_api/types/license_manager.py,sha256=
|
|
29
|
-
vtexpy-0.0.
|
|
30
|
-
vtexpy-0.0.
|
|
31
|
-
vtexpy-0.0.
|
|
32
|
-
vtexpy-0.0.
|
|
28
|
+
vtex/_api/types/license_manager.py,sha256=YxEOv_l6kHlKdxrvOgcXa2gS9iQvZpfKxOe7ns9DFgk,398
|
|
29
|
+
vtexpy-0.0.0b43.dist-info/METADATA,sha256=RsYpmlN4NoPj7V-NDaksdg1Q-ftw84welJsAaBXDzEQ,3408
|
|
30
|
+
vtexpy-0.0.0b43.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
31
|
+
vtexpy-0.0.0b43.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
32
|
+
vtexpy-0.0.0b43.dist-info/RECORD,,
|
|
File without changes
|