meshtrade 1.23.0__py3-none-any.whl → 1.24.0__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 meshtrade might be problematic. Click here for more details.
- meshtrade/compliance/client/v1/__init__.py +12 -0
- meshtrade/compliance/client/v1/service_meshpy.py +1 -0
- meshtrade/iam/api_user/v1/__init__.py +10 -4
- meshtrade/iam/api_user/v1/api_user_pb2.py +7 -7
- meshtrade/iam/api_user/v1/service_meshpy.py +13 -12
- meshtrade/iam/api_user/v1/service_pb2.py +31 -31
- meshtrade/iam/api_user/v1/service_pb2.pyi +10 -10
- meshtrade/iam/api_user/v1/service_pb2_grpc.py +22 -22
- meshtrade/iam/group/v1/service_meshpy.py +1 -0
- meshtrade/iam/role/v1/__init__.py +15 -1
- meshtrade/iam/role/v1/role.py +14 -14
- meshtrade/iam/user/v1/__init__.py +4 -2
- meshtrade/iam/user/v1/service_meshpy.py +24 -6
- meshtrade/iam/user/v1/service_pb2.py +37 -29
- meshtrade/iam/user/v1/service_pb2.pyi +13 -5
- meshtrade/iam/user/v1/service_pb2_grpc.py +60 -11
- meshtrade/iam/user/v1/user_pb2.py +3 -3
- meshtrade/ledger/transaction/v1/__init__.py +4 -0
- meshtrade/ledger/transaction/v1/service_meshpy.py +2 -1
- meshtrade/reporting/account_report/v1/__init__.py +4 -0
- meshtrade/reporting/account_report/v1/service_meshpy.py +1 -0
- meshtrade/trading/limit_order/v1/service_meshpy.py +1 -0
- meshtrade/trading/market_order/v1/service_meshpy.py +1 -0
- meshtrade/type/v1/__init__.py +81 -11
- meshtrade/wallet/account/v1/service_meshpy.py +1 -0
- {meshtrade-1.23.0.dist-info → meshtrade-1.24.0.dist-info}/METADATA +1 -1
- {meshtrade-1.23.0.dist-info → meshtrade-1.24.0.dist-info}/RECORD +29 -30
- meshtrade/iam/api_user/v1/service.py +0 -58
- {meshtrade-1.23.0.dist-info → meshtrade-1.24.0.dist-info}/WHEEL +0 -0
- {meshtrade-1.23.0.dist-info → meshtrade-1.24.0.dist-info}/top_level.txt +0 -0
|
@@ -9,6 +9,7 @@ the service interface with resource management capabilities, providing authentic
|
|
|
9
9
|
timeouts, and proper connection handling.
|
|
10
10
|
"""
|
|
11
11
|
|
|
12
|
+
from collections.abc import Iterator
|
|
12
13
|
from datetime import timedelta
|
|
13
14
|
from typing import Optional
|
|
14
15
|
|
|
@@ -18,11 +19,12 @@ from meshtrade.iam.api_user.v1.api_credentials import find_credentials
|
|
|
18
19
|
from .user_pb2 import User
|
|
19
20
|
from meshtrade.common.service_options import ServiceOptions
|
|
20
21
|
from .service_pb2 import (
|
|
21
|
-
|
|
22
|
+
AssignRolesToUserRequest,
|
|
22
23
|
CreateUserRequest,
|
|
23
24
|
GetUserRequest,
|
|
24
25
|
ListUsersRequest,
|
|
25
26
|
ListUsersResponse,
|
|
27
|
+
RevokeRolesFromUserRequest,
|
|
26
28
|
SearchUsersRequest,
|
|
27
29
|
SearchUsersResponse,
|
|
28
30
|
UpdateUserRequest,
|
|
@@ -136,21 +138,37 @@ class UserService(BaseGRPCClient):
|
|
|
136
138
|
tls=options.tls,
|
|
137
139
|
)
|
|
138
140
|
|
|
139
|
-
def
|
|
140
|
-
"""
|
|
141
|
+
def assign_roles_to_user(self, request: AssignRolesToUserRequest, timeout: Optional[timedelta] = None) -> User:
|
|
142
|
+
"""AssignRolesToUser method.
|
|
141
143
|
|
|
142
144
|
Args:
|
|
143
|
-
request: The
|
|
145
|
+
request: The AssignRolesToUser request message
|
|
144
146
|
timeout: Optional timeout override for this call
|
|
145
147
|
|
|
146
148
|
Returns:
|
|
147
|
-
The
|
|
149
|
+
The AssignRolesToUser response message
|
|
148
150
|
|
|
149
151
|
Raises:
|
|
150
152
|
grpc.RpcError: If the gRPC call fails
|
|
151
153
|
ValueError: If authentication credentials are missing
|
|
152
154
|
"""
|
|
153
|
-
return self._execute_method("
|
|
155
|
+
return self._execute_method("AssignRolesToUser", request, timeout)
|
|
156
|
+
|
|
157
|
+
def revoke_roles_from_user(self, request: RevokeRolesFromUserRequest, timeout: Optional[timedelta] = None) -> User:
|
|
158
|
+
"""RevokeRolesFromUser method.
|
|
159
|
+
|
|
160
|
+
Args:
|
|
161
|
+
request: The RevokeRolesFromUser request message
|
|
162
|
+
timeout: Optional timeout override for this call
|
|
163
|
+
|
|
164
|
+
Returns:
|
|
165
|
+
The RevokeRolesFromUser response message
|
|
166
|
+
|
|
167
|
+
Raises:
|
|
168
|
+
grpc.RpcError: If the gRPC call fails
|
|
169
|
+
ValueError: If authentication credentials are missing
|
|
170
|
+
"""
|
|
171
|
+
return self._execute_method("RevokeRolesFromUser", request, timeout)
|
|
154
172
|
|
|
155
173
|
def get_user(self, request: GetUserRequest, timeout: Optional[timedelta] = None) -> User:
|
|
156
174
|
"""GetUser method.
|
|
@@ -29,7 +29,7 @@ from meshtrade.option.v1 import method_type_pb2 as meshtrade_dot_option_dot_v1_d
|
|
|
29
29
|
from meshtrade.type.v1 import sorting_pb2 as meshtrade_dot_type_dot_v1_dot_sorting__pb2
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#meshtrade/iam/user/v1/service.proto\x12\x15meshtrade.iam.user.v1\x1a\x1b\x62uf/validate/validate.proto\x1a meshtrade/iam/role/v1/role.proto\x1a meshtrade/iam/user/v1/user.proto\x1a%meshtrade/option/v1/method_type.proto\x1a\x1fmeshtrade/type/v1/sorting.proto\"\
|
|
32
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#meshtrade/iam/user/v1/service.proto\x12\x15meshtrade.iam.user.v1\x1a\x1b\x62uf/validate/validate.proto\x1a meshtrade/iam/role/v1/role.proto\x1a meshtrade/iam/user/v1/user.proto\x1a%meshtrade/option/v1/method_type.proto\x1a\x1fmeshtrade/type/v1/sorting.proto\"\xdb\x01\n\x18\x41ssignRolesToUserRequest\x12O\n\x04name\x18\x01 \x01(\tB;\xbaH8r32.^users/[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}$\x98\x01 \xc8\x01\x01R\x04name\x12n\n\x05roles\x18\x02 \x03(\tBX\xbaHU\x92\x01O\"MrK\x10/\x18\x30\x32\x45^groups/[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}/roles/[1-9][0-9]{6,7}$\xc8\x01\x01R\x05roles\"\xdd\x01\n\x1aRevokeRolesFromUserRequest\x12O\n\x04name\x18\x01 \x01(\tB;\xbaH8r32.^users/[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}$\x98\x01 \xc8\x01\x01R\x04name\x12n\n\x05roles\x18\x02 \x03(\tBX\xbaHU\x92\x01O\"MrK\x10/\x18\x30\x32\x45^groups/[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}/roles/[1-9][0-9]{6,7}$\xc8\x01\x01R\x05roles\"a\n\x0eGetUserRequest\x12O\n\x04name\x18\x01 \x01(\tB;\xbaH8r32.^users/[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}$\x98\x01 \xc8\x01\x01R\x04name\"\x94\x02\n\x10ListUsersRequest\x12I\n\x07sorting\x18\x01 \x01(\x0b\x32/.meshtrade.iam.user.v1.ListUsersRequest.SortingR\x07sorting\x1a\xb4\x01\n\x07Sorting\x12r\n\x05\x66ield\x18\x01 \x01(\tB\\\xbaHYr\tR\x00R\x05\x65mail\xba\x01K\n\x0b\x66ield.valid\x12%field must be one of: email, or empty\x1a\x15this in [\'\', \'email\']R\x05\x66ield\x12\x35\n\x05order\x18\x02 \x01(\x0e\x32\x1f.meshtrade.type.v1.SortingOrderR\x05order\"F\n\x11ListUsersResponse\x12\x31\n\x05users\x18\x01 \x03(\x0b\x32\x1b.meshtrade.iam.user.v1.UserR\x05users\"\xae\x02\n\x12SearchUsersRequest\x12\x14\n\x05\x65mail\x18\x01 \x01(\tR\x05\x65mail\x12K\n\x07sorting\x18\x02 \x01(\x0b\x32\x31.meshtrade.iam.user.v1.SearchUsersRequest.SortingR\x07sorting\x1a\xb4\x01\n\x07Sorting\x12r\n\x05\x66ield\x18\x01 \x01(\tB\\\xbaHYr\tR\x00R\x05\x65mail\xba\x01K\n\x0b\x66ield.valid\x12%field must be one of: email, or empty\x1a\x15this in [\'\', \'email\']R\x05\x66ield\x12\x35\n\x05order\x18\x02 \x01(\x0e\x32\x1f.meshtrade.type.v1.SortingOrderR\x05order\"H\n\x13SearchUsersResponse\x12\x31\n\x05users\x18\x01 \x03(\x0b\x32\x1b.meshtrade.iam.user.v1.UserR\x05users\"L\n\x11\x43reateUserRequest\x12\x37\n\x04user\x18\x01 \x01(\x0b\x32\x1b.meshtrade.iam.user.v1.UserB\x06\xbaH\x03\xc8\x01\x01R\x04user\"L\n\x11UpdateUserRequest\x12\x37\n\x04user\x18\x01 \x01(\x0b\x32\x1b.meshtrade.iam.user.v1.UserB\x06\xbaH\x03\xc8\x01\x01R\x04user2\xbb\x06\n\x0bUserService\x12u\n\x11\x41ssignRolesToUser\x12/.meshtrade.iam.user.v1.AssignRolesToUserRequest\x1a\x1b.meshtrade.iam.user.v1.User\"\x12\xa0\xb5\x18\x02\xaa\xb5\x18\n\n\x08\xc0\x8d\xb7\x01\xc6\x8d\xb7\x01\x12y\n\x13RevokeRolesFromUser\x12\x31.meshtrade.iam.user.v1.RevokeRolesFromUserRequest\x1a\x1b.meshtrade.iam.user.v1.User\"\x12\xa0\xb5\x18\x02\xaa\xb5\x18\n\n\x08\xc0\x8d\xb7\x01\xc6\x8d\xb7\x01\x12i\n\x07GetUser\x12%.meshtrade.iam.user.v1.GetUserRequest\x1a\x1b.meshtrade.iam.user.v1.User\"\x1a\xa0\xb5\x18\x01\xaa\xb5\x18\x12\n\x10\xc0\x8d\xb7\x01\xc1\x8d\xb7\x01\xc6\x8d\xb7\x01\xc7\x8d\xb7\x01\x12z\n\tListUsers\x12\'.meshtrade.iam.user.v1.ListUsersRequest\x1a(.meshtrade.iam.user.v1.ListUsersResponse\"\x1a\xa0\xb5\x18\x01\xaa\xb5\x18\x12\n\x10\xc0\x8d\xb7\x01\xc1\x8d\xb7\x01\xc6\x8d\xb7\x01\xc7\x8d\xb7\x01\x12\x80\x01\n\x0bSearchUsers\x12).meshtrade.iam.user.v1.SearchUsersRequest\x1a*.meshtrade.iam.user.v1.SearchUsersResponse\"\x1a\xa0\xb5\x18\x01\xaa\xb5\x18\x12\n\x10\xc0\x8d\xb7\x01\xc1\x8d\xb7\x01\xc6\x8d\xb7\x01\xc7\x8d\xb7\x01\x12g\n\nCreateUser\x12(.meshtrade.iam.user.v1.CreateUserRequest\x1a\x1b.meshtrade.iam.user.v1.User\"\x12\xa0\xb5\x18\x02\xaa\xb5\x18\n\n\x08\xc0\x8d\xb7\x01\xc6\x8d\xb7\x01\x12g\n\nUpdateUser\x12(.meshtrade.iam.user.v1.UpdateUserRequest\x1a\x1b.meshtrade.iam.user.v1.User\"\x12\xa0\xb5\x18\x02\xaa\xb5\x18\n\n\x08\xc0\x8d\xb7\x01\xc6\x8d\xb7\x01\x42O\n\x1c\x63o.meshtrade.api.iam.user.v1Z/github.com/meshtrade/api/go/iam/user/v1;user_v1b\x06proto3')
|
|
33
33
|
|
|
34
34
|
_globals = globals()
|
|
35
35
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -37,10 +37,14 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtrade.iam.user.v1.servi
|
|
|
37
37
|
if not _descriptor._USE_C_DESCRIPTORS:
|
|
38
38
|
_globals['DESCRIPTOR']._loaded_options = None
|
|
39
39
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034co.meshtrade.api.iam.user.v1Z/github.com/meshtrade/api/go/iam/user/v1;user_v1'
|
|
40
|
-
_globals['
|
|
41
|
-
_globals['
|
|
42
|
-
_globals['
|
|
43
|
-
_globals['
|
|
40
|
+
_globals['_ASSIGNROLESTOUSERREQUEST'].fields_by_name['name']._loaded_options = None
|
|
41
|
+
_globals['_ASSIGNROLESTOUSERREQUEST'].fields_by_name['name']._serialized_options = b'\272H8r32.^users/[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}$\230\001 \310\001\001'
|
|
42
|
+
_globals['_ASSIGNROLESTOUSERREQUEST'].fields_by_name['roles']._loaded_options = None
|
|
43
|
+
_globals['_ASSIGNROLESTOUSERREQUEST'].fields_by_name['roles']._serialized_options = b'\272HU\222\001O\"MrK\020/\03002E^groups/[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}/roles/[1-9][0-9]{6,7}$\310\001\001'
|
|
44
|
+
_globals['_REVOKEROLESFROMUSERREQUEST'].fields_by_name['name']._loaded_options = None
|
|
45
|
+
_globals['_REVOKEROLESFROMUSERREQUEST'].fields_by_name['name']._serialized_options = b'\272H8r32.^users/[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}$\230\001 \310\001\001'
|
|
46
|
+
_globals['_REVOKEROLESFROMUSERREQUEST'].fields_by_name['roles']._loaded_options = None
|
|
47
|
+
_globals['_REVOKEROLESFROMUSERREQUEST'].fields_by_name['roles']._serialized_options = b'\272HU\222\001O\"MrK\020/\03002E^groups/[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}/roles/[1-9][0-9]{6,7}$\310\001\001'
|
|
44
48
|
_globals['_GETUSERREQUEST'].fields_by_name['name']._loaded_options = None
|
|
45
49
|
_globals['_GETUSERREQUEST'].fields_by_name['name']._serialized_options = b'\272H8r32.^users/[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}$\230\001 \310\001\001'
|
|
46
50
|
_globals['_LISTUSERSREQUEST_SORTING'].fields_by_name['field']._loaded_options = None
|
|
@@ -51,8 +55,10 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
51
55
|
_globals['_CREATEUSERREQUEST'].fields_by_name['user']._serialized_options = b'\272H\003\310\001\001'
|
|
52
56
|
_globals['_UPDATEUSERREQUEST'].fields_by_name['user']._loaded_options = None
|
|
53
57
|
_globals['_UPDATEUSERREQUEST'].fields_by_name['user']._serialized_options = b'\272H\003\310\001\001'
|
|
54
|
-
_globals['_USERSERVICE'].methods_by_name['
|
|
55
|
-
_globals['_USERSERVICE'].methods_by_name['
|
|
58
|
+
_globals['_USERSERVICE'].methods_by_name['AssignRolesToUser']._loaded_options = None
|
|
59
|
+
_globals['_USERSERVICE'].methods_by_name['AssignRolesToUser']._serialized_options = b'\240\265\030\002\252\265\030\n\n\010\300\215\267\001\306\215\267\001'
|
|
60
|
+
_globals['_USERSERVICE'].methods_by_name['RevokeRolesFromUser']._loaded_options = None
|
|
61
|
+
_globals['_USERSERVICE'].methods_by_name['RevokeRolesFromUser']._serialized_options = b'\240\265\030\002\252\265\030\n\n\010\300\215\267\001\306\215\267\001'
|
|
56
62
|
_globals['_USERSERVICE'].methods_by_name['GetUser']._loaded_options = None
|
|
57
63
|
_globals['_USERSERVICE'].methods_by_name['GetUser']._serialized_options = b'\240\265\030\001\252\265\030\022\n\020\300\215\267\001\301\215\267\001\306\215\267\001\307\215\267\001'
|
|
58
64
|
_globals['_USERSERVICE'].methods_by_name['ListUsers']._loaded_options = None
|
|
@@ -63,26 +69,28 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
63
69
|
_globals['_USERSERVICE'].methods_by_name['CreateUser']._serialized_options = b'\240\265\030\002\252\265\030\n\n\010\300\215\267\001\306\215\267\001'
|
|
64
70
|
_globals['_USERSERVICE'].methods_by_name['UpdateUser']._loaded_options = None
|
|
65
71
|
_globals['_USERSERVICE'].methods_by_name['UpdateUser']._serialized_options = b'\240\265\030\002\252\265\030\n\n\010\300\215\267\001\306\215\267\001'
|
|
66
|
-
_globals['
|
|
67
|
-
_globals['
|
|
68
|
-
_globals['
|
|
69
|
-
_globals['
|
|
70
|
-
_globals['
|
|
71
|
-
_globals['
|
|
72
|
-
_globals['
|
|
73
|
-
_globals['
|
|
74
|
-
_globals['
|
|
75
|
-
_globals['
|
|
76
|
-
_globals['
|
|
77
|
-
_globals['
|
|
78
|
-
_globals['
|
|
79
|
-
_globals['
|
|
80
|
-
_globals['
|
|
81
|
-
_globals['
|
|
82
|
-
_globals['
|
|
83
|
-
_globals['
|
|
84
|
-
_globals['
|
|
85
|
-
_globals['
|
|
86
|
-
_globals['
|
|
87
|
-
_globals['
|
|
72
|
+
_globals['_ASSIGNROLESTOUSERREQUEST']._serialized_start=232
|
|
73
|
+
_globals['_ASSIGNROLESTOUSERREQUEST']._serialized_end=451
|
|
74
|
+
_globals['_REVOKEROLESFROMUSERREQUEST']._serialized_start=454
|
|
75
|
+
_globals['_REVOKEROLESFROMUSERREQUEST']._serialized_end=675
|
|
76
|
+
_globals['_GETUSERREQUEST']._serialized_start=677
|
|
77
|
+
_globals['_GETUSERREQUEST']._serialized_end=774
|
|
78
|
+
_globals['_LISTUSERSREQUEST']._serialized_start=777
|
|
79
|
+
_globals['_LISTUSERSREQUEST']._serialized_end=1053
|
|
80
|
+
_globals['_LISTUSERSREQUEST_SORTING']._serialized_start=873
|
|
81
|
+
_globals['_LISTUSERSREQUEST_SORTING']._serialized_end=1053
|
|
82
|
+
_globals['_LISTUSERSRESPONSE']._serialized_start=1055
|
|
83
|
+
_globals['_LISTUSERSRESPONSE']._serialized_end=1125
|
|
84
|
+
_globals['_SEARCHUSERSREQUEST']._serialized_start=1128
|
|
85
|
+
_globals['_SEARCHUSERSREQUEST']._serialized_end=1430
|
|
86
|
+
_globals['_SEARCHUSERSREQUEST_SORTING']._serialized_start=873
|
|
87
|
+
_globals['_SEARCHUSERSREQUEST_SORTING']._serialized_end=1053
|
|
88
|
+
_globals['_SEARCHUSERSRESPONSE']._serialized_start=1432
|
|
89
|
+
_globals['_SEARCHUSERSRESPONSE']._serialized_end=1504
|
|
90
|
+
_globals['_CREATEUSERREQUEST']._serialized_start=1506
|
|
91
|
+
_globals['_CREATEUSERREQUEST']._serialized_end=1582
|
|
92
|
+
_globals['_UPDATEUSERREQUEST']._serialized_start=1584
|
|
93
|
+
_globals['_UPDATEUSERREQUEST']._serialized_end=1660
|
|
94
|
+
_globals['_USERSERVICE']._serialized_start=1663
|
|
95
|
+
_globals['_USERSERVICE']._serialized_end=2490
|
|
88
96
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -11,13 +11,21 @@ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
|
|
11
11
|
|
|
12
12
|
DESCRIPTOR: _descriptor.FileDescriptor
|
|
13
13
|
|
|
14
|
-
class
|
|
15
|
-
__slots__ = ("name", "
|
|
14
|
+
class AssignRolesToUserRequest(_message.Message):
|
|
15
|
+
__slots__ = ("name", "roles")
|
|
16
16
|
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
17
|
-
|
|
17
|
+
ROLES_FIELD_NUMBER: _ClassVar[int]
|
|
18
18
|
name: str
|
|
19
|
-
|
|
20
|
-
def __init__(self, name: _Optional[str] = ...,
|
|
19
|
+
roles: _containers.RepeatedScalarFieldContainer[str]
|
|
20
|
+
def __init__(self, name: _Optional[str] = ..., roles: _Optional[_Iterable[str]] = ...) -> None: ...
|
|
21
|
+
|
|
22
|
+
class RevokeRolesFromUserRequest(_message.Message):
|
|
23
|
+
__slots__ = ("name", "roles")
|
|
24
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
25
|
+
ROLES_FIELD_NUMBER: _ClassVar[int]
|
|
26
|
+
name: str
|
|
27
|
+
roles: _containers.RepeatedScalarFieldContainer[str]
|
|
28
|
+
def __init__(self, name: _Optional[str] = ..., roles: _Optional[_Iterable[str]] = ...) -> None: ...
|
|
21
29
|
|
|
22
30
|
class GetUserRequest(_message.Message):
|
|
23
31
|
__slots__ = ("name",)
|
|
@@ -25,9 +25,14 @@ class UserServiceStub(object):
|
|
|
25
25
|
Args:
|
|
26
26
|
channel: A grpc.Channel.
|
|
27
27
|
"""
|
|
28
|
-
self.
|
|
29
|
-
'/meshtrade.iam.user.v1.UserService/
|
|
30
|
-
request_serializer=meshtrade_dot_iam_dot_user_dot_v1_dot_service__pb2.
|
|
28
|
+
self.AssignRolesToUser = channel.unary_unary(
|
|
29
|
+
'/meshtrade.iam.user.v1.UserService/AssignRolesToUser',
|
|
30
|
+
request_serializer=meshtrade_dot_iam_dot_user_dot_v1_dot_service__pb2.AssignRolesToUserRequest.SerializeToString,
|
|
31
|
+
response_deserializer=meshtrade_dot_iam_dot_user_dot_v1_dot_user__pb2.User.FromString,
|
|
32
|
+
_registered_method=True)
|
|
33
|
+
self.RevokeRolesFromUser = channel.unary_unary(
|
|
34
|
+
'/meshtrade.iam.user.v1.UserService/RevokeRolesFromUser',
|
|
35
|
+
request_serializer=meshtrade_dot_iam_dot_user_dot_v1_dot_service__pb2.RevokeRolesFromUserRequest.SerializeToString,
|
|
31
36
|
response_deserializer=meshtrade_dot_iam_dot_user_dot_v1_dot_user__pb2.User.FromString,
|
|
32
37
|
_registered_method=True)
|
|
33
38
|
self.GetUser = channel.unary_unary(
|
|
@@ -70,9 +75,9 @@ class UserServiceServicer(object):
|
|
|
70
75
|
the authenticated group context.
|
|
71
76
|
"""
|
|
72
77
|
|
|
73
|
-
def
|
|
78
|
+
def AssignRolesToUser(self, request, context):
|
|
74
79
|
"""
|
|
75
|
-
|
|
80
|
+
Assign roles to an existing user within the authenticated group context.
|
|
76
81
|
|
|
77
82
|
The role assignment enables the user to perform operations according
|
|
78
83
|
to the permissions associated with that role within the group hierarchy.
|
|
@@ -81,6 +86,18 @@ class UserServiceServicer(object):
|
|
|
81
86
|
context.set_details('Method not implemented!')
|
|
82
87
|
raise NotImplementedError('Method not implemented!')
|
|
83
88
|
|
|
89
|
+
def RevokeRolesFromUser(self, request, context):
|
|
90
|
+
"""
|
|
91
|
+
Revoke roles from an existing user within the authenticated group context.
|
|
92
|
+
|
|
93
|
+
The role revocation removes the permissions associated with that role from
|
|
94
|
+
the user within the group hierarchy. The user will no longer be able
|
|
95
|
+
to perform operations that require the revoked role.
|
|
96
|
+
"""
|
|
97
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
98
|
+
context.set_details('Method not implemented!')
|
|
99
|
+
raise NotImplementedError('Method not implemented!')
|
|
100
|
+
|
|
84
101
|
def GetUser(self, request, context):
|
|
85
102
|
"""
|
|
86
103
|
Retrieves a single user by its unique identifier.
|
|
@@ -142,9 +159,14 @@ class UserServiceServicer(object):
|
|
|
142
159
|
|
|
143
160
|
def add_UserServiceServicer_to_server(servicer, server):
|
|
144
161
|
rpc_method_handlers = {
|
|
145
|
-
'
|
|
146
|
-
servicer.
|
|
147
|
-
request_deserializer=meshtrade_dot_iam_dot_user_dot_v1_dot_service__pb2.
|
|
162
|
+
'AssignRolesToUser': grpc.unary_unary_rpc_method_handler(
|
|
163
|
+
servicer.AssignRolesToUser,
|
|
164
|
+
request_deserializer=meshtrade_dot_iam_dot_user_dot_v1_dot_service__pb2.AssignRolesToUserRequest.FromString,
|
|
165
|
+
response_serializer=meshtrade_dot_iam_dot_user_dot_v1_dot_user__pb2.User.SerializeToString,
|
|
166
|
+
),
|
|
167
|
+
'RevokeRolesFromUser': grpc.unary_unary_rpc_method_handler(
|
|
168
|
+
servicer.RevokeRolesFromUser,
|
|
169
|
+
request_deserializer=meshtrade_dot_iam_dot_user_dot_v1_dot_service__pb2.RevokeRolesFromUserRequest.FromString,
|
|
148
170
|
response_serializer=meshtrade_dot_iam_dot_user_dot_v1_dot_user__pb2.User.SerializeToString,
|
|
149
171
|
),
|
|
150
172
|
'GetUser': grpc.unary_unary_rpc_method_handler(
|
|
@@ -194,7 +216,34 @@ class UserService(object):
|
|
|
194
216
|
"""
|
|
195
217
|
|
|
196
218
|
@staticmethod
|
|
197
|
-
def
|
|
219
|
+
def AssignRolesToUser(request,
|
|
220
|
+
target,
|
|
221
|
+
options=(),
|
|
222
|
+
channel_credentials=None,
|
|
223
|
+
call_credentials=None,
|
|
224
|
+
insecure=False,
|
|
225
|
+
compression=None,
|
|
226
|
+
wait_for_ready=None,
|
|
227
|
+
timeout=None,
|
|
228
|
+
metadata=None):
|
|
229
|
+
return grpc.experimental.unary_unary(
|
|
230
|
+
request,
|
|
231
|
+
target,
|
|
232
|
+
'/meshtrade.iam.user.v1.UserService/AssignRolesToUser',
|
|
233
|
+
meshtrade_dot_iam_dot_user_dot_v1_dot_service__pb2.AssignRolesToUserRequest.SerializeToString,
|
|
234
|
+
meshtrade_dot_iam_dot_user_dot_v1_dot_user__pb2.User.FromString,
|
|
235
|
+
options,
|
|
236
|
+
channel_credentials,
|
|
237
|
+
insecure,
|
|
238
|
+
call_credentials,
|
|
239
|
+
compression,
|
|
240
|
+
wait_for_ready,
|
|
241
|
+
timeout,
|
|
242
|
+
metadata,
|
|
243
|
+
_registered_method=True)
|
|
244
|
+
|
|
245
|
+
@staticmethod
|
|
246
|
+
def RevokeRolesFromUser(request,
|
|
198
247
|
target,
|
|
199
248
|
options=(),
|
|
200
249
|
channel_credentials=None,
|
|
@@ -207,8 +256,8 @@ class UserService(object):
|
|
|
207
256
|
return grpc.experimental.unary_unary(
|
|
208
257
|
request,
|
|
209
258
|
target,
|
|
210
|
-
'/meshtrade.iam.user.v1.UserService/
|
|
211
|
-
meshtrade_dot_iam_dot_user_dot_v1_dot_service__pb2.
|
|
259
|
+
'/meshtrade.iam.user.v1.UserService/RevokeRolesFromUser',
|
|
260
|
+
meshtrade_dot_iam_dot_user_dot_v1_dot_service__pb2.RevokeRolesFromUserRequest.SerializeToString,
|
|
212
261
|
meshtrade_dot_iam_dot_user_dot_v1_dot_user__pb2.User.FromString,
|
|
213
262
|
options,
|
|
214
263
|
channel_credentials,
|
|
@@ -25,7 +25,7 @@ _sym_db = _symbol_database.Default()
|
|
|
25
25
|
from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n meshtrade/iam/user/v1/user.proto\x12\x15meshtrade.iam.user.v1\x1a\x1b\x62uf/validate/validate.proto\"\
|
|
28
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n meshtrade/iam/user/v1/user.proto\x12\x15meshtrade.iam.user.v1\x1a\x1b\x62uf/validate/validate.proto\"\xa6\x03\n\x04User\x12\xba\x01\n\x04name\x18\x01 \x01(\tB\xa5\x01\xbaH\xa1\x01\xba\x01\x9d\x01\n\x14name.format.optional\x12\x32name must be empty or in the format users/{ULIDv2}\x1aQsize(this) == 0 || this.matches(\'^users/[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}$\')R\x04name\x12R\n\x05owner\x18\x02 \x01(\tB<\xbaH9r42/^groups/[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}$\x98\x01!\xc8\x01\x01R\x05owner\x12 \n\x05\x65mail\x18\x03 \x01(\tB\n\xbaH\x07r\x02`\x01\xc8\x01\x01R\x05\x65mail\x12k\n\x05roles\x18\x04 \x03(\tBU\xbaHR\x92\x01O\"MrK\x10/\x18\x30\x32\x45^groups/[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}/roles/[1-9][0-9]{6,7}$R\x05rolesBO\n\x1c\x63o.meshtrade.api.iam.user.v1Z/github.com/meshtrade/api/go/iam/user/v1;user_v1b\x06proto3')
|
|
29
29
|
|
|
30
30
|
_globals = globals()
|
|
31
31
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -40,7 +40,7 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
40
40
|
_globals['_USER'].fields_by_name['email']._loaded_options = None
|
|
41
41
|
_globals['_USER'].fields_by_name['email']._serialized_options = b'\272H\007r\002`\001\310\001\001'
|
|
42
42
|
_globals['_USER'].fields_by_name['roles']._loaded_options = None
|
|
43
|
-
_globals['_USER'].fields_by_name['roles']._serialized_options = b'\
|
|
43
|
+
_globals['_USER'].fields_by_name['roles']._serialized_options = b'\272HR\222\001O\"MrK\020/\03002E^groups/[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}/roles/[1-9][0-9]{6,7}$'
|
|
44
44
|
_globals['_USER']._serialized_start=89
|
|
45
|
-
_globals['_USER']._serialized_end=
|
|
45
|
+
_globals['_USER']._serialized_end=511
|
|
46
46
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -43,6 +43,8 @@ from .service_meshpy import (
|
|
|
43
43
|
#
|
|
44
44
|
# ===================================================================
|
|
45
45
|
|
|
46
|
+
from .transaction_state_machine import transaction_state_can_perform_action_at_state
|
|
47
|
+
|
|
46
48
|
# ===================================================================
|
|
47
49
|
# MODULE EXPORTS
|
|
48
50
|
# ===================================================================
|
|
@@ -58,4 +60,6 @@ __all__ = [
|
|
|
58
60
|
"TransactionServiceGRPCClient",
|
|
59
61
|
"TransactionServiceGRPCClientInterface",
|
|
60
62
|
"TransactionState",
|
|
63
|
+
# Manual exports
|
|
64
|
+
"transaction_state_can_perform_action_at_state",
|
|
61
65
|
]
|
|
@@ -9,6 +9,7 @@ the service interface with resource management capabilities, providing authentic
|
|
|
9
9
|
timeouts, and proper connection handling.
|
|
10
10
|
"""
|
|
11
11
|
|
|
12
|
+
from collections.abc import Iterator
|
|
12
13
|
from datetime import timedelta
|
|
13
14
|
from typing import Optional
|
|
14
15
|
|
|
@@ -147,7 +148,7 @@ class TransactionService(BaseGRPCClient):
|
|
|
147
148
|
"""
|
|
148
149
|
return self._execute_method("GetTransactionState", request, timeout)
|
|
149
150
|
|
|
150
|
-
def monitor_transaction_state(self, request: MonitorTransactionStateRequest, timeout: Optional[timedelta] = None):
|
|
151
|
+
def monitor_transaction_state(self, request: MonitorTransactionStateRequest, timeout: Optional[timedelta] = None) -> Iterator[MonitorTransactionStateResponse]:
|
|
151
152
|
"""MonitorTransactionState server-side streaming method with authentication and validation.
|
|
152
153
|
|
|
153
154
|
Args:
|
|
@@ -41,6 +41,8 @@ from .service_meshpy import (
|
|
|
41
41
|
#
|
|
42
42
|
# ===================================================================
|
|
43
43
|
|
|
44
|
+
from .income_entry import income_narrative_pretty_string
|
|
45
|
+
|
|
44
46
|
# ===================================================================
|
|
45
47
|
# MODULE EXPORTS
|
|
46
48
|
# ===================================================================
|
|
@@ -59,4 +61,6 @@ __all__ = [
|
|
|
59
61
|
"IncomeEntry",
|
|
60
62
|
"IncomeNarrative",
|
|
61
63
|
"TradingStatementEntry",
|
|
64
|
+
# Manual exports
|
|
65
|
+
"income_narrative_pretty_string",
|
|
62
66
|
]
|
meshtrade/type/v1/__init__.py
CHANGED
|
@@ -38,43 +38,80 @@ from .time_of_day_pb2 import TimeOfDay
|
|
|
38
38
|
# ===================================================================
|
|
39
39
|
|
|
40
40
|
from .amount import (
|
|
41
|
+
amount_add,
|
|
42
|
+
amount_contains_fractions,
|
|
43
|
+
amount_decimal_div,
|
|
44
|
+
amount_decimal_mul,
|
|
45
|
+
amount_is_equal_to,
|
|
46
|
+
amount_is_negative,
|
|
47
|
+
amount_is_same_type_as,
|
|
48
|
+
amount_is_undefined,
|
|
49
|
+
amount_is_zero,
|
|
50
|
+
amount_set_value,
|
|
51
|
+
amount_sub,
|
|
41
52
|
new_amount,
|
|
53
|
+
new_undefined_amount,
|
|
42
54
|
)
|
|
43
55
|
from .date import (
|
|
44
56
|
date_add_days,
|
|
45
57
|
date_add_months,
|
|
46
58
|
date_add_years,
|
|
47
|
-
date_to_python_date,
|
|
48
|
-
date_to_string,
|
|
49
59
|
date_is_after,
|
|
50
60
|
date_is_after_or_equal,
|
|
51
61
|
date_is_before,
|
|
52
62
|
date_is_before_or_equal,
|
|
53
63
|
date_is_complete,
|
|
54
64
|
date_is_equal,
|
|
65
|
+
date_is_valid,
|
|
66
|
+
date_to_python_date,
|
|
67
|
+
date_to_string,
|
|
55
68
|
new_date,
|
|
56
69
|
new_date_from_python_date,
|
|
57
|
-
|
|
70
|
+
)
|
|
71
|
+
from .decimal_built_in_conversions import (
|
|
72
|
+
built_in_to_decimal,
|
|
73
|
+
decimal_to_built_in,
|
|
74
|
+
)
|
|
75
|
+
from .decimal_operations import (
|
|
76
|
+
decimal_add,
|
|
77
|
+
decimal_div,
|
|
78
|
+
decimal_equal,
|
|
79
|
+
decimal_greater_than,
|
|
80
|
+
decimal_greater_than_or_equal,
|
|
81
|
+
decimal_is_negative,
|
|
82
|
+
decimal_is_positive,
|
|
83
|
+
decimal_is_zero,
|
|
84
|
+
decimal_less_than,
|
|
85
|
+
decimal_less_than_or_equal,
|
|
86
|
+
decimal_mul,
|
|
87
|
+
decimal_round,
|
|
88
|
+
decimal_sub,
|
|
89
|
+
)
|
|
90
|
+
from .ledger import (
|
|
91
|
+
UnsupportedLedgerError,
|
|
92
|
+
get_ledger_no_decimal_places,
|
|
93
|
+
ledger_is_valid,
|
|
94
|
+
ledger_is_valid_and_defined,
|
|
95
|
+
ledger_to_pretty_string,
|
|
58
96
|
)
|
|
59
97
|
from .time_of_day import (
|
|
60
|
-
time_of_day_is_midnight,
|
|
61
98
|
new_time_of_day,
|
|
62
99
|
new_time_of_day_from_datetime,
|
|
63
100
|
new_time_of_day_from_python_time,
|
|
64
101
|
new_time_of_day_from_timedelta,
|
|
102
|
+
time_of_day_is_midnight,
|
|
103
|
+
time_of_day_is_valid,
|
|
65
104
|
time_of_day_to_datetime_with_date,
|
|
66
105
|
time_of_day_to_python_time,
|
|
67
106
|
time_of_day_to_string,
|
|
68
107
|
time_of_day_to_timedelta,
|
|
69
108
|
time_of_day_total_seconds,
|
|
70
|
-
time_of_day_is_valid,
|
|
71
109
|
)
|
|
72
|
-
from .
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
get_ledger_no_decimal_places,
|
|
110
|
+
from .token import (
|
|
111
|
+
new_undefined_token,
|
|
112
|
+
token_is_equal_to,
|
|
113
|
+
token_is_undefined,
|
|
114
|
+
token_pretty_string,
|
|
78
115
|
)
|
|
79
116
|
|
|
80
117
|
# ===================================================================
|
|
@@ -93,6 +130,18 @@ __all__ = [
|
|
|
93
130
|
"TimeOfDay",
|
|
94
131
|
"Token",
|
|
95
132
|
# Manual exports
|
|
133
|
+
"UnsupportedLedgerError",
|
|
134
|
+
"amount_add",
|
|
135
|
+
"amount_contains_fractions",
|
|
136
|
+
"amount_decimal_div",
|
|
137
|
+
"amount_decimal_mul",
|
|
138
|
+
"amount_is_equal_to",
|
|
139
|
+
"amount_is_negative",
|
|
140
|
+
"amount_is_same_type_as",
|
|
141
|
+
"amount_is_undefined",
|
|
142
|
+
"amount_is_zero",
|
|
143
|
+
"amount_set_value",
|
|
144
|
+
"amount_sub",
|
|
96
145
|
"built_in_to_decimal",
|
|
97
146
|
"date_add_days",
|
|
98
147
|
"date_add_months",
|
|
@@ -106,8 +155,24 @@ __all__ = [
|
|
|
106
155
|
"date_is_valid",
|
|
107
156
|
"date_to_python_date",
|
|
108
157
|
"date_to_string",
|
|
158
|
+
"decimal_add",
|
|
159
|
+
"decimal_div",
|
|
160
|
+
"decimal_equal",
|
|
161
|
+
"decimal_greater_than",
|
|
162
|
+
"decimal_greater_than_or_equal",
|
|
163
|
+
"decimal_is_negative",
|
|
164
|
+
"decimal_is_positive",
|
|
165
|
+
"decimal_is_zero",
|
|
166
|
+
"decimal_less_than",
|
|
167
|
+
"decimal_less_than_or_equal",
|
|
168
|
+
"decimal_mul",
|
|
169
|
+
"decimal_round",
|
|
170
|
+
"decimal_sub",
|
|
109
171
|
"decimal_to_built_in",
|
|
110
172
|
"get_ledger_no_decimal_places",
|
|
173
|
+
"ledger_is_valid",
|
|
174
|
+
"ledger_is_valid_and_defined",
|
|
175
|
+
"ledger_to_pretty_string",
|
|
111
176
|
"new_amount",
|
|
112
177
|
"new_date",
|
|
113
178
|
"new_date_from_python_date",
|
|
@@ -115,6 +180,8 @@ __all__ = [
|
|
|
115
180
|
"new_time_of_day_from_datetime",
|
|
116
181
|
"new_time_of_day_from_python_time",
|
|
117
182
|
"new_time_of_day_from_timedelta",
|
|
183
|
+
"new_undefined_amount",
|
|
184
|
+
"new_undefined_token",
|
|
118
185
|
"time_of_day_is_midnight",
|
|
119
186
|
"time_of_day_is_valid",
|
|
120
187
|
"time_of_day_to_datetime_with_date",
|
|
@@ -122,4 +189,7 @@ __all__ = [
|
|
|
122
189
|
"time_of_day_to_string",
|
|
123
190
|
"time_of_day_to_timedelta",
|
|
124
191
|
"time_of_day_total_seconds",
|
|
192
|
+
"token_is_equal_to",
|
|
193
|
+
"token_is_undefined",
|
|
194
|
+
"token_pretty_string",
|
|
125
195
|
]
|