Skip to content
Snippets Groups Projects
Verified Commit a17a1954 authored by Konstantin Tsabolov's avatar Konstantin Tsabolov
Browse files

chore(shared): add missing NATS events

parent 86bd028b
No related branches found
No related tags found
1 merge request!40End to end run preparation
...@@ -50,6 +50,27 @@ export class EventAnonCredsCredentialsGetById extends BaseEvent<CredentialExchan ...@@ -50,6 +50,27 @@ export class EventAnonCredsCredentialsGetById extends BaseEvent<CredentialExchan
} }
} }
export type EventDidcommAnonCredsCredentialsAcceptOfferInput = BaseEventInput<{
credentialId: string;
}>;
export class EventDidcommAnonCredsCredentialsAcceptOffer extends BaseEvent<CredentialExchangeRecord> {
public static token = 'didcomm.anoncreds.credentials.acceptOffer';
public get instance() {
return JsonTransformer.fromJSON(this.data, CredentialExchangeRecord);
}
public static fromEvent(e: EventDidcommAnonCredsCredentialsOffer) {
return new EventDidcommAnonCredsCredentialsOffer(
e.data,
e.tenantId,
e.id,
e.type,
e.timestamp,
);
}
}
export type EventDidcommAnonCredsCredentialsOfferInput = BaseEventInput<{ export type EventDidcommAnonCredsCredentialsOfferInput = BaseEventInput<{
connectionId: string; connectionId: string;
credentialDefinitionId: string; credentialDefinitionId: string;
......
...@@ -106,3 +106,24 @@ export class EventAnonCredsProofsDeleteById extends BaseEvent { ...@@ -106,3 +106,24 @@ export class EventAnonCredsProofsDeleteById extends BaseEvent {
); );
} }
} }
export type EventDidcommAnonCredsProofsAcceptRequestInput = BaseEventInput<{
proofRecordId: string;
}>;
export class EventDidcommAnonCredsProofsAcceptRequest extends BaseEvent<ProofExchangeRecord> {
public static token = 'didcomm.anoncreds.proofs.acceptRequest';
public get instance() {
return JsonTransformer.fromJSON(this.data, ProofExchangeRecord);
}
public static fromEvent(e: EventDidcommAnonCredsProofsRequest) {
return new EventDidcommAnonCredsProofsRequest(
e.data,
e.tenantId,
e.id,
e.type,
e.timestamp,
);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment