affinidi_tdk_wallets_client 1.19.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 affinidi_tdk_wallets_client might be problematic. Click here for more details.
- affinidi_tdk_wallets_client/__init__.py +63 -0
- affinidi_tdk_wallets_client/api/__init__.py +7 -0
- affinidi_tdk_wallets_client/api/default_api.py +202 -0
- affinidi_tdk_wallets_client/api/revocation_api.py +351 -0
- affinidi_tdk_wallets_client/api/wallet_api.py +1094 -0
- affinidi_tdk_wallets_client/api_client.py +760 -0
- affinidi_tdk_wallets_client/api_response.py +25 -0
- affinidi_tdk_wallets_client/configuration.py +464 -0
- affinidi_tdk_wallets_client/exceptions.py +167 -0
- affinidi_tdk_wallets_client/models/__init__.py +44 -0
- affinidi_tdk_wallets_client/models/create_wallet_input.py +142 -0
- affinidi_tdk_wallets_client/models/create_wallet_response.py +76 -0
- affinidi_tdk_wallets_client/models/did_key_input_params.py +86 -0
- affinidi_tdk_wallets_client/models/did_web_input_params.py +92 -0
- affinidi_tdk_wallets_client/models/entity_not_found_error.py +109 -0
- affinidi_tdk_wallets_client/models/get_revocation_credential_status_ok.py +72 -0
- affinidi_tdk_wallets_client/models/get_revocation_list_credential_result_dto.py +72 -0
- affinidi_tdk_wallets_client/models/invalid_did_parameter_error.py +109 -0
- affinidi_tdk_wallets_client/models/invalid_parameter_error.py +109 -0
- affinidi_tdk_wallets_client/models/key_not_found_error.py +109 -0
- affinidi_tdk_wallets_client/models/not_found_error.py +109 -0
- affinidi_tdk_wallets_client/models/operation_forbidden_error.py +109 -0
- affinidi_tdk_wallets_client/models/revoke_credential_input.py +79 -0
- affinidi_tdk_wallets_client/models/service_error_response.py +86 -0
- affinidi_tdk_wallets_client/models/service_error_response_details_inner.py +78 -0
- affinidi_tdk_wallets_client/models/sign_credential400_response.py +142 -0
- affinidi_tdk_wallets_client/models/sign_credential_input_dto.py +92 -0
- affinidi_tdk_wallets_client/models/sign_credential_input_dto_unsigned_credential_params.py +89 -0
- affinidi_tdk_wallets_client/models/sign_credential_result_dto.py +76 -0
- affinidi_tdk_wallets_client/models/sign_credential_result_dto_signed_credential.py +148 -0
- affinidi_tdk_wallets_client/models/sign_jwt_token.py +74 -0
- affinidi_tdk_wallets_client/models/sign_jwt_token_ok.py +72 -0
- affinidi_tdk_wallets_client/models/signing_failed_error.py +109 -0
- affinidi_tdk_wallets_client/models/update_wallet_input.py +74 -0
- affinidi_tdk_wallets_client/models/wallet_dto.py +96 -0
- affinidi_tdk_wallets_client/models/wallet_dto_keys_inner.py +74 -0
- affinidi_tdk_wallets_client/models/wallets_list_dto.py +80 -0
- affinidi_tdk_wallets_client/py.typed +0 -0
- affinidi_tdk_wallets_client/rest.py +328 -0
- affinidi_tdk_wallets_client-1.19.0.dist-info/METADATA +188 -0
- affinidi_tdk_wallets_client-1.19.0.dist-info/RECORD +42 -0
- affinidi_tdk_wallets_client-1.19.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,1094 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
CloudWalletEssentials
|
|
5
|
+
|
|
6
|
+
Cloud Wallet For Enterprise Structure
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: info@affinidi.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import re # noqa: F401
|
|
17
|
+
import io
|
|
18
|
+
import warnings
|
|
19
|
+
|
|
20
|
+
from pydantic import validate_arguments, ValidationError
|
|
21
|
+
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from pydantic import Field, StrictStr
|
|
24
|
+
|
|
25
|
+
from typing import Optional
|
|
26
|
+
|
|
27
|
+
from affinidi_tdk_wallets_client.models.create_wallet_input import CreateWalletInput
|
|
28
|
+
from affinidi_tdk_wallets_client.models.create_wallet_response import CreateWalletResponse
|
|
29
|
+
from affinidi_tdk_wallets_client.models.sign_credential_input_dto import SignCredentialInputDto
|
|
30
|
+
from affinidi_tdk_wallets_client.models.sign_credential_result_dto import SignCredentialResultDto
|
|
31
|
+
from affinidi_tdk_wallets_client.models.sign_jwt_token import SignJwtToken
|
|
32
|
+
from affinidi_tdk_wallets_client.models.sign_jwt_token_ok import SignJwtTokenOK
|
|
33
|
+
from affinidi_tdk_wallets_client.models.update_wallet_input import UpdateWalletInput
|
|
34
|
+
from affinidi_tdk_wallets_client.models.wallet_dto import WalletDto
|
|
35
|
+
from affinidi_tdk_wallets_client.models.wallets_list_dto import WalletsListDto
|
|
36
|
+
|
|
37
|
+
from affinidi_tdk_wallets_client.api_client import ApiClient
|
|
38
|
+
from affinidi_tdk_wallets_client.api_response import ApiResponse
|
|
39
|
+
from affinidi_tdk_wallets_client.exceptions import ( # noqa: F401
|
|
40
|
+
ApiTypeError,
|
|
41
|
+
ApiValueError
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class WalletApi:
|
|
46
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
47
|
+
Ref: https://openapi-generator.tech
|
|
48
|
+
|
|
49
|
+
Do not edit the class manually.
|
|
50
|
+
"""
|
|
51
|
+
|
|
52
|
+
def __init__(self, api_client=None) -> None:
|
|
53
|
+
if api_client is None:
|
|
54
|
+
api_client = ApiClient.get_default()
|
|
55
|
+
self.api_client = api_client
|
|
56
|
+
|
|
57
|
+
@validate_arguments
|
|
58
|
+
def create_wallet(self, create_wallet_input : Annotated[Optional[CreateWalletInput], Field(description="CreateWallet")] = None, **kwargs) -> CreateWalletResponse: # noqa: E501
|
|
59
|
+
"""create_wallet # noqa: E501
|
|
60
|
+
|
|
61
|
+
creates a wallet # noqa: E501
|
|
62
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
63
|
+
asynchronous HTTP request, please pass async_req=True
|
|
64
|
+
|
|
65
|
+
>>> thread = api.create_wallet(create_wallet_input, async_req=True)
|
|
66
|
+
>>> result = thread.get()
|
|
67
|
+
|
|
68
|
+
:param create_wallet_input: CreateWallet
|
|
69
|
+
:type create_wallet_input: CreateWalletInput
|
|
70
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
71
|
+
:type async_req: bool, optional
|
|
72
|
+
:param _request_timeout: timeout setting for this request.
|
|
73
|
+
If one number provided, it will be total request
|
|
74
|
+
timeout. It can also be a pair (tuple) of
|
|
75
|
+
(connection, read) timeouts.
|
|
76
|
+
:return: Returns the result object.
|
|
77
|
+
If the method is called asynchronously,
|
|
78
|
+
returns the request thread.
|
|
79
|
+
:rtype: CreateWalletResponse
|
|
80
|
+
"""
|
|
81
|
+
kwargs['_return_http_data_only'] = True
|
|
82
|
+
if '_preload_content' in kwargs:
|
|
83
|
+
message = "Error! Please call the create_wallet_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
|
84
|
+
raise ValueError(message)
|
|
85
|
+
return self.create_wallet_with_http_info(create_wallet_input, **kwargs) # noqa: E501
|
|
86
|
+
|
|
87
|
+
@validate_arguments
|
|
88
|
+
def create_wallet_with_http_info(self, create_wallet_input : Annotated[Optional[CreateWalletInput], Field(description="CreateWallet")] = None, **kwargs) -> ApiResponse: # noqa: E501
|
|
89
|
+
"""create_wallet # noqa: E501
|
|
90
|
+
|
|
91
|
+
creates a wallet # noqa: E501
|
|
92
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
93
|
+
asynchronous HTTP request, please pass async_req=True
|
|
94
|
+
|
|
95
|
+
>>> thread = api.create_wallet_with_http_info(create_wallet_input, async_req=True)
|
|
96
|
+
>>> result = thread.get()
|
|
97
|
+
|
|
98
|
+
:param create_wallet_input: CreateWallet
|
|
99
|
+
:type create_wallet_input: CreateWalletInput
|
|
100
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
101
|
+
:type async_req: bool, optional
|
|
102
|
+
:param _preload_content: if False, the ApiResponse.data will
|
|
103
|
+
be set to none and raw_data will store the
|
|
104
|
+
HTTP response body without reading/decoding.
|
|
105
|
+
Default is True.
|
|
106
|
+
:type _preload_content: bool, optional
|
|
107
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
|
108
|
+
object with status code, headers, etc
|
|
109
|
+
:type _return_http_data_only: bool, optional
|
|
110
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
111
|
+
number provided, it will be total request
|
|
112
|
+
timeout. It can also be a pair (tuple) of
|
|
113
|
+
(connection, read) timeouts.
|
|
114
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
115
|
+
request; this effectively ignores the authentication
|
|
116
|
+
in the spec for a single request.
|
|
117
|
+
:type _request_auth: dict, optional
|
|
118
|
+
:type _content_type: string, optional: force content-type for the request
|
|
119
|
+
:return: Returns the result object.
|
|
120
|
+
If the method is called asynchronously,
|
|
121
|
+
returns the request thread.
|
|
122
|
+
:rtype: tuple(CreateWalletResponse, status_code(int), headers(HTTPHeaderDict))
|
|
123
|
+
"""
|
|
124
|
+
|
|
125
|
+
_params = locals()
|
|
126
|
+
|
|
127
|
+
_all_params = [
|
|
128
|
+
'create_wallet_input'
|
|
129
|
+
]
|
|
130
|
+
_all_params.extend(
|
|
131
|
+
[
|
|
132
|
+
'async_req',
|
|
133
|
+
'_return_http_data_only',
|
|
134
|
+
'_preload_content',
|
|
135
|
+
'_request_timeout',
|
|
136
|
+
'_request_auth',
|
|
137
|
+
'_content_type',
|
|
138
|
+
'_headers'
|
|
139
|
+
]
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
# validate the arguments
|
|
143
|
+
for _key, _val in _params['kwargs'].items():
|
|
144
|
+
if _key not in _all_params:
|
|
145
|
+
raise ApiTypeError(
|
|
146
|
+
"Got an unexpected keyword argument '%s'"
|
|
147
|
+
" to method create_wallet" % _key
|
|
148
|
+
)
|
|
149
|
+
_params[_key] = _val
|
|
150
|
+
del _params['kwargs']
|
|
151
|
+
|
|
152
|
+
_collection_formats = {}
|
|
153
|
+
|
|
154
|
+
# process the path parameters
|
|
155
|
+
_path_params = {}
|
|
156
|
+
|
|
157
|
+
# process the query parameters
|
|
158
|
+
_query_params = []
|
|
159
|
+
# process the header parameters
|
|
160
|
+
_header_params = dict(_params.get('_headers', {}))
|
|
161
|
+
# process the form parameters
|
|
162
|
+
_form_params = []
|
|
163
|
+
_files = {}
|
|
164
|
+
# process the body parameter
|
|
165
|
+
_body_params = None
|
|
166
|
+
if _params['create_wallet_input'] is not None:
|
|
167
|
+
_body_params = _params['create_wallet_input']
|
|
168
|
+
|
|
169
|
+
# set the HTTP header `Accept`
|
|
170
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
171
|
+
['application/json']) # noqa: E501
|
|
172
|
+
|
|
173
|
+
# set the HTTP header `Content-Type`
|
|
174
|
+
_content_types_list = _params.get('_content_type',
|
|
175
|
+
self.api_client.select_header_content_type(
|
|
176
|
+
['application/json']))
|
|
177
|
+
if _content_types_list:
|
|
178
|
+
_header_params['Content-Type'] = _content_types_list
|
|
179
|
+
|
|
180
|
+
# authentication setting
|
|
181
|
+
_auth_settings = ['ProjectTokenAuth'] # noqa: E501
|
|
182
|
+
|
|
183
|
+
_response_types_map = {
|
|
184
|
+
'201': "CreateWalletResponse",
|
|
185
|
+
'403': "OperationForbiddenError",
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
return self.api_client.call_api(
|
|
189
|
+
'/v1/wallets', 'POST',
|
|
190
|
+
_path_params,
|
|
191
|
+
_query_params,
|
|
192
|
+
_header_params,
|
|
193
|
+
body=_body_params,
|
|
194
|
+
post_params=_form_params,
|
|
195
|
+
files=_files,
|
|
196
|
+
response_types_map=_response_types_map,
|
|
197
|
+
auth_settings=_auth_settings,
|
|
198
|
+
async_req=_params.get('async_req'),
|
|
199
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
|
200
|
+
_preload_content=_params.get('_preload_content', True),
|
|
201
|
+
_request_timeout=_params.get('_request_timeout'),
|
|
202
|
+
collection_formats=_collection_formats,
|
|
203
|
+
_request_auth=_params.get('_request_auth'))
|
|
204
|
+
|
|
205
|
+
@validate_arguments
|
|
206
|
+
def delete_wallet(self, wallet_id : Annotated[StrictStr, Field(..., description="id of the wallet")], **kwargs) -> None: # noqa: E501
|
|
207
|
+
"""delete_wallet # noqa: E501
|
|
208
|
+
|
|
209
|
+
delete wallet by walletId # noqa: E501
|
|
210
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
211
|
+
asynchronous HTTP request, please pass async_req=True
|
|
212
|
+
|
|
213
|
+
>>> thread = api.delete_wallet(wallet_id, async_req=True)
|
|
214
|
+
>>> result = thread.get()
|
|
215
|
+
|
|
216
|
+
:param wallet_id: id of the wallet (required)
|
|
217
|
+
:type wallet_id: str
|
|
218
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
219
|
+
:type async_req: bool, optional
|
|
220
|
+
:param _request_timeout: timeout setting for this request.
|
|
221
|
+
If one number provided, it will be total request
|
|
222
|
+
timeout. It can also be a pair (tuple) of
|
|
223
|
+
(connection, read) timeouts.
|
|
224
|
+
:return: Returns the result object.
|
|
225
|
+
If the method is called asynchronously,
|
|
226
|
+
returns the request thread.
|
|
227
|
+
:rtype: None
|
|
228
|
+
"""
|
|
229
|
+
kwargs['_return_http_data_only'] = True
|
|
230
|
+
if '_preload_content' in kwargs:
|
|
231
|
+
message = "Error! Please call the delete_wallet_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
|
232
|
+
raise ValueError(message)
|
|
233
|
+
return self.delete_wallet_with_http_info(wallet_id, **kwargs) # noqa: E501
|
|
234
|
+
|
|
235
|
+
@validate_arguments
|
|
236
|
+
def delete_wallet_with_http_info(self, wallet_id : Annotated[StrictStr, Field(..., description="id of the wallet")], **kwargs) -> ApiResponse: # noqa: E501
|
|
237
|
+
"""delete_wallet # noqa: E501
|
|
238
|
+
|
|
239
|
+
delete wallet by walletId # noqa: E501
|
|
240
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
241
|
+
asynchronous HTTP request, please pass async_req=True
|
|
242
|
+
|
|
243
|
+
>>> thread = api.delete_wallet_with_http_info(wallet_id, async_req=True)
|
|
244
|
+
>>> result = thread.get()
|
|
245
|
+
|
|
246
|
+
:param wallet_id: id of the wallet (required)
|
|
247
|
+
:type wallet_id: str
|
|
248
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
249
|
+
:type async_req: bool, optional
|
|
250
|
+
:param _preload_content: if False, the ApiResponse.data will
|
|
251
|
+
be set to none and raw_data will store the
|
|
252
|
+
HTTP response body without reading/decoding.
|
|
253
|
+
Default is True.
|
|
254
|
+
:type _preload_content: bool, optional
|
|
255
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
|
256
|
+
object with status code, headers, etc
|
|
257
|
+
:type _return_http_data_only: bool, optional
|
|
258
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
259
|
+
number provided, it will be total request
|
|
260
|
+
timeout. It can also be a pair (tuple) of
|
|
261
|
+
(connection, read) timeouts.
|
|
262
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
263
|
+
request; this effectively ignores the authentication
|
|
264
|
+
in the spec for a single request.
|
|
265
|
+
:type _request_auth: dict, optional
|
|
266
|
+
:type _content_type: string, optional: force content-type for the request
|
|
267
|
+
:return: Returns the result object.
|
|
268
|
+
If the method is called asynchronously,
|
|
269
|
+
returns the request thread.
|
|
270
|
+
:rtype: None
|
|
271
|
+
"""
|
|
272
|
+
|
|
273
|
+
_params = locals()
|
|
274
|
+
|
|
275
|
+
_all_params = [
|
|
276
|
+
'wallet_id'
|
|
277
|
+
]
|
|
278
|
+
_all_params.extend(
|
|
279
|
+
[
|
|
280
|
+
'async_req',
|
|
281
|
+
'_return_http_data_only',
|
|
282
|
+
'_preload_content',
|
|
283
|
+
'_request_timeout',
|
|
284
|
+
'_request_auth',
|
|
285
|
+
'_content_type',
|
|
286
|
+
'_headers'
|
|
287
|
+
]
|
|
288
|
+
)
|
|
289
|
+
|
|
290
|
+
# validate the arguments
|
|
291
|
+
for _key, _val in _params['kwargs'].items():
|
|
292
|
+
if _key not in _all_params:
|
|
293
|
+
raise ApiTypeError(
|
|
294
|
+
"Got an unexpected keyword argument '%s'"
|
|
295
|
+
" to method delete_wallet" % _key
|
|
296
|
+
)
|
|
297
|
+
_params[_key] = _val
|
|
298
|
+
del _params['kwargs']
|
|
299
|
+
|
|
300
|
+
_collection_formats = {}
|
|
301
|
+
|
|
302
|
+
# process the path parameters
|
|
303
|
+
_path_params = {}
|
|
304
|
+
if _params['wallet_id'] is not None:
|
|
305
|
+
_path_params['walletId'] = _params['wallet_id']
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
# process the query parameters
|
|
309
|
+
_query_params = []
|
|
310
|
+
# process the header parameters
|
|
311
|
+
_header_params = dict(_params.get('_headers', {}))
|
|
312
|
+
# process the form parameters
|
|
313
|
+
_form_params = []
|
|
314
|
+
_files = {}
|
|
315
|
+
# process the body parameter
|
|
316
|
+
_body_params = None
|
|
317
|
+
# authentication setting
|
|
318
|
+
_auth_settings = ['ProjectTokenAuth'] # noqa: E501
|
|
319
|
+
|
|
320
|
+
_response_types_map = {}
|
|
321
|
+
|
|
322
|
+
return self.api_client.call_api(
|
|
323
|
+
'/v1/wallets/{walletId}', 'DELETE',
|
|
324
|
+
_path_params,
|
|
325
|
+
_query_params,
|
|
326
|
+
_header_params,
|
|
327
|
+
body=_body_params,
|
|
328
|
+
post_params=_form_params,
|
|
329
|
+
files=_files,
|
|
330
|
+
response_types_map=_response_types_map,
|
|
331
|
+
auth_settings=_auth_settings,
|
|
332
|
+
async_req=_params.get('async_req'),
|
|
333
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
|
334
|
+
_preload_content=_params.get('_preload_content', True),
|
|
335
|
+
_request_timeout=_params.get('_request_timeout'),
|
|
336
|
+
collection_formats=_collection_formats,
|
|
337
|
+
_request_auth=_params.get('_request_auth'))
|
|
338
|
+
|
|
339
|
+
@validate_arguments
|
|
340
|
+
def get_wallet(self, wallet_id : Annotated[StrictStr, Field(..., description="id of the wallet")], **kwargs) -> WalletDto: # noqa: E501
|
|
341
|
+
"""get_wallet # noqa: E501
|
|
342
|
+
|
|
343
|
+
get wallet details using wallet Id. # noqa: E501
|
|
344
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
345
|
+
asynchronous HTTP request, please pass async_req=True
|
|
346
|
+
|
|
347
|
+
>>> thread = api.get_wallet(wallet_id, async_req=True)
|
|
348
|
+
>>> result = thread.get()
|
|
349
|
+
|
|
350
|
+
:param wallet_id: id of the wallet (required)
|
|
351
|
+
:type wallet_id: str
|
|
352
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
353
|
+
:type async_req: bool, optional
|
|
354
|
+
:param _request_timeout: timeout setting for this request.
|
|
355
|
+
If one number provided, it will be total request
|
|
356
|
+
timeout. It can also be a pair (tuple) of
|
|
357
|
+
(connection, read) timeouts.
|
|
358
|
+
:return: Returns the result object.
|
|
359
|
+
If the method is called asynchronously,
|
|
360
|
+
returns the request thread.
|
|
361
|
+
:rtype: WalletDto
|
|
362
|
+
"""
|
|
363
|
+
kwargs['_return_http_data_only'] = True
|
|
364
|
+
if '_preload_content' in kwargs:
|
|
365
|
+
message = "Error! Please call the get_wallet_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
|
366
|
+
raise ValueError(message)
|
|
367
|
+
return self.get_wallet_with_http_info(wallet_id, **kwargs) # noqa: E501
|
|
368
|
+
|
|
369
|
+
@validate_arguments
|
|
370
|
+
def get_wallet_with_http_info(self, wallet_id : Annotated[StrictStr, Field(..., description="id of the wallet")], **kwargs) -> ApiResponse: # noqa: E501
|
|
371
|
+
"""get_wallet # noqa: E501
|
|
372
|
+
|
|
373
|
+
get wallet details using wallet Id. # noqa: E501
|
|
374
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
375
|
+
asynchronous HTTP request, please pass async_req=True
|
|
376
|
+
|
|
377
|
+
>>> thread = api.get_wallet_with_http_info(wallet_id, async_req=True)
|
|
378
|
+
>>> result = thread.get()
|
|
379
|
+
|
|
380
|
+
:param wallet_id: id of the wallet (required)
|
|
381
|
+
:type wallet_id: str
|
|
382
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
383
|
+
:type async_req: bool, optional
|
|
384
|
+
:param _preload_content: if False, the ApiResponse.data will
|
|
385
|
+
be set to none and raw_data will store the
|
|
386
|
+
HTTP response body without reading/decoding.
|
|
387
|
+
Default is True.
|
|
388
|
+
:type _preload_content: bool, optional
|
|
389
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
|
390
|
+
object with status code, headers, etc
|
|
391
|
+
:type _return_http_data_only: bool, optional
|
|
392
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
393
|
+
number provided, it will be total request
|
|
394
|
+
timeout. It can also be a pair (tuple) of
|
|
395
|
+
(connection, read) timeouts.
|
|
396
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
397
|
+
request; this effectively ignores the authentication
|
|
398
|
+
in the spec for a single request.
|
|
399
|
+
:type _request_auth: dict, optional
|
|
400
|
+
:type _content_type: string, optional: force content-type for the request
|
|
401
|
+
:return: Returns the result object.
|
|
402
|
+
If the method is called asynchronously,
|
|
403
|
+
returns the request thread.
|
|
404
|
+
:rtype: tuple(WalletDto, status_code(int), headers(HTTPHeaderDict))
|
|
405
|
+
"""
|
|
406
|
+
|
|
407
|
+
_params = locals()
|
|
408
|
+
|
|
409
|
+
_all_params = [
|
|
410
|
+
'wallet_id'
|
|
411
|
+
]
|
|
412
|
+
_all_params.extend(
|
|
413
|
+
[
|
|
414
|
+
'async_req',
|
|
415
|
+
'_return_http_data_only',
|
|
416
|
+
'_preload_content',
|
|
417
|
+
'_request_timeout',
|
|
418
|
+
'_request_auth',
|
|
419
|
+
'_content_type',
|
|
420
|
+
'_headers'
|
|
421
|
+
]
|
|
422
|
+
)
|
|
423
|
+
|
|
424
|
+
# validate the arguments
|
|
425
|
+
for _key, _val in _params['kwargs'].items():
|
|
426
|
+
if _key not in _all_params:
|
|
427
|
+
raise ApiTypeError(
|
|
428
|
+
"Got an unexpected keyword argument '%s'"
|
|
429
|
+
" to method get_wallet" % _key
|
|
430
|
+
)
|
|
431
|
+
_params[_key] = _val
|
|
432
|
+
del _params['kwargs']
|
|
433
|
+
|
|
434
|
+
_collection_formats = {}
|
|
435
|
+
|
|
436
|
+
# process the path parameters
|
|
437
|
+
_path_params = {}
|
|
438
|
+
if _params['wallet_id'] is not None:
|
|
439
|
+
_path_params['walletId'] = _params['wallet_id']
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
# process the query parameters
|
|
443
|
+
_query_params = []
|
|
444
|
+
# process the header parameters
|
|
445
|
+
_header_params = dict(_params.get('_headers', {}))
|
|
446
|
+
# process the form parameters
|
|
447
|
+
_form_params = []
|
|
448
|
+
_files = {}
|
|
449
|
+
# process the body parameter
|
|
450
|
+
_body_params = None
|
|
451
|
+
# set the HTTP header `Accept`
|
|
452
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
453
|
+
['application/json']) # noqa: E501
|
|
454
|
+
|
|
455
|
+
# authentication setting
|
|
456
|
+
_auth_settings = ['ProjectTokenAuth'] # noqa: E501
|
|
457
|
+
|
|
458
|
+
_response_types_map = {
|
|
459
|
+
'200': "WalletDto",
|
|
460
|
+
'400': "InvalidParameterError",
|
|
461
|
+
'403': "OperationForbiddenError",
|
|
462
|
+
'404': "NotFoundError",
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
return self.api_client.call_api(
|
|
466
|
+
'/v1/wallets/{walletId}', 'GET',
|
|
467
|
+
_path_params,
|
|
468
|
+
_query_params,
|
|
469
|
+
_header_params,
|
|
470
|
+
body=_body_params,
|
|
471
|
+
post_params=_form_params,
|
|
472
|
+
files=_files,
|
|
473
|
+
response_types_map=_response_types_map,
|
|
474
|
+
auth_settings=_auth_settings,
|
|
475
|
+
async_req=_params.get('async_req'),
|
|
476
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
|
477
|
+
_preload_content=_params.get('_preload_content', True),
|
|
478
|
+
_request_timeout=_params.get('_request_timeout'),
|
|
479
|
+
collection_formats=_collection_formats,
|
|
480
|
+
_request_auth=_params.get('_request_auth'))
|
|
481
|
+
|
|
482
|
+
@validate_arguments
|
|
483
|
+
def list_wallets(self, did_type : Optional[StrictStr] = None, **kwargs) -> WalletsListDto: # noqa: E501
|
|
484
|
+
"""list_wallets # noqa: E501
|
|
485
|
+
|
|
486
|
+
lists all wallets # noqa: E501
|
|
487
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
488
|
+
asynchronous HTTP request, please pass async_req=True
|
|
489
|
+
|
|
490
|
+
>>> thread = api.list_wallets(did_type, async_req=True)
|
|
491
|
+
>>> result = thread.get()
|
|
492
|
+
|
|
493
|
+
:param did_type:
|
|
494
|
+
:type did_type: str
|
|
495
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
496
|
+
:type async_req: bool, optional
|
|
497
|
+
:param _request_timeout: timeout setting for this request.
|
|
498
|
+
If one number provided, it will be total request
|
|
499
|
+
timeout. It can also be a pair (tuple) of
|
|
500
|
+
(connection, read) timeouts.
|
|
501
|
+
:return: Returns the result object.
|
|
502
|
+
If the method is called asynchronously,
|
|
503
|
+
returns the request thread.
|
|
504
|
+
:rtype: WalletsListDto
|
|
505
|
+
"""
|
|
506
|
+
kwargs['_return_http_data_only'] = True
|
|
507
|
+
if '_preload_content' in kwargs:
|
|
508
|
+
message = "Error! Please call the list_wallets_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
|
509
|
+
raise ValueError(message)
|
|
510
|
+
return self.list_wallets_with_http_info(did_type, **kwargs) # noqa: E501
|
|
511
|
+
|
|
512
|
+
@validate_arguments
|
|
513
|
+
def list_wallets_with_http_info(self, did_type : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501
|
|
514
|
+
"""list_wallets # noqa: E501
|
|
515
|
+
|
|
516
|
+
lists all wallets # noqa: E501
|
|
517
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
518
|
+
asynchronous HTTP request, please pass async_req=True
|
|
519
|
+
|
|
520
|
+
>>> thread = api.list_wallets_with_http_info(did_type, async_req=True)
|
|
521
|
+
>>> result = thread.get()
|
|
522
|
+
|
|
523
|
+
:param did_type:
|
|
524
|
+
:type did_type: str
|
|
525
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
526
|
+
:type async_req: bool, optional
|
|
527
|
+
:param _preload_content: if False, the ApiResponse.data will
|
|
528
|
+
be set to none and raw_data will store the
|
|
529
|
+
HTTP response body without reading/decoding.
|
|
530
|
+
Default is True.
|
|
531
|
+
:type _preload_content: bool, optional
|
|
532
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
|
533
|
+
object with status code, headers, etc
|
|
534
|
+
:type _return_http_data_only: bool, optional
|
|
535
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
536
|
+
number provided, it will be total request
|
|
537
|
+
timeout. It can also be a pair (tuple) of
|
|
538
|
+
(connection, read) timeouts.
|
|
539
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
540
|
+
request; this effectively ignores the authentication
|
|
541
|
+
in the spec for a single request.
|
|
542
|
+
:type _request_auth: dict, optional
|
|
543
|
+
:type _content_type: string, optional: force content-type for the request
|
|
544
|
+
:return: Returns the result object.
|
|
545
|
+
If the method is called asynchronously,
|
|
546
|
+
returns the request thread.
|
|
547
|
+
:rtype: tuple(WalletsListDto, status_code(int), headers(HTTPHeaderDict))
|
|
548
|
+
"""
|
|
549
|
+
|
|
550
|
+
_params = locals()
|
|
551
|
+
|
|
552
|
+
_all_params = [
|
|
553
|
+
'did_type'
|
|
554
|
+
]
|
|
555
|
+
_all_params.extend(
|
|
556
|
+
[
|
|
557
|
+
'async_req',
|
|
558
|
+
'_return_http_data_only',
|
|
559
|
+
'_preload_content',
|
|
560
|
+
'_request_timeout',
|
|
561
|
+
'_request_auth',
|
|
562
|
+
'_content_type',
|
|
563
|
+
'_headers'
|
|
564
|
+
]
|
|
565
|
+
)
|
|
566
|
+
|
|
567
|
+
# validate the arguments
|
|
568
|
+
for _key, _val in _params['kwargs'].items():
|
|
569
|
+
if _key not in _all_params:
|
|
570
|
+
raise ApiTypeError(
|
|
571
|
+
"Got an unexpected keyword argument '%s'"
|
|
572
|
+
" to method list_wallets" % _key
|
|
573
|
+
)
|
|
574
|
+
_params[_key] = _val
|
|
575
|
+
del _params['kwargs']
|
|
576
|
+
|
|
577
|
+
_collection_formats = {}
|
|
578
|
+
|
|
579
|
+
# process the path parameters
|
|
580
|
+
_path_params = {}
|
|
581
|
+
|
|
582
|
+
# process the query parameters
|
|
583
|
+
_query_params = []
|
|
584
|
+
if _params.get('did_type') is not None: # noqa: E501
|
|
585
|
+
_query_params.append(('didType', _params['did_type']))
|
|
586
|
+
|
|
587
|
+
# process the header parameters
|
|
588
|
+
_header_params = dict(_params.get('_headers', {}))
|
|
589
|
+
# process the form parameters
|
|
590
|
+
_form_params = []
|
|
591
|
+
_files = {}
|
|
592
|
+
# process the body parameter
|
|
593
|
+
_body_params = None
|
|
594
|
+
# set the HTTP header `Accept`
|
|
595
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
596
|
+
['application/json']) # noqa: E501
|
|
597
|
+
|
|
598
|
+
# authentication setting
|
|
599
|
+
_auth_settings = ['ProjectTokenAuth'] # noqa: E501
|
|
600
|
+
|
|
601
|
+
_response_types_map = {
|
|
602
|
+
'200': "WalletsListDto",
|
|
603
|
+
'400': "InvalidParameterError",
|
|
604
|
+
'403': "OperationForbiddenError",
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
return self.api_client.call_api(
|
|
608
|
+
'/v1/wallets', 'GET',
|
|
609
|
+
_path_params,
|
|
610
|
+
_query_params,
|
|
611
|
+
_header_params,
|
|
612
|
+
body=_body_params,
|
|
613
|
+
post_params=_form_params,
|
|
614
|
+
files=_files,
|
|
615
|
+
response_types_map=_response_types_map,
|
|
616
|
+
auth_settings=_auth_settings,
|
|
617
|
+
async_req=_params.get('async_req'),
|
|
618
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
|
619
|
+
_preload_content=_params.get('_preload_content', True),
|
|
620
|
+
_request_timeout=_params.get('_request_timeout'),
|
|
621
|
+
collection_formats=_collection_formats,
|
|
622
|
+
_request_auth=_params.get('_request_auth'))
|
|
623
|
+
|
|
624
|
+
@validate_arguments
|
|
625
|
+
def sign_credential(self, wallet_id : Annotated[StrictStr, Field(..., description="id of the wallet")], sign_credential_input_dto : Annotated[SignCredentialInputDto, Field(..., description="SignCredential")], **kwargs) -> SignCredentialResultDto: # noqa: E501
|
|
626
|
+
"""sign_credential # noqa: E501
|
|
627
|
+
|
|
628
|
+
signs credential with the wallet # noqa: E501
|
|
629
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
630
|
+
asynchronous HTTP request, please pass async_req=True
|
|
631
|
+
|
|
632
|
+
>>> thread = api.sign_credential(wallet_id, sign_credential_input_dto, async_req=True)
|
|
633
|
+
>>> result = thread.get()
|
|
634
|
+
|
|
635
|
+
:param wallet_id: id of the wallet (required)
|
|
636
|
+
:type wallet_id: str
|
|
637
|
+
:param sign_credential_input_dto: SignCredential (required)
|
|
638
|
+
:type sign_credential_input_dto: SignCredentialInputDto
|
|
639
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
640
|
+
:type async_req: bool, optional
|
|
641
|
+
:param _request_timeout: timeout setting for this request.
|
|
642
|
+
If one number provided, it will be total request
|
|
643
|
+
timeout. It can also be a pair (tuple) of
|
|
644
|
+
(connection, read) timeouts.
|
|
645
|
+
:return: Returns the result object.
|
|
646
|
+
If the method is called asynchronously,
|
|
647
|
+
returns the request thread.
|
|
648
|
+
:rtype: SignCredentialResultDto
|
|
649
|
+
"""
|
|
650
|
+
kwargs['_return_http_data_only'] = True
|
|
651
|
+
if '_preload_content' in kwargs:
|
|
652
|
+
message = "Error! Please call the sign_credential_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
|
653
|
+
raise ValueError(message)
|
|
654
|
+
return self.sign_credential_with_http_info(wallet_id, sign_credential_input_dto, **kwargs) # noqa: E501
|
|
655
|
+
|
|
656
|
+
@validate_arguments
|
|
657
|
+
def sign_credential_with_http_info(self, wallet_id : Annotated[StrictStr, Field(..., description="id of the wallet")], sign_credential_input_dto : Annotated[SignCredentialInputDto, Field(..., description="SignCredential")], **kwargs) -> ApiResponse: # noqa: E501
|
|
658
|
+
"""sign_credential # noqa: E501
|
|
659
|
+
|
|
660
|
+
signs credential with the wallet # noqa: E501
|
|
661
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
662
|
+
asynchronous HTTP request, please pass async_req=True
|
|
663
|
+
|
|
664
|
+
>>> thread = api.sign_credential_with_http_info(wallet_id, sign_credential_input_dto, async_req=True)
|
|
665
|
+
>>> result = thread.get()
|
|
666
|
+
|
|
667
|
+
:param wallet_id: id of the wallet (required)
|
|
668
|
+
:type wallet_id: str
|
|
669
|
+
:param sign_credential_input_dto: SignCredential (required)
|
|
670
|
+
:type sign_credential_input_dto: SignCredentialInputDto
|
|
671
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
672
|
+
:type async_req: bool, optional
|
|
673
|
+
:param _preload_content: if False, the ApiResponse.data will
|
|
674
|
+
be set to none and raw_data will store the
|
|
675
|
+
HTTP response body without reading/decoding.
|
|
676
|
+
Default is True.
|
|
677
|
+
:type _preload_content: bool, optional
|
|
678
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
|
679
|
+
object with status code, headers, etc
|
|
680
|
+
:type _return_http_data_only: bool, optional
|
|
681
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
682
|
+
number provided, it will be total request
|
|
683
|
+
timeout. It can also be a pair (tuple) of
|
|
684
|
+
(connection, read) timeouts.
|
|
685
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
686
|
+
request; this effectively ignores the authentication
|
|
687
|
+
in the spec for a single request.
|
|
688
|
+
:type _request_auth: dict, optional
|
|
689
|
+
:type _content_type: string, optional: force content-type for the request
|
|
690
|
+
:return: Returns the result object.
|
|
691
|
+
If the method is called asynchronously,
|
|
692
|
+
returns the request thread.
|
|
693
|
+
:rtype: tuple(SignCredentialResultDto, status_code(int), headers(HTTPHeaderDict))
|
|
694
|
+
"""
|
|
695
|
+
|
|
696
|
+
_params = locals()
|
|
697
|
+
|
|
698
|
+
_all_params = [
|
|
699
|
+
'wallet_id',
|
|
700
|
+
'sign_credential_input_dto'
|
|
701
|
+
]
|
|
702
|
+
_all_params.extend(
|
|
703
|
+
[
|
|
704
|
+
'async_req',
|
|
705
|
+
'_return_http_data_only',
|
|
706
|
+
'_preload_content',
|
|
707
|
+
'_request_timeout',
|
|
708
|
+
'_request_auth',
|
|
709
|
+
'_content_type',
|
|
710
|
+
'_headers'
|
|
711
|
+
]
|
|
712
|
+
)
|
|
713
|
+
|
|
714
|
+
# validate the arguments
|
|
715
|
+
for _key, _val in _params['kwargs'].items():
|
|
716
|
+
if _key not in _all_params:
|
|
717
|
+
raise ApiTypeError(
|
|
718
|
+
"Got an unexpected keyword argument '%s'"
|
|
719
|
+
" to method sign_credential" % _key
|
|
720
|
+
)
|
|
721
|
+
_params[_key] = _val
|
|
722
|
+
del _params['kwargs']
|
|
723
|
+
|
|
724
|
+
_collection_formats = {}
|
|
725
|
+
|
|
726
|
+
# process the path parameters
|
|
727
|
+
_path_params = {}
|
|
728
|
+
if _params['wallet_id'] is not None:
|
|
729
|
+
_path_params['walletId'] = _params['wallet_id']
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
# process the query parameters
|
|
733
|
+
_query_params = []
|
|
734
|
+
# process the header parameters
|
|
735
|
+
_header_params = dict(_params.get('_headers', {}))
|
|
736
|
+
# process the form parameters
|
|
737
|
+
_form_params = []
|
|
738
|
+
_files = {}
|
|
739
|
+
# process the body parameter
|
|
740
|
+
_body_params = None
|
|
741
|
+
if _params['sign_credential_input_dto'] is not None:
|
|
742
|
+
_body_params = _params['sign_credential_input_dto']
|
|
743
|
+
|
|
744
|
+
# set the HTTP header `Accept`
|
|
745
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
746
|
+
['application/json']) # noqa: E501
|
|
747
|
+
|
|
748
|
+
# set the HTTP header `Content-Type`
|
|
749
|
+
_content_types_list = _params.get('_content_type',
|
|
750
|
+
self.api_client.select_header_content_type(
|
|
751
|
+
['application/json']))
|
|
752
|
+
if _content_types_list:
|
|
753
|
+
_header_params['Content-Type'] = _content_types_list
|
|
754
|
+
|
|
755
|
+
# authentication setting
|
|
756
|
+
_auth_settings = ['ProjectTokenAuth'] # noqa: E501
|
|
757
|
+
|
|
758
|
+
_response_types_map = {
|
|
759
|
+
'200': "SignCredentialResultDto",
|
|
760
|
+
'400': "SignCredential400Response",
|
|
761
|
+
'403': "OperationForbiddenError",
|
|
762
|
+
'404': "NotFoundError",
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
return self.api_client.call_api(
|
|
766
|
+
'/v1/wallets/{walletId}/sign-credential', 'POST',
|
|
767
|
+
_path_params,
|
|
768
|
+
_query_params,
|
|
769
|
+
_header_params,
|
|
770
|
+
body=_body_params,
|
|
771
|
+
post_params=_form_params,
|
|
772
|
+
files=_files,
|
|
773
|
+
response_types_map=_response_types_map,
|
|
774
|
+
auth_settings=_auth_settings,
|
|
775
|
+
async_req=_params.get('async_req'),
|
|
776
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
|
777
|
+
_preload_content=_params.get('_preload_content', True),
|
|
778
|
+
_request_timeout=_params.get('_request_timeout'),
|
|
779
|
+
collection_formats=_collection_formats,
|
|
780
|
+
_request_auth=_params.get('_request_auth'))
|
|
781
|
+
|
|
782
|
+
@validate_arguments
|
|
783
|
+
def sign_jwt_token(self, wallet_id : Annotated[StrictStr, Field(..., description="id of the wallet.")], sign_jwt_token : Annotated[SignJwtToken, Field(..., description="SignJwtToken")], **kwargs) -> SignJwtTokenOK: # noqa: E501
|
|
784
|
+
"""sign_jwt_token # noqa: E501
|
|
785
|
+
|
|
786
|
+
signs a jwt token with the wallet # noqa: E501
|
|
787
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
788
|
+
asynchronous HTTP request, please pass async_req=True
|
|
789
|
+
|
|
790
|
+
>>> thread = api.sign_jwt_token(wallet_id, sign_jwt_token, async_req=True)
|
|
791
|
+
>>> result = thread.get()
|
|
792
|
+
|
|
793
|
+
:param wallet_id: id of the wallet. (required)
|
|
794
|
+
:type wallet_id: str
|
|
795
|
+
:param sign_jwt_token: SignJwtToken (required)
|
|
796
|
+
:type sign_jwt_token: SignJwtToken
|
|
797
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
798
|
+
:type async_req: bool, optional
|
|
799
|
+
:param _request_timeout: timeout setting for this request.
|
|
800
|
+
If one number provided, it will be total request
|
|
801
|
+
timeout. It can also be a pair (tuple) of
|
|
802
|
+
(connection, read) timeouts.
|
|
803
|
+
:return: Returns the result object.
|
|
804
|
+
If the method is called asynchronously,
|
|
805
|
+
returns the request thread.
|
|
806
|
+
:rtype: SignJwtTokenOK
|
|
807
|
+
"""
|
|
808
|
+
kwargs['_return_http_data_only'] = True
|
|
809
|
+
if '_preload_content' in kwargs:
|
|
810
|
+
message = "Error! Please call the sign_jwt_token_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
|
811
|
+
raise ValueError(message)
|
|
812
|
+
return self.sign_jwt_token_with_http_info(wallet_id, sign_jwt_token, **kwargs) # noqa: E501
|
|
813
|
+
|
|
814
|
+
@validate_arguments
|
|
815
|
+
def sign_jwt_token_with_http_info(self, wallet_id : Annotated[StrictStr, Field(..., description="id of the wallet.")], sign_jwt_token : Annotated[SignJwtToken, Field(..., description="SignJwtToken")], **kwargs) -> ApiResponse: # noqa: E501
|
|
816
|
+
"""sign_jwt_token # noqa: E501
|
|
817
|
+
|
|
818
|
+
signs a jwt token with the wallet # noqa: E501
|
|
819
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
820
|
+
asynchronous HTTP request, please pass async_req=True
|
|
821
|
+
|
|
822
|
+
>>> thread = api.sign_jwt_token_with_http_info(wallet_id, sign_jwt_token, async_req=True)
|
|
823
|
+
>>> result = thread.get()
|
|
824
|
+
|
|
825
|
+
:param wallet_id: id of the wallet. (required)
|
|
826
|
+
:type wallet_id: str
|
|
827
|
+
:param sign_jwt_token: SignJwtToken (required)
|
|
828
|
+
:type sign_jwt_token: SignJwtToken
|
|
829
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
830
|
+
:type async_req: bool, optional
|
|
831
|
+
:param _preload_content: if False, the ApiResponse.data will
|
|
832
|
+
be set to none and raw_data will store the
|
|
833
|
+
HTTP response body without reading/decoding.
|
|
834
|
+
Default is True.
|
|
835
|
+
:type _preload_content: bool, optional
|
|
836
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
|
837
|
+
object with status code, headers, etc
|
|
838
|
+
:type _return_http_data_only: bool, optional
|
|
839
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
840
|
+
number provided, it will be total request
|
|
841
|
+
timeout. It can also be a pair (tuple) of
|
|
842
|
+
(connection, read) timeouts.
|
|
843
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
844
|
+
request; this effectively ignores the authentication
|
|
845
|
+
in the spec for a single request.
|
|
846
|
+
:type _request_auth: dict, optional
|
|
847
|
+
:type _content_type: string, optional: force content-type for the request
|
|
848
|
+
:return: Returns the result object.
|
|
849
|
+
If the method is called asynchronously,
|
|
850
|
+
returns the request thread.
|
|
851
|
+
:rtype: tuple(SignJwtTokenOK, status_code(int), headers(HTTPHeaderDict))
|
|
852
|
+
"""
|
|
853
|
+
|
|
854
|
+
_params = locals()
|
|
855
|
+
|
|
856
|
+
_all_params = [
|
|
857
|
+
'wallet_id',
|
|
858
|
+
'sign_jwt_token'
|
|
859
|
+
]
|
|
860
|
+
_all_params.extend(
|
|
861
|
+
[
|
|
862
|
+
'async_req',
|
|
863
|
+
'_return_http_data_only',
|
|
864
|
+
'_preload_content',
|
|
865
|
+
'_request_timeout',
|
|
866
|
+
'_request_auth',
|
|
867
|
+
'_content_type',
|
|
868
|
+
'_headers'
|
|
869
|
+
]
|
|
870
|
+
)
|
|
871
|
+
|
|
872
|
+
# validate the arguments
|
|
873
|
+
for _key, _val in _params['kwargs'].items():
|
|
874
|
+
if _key not in _all_params:
|
|
875
|
+
raise ApiTypeError(
|
|
876
|
+
"Got an unexpected keyword argument '%s'"
|
|
877
|
+
" to method sign_jwt_token" % _key
|
|
878
|
+
)
|
|
879
|
+
_params[_key] = _val
|
|
880
|
+
del _params['kwargs']
|
|
881
|
+
|
|
882
|
+
_collection_formats = {}
|
|
883
|
+
|
|
884
|
+
# process the path parameters
|
|
885
|
+
_path_params = {}
|
|
886
|
+
if _params['wallet_id'] is not None:
|
|
887
|
+
_path_params['walletId'] = _params['wallet_id']
|
|
888
|
+
|
|
889
|
+
|
|
890
|
+
# process the query parameters
|
|
891
|
+
_query_params = []
|
|
892
|
+
# process the header parameters
|
|
893
|
+
_header_params = dict(_params.get('_headers', {}))
|
|
894
|
+
# process the form parameters
|
|
895
|
+
_form_params = []
|
|
896
|
+
_files = {}
|
|
897
|
+
# process the body parameter
|
|
898
|
+
_body_params = None
|
|
899
|
+
if _params['sign_jwt_token'] is not None:
|
|
900
|
+
_body_params = _params['sign_jwt_token']
|
|
901
|
+
|
|
902
|
+
# set the HTTP header `Accept`
|
|
903
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
904
|
+
['application/json']) # noqa: E501
|
|
905
|
+
|
|
906
|
+
# set the HTTP header `Content-Type`
|
|
907
|
+
_content_types_list = _params.get('_content_type',
|
|
908
|
+
self.api_client.select_header_content_type(
|
|
909
|
+
['application/json']))
|
|
910
|
+
if _content_types_list:
|
|
911
|
+
_header_params['Content-Type'] = _content_types_list
|
|
912
|
+
|
|
913
|
+
# authentication setting
|
|
914
|
+
_auth_settings = ['ProjectTokenAuth'] # noqa: E501
|
|
915
|
+
|
|
916
|
+
_response_types_map = {
|
|
917
|
+
'200': "SignJwtTokenOK",
|
|
918
|
+
'400': "InvalidParameterError",
|
|
919
|
+
'403': "OperationForbiddenError",
|
|
920
|
+
'404': "NotFoundError",
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
return self.api_client.call_api(
|
|
924
|
+
'/v1/wallets/{walletId}/sign-jwt', 'POST',
|
|
925
|
+
_path_params,
|
|
926
|
+
_query_params,
|
|
927
|
+
_header_params,
|
|
928
|
+
body=_body_params,
|
|
929
|
+
post_params=_form_params,
|
|
930
|
+
files=_files,
|
|
931
|
+
response_types_map=_response_types_map,
|
|
932
|
+
auth_settings=_auth_settings,
|
|
933
|
+
async_req=_params.get('async_req'),
|
|
934
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
|
935
|
+
_preload_content=_params.get('_preload_content', True),
|
|
936
|
+
_request_timeout=_params.get('_request_timeout'),
|
|
937
|
+
collection_formats=_collection_formats,
|
|
938
|
+
_request_auth=_params.get('_request_auth'))
|
|
939
|
+
|
|
940
|
+
@validate_arguments
|
|
941
|
+
def update_wallet(self, wallet_id : Annotated[StrictStr, Field(..., description="id of the wallet")], update_wallet_input : Annotated[UpdateWalletInput, Field(..., description="UpdateWallet")], **kwargs) -> WalletDto: # noqa: E501
|
|
942
|
+
"""update_wallet # noqa: E501
|
|
943
|
+
|
|
944
|
+
update wallet details using wallet Id. # noqa: E501
|
|
945
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
946
|
+
asynchronous HTTP request, please pass async_req=True
|
|
947
|
+
|
|
948
|
+
>>> thread = api.update_wallet(wallet_id, update_wallet_input, async_req=True)
|
|
949
|
+
>>> result = thread.get()
|
|
950
|
+
|
|
951
|
+
:param wallet_id: id of the wallet (required)
|
|
952
|
+
:type wallet_id: str
|
|
953
|
+
:param update_wallet_input: UpdateWallet (required)
|
|
954
|
+
:type update_wallet_input: UpdateWalletInput
|
|
955
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
956
|
+
:type async_req: bool, optional
|
|
957
|
+
:param _request_timeout: timeout setting for this request.
|
|
958
|
+
If one number provided, it will be total request
|
|
959
|
+
timeout. It can also be a pair (tuple) of
|
|
960
|
+
(connection, read) timeouts.
|
|
961
|
+
:return: Returns the result object.
|
|
962
|
+
If the method is called asynchronously,
|
|
963
|
+
returns the request thread.
|
|
964
|
+
:rtype: WalletDto
|
|
965
|
+
"""
|
|
966
|
+
kwargs['_return_http_data_only'] = True
|
|
967
|
+
if '_preload_content' in kwargs:
|
|
968
|
+
message = "Error! Please call the update_wallet_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
|
969
|
+
raise ValueError(message)
|
|
970
|
+
return self.update_wallet_with_http_info(wallet_id, update_wallet_input, **kwargs) # noqa: E501
|
|
971
|
+
|
|
972
|
+
@validate_arguments
|
|
973
|
+
def update_wallet_with_http_info(self, wallet_id : Annotated[StrictStr, Field(..., description="id of the wallet")], update_wallet_input : Annotated[UpdateWalletInput, Field(..., description="UpdateWallet")], **kwargs) -> ApiResponse: # noqa: E501
|
|
974
|
+
"""update_wallet # noqa: E501
|
|
975
|
+
|
|
976
|
+
update wallet details using wallet Id. # noqa: E501
|
|
977
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
978
|
+
asynchronous HTTP request, please pass async_req=True
|
|
979
|
+
|
|
980
|
+
>>> thread = api.update_wallet_with_http_info(wallet_id, update_wallet_input, async_req=True)
|
|
981
|
+
>>> result = thread.get()
|
|
982
|
+
|
|
983
|
+
:param wallet_id: id of the wallet (required)
|
|
984
|
+
:type wallet_id: str
|
|
985
|
+
:param update_wallet_input: UpdateWallet (required)
|
|
986
|
+
:type update_wallet_input: UpdateWalletInput
|
|
987
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
988
|
+
:type async_req: bool, optional
|
|
989
|
+
:param _preload_content: if False, the ApiResponse.data will
|
|
990
|
+
be set to none and raw_data will store the
|
|
991
|
+
HTTP response body without reading/decoding.
|
|
992
|
+
Default is True.
|
|
993
|
+
:type _preload_content: bool, optional
|
|
994
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
|
995
|
+
object with status code, headers, etc
|
|
996
|
+
:type _return_http_data_only: bool, optional
|
|
997
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
998
|
+
number provided, it will be total request
|
|
999
|
+
timeout. It can also be a pair (tuple) of
|
|
1000
|
+
(connection, read) timeouts.
|
|
1001
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1002
|
+
request; this effectively ignores the authentication
|
|
1003
|
+
in the spec for a single request.
|
|
1004
|
+
:type _request_auth: dict, optional
|
|
1005
|
+
:type _content_type: string, optional: force content-type for the request
|
|
1006
|
+
:return: Returns the result object.
|
|
1007
|
+
If the method is called asynchronously,
|
|
1008
|
+
returns the request thread.
|
|
1009
|
+
:rtype: tuple(WalletDto, status_code(int), headers(HTTPHeaderDict))
|
|
1010
|
+
"""
|
|
1011
|
+
|
|
1012
|
+
_params = locals()
|
|
1013
|
+
|
|
1014
|
+
_all_params = [
|
|
1015
|
+
'wallet_id',
|
|
1016
|
+
'update_wallet_input'
|
|
1017
|
+
]
|
|
1018
|
+
_all_params.extend(
|
|
1019
|
+
[
|
|
1020
|
+
'async_req',
|
|
1021
|
+
'_return_http_data_only',
|
|
1022
|
+
'_preload_content',
|
|
1023
|
+
'_request_timeout',
|
|
1024
|
+
'_request_auth',
|
|
1025
|
+
'_content_type',
|
|
1026
|
+
'_headers'
|
|
1027
|
+
]
|
|
1028
|
+
)
|
|
1029
|
+
|
|
1030
|
+
# validate the arguments
|
|
1031
|
+
for _key, _val in _params['kwargs'].items():
|
|
1032
|
+
if _key not in _all_params:
|
|
1033
|
+
raise ApiTypeError(
|
|
1034
|
+
"Got an unexpected keyword argument '%s'"
|
|
1035
|
+
" to method update_wallet" % _key
|
|
1036
|
+
)
|
|
1037
|
+
_params[_key] = _val
|
|
1038
|
+
del _params['kwargs']
|
|
1039
|
+
|
|
1040
|
+
_collection_formats = {}
|
|
1041
|
+
|
|
1042
|
+
# process the path parameters
|
|
1043
|
+
_path_params = {}
|
|
1044
|
+
if _params['wallet_id'] is not None:
|
|
1045
|
+
_path_params['walletId'] = _params['wallet_id']
|
|
1046
|
+
|
|
1047
|
+
|
|
1048
|
+
# process the query parameters
|
|
1049
|
+
_query_params = []
|
|
1050
|
+
# process the header parameters
|
|
1051
|
+
_header_params = dict(_params.get('_headers', {}))
|
|
1052
|
+
# process the form parameters
|
|
1053
|
+
_form_params = []
|
|
1054
|
+
_files = {}
|
|
1055
|
+
# process the body parameter
|
|
1056
|
+
_body_params = None
|
|
1057
|
+
if _params['update_wallet_input'] is not None:
|
|
1058
|
+
_body_params = _params['update_wallet_input']
|
|
1059
|
+
|
|
1060
|
+
# set the HTTP header `Accept`
|
|
1061
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1062
|
+
['application/json']) # noqa: E501
|
|
1063
|
+
|
|
1064
|
+
# set the HTTP header `Content-Type`
|
|
1065
|
+
_content_types_list = _params.get('_content_type',
|
|
1066
|
+
self.api_client.select_header_content_type(
|
|
1067
|
+
['application/json']))
|
|
1068
|
+
if _content_types_list:
|
|
1069
|
+
_header_params['Content-Type'] = _content_types_list
|
|
1070
|
+
|
|
1071
|
+
# authentication setting
|
|
1072
|
+
_auth_settings = ['ProjectTokenAuth'] # noqa: E501
|
|
1073
|
+
|
|
1074
|
+
_response_types_map = {
|
|
1075
|
+
'200': "WalletDto",
|
|
1076
|
+
'400': "InvalidParameterError",
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
return self.api_client.call_api(
|
|
1080
|
+
'/v1/wallets/{walletId}', 'PATCH',
|
|
1081
|
+
_path_params,
|
|
1082
|
+
_query_params,
|
|
1083
|
+
_header_params,
|
|
1084
|
+
body=_body_params,
|
|
1085
|
+
post_params=_form_params,
|
|
1086
|
+
files=_files,
|
|
1087
|
+
response_types_map=_response_types_map,
|
|
1088
|
+
auth_settings=_auth_settings,
|
|
1089
|
+
async_req=_params.get('async_req'),
|
|
1090
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
|
1091
|
+
_preload_content=_params.get('_preload_content', True),
|
|
1092
|
+
_request_timeout=_params.get('_request_timeout'),
|
|
1093
|
+
collection_formats=_collection_formats,
|
|
1094
|
+
_request_auth=_params.get('_request_auth'))
|