13
13
json ,
14
14
)
15
15
16
- from typing import Dict , List , Optional , Union # noqa: F401
16
+ from typing import Dict , List , Optional , Union # noqa: F401
17
17
18
- from aries_cloudcontroller .model .v20_cred_bound_offer_request import (
19
- V20CredBoundOfferRequest ,
20
- )
18
+ from aries_cloudcontroller .model .v20_cred_bound_offer_request import V20CredBoundOfferRequest
19
+ from aries_cloudcontroller .model .v20_cred_ex_free import V20CredExFree
21
20
from aries_cloudcontroller .model .v20_cred_ex_record import V20CredExRecord
22
21
from aries_cloudcontroller .model .v20_cred_ex_record_detail import V20CredExRecordDetail
23
- from aries_cloudcontroller .model .v20_cred_ex_record_list_result import (
24
- V20CredExRecordListResult ,
25
- )
26
- from aries_cloudcontroller .model .v20_cred_issue_problem_report_request import (
27
- V20CredIssueProblemReportRequest ,
28
- )
22
+ from aries_cloudcontroller .model .v20_cred_ex_record_list_result import V20CredExRecordListResult
23
+ from aries_cloudcontroller .model .v20_cred_issue_problem_report_request import V20CredIssueProblemReportRequest
29
24
from aries_cloudcontroller .model .v20_cred_issue_request import V20CredIssueRequest
25
+ from aries_cloudcontroller .model .v20_cred_offer_conn_free_request import V20CredOfferConnFreeRequest
30
26
from aries_cloudcontroller .model .v20_cred_offer_request import V20CredOfferRequest
31
27
from aries_cloudcontroller .model .v20_cred_request_free import V20CredRequestFree
32
28
from aries_cloudcontroller .model .v20_cred_request_request import V20CredRequestRequest
33
29
from aries_cloudcontroller .model .v20_cred_send_request import V20CredSendRequest
34
30
from aries_cloudcontroller .model .v20_cred_store_request import V20CredStoreRequest
35
- from aries_cloudcontroller .model .v20_issue_cred_schema_core import (
36
- V20IssueCredSchemaCore ,
37
- )
38
31
39
32
40
33
class IssueCredentialV20Api (Consumer ):
41
- async def create_credential (
42
- self , * , body : Optional [V20IssueCredSchemaCore ] = None
43
- ) -> V20CredExRecord :
34
+
35
+ async def create_credential (self , * , body : Optional [ ] = None ) -> V20CredExRecord :
44
36
"""Create credential from attribute values"""
45
37
return await self .__create_credential (
46
38
body = body ,
@@ -58,14 +50,7 @@ async def get_record(self, *, cred_ex_id: str) -> V20CredExRecordDetail:
58
50
cred_ex_id = cred_ex_id ,
59
51
)
60
52
61
- async def get_records (
62
- self ,
63
- * ,
64
- connection_id : Optional [str ] = None ,
65
- role : Optional [str ] = None ,
66
- state : Optional [str ] = None ,
67
- thread_id : Optional [str ] = None
68
- ) -> V20CredExRecordListResult :
53
+ async def get_records (self , * , connection_id : Optional [str ] = None , role : Optional [str ] = None , state : Optional [str ] = None , thread_id : Optional [str ] = None ) -> V20CredExRecordListResult :
69
54
"""Fetch all credential exchange records"""
70
55
return await self .__get_records (
71
56
connection_id = connection_id ,
@@ -74,80 +59,65 @@ async def get_records(
74
59
thread_id = thread_id ,
75
60
)
76
61
77
- async def issue_credential (
78
- self , * , cred_ex_id : str , body : Optional [V20CredIssueRequest ] = None
79
- ) -> V20CredExRecordDetail :
62
+ async def issue_credential (self , * , cred_ex_id : str , body : Optional [V20CredIssueRequest ] = None ) -> V20CredExRecordDetail :
80
63
"""Send holder a credential"""
81
64
return await self .__issue_credential (
82
65
cred_ex_id = cred_ex_id ,
83
66
body = body ,
84
67
)
85
68
86
- async def issue_credential_automated (
87
- self , * , body : Optional [V20CredSendRequest ] = None
88
- ) -> V20CredExRecord :
69
+ async def issue_credential20_create_offer_post (self , * , body : Optional [V20CredOfferConnFreeRequest ] = None ) -> V20CredExRecord :
70
+ """Create a credential offer, independent of any proposal or connection"""
71
+ return await self .__issue_credential20_create_offer_post (
72
+ body = body ,
73
+ )
74
+
75
+ async def issue_credential_automated (self , * , body : Optional [V20CredExFree ] = None ) -> V20CredExRecord :
89
76
"""Send holder a credential, automating entire flow"""
90
77
return await self .__issue_credential_automated (
91
78
body = body ,
92
79
)
93
80
94
- async def report_problem (
95
- self ,
96
- * ,
97
- cred_ex_id : str ,
98
- body : Optional [V20CredIssueProblemReportRequest ] = None
99
- ) -> Dict :
81
+ async def report_problem (self , * , cred_ex_id : str , body : Optional [V20CredIssueProblemReportRequest ] = None ) -> Dict :
100
82
"""Send a problem report for credential exchange"""
101
83
return await self .__report_problem (
102
84
cred_ex_id = cred_ex_id ,
103
85
body = body ,
104
86
)
105
87
106
- async def send_offer (
107
- self , * , cred_ex_id : str , body : Optional [V20CredBoundOfferRequest ] = None
108
- ) -> V20CredExRecord :
88
+ async def send_offer (self , * , cred_ex_id : str , body : Optional [V20CredBoundOfferRequest ] = None ) -> V20CredExRecord :
109
89
"""Send holder a credential offer in reference to a proposal with preview"""
110
90
return await self .__send_offer (
111
91
cred_ex_id = cred_ex_id ,
112
92
body = body ,
113
93
)
114
94
115
- async def send_offer_free (
116
- self , * , body : Optional [V20CredOfferRequest ] = None
117
- ) -> V20CredExRecord :
95
+ async def send_offer_free (self , * , body : Optional [V20CredOfferRequest ] = None ) -> V20CredExRecord :
118
96
"""Send holder a credential offer, independent of any proposal"""
119
97
return await self .__send_offer_free (
120
98
body = body ,
121
99
)
122
100
123
- async def send_proposal (
124
- self , * , body : Optional [V20CredSendRequest ] = None
125
- ) -> V20CredExRecord :
101
+ async def send_proposal (self , * , body : Optional [V20CredExFree ] = None ) -> V20CredExRecord :
126
102
"""Send issuer a credential proposal"""
127
103
return await self .__send_proposal (
128
104
body = body ,
129
105
)
130
106
131
- async def send_request (
132
- self , * , cred_ex_id : str , body : Optional [V20CredRequestRequest ] = None
133
- ) -> V20CredExRecord :
107
+ async def send_request (self , * , cred_ex_id : str , body : Optional [V20CredRequestRequest ] = None ) -> V20CredExRecord :
134
108
"""Send issuer a credential request"""
135
109
return await self .__send_request (
136
110
cred_ex_id = cred_ex_id ,
137
111
body = body ,
138
112
)
139
113
140
- async def send_request_free (
141
- self , * , body : Optional [V20CredRequestFree ] = None
142
- ) -> V20CredExRecord :
114
+ async def send_request_free (self , * , body : Optional [V20CredRequestFree ] = None ) -> V20CredExRecord :
143
115
"""Send issuer a credential request not bound to an existing thread. Indy credentials cannot start at a request"""
144
116
return await self .__send_request_free (
145
117
body = body ,
146
118
)
147
119
148
- async def store_credential (
149
- self , * , cred_ex_id : str , body : Optional [V20CredStoreRequest ] = None
150
- ) -> V20CredExRecordDetail :
120
+ async def store_credential (self , * , cred_ex_id : str , body : Optional [V20CredStoreRequest ] = None ) -> V20CredExRecordDetail :
151
121
"""Store a received credential"""
152
122
return await self .__store_credential (
153
123
cred_ex_id = cred_ex_id ,
@@ -157,9 +127,7 @@ async def store_credential(
157
127
@returns .json
158
128
@json
159
129
@post ("/issue-credential-2.0/create" )
160
- def __create_credential (
161
- self , * , body : Body (type = V20IssueCredSchemaCore ) = {}
162
- ) -> V20CredExRecord :
130
+ def __create_credential (self , * , body : Body (type = ) = {}) -> V20CredExRecord :
163
131
"""Internal uplink method for create_credential"""
164
132
165
133
@returns .json
@@ -174,84 +142,65 @@ def __get_record(self, *, cred_ex_id: str) -> V20CredExRecordDetail:
174
142
175
143
@returns .json
176
144
@get ("/issue-credential-2.0/records" )
177
- def __get_records (
178
- self ,
179
- * ,
180
- connection_id : Query = None ,
181
- role : Query = None ,
182
- state : Query = None ,
183
- thread_id : Query = None
184
- ) -> V20CredExRecordListResult :
145
+ def __get_records (self , * , connection_id : Query = None , role : Query = None , state : Query = None , thread_id : Query = None ) -> V20CredExRecordListResult :
185
146
"""Internal uplink method for get_records"""
186
147
187
148
@returns .json
188
149
@json
189
150
@post ("/issue-credential-2.0/records/{cred_ex_id}/issue" )
190
- def __issue_credential (
191
- self , * , cred_ex_id : str , body : Body (type = V20CredIssueRequest ) = {}
192
- ) -> V20CredExRecordDetail :
151
+ def __issue_credential (self , * , cred_ex_id : str , body : Body (type = V20CredIssueRequest ) = {}) -> V20CredExRecordDetail :
193
152
"""Internal uplink method for issue_credential"""
194
153
154
+ @returns .json
155
+ @json
156
+ @post ("/issue-credential-2.0/create-offer" )
157
+ def __issue_credential20_create_offer_post (self , * , body : Body (type = V20CredOfferConnFreeRequest ) = {}) -> V20CredExRecord :
158
+ """Internal uplink method for issue_credential20_create_offer_post"""
159
+
195
160
@returns .json
196
161
@json
197
162
@post ("/issue-credential-2.0/send" )
198
- def __issue_credential_automated (
199
- self , * , body : Body (type = V20CredSendRequest ) = {}
200
- ) -> V20CredExRecord :
163
+ def __issue_credential_automated (self , * , body : Body (type = V20CredExFree ) = {}) -> V20CredExRecord :
201
164
"""Internal uplink method for issue_credential_automated"""
202
165
203
166
@returns .json
204
167
@json
205
168
@post ("/issue-credential-2.0/records/{cred_ex_id}/problem-report" )
206
- def __report_problem (
207
- self , * , cred_ex_id : str , body : Body (type = V20CredIssueProblemReportRequest ) = {}
208
- ) -> Dict :
169
+ def __report_problem (self , * , cred_ex_id : str , body : Body (type = V20CredIssueProblemReportRequest ) = {}) -> Dict :
209
170
"""Internal uplink method for report_problem"""
210
171
211
172
@returns .json
212
173
@json
213
174
@post ("/issue-credential-2.0/records/{cred_ex_id}/send-offer" )
214
- def __send_offer (
215
- self , * , cred_ex_id : str , body : Body (type = V20CredBoundOfferRequest ) = {}
216
- ) -> V20CredExRecord :
175
+ def __send_offer (self , * , cred_ex_id : str , body : Body (type = V20CredBoundOfferRequest ) = {}) -> V20CredExRecord :
217
176
"""Internal uplink method for send_offer"""
218
177
219
178
@returns .json
220
179
@json
221
180
@post ("/issue-credential-2.0/send-offer" )
222
- def __send_offer_free (
223
- self , * , body : Body (type = V20CredOfferRequest ) = {}
224
- ) -> V20CredExRecord :
181
+ def __send_offer_free (self , * , body : Body (type = V20CredOfferRequest ) = {}) -> V20CredExRecord :
225
182
"""Internal uplink method for send_offer_free"""
226
183
227
184
@returns .json
228
185
@json
229
186
@post ("/issue-credential-2.0/send-proposal" )
230
- def __send_proposal (
231
- self , * , body : Body (type = V20CredSendRequest ) = {}
232
- ) -> V20CredExRecord :
187
+ def __send_proposal (self , * , body : Body (type = V20CredExFree ) = {}) -> V20CredExRecord :
233
188
"""Internal uplink method for send_proposal"""
234
189
235
190
@returns .json
236
191
@json
237
192
@post ("/issue-credential-2.0/records/{cred_ex_id}/send-request" )
238
- def __send_request (
239
- self , * , cred_ex_id : str , body : Body (type = V20CredRequestRequest ) = {}
240
- ) -> V20CredExRecord :
193
+ def __send_request (self , * , cred_ex_id : str , body : Body (type = V20CredRequestRequest ) = {}) -> V20CredExRecord :
241
194
"""Internal uplink method for send_request"""
242
195
243
196
@returns .json
244
197
@json
245
198
@post ("/issue-credential-2.0/send-request" )
246
- def __send_request_free (
247
- self , * , body : Body (type = V20CredRequestFree ) = {}
248
- ) -> V20CredExRecord :
199
+ def __send_request_free (self , * , body : Body (type = V20CredRequestFree ) = {}) -> V20CredExRecord :
249
200
"""Internal uplink method for send_request_free"""
250
201
251
202
@returns .json
252
203
@json
253
204
@post ("/issue-credential-2.0/records/{cred_ex_id}/store" )
254
- def __store_credential (
255
- self , * , cred_ex_id : str , body : Body (type = V20CredStoreRequest ) = {}
256
- ) -> V20CredExRecordDetail :
205
+ def __store_credential (self , * , cred_ex_id : str , body : Body (type = V20CredStoreRequest ) = {}) -> V20CredExRecordDetail :
257
206
"""Internal uplink method for store_credential"""
0 commit comments