Skip to content

Commit

Permalink
Push v2alpha to V2 for 3 files and 1 dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
SamJaarsma authored and havan committed Sep 20, 2024
1 parent 07f59fe commit b42e9c5
Show file tree
Hide file tree
Showing 4 changed files with 156 additions and 6 deletions.
4 changes: 0 additions & 4 deletions proto/cmp/services/info/v1/entry_requirements.proto
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,4 @@ enum ItemStatus {
ITEM_STATUS_UNSPECIFIED = 0;
ITEM_STATUS_TRUE = 1;
ITEM_STATUS_FALSE = 2;
ITEM_STATUS_CRISIS = 3;
ITEM_STATUS_RESTRICTIONS = 4;
ITEM_STATUS_NO_RESTRICTIONS = 5;
ITEM_STATUS_UNKNOWN = 6;
}
130 changes: 130 additions & 0 deletions proto/cmp/services/info/v2/entry_requirements.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
syntax = "proto3";

package cmp.services.info.v2;

import "cmp/types/v1/common.proto";
import "cmp/types/v1/country.proto";
import "cmp/types/v1/datetime_range.proto";
import "cmp/types/v1/filter.proto";
import "cmp/types/v1/language.proto";
import "cmp/types/v1/localized.proto";
import "cmp/types/v1/travel_type.proto";
import "cmp/types/v1/uuid.proto";
import "google/protobuf/timestamp.proto";

// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/info/v1/entry_requirements.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/info/v1/entry_requirements.proto.dot.svg)
service CountryEntryRequirementsService {
rpc CountryEntryRequirements(CountryEntryRequirementsRequest) returns (CountryEntryRequirementsResponse);
}

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

// Departure country
cmp.types.v1.Country departure = 2;

// Destination country
cmp.types.v1.Country destination = 3;

// Citizenship
cmp.types.v1.Country citizenship = 4;

// Residence
cmp.types.v1.Country residence = 5;

// Transit country
cmp.types.v1.Country transit = 6;

// Travel type, ex: business or tourism
cmp.types.v1.TravelType travel_type = 7;

// Date time range, start and end dates of visit, as timestamp.
cmp.types.v1.DateTimeRange datetime_range = 8;

// Languages requested
repeated cmp.types.v1.Language languages = 9;

bool exclude_categories = 10;

bool include_items = 11;

// There is not yet any categorization standard and conclusively filters are
// supplier specific and the filter type should be "FILTER_TYPE_PROVIDER_CODE"
// Examples:
repeated cmp.types.v1.Filter filters = 12;
}

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

// This must be a UUID according to RFC 4122
cmp.types.v1.UUID response_id = 2;

// Categories
repeated CountryEntryRequirementCategory categories = 3;

// Items
repeated CountryEntryRequirementItem items = 4;
}

// Types

message CountryEntryRequirementCategory {
// Category key.
string key = 1;

// List of localized names
repeated cmp.types.v1.LocalizedString names = 2;

// Items
repeated CountryEntryRequirementItem items = 3;

// Sub categories
repeated CountryEntryRequirementCategory sub_categories = 4;
}

message CountryEntryRequirementItem {
// Item type key.
string key = 1;

// Language specific names and descriptions
repeated LocalizedItemInfo info = 2;

// Status of the item. An item specifies an action or requirement which should be
// done/provided or rather not. This is expressed with "true" and "false".
// Examples:
// Entry generally permitted, status=true
// EU Digital COVID Certificate accepted, status=true
// Visa required for stay, status=false
// Entry forms required, status=false
// Additional information, status=undefined
ItemStatus status = 3;

// Significant update date
google.protobuf.Timestamp last_significant_update = 4;
}

message LocalizedItemInfo {
string name = 1;
string description = 2;
cmp.types.v1.Language language = 3;
}

// Status identifies whether an item should be done/provided or rather not. In case
// of an incident, there might be restrictions.
//
// UNKNOWN is different from UNSPECIFIED. For UNKNOWN information about this topic
// was sought, but it was not possible to find enough information to classify that
// topic
enum ItemStatus {
ITEM_STATUS_UNSPECIFIED = 0;
ITEM_STATUS_TRUE = 1;
ITEM_STATUS_FALSE = 2;
ITEM_STATUS_CRISIS = 3;
ITEM_STATUS_RESTRICTIONS = 4;
ITEM_STATUS_NO_RESTRICTIONS = 5;
ITEM_STATUS_UNKNOWN = 6;
}
26 changes: 26 additions & 0 deletions proto/cmp/types/v2/contact_info.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
syntax = "proto3";

package cmp.types.v2;

import "cmp/types/v1/address.proto";
import "cmp/types/v1/email.proto";
import "cmp/types/v1/link.proto";
import "cmp/types/v1/phone.proto";

// Contact Info for general use.
//
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1/contact_info.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/types/v1/contact_info.proto.dot.svg)
message ContactInfo {
// Address
repeated cmp.types.v1.Address address = 1;

// Phones
repeated cmp.types.v1.Phone phones = 2;

// Emails
repeated cmp.types.v2.Email emails = 3;

Check failure on line 22 in proto/cmp/types/v2/contact_info.proto

View workflow job for this annotation

GitHub Actions / buf-lint

field cmp.types.v2.ContactInfo.emails: unknown type cmp.types.v2.Email

// Websites
repeated cmp.types.v1.Link links = 4;
}
2 changes: 0 additions & 2 deletions proto/cmp/types/v2/email.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ message Email {
string address = 1;

EmailType type = 2;

string description = 3;
}

// Email Types
Expand Down

0 comments on commit b42e9c5

Please sign in to comment.