diff --git a/pkg/server/gen/server.pb.json.go b/pkg/server/gen/server.pb.json.go index de41a11413c..992c8109206 100644 --- a/pkg/server/gen/server.pb.json.go +++ b/pkg/server/gen/server.pb.json.go @@ -488,7 +488,7 @@ func (msg *UI_EventRelease) UnmarshalJSON(b []byte) error { } // MarshalJSON implements json.Marshaler -func (msg *UI_EventAddOn) MarshalJSON() ([]byte, error) { +func (msg *UI_EventAddOnCreated) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ UseEnumNumbers: false, EmitUnpopulated: false, @@ -497,7 +497,23 @@ func (msg *UI_EventAddOn) MarshalJSON() ([]byte, error) { } // UnmarshalJSON implements json.Unmarshaler -func (msg *UI_EventAddOn) UnmarshalJSON(b []byte) error { +func (msg *UI_EventAddOnCreated) UnmarshalJSON(b []byte) error { + return protojson.UnmarshalOptions{ + DiscardUnknown: false, + }.Unmarshal(b, msg) +} + +// MarshalJSON implements json.Marshaler +func (msg *UI_EventAddOnDestroyed) MarshalJSON() ([]byte, error) { + return protojson.MarshalOptions{ + UseEnumNumbers: false, + EmitUnpopulated: false, + UseProtoNames: false, + }.Marshal(msg) +} + +// UnmarshalJSON implements json.Unmarshaler +func (msg *UI_EventAddOnDestroyed) UnmarshalJSON(b []byte) error { return protojson.UnmarshalOptions{ DiscardUnknown: false, }.Unmarshal(b, msg) diff --git a/pkg/server/gen/server.swagger.json b/pkg/server/gen/server.swagger.json index 7142e4d379a..4fed25b223b 100644 --- a/pkg/server/gen/server.swagger.json +++ b/pkg/server/gen/server.swagger.json @@ -13424,7 +13424,18 @@ }, "description": "A deployment packaged alongside prefetched related messages." }, - "hashicorp.waypoint.UI.EventAddOn": { + "hashicorp.waypoint.UI.EventAddOnCreated": { + "type": "object", + "properties": { + "add_on_id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "hashicorp.waypoint.UI.EventAddOnDestroyed": { "type": "object", "properties": { "add_on_id": { @@ -13486,7 +13497,8 @@ "BUILD", "DEPLOYMENT", "RELEASE", - "ADDON" + "ADDON_CREATED", + "ADDON_DESTROYED" ], "default": "BUILD", "title": "Supported EventTypes" @@ -13603,8 +13615,11 @@ "event_release_schema": { "$ref": "#/definitions/hashicorp.waypoint.UI.EventRelease" }, - "event_add_on_schema": { - "$ref": "#/definitions/hashicorp.waypoint.UI.EventAddOn" + "event_add_on_created_schema": { + "$ref": "#/definitions/hashicorp.waypoint.UI.EventAddOnCreated" + }, + "event_add_on_destroyed_schema": { + "$ref": "#/definitions/hashicorp.waypoint.UI.EventAddOnDestroyed" } }, "title": "NOTE(Cassie): This should be implemented once pipeline_runs are app scoped\nmessage EventPipelineRun {\nstring pipelineRun_id = 1;\nuint64 sequence = 2;\n// Component component = 3; //aka platform\n// Ref.Workspace workspace = 4;\n}" diff --git a/pkg/server/proto/server.proto b/pkg/server/proto/server.proto index 04555e55823..0eb339e4261 100644 --- a/pkg/server/proto/server.proto +++ b/pkg/server/proto/server.proto @@ -815,7 +815,8 @@ message UI { BUILD = 0; DEPLOYMENT = 1; RELEASE = 2; - ADDON = 3; + ADDON_CREATED = 3; + ADDON_DESTROYED = 4; } //generic so looser contract for activity feed between backend and UI } @@ -848,7 +849,12 @@ message UI { uint64 deployment_sequence = 6; } - message EventAddOn { + message EventAddOnCreated { + string add_on_id = 1; + string name = 2; + } + + message EventAddOnDestroyed { string add_on_id = 1; string name = 2; } @@ -865,7 +871,8 @@ message UI { UI.EventBuild event_build_schema = 1; UI.EventDeployment event_deployment_schema = 2; UI.EventRelease event_release_schema = 3; - UI.EventAddOn event_add_on_schema = 4; + UI.EventAddOnCreated event_add_on_created_schema = 4; + UI.EventAddOnDestroyed event_add_on_destroyed_schema = 5; //UI.EventPipelineRun event_pipeline_run_schema = 4; } }