Skip to content

Commit 5b8a53d

Browse files
authored
⬆️ Upgrade to latest ACA-Py nightly build (#178)
* ⬆️ Upgrade anyio * 0.12.2b0 * ✨ new field: additional_properties * ✨ new cred filter: vc_di * ✨ new api: AnoncredsWalletUpgradeApi * ⚠️ "indy" wallet type no longer supported * 🎨 modifies handling when `non_revoked is Null` in to_dict output * 🎨 `domain` field isd no longer regex validated * ✨ adds limit and offset for listing wallets * ✨ adds limit and offset for listing wallets with group_id * 🎨 remove duplicate get_wallets method, keeping only the one supporting group_id
1 parent c816310 commit 5b8a53d

28 files changed

+632
-14477
lines changed

aries_cloudcontroller/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
""" # noqa: E501
1515

1616

17-
__version__ = "0.12.1"
17+
__version__ = "0.12.2b0"
1818

1919
from aries_cloudcontroller.acapy_client import AcaPyClient
2020

@@ -24,6 +24,7 @@
2424
AnoncredsCredentialDefinitionsApi,
2525
AnoncredsRevocationApi,
2626
AnoncredsSchemasApi,
27+
AnoncredsWalletUpgradeApi,
2728
BasicmessageApi,
2829
ConnectionApi,
2930
CredentialDefinitionApi,
@@ -366,6 +367,7 @@
366367
V20CredFilter,
367368
V20CredFilterIndy,
368369
V20CredFilterLDProof,
370+
V20CredFilterVCDI,
369371
V20CredFormat,
370372
V20CredIssue,
371373
V20CredIssueProblemReportRequest,

aries_cloudcontroller/api/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
)
88
from aries_cloudcontroller.api.anoncreds_revocation_api import AnoncredsRevocationApi
99
from aries_cloudcontroller.api.anoncreds_schemas_api import AnoncredsSchemasApi
10+
from aries_cloudcontroller.api.anoncreds_wallet_upgrade_api import (
11+
AnoncredsWalletUpgradeApi,
12+
)
1013
from aries_cloudcontroller.api.basicmessage_api import BasicmessageApi
1114
from aries_cloudcontroller.api.connection_api import ConnectionApi
1215
from aries_cloudcontroller.api.credential_definition_api import CredentialDefinitionApi
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# coding: utf-8
2+
3+
"""
4+
Aries Cloud Agent
5+
6+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7+
8+
The version of the OpenAPI document: v0.12.1
9+
Generated by OpenAPI Generator (https://openapi-generator.tech)
10+
11+
Do not edit the class manually.
12+
""" # noqa: E501
13+
14+
from typing import Any, Dict, List, Optional, Tuple, Union
15+
16+
from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
17+
from typing_extensions import Annotated
18+
19+
from aries_cloudcontroller.api_client import ApiClient, RequestSerialized
20+
21+
22+
class AnoncredsWalletUpgradeApi:
23+
"""NOTE: This class is auto generated by OpenAPI Generator
24+
Ref: https://openapi-generator.tech
25+
26+
Do not edit the class manually.
27+
"""
28+
29+
def __init__(self, api_client=None) -> None:
30+
if api_client is None:
31+
api_client = ApiClient.get_default()
32+
self.api_client = api_client
33+
34+
@validate_call
35+
async def anoncreds_wallet_upgrade_post(
36+
self,
37+
wallet_name: Annotated[
38+
StrictStr, Field(description="Name of wallet to upgrade to anoncreds")
39+
],
40+
_request_timeout: Union[
41+
None,
42+
Annotated[StrictFloat, Field(gt=0)],
43+
Tuple[
44+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
45+
],
46+
] = None,
47+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
48+
_content_type: Optional[StrictStr] = None,
49+
_headers: Optional[Dict[StrictStr, Any]] = None,
50+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
51+
) -> object:
52+
"""Upgrade the wallet from askar to anoncreds - Be very careful with this! You cannot go back! See migration guide for more information.
53+
54+
55+
:param wallet_name: Name of wallet to upgrade to anoncreds (required)
56+
:type wallet_name: str
57+
...
58+
""" # noqa: E501
59+
60+
_param = self._anoncreds_wallet_upgrade_post_serialize(
61+
wallet_name=wallet_name,
62+
_request_auth=_request_auth,
63+
_content_type=_content_type,
64+
_headers=_headers,
65+
_host_index=_host_index,
66+
)
67+
68+
_response_types_map: Dict[str, Optional[str]] = {
69+
"200": "object",
70+
}
71+
response_data = await self.api_client.call_api(
72+
*_param, _request_timeout=_request_timeout
73+
)
74+
await response_data.read()
75+
return self.api_client.response_deserialize(
76+
response_data=response_data,
77+
response_types_map=_response_types_map,
78+
).data
79+
80+
def _anoncreds_wallet_upgrade_post_serialize(
81+
self,
82+
wallet_name,
83+
_request_auth,
84+
_content_type,
85+
_headers,
86+
_host_index,
87+
) -> RequestSerialized:
88+
89+
_host = None
90+
91+
_collection_formats: Dict[str, str] = {}
92+
93+
_path_params: Dict[str, str] = {}
94+
_query_params: List[Tuple[str, str]] = []
95+
_header_params: Dict[str, Optional[str]] = _headers or {}
96+
_form_params: List[Tuple[str, str]] = []
97+
_files: Dict[str, Union[str, bytes]] = {}
98+
_body_params: Optional[bytes] = None
99+
100+
# process the path parameters
101+
# process the query parameters
102+
if wallet_name is not None:
103+
104+
_query_params.append(("wallet_name", wallet_name))
105+
106+
# process the header parameters
107+
# process the form parameters
108+
# process the body parameter
109+
110+
# set the HTTP header `Accept`
111+
_header_params["Accept"] = self.api_client.select_header_accept(
112+
["application/json"]
113+
)
114+
115+
# authentication setting
116+
_auth_settings: List[str] = ["AuthorizationHeader"]
117+
118+
return self.api_client.param_serialize(
119+
method="POST",
120+
resource_path="/anoncreds/wallet/upgrade",
121+
path_params=_path_params,
122+
query_params=_query_params,
123+
header_params=_header_params,
124+
body=_body_params,
125+
post_params=_form_params,
126+
files=_files,
127+
auth_settings=_auth_settings,
128+
collection_formats=_collection_formats,
129+
_host=_host,
130+
_request_auth=_request_auth,
131+
)

aries_cloudcontroller/api/multitenancy_api.py

Lines changed: 20 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -471,105 +471,12 @@ def _get_wallet_serialize(
471471
@validate_call
472472
async def get_wallets(
473473
self,
474-
wallet_name: Annotated[
475-
Optional[StrictStr], Field(description="Wallet name")
474+
limit: Annotated[
475+
Optional[StrictInt], Field(description="Number of results to return")
476476
] = None,
477-
_request_timeout: Union[
478-
None,
479-
Annotated[StrictFloat, Field(gt=0)],
480-
Tuple[
481-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
482-
],
477+
offset: Annotated[
478+
Optional[StrictInt], Field(description="Offset for pagination")
483479
] = None,
484-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
485-
_content_type: Optional[StrictStr] = None,
486-
_headers: Optional[Dict[StrictStr, Any]] = None,
487-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
488-
) -> WalletList:
489-
"""Query subwallets
490-
491-
492-
:param wallet_name: Wallet name
493-
:type wallet_name: str
494-
...
495-
""" # noqa: E501
496-
497-
_param = self._get_wallets_serialize(
498-
wallet_name=wallet_name,
499-
_request_auth=_request_auth,
500-
_content_type=_content_type,
501-
_headers=_headers,
502-
_host_index=_host_index,
503-
)
504-
505-
_response_types_map: Dict[str, Optional[str]] = {
506-
"200": "WalletList",
507-
}
508-
response_data = await self.api_client.call_api(
509-
*_param, _request_timeout=_request_timeout
510-
)
511-
await response_data.read()
512-
return self.api_client.response_deserialize(
513-
response_data=response_data,
514-
response_types_map=_response_types_map,
515-
).data
516-
517-
def _get_wallets_serialize(
518-
self,
519-
wallet_name,
520-
_request_auth,
521-
_content_type,
522-
_headers,
523-
_host_index,
524-
) -> RequestSerialized:
525-
526-
_host = None
527-
528-
_collection_formats: Dict[str, str] = {}
529-
530-
_path_params: Dict[str, str] = {}
531-
_query_params: List[Tuple[str, str]] = []
532-
_header_params: Dict[str, Optional[str]] = _headers or {}
533-
_form_params: List[Tuple[str, str]] = []
534-
_files: Dict[str, Union[str, bytes]] = {}
535-
_body_params: Optional[bytes] = None
536-
537-
# process the path parameters
538-
# process the query parameters
539-
if wallet_name is not None:
540-
541-
_query_params.append(("wallet_name", wallet_name))
542-
543-
# process the header parameters
544-
# process the form parameters
545-
# process the body parameter
546-
547-
# set the HTTP header `Accept`
548-
_header_params["Accept"] = self.api_client.select_header_accept(
549-
["application/json"]
550-
)
551-
552-
# authentication setting
553-
_auth_settings: List[str] = ["AuthorizationHeader"]
554-
555-
return self.api_client.param_serialize(
556-
method="GET",
557-
resource_path="/multitenancy/wallets",
558-
path_params=_path_params,
559-
query_params=_query_params,
560-
header_params=_header_params,
561-
body=_body_params,
562-
post_params=_form_params,
563-
files=_files,
564-
auth_settings=_auth_settings,
565-
collection_formats=_collection_formats,
566-
_host=_host,
567-
_request_auth=_request_auth,
568-
)
569-
570-
@validate_call
571-
async def get_wallets(
572-
self,
573480
wallet_name: Annotated[
574481
Optional[StrictStr], Field(description="Wallet name")
575482
] = None,
@@ -592,6 +499,10 @@ async def get_wallets(
592499
"""Query subwallets
593500
594501
502+
:param limit: Number of results to return
503+
:type limit: int
504+
:param offset: Offset for pagination
505+
:type offset: int
595506
:param wallet_name: Wallet name
596507
:type wallet_name: str
597508
:param group_id: Group id (additional field from ACA-Py plugin)
@@ -600,6 +511,8 @@ async def get_wallets(
600511
""" # noqa: E501
601512

602513
_param = self._get_wallets_serialize(
514+
limit=limit,
515+
offset=offset,
603516
wallet_name=wallet_name,
604517
group_id=group_id,
605518
_request_auth=_request_auth,
@@ -622,6 +535,8 @@ async def get_wallets(
622535

623536
def _get_wallets_serialize(
624537
self,
538+
limit,
539+
offset,
625540
wallet_name,
626541
group_id,
627542
_request_auth,
@@ -643,6 +558,14 @@ def _get_wallets_serialize(
643558

644559
# process the path parameters
645560
# process the query parameters
561+
if limit is not None:
562+
563+
_query_params.append(("limit", limit))
564+
565+
if offset is not None:
566+
567+
_query_params.append(("offset", offset))
568+
646569
if wallet_name is not None:
647570

648571
_query_params.append(("wallet_name", wallet_name))

aries_cloudcontroller/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def __init__(
7878
self.default_headers[header_name] = header_value
7979
self.cookie = cookie
8080
# Set default User-Agent.
81-
self.user_agent = "OpenAPI-Generator/0.12.1/python"
81+
self.user_agent = "OpenAPI-Generator/0.12.2b0/python"
8282
self.client_side_validation = configuration.client_side_validation
8383

8484
async def __aenter__(self):

aries_cloudcontroller/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ def to_debug_report(self):
411411
"OS: {env}\n"
412412
"Python Version: {pyversion}\n"
413413
"Version of the API: v0.12.1\n"
414-
"SDK Package Version: 0.12.1".format(
414+
"SDK Package Version: 0.12.2b0".format(
415415
env=sys.platform, pyversion=sys.version
416416
)
417417
)

aries_cloudcontroller/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,7 @@
494494
from aries_cloudcontroller.models.v20_cred_filter import V20CredFilter
495495
from aries_cloudcontroller.models.v20_cred_filter_indy import V20CredFilterIndy
496496
from aries_cloudcontroller.models.v20_cred_filter_ld_proof import V20CredFilterLDProof
497+
from aries_cloudcontroller.models.v20_cred_filter_vcdi import V20CredFilterVCDI
497498
from aries_cloudcontroller.models.v20_cred_format import V20CredFormat
498499
from aries_cloudcontroller.models.v20_cred_issue import V20CredIssue
499500
from aries_cloudcontroller.models.v20_cred_issue_problem_report_request import (

aries_cloudcontroller/models/create_wallet_request.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ def wallet_type_validate_enum(cls, value):
112112
if value is None:
113113
return value
114114

115-
if value not in set(["askar", "askar-anoncreds", "in_memory", "indy"]):
115+
if value not in set(["askar", "askar-anoncreds", "in_memory"]):
116116
raise ValueError(
117-
"must be one of enum values ('askar', 'askar-anoncreds', 'in_memory', 'indy')"
117+
"must be one of enum values ('askar', 'askar-anoncreds', 'in_memory')"
118118
)
119119
return value
120120

0 commit comments

Comments
 (0)