From b42e9c5679ef2fd5748ac445f0c2f9d3dde3cf32 Mon Sep 17 00:00:00 2001 From: Sam Jaarsma Date: Fri, 20 Sep 2024 13:34:27 +0200 Subject: [PATCH] Push v2alpha to V2 for 3 files and 1 dependency --- .../services/info/v1/entry_requirements.proto | 4 - .../services/info/v2/entry_requirements.proto | 130 ++++++++++++++++++ proto/cmp/types/v2/contact_info.proto | 26 ++++ proto/cmp/types/v2/email.proto | 2 - 4 files changed, 156 insertions(+), 6 deletions(-) create mode 100644 proto/cmp/services/info/v2/entry_requirements.proto create mode 100644 proto/cmp/types/v2/contact_info.proto diff --git a/proto/cmp/services/info/v1/entry_requirements.proto b/proto/cmp/services/info/v1/entry_requirements.proto index 6a26f1a..ed582bd 100644 --- a/proto/cmp/services/info/v1/entry_requirements.proto +++ b/proto/cmp/services/info/v1/entry_requirements.proto @@ -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; } diff --git a/proto/cmp/services/info/v2/entry_requirements.proto b/proto/cmp/services/info/v2/entry_requirements.proto new file mode 100644 index 0000000..d62e9c7 --- /dev/null +++ b/proto/cmp/services/info/v2/entry_requirements.proto @@ -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; +} diff --git a/proto/cmp/types/v2/contact_info.proto b/proto/cmp/types/v2/contact_info.proto new file mode 100644 index 0000000..e7a44b1 --- /dev/null +++ b/proto/cmp/types/v2/contact_info.proto @@ -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; + + // Websites + repeated cmp.types.v1.Link links = 4; +} diff --git a/proto/cmp/types/v2/email.proto b/proto/cmp/types/v2/email.proto index f8883b9..436068f 100644 --- a/proto/cmp/types/v2/email.proto +++ b/proto/cmp/types/v2/email.proto @@ -10,8 +10,6 @@ message Email { string address = 1; EmailType type = 2; - - string description = 3; } // Email Types