affinidi_tdk_wallets_client 1.28.0__py3-none-any.whl → 1.29.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.

@@ -19,7 +19,6 @@ __version__ = "1.0.0"
19
19
 
20
20
  # import apis into sdk package
21
21
  from affinidi_tdk_wallets_client.api.revocation_api import RevocationApi
22
- from affinidi_tdk_wallets_client.api.default_api import DefaultApi
23
22
  from affinidi_tdk_wallets_client.api.wallet_api import WalletApi
24
23
 
25
24
  # import ApiClient
@@ -2,6 +2,5 @@
2
2
 
3
3
  # import apis into api package
4
4
  from affinidi_tdk_wallets_client.api.revocation_api import RevocationApi
5
- from affinidi_tdk_wallets_client.api.default_api import DefaultApi
6
5
  from affinidi_tdk_wallets_client.api.wallet_api import WalletApi
7
6
 
@@ -45,6 +45,163 @@ class RevocationApi:
45
45
  api_client = ApiClient.get_default()
46
46
  self.api_client = api_client
47
47
 
48
+ @validate_arguments
49
+ def get_revocation_credential_status(self, project_id : Annotated[StrictStr, Field(..., description="Description for projectId.")], wallet_id : Annotated[StrictStr, Field(..., description="Description for walletId.")], status_id : Annotated[StrictStr, Field(..., description="Description for statusId.")], **kwargs) -> GetRevocationListCredentialResultDto: # noqa: E501
50
+ """get_revocation_credential_status # noqa: E501
51
+
52
+ Get revocation status list as RevocationListCredential # noqa: E501
53
+ This method makes a synchronous HTTP request by default. To make an
54
+ asynchronous HTTP request, please pass async_req=True
55
+
56
+ >>> thread = api.get_revocation_credential_status(project_id, wallet_id, status_id, async_req=True)
57
+ >>> result = thread.get()
58
+
59
+ :param project_id: Description for projectId. (required)
60
+ :type project_id: str
61
+ :param wallet_id: Description for walletId. (required)
62
+ :type wallet_id: str
63
+ :param status_id: Description for statusId. (required)
64
+ :type status_id: str
65
+ :param async_req: Whether to execute the request asynchronously.
66
+ :type async_req: bool, optional
67
+ :param _request_timeout: timeout setting for this request.
68
+ If one number provided, it will be total request
69
+ timeout. It can also be a pair (tuple) of
70
+ (connection, read) timeouts.
71
+ :return: Returns the result object.
72
+ If the method is called asynchronously,
73
+ returns the request thread.
74
+ :rtype: GetRevocationListCredentialResultDto
75
+ """
76
+ kwargs['_return_http_data_only'] = True
77
+ if '_preload_content' in kwargs:
78
+ message = "Error! Please call the get_revocation_credential_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
79
+ raise ValueError(message)
80
+ return self.get_revocation_credential_status_with_http_info(project_id, wallet_id, status_id, **kwargs) # noqa: E501
81
+
82
+ @validate_arguments
83
+ def get_revocation_credential_status_with_http_info(self, project_id : Annotated[StrictStr, Field(..., description="Description for projectId.")], wallet_id : Annotated[StrictStr, Field(..., description="Description for walletId.")], status_id : Annotated[StrictStr, Field(..., description="Description for statusId.")], **kwargs) -> ApiResponse: # noqa: E501
84
+ """get_revocation_credential_status # noqa: E501
85
+
86
+ Get revocation status list as RevocationListCredential # noqa: E501
87
+ This method makes a synchronous HTTP request by default. To make an
88
+ asynchronous HTTP request, please pass async_req=True
89
+
90
+ >>> thread = api.get_revocation_credential_status_with_http_info(project_id, wallet_id, status_id, async_req=True)
91
+ >>> result = thread.get()
92
+
93
+ :param project_id: Description for projectId. (required)
94
+ :type project_id: str
95
+ :param wallet_id: Description for walletId. (required)
96
+ :type wallet_id: str
97
+ :param status_id: Description for statusId. (required)
98
+ :type status_id: str
99
+ :param async_req: Whether to execute the request asynchronously.
100
+ :type async_req: bool, optional
101
+ :param _preload_content: if False, the ApiResponse.data will
102
+ be set to none and raw_data will store the
103
+ HTTP response body without reading/decoding.
104
+ Default is True.
105
+ :type _preload_content: bool, optional
106
+ :param _return_http_data_only: response data instead of ApiResponse
107
+ object with status code, headers, etc
108
+ :type _return_http_data_only: bool, optional
109
+ :param _request_timeout: timeout setting for this request. If one
110
+ number provided, it will be total request
111
+ timeout. It can also be a pair (tuple) of
112
+ (connection, read) timeouts.
113
+ :param _request_auth: set to override the auth_settings for an a single
114
+ request; this effectively ignores the authentication
115
+ in the spec for a single request.
116
+ :type _request_auth: dict, optional
117
+ :type _content_type: string, optional: force content-type for the request
118
+ :return: Returns the result object.
119
+ If the method is called asynchronously,
120
+ returns the request thread.
121
+ :rtype: tuple(GetRevocationListCredentialResultDto, status_code(int), headers(HTTPHeaderDict))
122
+ """
123
+
124
+ _params = locals()
125
+
126
+ _all_params = [
127
+ 'project_id',
128
+ 'wallet_id',
129
+ 'status_id'
130
+ ]
131
+ _all_params.extend(
132
+ [
133
+ 'async_req',
134
+ '_return_http_data_only',
135
+ '_preload_content',
136
+ '_request_timeout',
137
+ '_request_auth',
138
+ '_content_type',
139
+ '_headers'
140
+ ]
141
+ )
142
+
143
+ # validate the arguments
144
+ for _key, _val in _params['kwargs'].items():
145
+ if _key not in _all_params:
146
+ raise ApiTypeError(
147
+ "Got an unexpected keyword argument '%s'"
148
+ " to method get_revocation_credential_status" % _key
149
+ )
150
+ _params[_key] = _val
151
+ del _params['kwargs']
152
+
153
+ _collection_formats = {}
154
+
155
+ # process the path parameters
156
+ _path_params = {}
157
+ if _params['project_id'] is not None:
158
+ _path_params['projectId'] = _params['project_id']
159
+
160
+ if _params['wallet_id'] is not None:
161
+ _path_params['walletId'] = _params['wallet_id']
162
+
163
+ if _params['status_id'] is not None:
164
+ _path_params['statusId'] = _params['status_id']
165
+
166
+
167
+ # process the query parameters
168
+ _query_params = []
169
+ # process the header parameters
170
+ _header_params = dict(_params.get('_headers', {}))
171
+ # process the form parameters
172
+ _form_params = []
173
+ _files = {}
174
+ # process the body parameter
175
+ _body_params = None
176
+ # set the HTTP header `Accept`
177
+ _header_params['Accept'] = self.api_client.select_header_accept(
178
+ ['application/json']) # noqa: E501
179
+
180
+ # authentication setting
181
+ _auth_settings = ['ProjectTokenAuth'] # noqa: E501
182
+
183
+ _response_types_map = {
184
+ '200': "GetRevocationListCredentialResultDto",
185
+ '404': "NotFoundError",
186
+ }
187
+
188
+ return self.api_client.call_api(
189
+ '/v1/projects/{projectId}/wallets/{walletId}/revocation-statuses/{statusId}', 'GET',
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
+
48
205
  @validate_arguments
49
206
  def get_revocation_list_credential(self, list_id : StrictStr, wallet_id : Annotated[StrictStr, Field(..., description="id of the wallet")], **kwargs) -> GetRevocationListCredentialResultDto: # noqa: E501
50
207
  """(Deprecated) Return revocation list credential. # noqa: E501
@@ -348,7 +348,7 @@ conf = affinidi_tdk_wallets_client.Configuration(
348
348
  :return: The token for api key authentication.
349
349
  """
350
350
  if self.refresh_api_key_hook is not None:
351
- self.refresh_api_key_hook(self)
351
+ return self.refresh_api_key_hook(self)
352
352
  key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None)
