Skip to content

Commit

Permalink
buf lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mo-c4t committed Oct 18, 2024
1 parent b8addda commit d029583
Show file tree
Hide file tree
Showing 9 changed files with 173 additions and 186 deletions.
12 changes: 6 additions & 6 deletions proto/cmp/services/insurance/v1/claim_settlement_decision.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ message InsuranceSettlementDecisionRequest {
//
// Timestamps may be used for both off-chain and on-chain operations.
// For on-chain operations, only seconds are supported, and nanoseconds
// will be ignored.
// will be ignored.
google.protobuf.Timestamp modified_after = 2;

// Claim IDs: Submission ID, Processing ID and Carrier ID
cmp.services.insurance.v1.ClaimIds claim_ids = 3;
// Claim ID: Submission ID, Processing ID and Carrier ID
cmp.services.insurance.v1.ClaimId claim_id = 3;

// Claim Status
cmp.services.insurance.v1.ClaimStatus status = 4;

// TODO: Is this reference applied for Acceptance and Rejection ?
string decision_reference = 5;
string decision_reference = 5;

// More info about decision such as rejection reason.
string decision_detail = 6;
Expand All @@ -39,7 +39,7 @@ message InsuranceSettlementDecisionRequest {
cmp.types.v2.PriceDetail amount = 8;
}

message InsuranceSettlementDecisionResponse {
message InsuranceSettlementDecisionResponse {
// Message header
cmp.types.v1.ResponseHeader header = 1;

Expand All @@ -55,4 +55,4 @@ message InsuranceSettlementDecisionResponse {
service InsuranceSettlementDecisionService {
// Returns insurance settlement response
rpc InsuranceSettlementDecision(InsuranceSettlementDecisionRequest) returns (InsuranceSettlementDecisionResponse);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ message InsuranceSettlementExtraInfoRequest {
// will be ignored.
google.protobuf.Timestamp modified_after = 2;

// Claim IDs: Submission ID, Processing ID and Carrier ID
cmp.services.insurance.v1.ClaimIds claim_ids = 3;
// Claim ID: Submission ID, Processing ID and Carrier ID
cmp.services.insurance.v1.ClaimId claim_id = 3;

repeated cmp.services.insurance.v1.ClaimInfoRequested info_requested = 4;
}

message InsuranceSettlementExtraInfoResponse {
message InsuranceSettlementExtraInfoResponse {
// Message header
cmp.types.v1.ResponseHeader header = 1;

Expand Down
194 changes: 97 additions & 97 deletions proto/cmp/services/insurance/v1/claim_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ syntax = "proto3";

package cmp.services.insurance.v1;

import "cmp/services/insurance/v1/search_result_types.proto";
import "cmp/types/v1/date.proto";
import "cmp/types/v1/common.proto";
import "cmp/types/v3/file.proto";
import "cmp/types/v2/price.proto";
import "cmp/types/v2/company.proto";
import "cmp/types/v2/payment.proto";
import "cmp/types/v2/price.proto";
import "cmp/types/v3/file.proto";
import "cmp/types/v3/traveller.proto";

// ClaimForm
Expand All @@ -15,145 +16,144 @@ import "cmp/types/v3/traveller.proto";
//
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/insurance/v1/claim_types.proto.dot.svg)
message ClaimForm {
// Insured person or someone related who has the accident
cmp.types.v3.TravellerExtraInfo affected_person = 1;

// Insured person or someone related who has the accident
cmp.types.v3.TravellerExtraInfo affected_person = 2;
// Policy brief info
cmp.services.insurance.v1.PolicyInfo policy_info = 2;

// Policy brief info
cmp.services.insurance.v1.PolicyInfo policy_info = 3;

// Dates of services
repeated cmp.types.v1.Date dates = 1;
// Dates of services
repeated cmp.types.v1.Date dates = 3;

// Services to claim
repeated cmp.services.insurance.v1.ClaimableService services_to_claim = 2;
// Services to claim
repeated cmp.services.insurance.v1.ClaimableService services_to_claim = 4;

// Additional documents
repeated cmp.services.insurance.v1.ClaimDocument additional_documents = 3;
// Additional documents
repeated cmp.services.insurance.v1.ClaimDocument additional_documents = 5;

// Additional info
repeated cmp.services.insurance.v1.ClaimAdditionalInfo additional_info = 4;
// Additional info
repeated cmp.services.insurance.v1.ClaimAdditionalInfo additional_info = 6;
}

// Service to claim
message ClaimableService {
// Service description
string service_description = 1;
// Service description
string service_description = 1;

// Amount to be claimed
cmp.types.v2.Price charge_amount = 2;
// Amount to be claimed
cmp.types.v2.Price charge_amount = 2;

// Documents
repeated cmp.services.insurance.v1.ClaimDocument documents = 3;
// Documents
repeated cmp.services.insurance.v1.ClaimDocument documents = 3;
}

// Claim Document
message ClaimDocument {
// File
cmp.types.v3.File file = 1;
// File
cmp.types.v3.File file = 1;

// Type of the document
cmp.services.insurance.v1.ClaimDocumentType type = 2;
// Type of the document
cmp.services.insurance.v1.ClaimDocumentType type = 2;
}

// Additonal info
message ClaimAdditionalInfo {
// Info string. More information regarding the claim/accident to be added here
string info = 1;
// Info string. More information regarding the claim/accident to be added here
string info = 1;

// Condition related to the claim
cmp.services.insurance.v1.ClaimCondition condition = 2;
// Condition related to the claim
cmp.services.insurance.v1.ClaimCondition condition = 2;
}

// Claim conditions
// TODO: is this list enough ?
enum ClaimCondition {
CLAIM_CONDITION_UNSPECIFIED = 0;
CLAIM_CONDITION_OTHER = 1;
CLAIM_CONDITION_EMPLOYMENT = 2;
CLAIM_CONDITION_TRIP_DELAY = 3;
CLAIM_CONDITION_TRIP_CANCELLED = 4;
CLAIM_CONDITION_FAMILY = 5;
CLAIM_CONDITION_DEATH = 6;
CLAIM_CONDITION_CAR_ACCIDENT = 0;
enum ClaimCondition {
CLAIM_CONDITION_UNSPECIFIED = 0;
CLAIM_CONDITION_OTHER = 1;
CLAIM_CONDITION_EMPLOYMENT = 2;
CLAIM_CONDITION_TRIP_DELAY = 3;
CLAIM_CONDITION_TRIP_CANCELLED = 4;
CLAIM_CONDITION_FAMILY = 5;
CLAIM_CONDITION_DEATH = 6;
CLAIM_CONDITION_CAR_ACCIDENT = 7;
}

// Claim document types
// TODO: check if there are more types
enum ClaimDocumentType {
CLAIM_DOCUMENT_TYPE_UNSPECIFIED = 0;
CLAIM_DOCUMENT_TYPE_OTHER = 1;
CLAIM_DOCUMENT_TYPE_BILL = 2;
CLAIM_DOCUMENT_TYPE_POLICE_REPORT = 3;
CLAIM_DOCUMENT_TYPE_MEDICAL_REPORT = 4;
CLAIM_DOCUMENT_TYPE_LAB_RESULT = 5;
CLAIM_DOCUMENT_TYPE_UNSPECIFIED = 0;
CLAIM_DOCUMENT_TYPE_OTHER = 1;
CLAIM_DOCUMENT_TYPE_BILL = 2;
CLAIM_DOCUMENT_TYPE_POLICE_REPORT = 3;
CLAIM_DOCUMENT_TYPE_MEDICAL_REPORT = 4;
CLAIM_DOCUMENT_TYPE_LAB_RESULT = 5;
}

// Claim Status
// TODO: check if this list is sufficient
enum ClaimStatus {
CLAIM_STATUS_UNSPECIFIED = 0;
CLAIM_STATUS_RECEIVED = 1;
CLAIM_STATUS_PROCESSING = 2;
CLAIM_STATUS_APPROVED = 3;
CLAIM_STATUS_REJECTED = 4;
CLAIM_STATUS_INVESTIGATING = 5;
CLAIM_STATUS_MORE_INFO_REQUIRED = 6;
CLAIM_STATUS_FEEDBACK = 7;
CLAIM_STATUS_REVIEW = 8;
CLAIM_STATUS_PAIDOUT = 9;
CLAIM_STATUS_DONE = 10;
CLAIM_STATUS_UNSPECIFIED = 0;
CLAIM_STATUS_RECEIVED = 1;
CLAIM_STATUS_PROCESSING = 2;
CLAIM_STATUS_APPROVED = 3;
CLAIM_STATUS_REJECTED = 4;
CLAIM_STATUS_INVESTIGATING = 5;
CLAIM_STATUS_MORE_INFO_REQUIRED = 6;
CLAIM_STATUS_FEEDBACK = 7;
CLAIM_STATUS_REVIEW = 8;
CLAIM_STATUS_PAIDOUT = 9;
CLAIM_STATUS_DONE = 10;
}

// Claim Message Status
// TODO: check if this list is sufficient
enum ClaimMessageStatus {
CLAIM_MESSAGE_STATUS_UNSPECIFIED = 0;
CLAIM_MESSAGE_STATUS_ERROR = 1;
CLAIM_MESSAGE_STATUS_RECEIVED = 2;
CLAIM_MESSAGE_STATUS_UNKNOWN_CARRIER_ID = 3;
CLAIM_MESSAGE_STATUS_UNKNOWN_PROCESSING_ID = 4;
CLAIM_MESSAGE_STATUS_UNKNOWN_SUBMISSION_ID = 5;
CLAIM_MESSAGE_STATUS_UNSPECIFIED = 0;
CLAIM_MESSAGE_STATUS_ERROR = 1;
CLAIM_MESSAGE_STATUS_RECEIVED = 2;
CLAIM_MESSAGE_STATUS_UNKNOWN_CARRIER_ID = 3;
CLAIM_MESSAGE_STATUS_UNKNOWN_PROCESSING_ID = 4;
CLAIM_MESSAGE_STATUS_UNKNOWN_SUBMISSION_ID = 5;
}

// Brief info about insurance policy
message PolicyInfo {
// Insured person
cmp.types.v3.TravellerExtraInfo insured_person = 1;

// Token ID of the policy booking
uint64 policy_token_id = 2 ;

// Chain ID , where the policy token was issued
int32 chain_id = 3;

// TODO: how do they define currency for pay out and which chain to use ?
// Payment method: wallet address or the IBAN of the claim issuer for pay-out
oneof payment_method {
// Wallet address for on-chain payment
string wallet_address = 4;

// IBAN for off-chain payment
string iban = 5;
}
// Insurance Company
cmp.types.v1.Company company = 6;

// Policy Codes: unit Code, service code and product code
cmp.services.insurance.v1.PolicyCodes policy_code = 8;
// Insured person
cmp.types.v3.TravellerExtraInfo insured_person = 1;

// Token ID of the policy booking
uint64 policy_token_id = 2;

// Chain ID , where the policy token was issued
int32 chain_id = 3;

// TODO: how do they define currency for pay out and which chain to use ?
// Payment method: wallet address or the IBAN of the claim issuer for pay-out
oneof payment_method {
// Wallet address for on-chain payment
string wallet_address = 4;

// IBAN for off-chain payment
string iban = 5;
}

// Insurance Company
cmp.types.v2.Company company = 6;

// Policy Codes: unit Code, service code and product code
cmp.services.insurance.v1.PolicyCodes policy_code = 8;
}

// Claim more info requested
message ClaimInfoRequested {
// Service description
string service_description = 1;
// Service description
string service_description = 1;

// Claim service amount
cmp.types.v2.Price charge_amount = 2;
// Claim service amount
cmp.types.v2.Price charge_amount = 2;

// Document type requested
cmp.services.insurance.v1.ClaimDocumentType document_type = 3;
// Document type requested
cmp.services.insurance.v1.ClaimDocumentType document_type = 3;
}

message ClaimId {
Expand All @@ -177,9 +177,9 @@ message ClaimMessageResponse {

// Claim Pay-Out Transaction
message PayOutTransaction {
// Transaction ID
string transaction_id = 1;
// Transaction ID
string transaction_id = 1;

// Transaction Type. It can be Bank transfer, Crypto transfer, Credit card, ... etc
cmp.types.v2.PaymentType transaction_type = 2;
}
// Transaction Type. It can be Bank transfer, Crypto transfer, Credit card, ... etc
cmp.types.v2.PaymentType transaction_type = 2;
}
7 changes: 1 addition & 6 deletions proto/cmp/services/insurance/v1/get_claim_form.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@ syntax = "proto3";

package cmp.services.insurance.v1;

import "cmp/services/insurance/v1/insurance_types.proto";
import "cmp/services/insurance/v1/claim_types.proto";
import "cmp/types/v1/common.proto";
import "cmp/types/v1/language.proto";
import "cmp/types/v3/traveller.proto";
import "cmp/services/insurance/v1/search_result_types.proto";
import "google/protobuf/timestamp.proto";


message InsuranceGetClaimFormRequest {
// Message header
Expand All @@ -20,7 +15,7 @@ message InsuranceGetClaimFormRequest {
repeated cmp.types.v1.Language languages = 2;

// Booking token ID for the policy. You get it after minting an Insurance policy. This is not the booking token of the trip.
unit64 policy_token_id = 3;
uint64 policy_token_id = 3;
}

message InsuranceGetClaimFormResponse {
Expand Down
3 changes: 0 additions & 3 deletions proto/cmp/services/insurance/v1/submit_claim_form.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ syntax = "proto3";

package cmp.services.insurance.v1;

import "cmp/services/insurance/v1/insurance_types.proto";
import "cmp/services/insurance/v1/claim_types.proto";
import "cmp/types/v1/common.proto";
import "cmp/types/v3/traveller.proto";
import "google/protobuf/timestamp.proto";

message InsuranceSubmitClaimFormRequest {
// Message header
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ syntax = "proto3";

package cmp.services.insurance.v1;


import "cmp/services/insurance/v1/claim_types.proto";
import "cmp/types/v1/common.proto";
import "google/protobuf/timestamp.proto";

message InsuranceSubmitClaimFormExtraInfoRequest {
// Message header
cmp.types.v1.RequestHeader header = 1;

// Claim IDs: Submission ID, Processing ID and Carrier ID
cmp.services.insurance.v1.ClaimIds claim_ids = 2;
// Claim ID: Submission ID, Processing ID and Carrier ID
cmp.services.insurance.v1.ClaimId claim_id = 2;

// Extra info needed
repeated cmp.services.insurance.v1.ClaimableService requested_info = 3;
Expand All @@ -26,7 +24,7 @@ message InsuranceSubmitClaimFormExtraInfoResponse {
cmp.services.insurance.v1.ClaimMessageResponse claim_message_response = 2;

// Claim Status
cmp.services.insurance.v1.ClaimStatus status = 2;
cmp.services.insurance.v1.ClaimStatus status = 3;
}

// Insurance submit claim form service definition
Expand Down
Loading

0 comments on commit d029583

Please sign in to comment.