-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(credentials): added credential sendProblemReport method #906
feat(credentials): added credential sendProblemReport method #906
Conversation
Signed-off-by: Pavel Zarecky <zarecky@procivis.ch>
Signed-off-by: Pavel Zarecky <zarecky@procivis.ch>
Codecov Report
@@ Coverage Diff @@
## main #906 +/- ##
==========================================
- Coverage 87.65% 87.57% -0.08%
==========================================
Files 470 470
Lines 11172 11189 +17
Branches 1868 1869 +1
==========================================
+ Hits 9793 9799 +6
- Misses 1313 1323 +10
- Partials 66 67 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great @Iskander508!
@@ -67,6 +67,7 @@ export interface CredentialsModule<CFs extends CredentialFormat[], CSs extends C | |||
|
|||
// Credential | |||
acceptCredential(options: AcceptCredentialOptions): Promise<CredentialExchangeRecord> | |||
sendProblemReport(credentialRecordId: string, message: string): Promise<CredentialExchangeRecord> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can also make this an object like we do with the other methods that contain both the credentialRecordId
and message
? Mainly for two reasons:
- Consistency with other methods
- It would allow to add more options in the future without needing to make a breaking change (we'll probably want to make it an options object when adding more options)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TimoGlastra refactored
@@ -84,6 +84,9 @@ export abstract class CredentialService<CFs extends CredentialFormat[] = Credent | |||
// methods for ack | |||
abstract processAck(messageContext: InboundMessageContext<AgentMessage>): Promise<CredentialExchangeRecord> | |||
|
|||
// methods for problem-report | |||
abstract createProblemReport(message: string): ProblemReportMessage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, if we make it an object it would be easier to add new properties later on (such as exposing the code
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactored
Signed-off-by: Pavel Zarecky <zarecky@procivis.ch>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
@Iskander508 I'll merge this once #908 is merged |
Signed-off-by: Pavel Zarecky zarecky@procivis.ch
Adding a convenience method to send problem report as part of RFC's 0036 and 0453 unhappy flow.
It is a complementary implementation to the
agent.proofs.sendProblemReport
. But for credentials it was still missing.