-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add notifications for cancellation events
- Loading branch information
Showing
3 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
syntax = "proto3"; | ||
|
||
package cmp.services.notification.v2; | ||
|
||
import "cmp/services/cancellation/v1/reject.proto"; | ||
import "cmp/types/v1/uuid.proto"; | ||
import "google/protobuf/empty.proto"; | ||
|
||
// Notification service for different events that the partner should be notified about | ||
// | ||
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/notification/v2/notify.proto.dot.xs.svg) | ||
// | ||
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/notification/v2/notify.proto.dot.svg) | ||
service NotificationService { | ||
rpc TokenBoughtNotification(TokenBought) returns (google.protobuf.Empty); | ||
rpc TokenExpiredNotification(TokenExpired) returns (google.protobuf.Empty); | ||
rpc CancellationPendingNotification(CancellationPending) returns (google.protobuf.Empty); | ||
rpc CancellationAcceptedNotification(CancellationAccepted) returns (google.protobuf.Empty); | ||
rpc CancellationProposalAcceptedByTheOwnerNotification(CancellationProposalAcceptedByTheOwner) returns (google.protobuf.Empty); | ||
rpc CancellationCounteredNotification(CancellationCountered) returns (google.protobuf.Empty); | ||
rpc CancellationProposalCancelledNotification(CancellationProposalCancelled) returns (google.protobuf.Empty); | ||
rpc CancellationRejectedNotification(CancellationRejected) returns (google.protobuf.Empty); | ||
} | ||
|
||
message TokenBought { | ||
uint64 token_id = 1; | ||
string tx_id = 2; | ||
cmp.types.v1.UUID mint_id = 3; | ||
} | ||
|
||
message TokenExpired { | ||
uint64 token_id = 1; | ||
cmp.types.v1.UUID mint_id = 2; | ||
} | ||
|
||
// event CancellationPending(uint256 indexed tokenId, address indexed proposedBy, uint256 refundAmount); | ||
message CancellationPending { | ||
uint64 token_id = 1; | ||
string proposed_by = 2; | ||
uint64 refund_amount = 3; | ||
string tx_id = 4; | ||
} | ||
|
||
// event CancellationAccepted(uint256 indexed tokenId, address indexed acceptedBy, uint256 refundAmount); | ||
message CancellationAccepted { | ||
uint64 token_id = 1; | ||
string accepted_by = 2; | ||
uint64 refund_amount = 3; | ||
string tx_id = 4; | ||
} | ||
|
||
// event CancellationProposalAcceptedByTheOwner(uint256 indexed tokenId, address indexed acceptedBy, uint256 refundAmount); | ||
message CancellationProposalAcceptedByTheOwner { | ||
uint64 token_id = 1; | ||
string accepted_by = 2; | ||
uint64 refund_amount = 3; | ||
string tx_id = 4; | ||
} | ||
|
||
// event CancellationCountered(uint256 indexed tokenId, address indexed counteredBy, uint256 newRefundAmount); | ||
message CancellationCountered { | ||
uint64 token_id = 1; | ||
string countered_by = 2; | ||
uint64 new_refund_amount = 3; | ||
string tx_id = 4; | ||
} | ||
|
||
// event CancellationProposalCancelled(uint256 indexed tokenId, address indexed cancelledBy); | ||
message CancellationProposalCancelled { | ||
uint64 token_id = 1; | ||
string cancelled_by = 2; | ||
string tx_id = 3; | ||
} | ||
|
||
// event CancellationRejected(uint256 indexed tokenId, address indexed rejectedBy, CancellationRejectionReason reason); | ||
message CancellationRejected { | ||
uint64 token_id = 1; | ||
string rejected_by = 2; | ||
cmp.services.cancellation.v1.CancellationRejectionReason reason = 3; | ||
string tx_id = 4; | ||
} |