353
353
  if key:
354
354
  prefix = self.api_key_prefix.get(identifier)
@@ -201,6 +201,8 @@ class RESTClientObject:
201
201
  # Content-Type which generated by urllib3 will be
202
202
  # overwritten.
203
203
  del headers['Content-Type']
204
+ # Ensures that dict objects are serialized
205
+ post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params]
204
206
  r = self.pool_manager.request(
205
207
  method, url,
206
208
  fields=post_params,
@@ -1,21 +1,21 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: affinidi_tdk_wallets_client
3
- Version: 1.28.0
3
+ Version: 1.29.0
4
4
  Summary: CloudWalletEssentials
5
5
  Home-page: https://github.com/affinidi.com/affinidi-tdk
6
6
  License: Apache-2.0
7
7
  Keywords: OpenAPI,OpenAPI-Generator,CloudWalletEssentials
8
8
  Author: Affinidi
9
9
  Author-email: info@affinidi.com
10
- Requires-Python: >=3.7,<4.0
10
+ Requires-Python: >=3.8,<4.0
11
11
  Classifier: License :: OSI Approved :: Apache Software License
12
12
  Classifier: Programming Language :: Python :: 3
13
- Classifier: Programming Language :: Python :: 3.7
14
13
  Classifier: Programming Language :: Python :: 3.8
15
14
  Classifier: Programming Language :: Python :: 3.9
16
15
  Classifier: Programming Language :: Python :: 3.10
17
16
  Classifier: Programming Language :: Python :: 3.11
18
17
  Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
19
  Requires-Dist: aenum (>=3.1.11)
20
20
  Requires-Dist: pydantic (>=1.10.5,<2.0.0)
21
21
  Requires-Dist: python-dateutil (>=2.8.2)
@@ -94,6 +94,21 @@ configuration = affinidi_tdk_wallets_client.Configuration(
94
94
  # Configure API key authorization: ProjectTokenAuth
95
95
  configuration.api_key['ProjectTokenAuth'] = os.environ["API_KEY"]
96
96
 
97
+ # Configure a hook to auto-refresh API key for your personal access token (PAT), if expired
98
+ import affinidi_tdk_auth_provider
99
+
100
+ stats = {
101
+ apiGatewayUrl,
102
+ keyId,
103
+ passphrase,
104
+ privateKey,
105
+ projectId,
106
+ tokenEndpoint,
107
+ tokenId,
108
+ }
109
+ authProvider = affinidi_tdk_auth_provider.AuthProvider(stats)
110
+ configuration.refresh_api_key_hook = lambda api_client: authProvider.fetch_project_scoped_token()
111
+
97
112
  # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
98
113
  # configuration.api_key_prefix['ProjectTokenAuth'] = 'Bearer'
99
114
 
@@ -102,16 +117,16 @@ configuration.api_key['ProjectTokenAuth'] = os.environ["API_KEY"]
102
117
  with affinidi_tdk_wallets_client.ApiClient(configuration) as api_client:
103
118
  # Create an instance of the API class
104
119
  api_instance = affinidi_tdk_wallets_client.RevocationApi(api_client)
105
- list_id = 'list_id_example' # str |
106
- wallet_id = 'wallet_id_example' # str | id of the wallet
120
+ project_id = 'project_id_example' # str | Description for projectId.
121
+ wallet_id = 'wallet_id_example' # str | Description for walletId.
122
+ status_id = 'status_id_example' # str | Description for statusId.
107
123
 
108
124
  try:
109
- # Return revocation list credential.
110
- api_response = api_instance.get_revocation_list_credential(list_id, wallet_id)
111
- print("The response of RevocationApi->get_revocation_list_credential:\n")
125
+ api_response = api_instance.get_revocation_credential_status(project_id, wallet_id, status_id)
126
+ print("The response of RevocationApi->get_revocation_credential_status:\n")
112
127
  pprint(api_response)
113
128
  except ApiException as e:
114
- print("Exception when calling RevocationApi->get_revocation_list_credential: %s\n" % e)
129
+ print("Exception when calling RevocationApi->get_revocation_credential_status: %s\n" % e)
115
130
 
116
131
  ```
117
132
 
@@ -119,18 +134,18 @@ with affinidi_tdk_wallets_client.ApiClient(configuration) as api_client:
119
134
 
120
135
  All URIs are relative to *https://apse1.api.affinidi.io/cwe*
121
136
 
122
- | Class | Method | HTTP request | Description |
123
- | --------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------- |
124
- | _RevocationApi_ | [**get_revocation_list_credential**](docs/RevocationApi.md#get_revocation_list_credential) | **GET** /v1/wallets/{walletId}/revocation-list/{listId} | Return revocation list credential. |
125
- | _RevocationApi_ | [**revoke_credential**](docs/RevocationApi.md#revoke_credential) | **POST** /v1/wallets/{walletId}/revoke | Revoke Credential. |
126
- | _DefaultApi_ | [**get_revocation_credential_status**](docs/DefaultApi.md#get_revocation_credential_status) | **GET** /v1/projects/{projectId}/wallets/{walletId}/revocation-statuses/{statusId} |
127
- | _WalletApi_ | [**create_wallet**](docs/WalletApi.md#create_wallet) | **POST** /v1/wallets |
128
- | _WalletApi_ | [**delete_wallet**](docs/WalletApi.md#delete_wallet) | **DELETE** /v1/wallets/{walletId} |
129
- | _WalletApi_ | [**get_wallet**](docs/WalletApi.md#get_wallet) | **GET** /v1/wallets/{walletId} |
130
- | _WalletApi_ | [**list_wallets**](docs/WalletApi.md#list_wallets) | **GET** /v1/wallets |
131
- | _WalletApi_ | [**sign_credential**](docs/WalletApi.md#sign_credential) | **POST** /v1/wallets/{walletId}/sign-credential |
132
- | _WalletApi_ | [**sign_jwt_token**](docs/WalletApi.md#sign_jwt_token) | **POST** /v1/wallets/{walletId}/sign-jwt |
133
- | _WalletApi_ | [**update_wallet**](docs/WalletApi.md#update_wallet) | **PATCH** /v1/wallets/{walletId} |
137
+ | Class | Method | HTTP request | Description |
138
+ | --------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------- |
139
+ | _RevocationApi_ | [**get_revocation_credential_status**](docs/RevocationApi.md#get_revocation_credential_status) | **GET** /v1/projects/{projectId}/wallets/{walletId}/revocation-statuses/{statusId} |
140
+ | _RevocationApi_ | [**get_revocation_list_credential**](docs/RevocationApi.md#get_revocation_list_credential) | **GET** /v1/wallets/{walletId}/revocation-list/{listId} | Return revocation list credential. |
141
+ | _RevocationApi_ | [**revoke_credential**](docs/RevocationApi.md#revoke_credential) | **POST** /v1/wallets/{walletId}/revoke | Revoke Credential. |
142
+ | _WalletApi_ | [**create_wallet**](docs/WalletApi.md#create_wallet) | **POST** /v1/wallets |
143
+ | _WalletApi_ | [**delete_wallet**](docs/WalletApi.md#delete_wallet) | **DELETE** /v1/wallets/{walletId} |
144
+ | _WalletApi_ | [**get_wallet**](docs/WalletApi.md#get_wallet) | **GET** /v1/wallets/{walletId} |
145
+ | _WalletApi_ | [**list_wallets**](docs/WalletApi.md#list_wallets) | **GET** /v1/wallets |
146
+ | _WalletApi_ | [**sign_credential**](docs/WalletApi.md#sign_credential) | **POST** /v1/wallets/{walletId}/sign-credential |
147
+ | _WalletApi_ | [**sign_jwt_token**](docs/WalletApi.md#sign_jwt_token) | **POST** /v1/wallets/{walletId}/sign-jwt |
148
+ | _WalletApi_ | [**update_wallet**](docs/WalletApi.md#update_wallet) | **PATCH** /v1/wallets/{walletId} |
134
149
 
135
150
  ## Documentation For Models
136
151
 
@@ -1,11 +1,11 @@
1
- affinidi_tdk_wallets_client/__init__.py,sha256=wHKLR6MBS9l3-n2JKCeL_YLkTdCcP5TFi86K_sBsjjA,3846
2
- affinidi_tdk_wallets_client/api/__init__.py,sha256=6lDsMuTp0a4fXfhi1Et1tuj59ejdyfVf7HC2MVy8R5k,253
1
+ affinidi_tdk_wallets_client/__init__.py,sha256=A6_J1gd1J-2d7gsqZTeNdkJU_G2RkrptR7h38WxzTJ0,3779
2
+ affinidi_tdk_wallets_client/api/__init__.py,sha256=NL6jeFJGXehRJgB6xh1xVXYh0Q8mnlBFwPRkD7oQeXc,186
3
3
  affinidi_tdk_wallets_client/api/default_api.py,sha256=YfcUd4Ag6_Foq_AyIhVXwZCF6W0JZxi3sdqhYaS2tOI,8714
4
- affinidi_tdk_wallets_client/api/revocation_api.py,sha256=4_q12L5BJ3gcsBkDeG16eVbsii5pw_lYI46l8246KOo,15260
4
+ affinidi_tdk_wallets_client/api/revocation_api.py,sha256=SmgoJFCeNji8kP5SZBGytZ9JHQQkdyL7xDHqbtbrehM,22730
5
5
  affinidi_tdk_wallets_client/api/wallet_api.py,sha256=xhssqZq1fOUyr4pcHoK269fn_HrxDWEGEUMDCUSRC7k,47132
6
6
  affinidi_tdk_wallets_client/api_client.py,sha256=lyYuB3Gv5PM44HZL-TWFLR8_bmi_hbrc7c4-8Tq6KRI,29644
7
7
  affinidi_tdk_wallets_client/api_response.py,sha256=uCehWdXXDnAO2HAHGKe0SgpQ_mJiGDbcu-BHDF3n_IM,852
8
- affinidi_tdk_wallets_client/configuration.py,sha256=qnk7hyrCBHRKLQzPmS8imghdcHRse9mgKYj-aJ8tr1E,15392
8
+ affinidi_tdk_wallets_client/configuration.py,sha256=Izm7JnraXZibNroBy-hcxWGA6Ig8LHFMhV9XoNVXo5I,15399
9
9
  affinidi_tdk_wallets_client/exceptions.py,sha256=FDQp4evUNGVo6Tg4Sn1Q13VDalhEsMHp5a5bz1dWgOM,5470
10
10
  affinidi_tdk_wallets_client/models/__init__.py,sha256=6gffmfOvAL5aDJ0joGM8MbHxe_3wyuwUcAYgYK4U63o,2980
11
11
  affinidi_tdk_wallets_client/models/create_wallet_input.py,sha256=-1Jgaxt4n_jyNuvCK7a8RDYk85qR0oefr8zNxvMG7NQ,5444
@@ -36,7 +36,7 @@ affinidi_tdk_wallets_client/models/wallet_dto.py,sha256=Kxx0F-Oz8Zsa8Ik_eDphbDfL
36
36
  affinidi_tdk_wallets_client/models/wallet_dto_keys_inner.py,sha256=RoUZdZBbKbXSq_eFx8-qAbp_DSJ6JGIQbYhTv3ceMmg,2149
37
37
  affinidi_tdk_wallets_client/models/wallets_list_dto.py,sha256=L4B0y7Ts1ozA2td6FJw81V25O535cCA2gKyEgVOeYvk,2444
38
38
  affinidi_tdk_wallets_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
- affinidi_tdk_wallets_client/rest.py,sha256=9I0ImJHeWIxCe4F7vna2cSa7_iF_WukIpgvWpakn7wY,13934
40
- affinidi_tdk_wallets_client-1.28.0.dist-info/METADATA,sha256=pUi54Na5ecYJW8fZAYFbZ1u0qwBE9I4n-AAu6PPs32U,8223
41
- affinidi_tdk_wallets_client-1.28.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
42
- affinidi_tdk_wallets_client-1.28.0.dist-info/RECORD,,
39
+ affinidi_tdk_wallets_client/rest.py,sha256=wd2Ze-oKd0Di0D_sbPubYWuT2_Rg31uImCk5n996oM4,14110
40
+ affinidi_tdk_wallets_client-1.29.0.dist-info/METADATA,sha256=8PXuYSMTiU9V6s1F9t5B_Cm-R2jRL4i5ZA6ryqP9_-I,8742
41
+ affinidi_tdk_wallets_client-1.29.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
42
+ affinidi_tdk_wallets_client-1.29.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.9.0
2
+ Generator: poetry-core 1.9.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any