Skip to content

Commit

Permalink
add activity product list
Browse files Browse the repository at this point in the history
  • Loading branch information
havan committed Dec 19, 2023
1 parent 1bdb163 commit 062e2a0
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 3 deletions.
32 changes: 32 additions & 0 deletions proto/cmp/services/activity/v1alpha1/list.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
syntax = "proto3";

package cmp.services.activity.v1alpha1;

import "cmp/services/activity/v1alpha1/search_result_types.proto";
import "cmp/types/v1alpha1/common.proto";
import "google/protobuf/timestamp.proto";

message ActivityProductListRequest {
// Message header
cmp.types.v1alpha1.Header header = 1;

// Only respond with the products that are modified after this timestamp
google.protobuf.Timestamp modified_after = 2;
}

message ActivityProductListResponse {
// Message header
cmp.types.v1alpha1.Header header = 1;

// Product list: Activities
repeated Activity activities = 2;
}

// This service is used to get a product list for activities.
//
// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha1/list.proto.dot.xs.svg)
// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha1/list.proto.dot.svg)
service ActivityProductListService {
// Gets an optional `modified_after` date and returns a product list.
rpc ActivityProductList(ActivityProductListRequest) returns (ActivityProductListResponse);
}
12 changes: 9 additions & 3 deletions proto/cmp/services/activity/v1alpha1/search_result_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ message ActivitySearchResult {
int32 result_id = 1;

// Activity basic info
ActivityInfo info = 2;
Activity info = 2;

// Schedule
cmp.types.v1alpha1.DateTimeRange schedule = 3;
Expand All @@ -45,10 +45,10 @@ message ActivitySearchResult {
PricingType pricing_type = 9;
}

// ### Activity Info
// Represents an Activity product.
//
// FIXME: We need optimizations in this type
message ActivityInfo {
message Activity {
// Ex: "TC000000"
string product_code = 1;

Expand Down Expand Up @@ -78,6 +78,12 @@ message ActivityInfo {

// Ex: "Safari"
string type_name = 10;

// Status
//
// FIXME: We need to make this an ENUM (this is also used for several other
// verticals)
string status = 11;
}

// ### Activity Location
Expand Down

0 comments on commit 062e2a0

Please sign in to comment.