Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

feat: ActivityIssueApprovalNotify (#6533)

p0nye3a559832f8b
diff --git a/backend/api/v1/review_service.go b/backend/api/v1/review_service.go
index 4ab97e5156..63505e5495 100644
--- a/backend/api/v1/review_service.go
+++ b/backend/api/v1/review_service.go
@@ -2,6 +2,7 @@ package v1
import (
"context"
+ "encoding/json"
"fmt"
"strconv"
"strings"
@@ -257,7 +258,38 @@ func (s *ReviewService) ApproveReview(ctx context.Context, request *v1pb.Approve
return nil
}(); err != nil {
- log.Error("failed to create activity after approving review", zap.Error(err))
+ log.Error("failed to create skipping steps activity after approving review", zap.Error(err))
+ }
+
+ if err := func() error {
+ protoPayload, err := protojson.Marshal(&storepb.ActivityIssueApprovalNotifyPayload{
+ ApprovalStep: utils.FindNextPendingStep(payload.Approval.ApprovalTemplates[0], payload.Approval.Approvers),
+ })
+ if err != nil {
+ return err
+ }
+ activityPayload, err := json.Marshal(api.ActivityIssueApprovalNotifyPayload{
+ ProtoPayload: string(protoPayload),
+ })
+ if err != nil {
+ return err
+ }
+
+ create := &api.ActivityCreate{
+ CreatorID: api.SystemBotID,
+ ContainerID: issue.UID,
+ Type: api.ActivityIssueApprovalNotify,
+ Level: api.ActivityInfo,
+ Comment: "",
+ Payload: string(activityPayload),
+ }
+ if _, err := s.activityManager.CreateActivity(ctx, create, &activity.Metadata{Issue: issue}); err != nil {
+ return err
+ }
+
+ return nil
+ }(); err != nil {
+ log.Error("failed to create approval step pending activity after creating review", zap.Error(err))
}
review, err := convertToReview(ctx, s.store, issue)
diff --git a/backend/component/activity/manager.go b/backend/component/activity/manager.go
index 620e0a2126..a7bf57d4da 100644
--- a/backend/component/activity/manager.go
+++ b/backend/component/activity/manager.go
@@ -7,9 +7,12 @@ import (
"fmt"
"sort"
"strconv"
+ "strings"
"time"
"github.com/gosimple/slug"
+ "github.com/nyaruka/phonenumbers"
+ "google.golang.org/protobuf/encoding/protojson"
"github.com/bytebase/bytebase/backend/common"
"github.com/bytebase/bytebase/backend/common/log"
@@ -17,6 +20,7 @@ import (
"github.com/bytebase/bytebase/backend/plugin/webhook"
"github.com/bytebase/bytebase/backend/store"
"github.com/bytebase/bytebase/backend/utils"
+ storepb "github.com/bytebase/bytebase/proto/generated-go/store"
"github.com/pkg/errors"
"go.uber.org/zap"
@@ -192,6 +196,7 @@ func postWebhookList(webhookCtx webhook.Context, webhookList []*store.ProjectWeb
func (m *Manager) getWebhookContext(ctx context.Context, activity *api.Activity, meta *Metadata, updater *store.UserMessage) (webhook.Context, error) {
var webhookCtx webhook.Context
var webhookTaskResult *webhook.TaskResult
+ var webhookApproval webhook.Approval
setting, err := m.store.GetWorkspaceGeneralSetting(ctx)
if err != nil {
@@ -399,6 +404,72 @@ func (m *Manager) getWebhookContext(ctx context.Context, activity *api.Activity,
}
webhookTaskResult.Detail = result.Detail
}
+ case api.ActivityIssueApprovalNotify:
+ payload := &api.ActivityIssueApprovalNotifyPayload{}
+ if err := json.Unmarshal([]byte(activity.Payload), payload); err != nil {
+ log.Warn("Failed to post webhook event after changing the issue approval node status, failed to unmarshal payload",
+ zap.String("issue_name", meta.Issue.Title),
+ zap.Error(err))
+ return webhookCtx, err
+ }
+ protoPayload := &storepb.ActivityIssueApprovalNotifyPayload{}
+ if err := protojson.Unmarshal([]byte(payload.ProtoPayload), protoPayload); err != nil {
+ log.Warn("Failed to post webhook event")
+ }
+ pendingStep := protoPayload.ApprovalStep
+
+ title = "Issue approval needed - " + meta.Issue.Title
+
+ if len(pendingStep.Nodes) != 1 {
+ log.Warn("Failed to post webhook event after changing the issue approval node status, pending step nodes length is not 1")
+ return webhookCtx, errors.Errorf("pending step nodes length is not 1, got %v", len(pendingStep.Nodes))
+ }
+
+ node := pendingStep.Nodes[0]
+
+ var usersGetter func(ctx context.Context) ([]*store.UserMessage, error)
+
+ switch val := node.Payload.(type) {
+ case *storepb.ApprovalNode_GroupValue_:
+ switch val.GroupValue {
+ case storepb.ApprovalNode_GROUP_VALUE_UNSPECIFILED:
+ return webhookCtx, errors.Errorf("invalid group value")
+ case storepb.ApprovalNode_WORKSPACE_OWNER:
+ usersGetter = getUsersFromWorkspaceRole(m.store, api.Owner)
+ case storepb.ApprovalNode_WORKSPACE_DBA:
+ usersGetter = getUsersFromWorkspaceRole(m.store, api.DBA)
+ case storepb.ApprovalNode_PROJECT_OWNER:
+ usersGetter = getUsersFromProjectRole(m.store, api.Owner, meta.Issue.Project.ResourceID)
+ case storepb.ApprovalNode_PROJECT_MEMBER:
+ usersGetter = getUsersFromProjectRole(m.store, api.Developer, meta.Issue.Project.ResourceID)
+ default:
+ return webhookCtx, errors.Errorf("invalid group value")
+ }
+ case *storepb.ApprovalNode_Role:
+ role := api.Role(strings.TrimPrefix(val.Role, "roles/"))
+ usersGetter = getUsersFromProjectRole(m.store, role, meta.Issue.Project.ResourceID)
+ default:
+ return webhookCtx, errors.Errorf("invalid node payload type")
+ }
+
+ users, err := usersGetter(ctx)
+ if err != nil {
+ log.Warn("Failed to post webhook event after changing the issue approval node status, failed to get users",
+ zap.String("issue_name", meta.Issue.Title),
+ zap.Error(err))
+ return webhookCtx, err
+ }
+ for _, user := range users {
+ phoneNumber, err := phonenumbers.Parse(user.Phone, "")
+ if err != nil {
+ log.Warn("Failed to post webhook event after changing the issue approval node status, failed to parse phone number",
+ zap.String("issue_name", meta.Issue.Title),
+ zap.Error(err))
+ continue
+ }
+ phone := strconv.FormatInt(int64(*phoneNumber.NationalNumber), 10)
+ webhookApproval.MentionUsersByPhone = append(webhookApproval.MentionUsersByPhone, phone)
+ }
}
webhookCtx = webhook.Context{
@@ -422,6 +493,7 @@ func (m *Manager) getWebhookContext(ctx context.Context, activity *api.Activity,
CreatorID: updater.ID,
CreatorName: updater.Name,
CreatorEmail: updater.Email,
+ Approval: &webhookApproval,
}
return webhookCtx, nil
}
@@ -490,3 +562,29 @@ func shouldPostInbox(activity *api.Activity, createType api.ActivityType) (bool,
}
return false, nil
}
+
+func getUsersFromWorkspaceRole(s *store.Store, role api.Role) func(context.Context) ([]*store.UserMessage, error) {
+ return func(ctx context.Context) ([]*store.UserMessage, error) {
+ return s.ListUsers(ctx, &store.FindUserMessage{
+ Role: &role,
+ })
+ }
+}
+
+func getUsersFromProjectRole(s *store.Store, role api.Role, projectID string) func(context.Context) ([]*store.UserMessage, error) {
+ return func(ctx context.Context) ([]*store.UserMessage, error) {
+ projectIAM, err := s.GetProjectPolicy(ctx, &store.GetProjectPolicyMessage{
+ ProjectID: &projectID,
+ })
+ if err != nil {
+ return nil, err
+ }
+ var users []*store.UserMessage
+ for _, binding := range projectIAM.Bindings {
+ if binding.Role == role {
+ users = append(users, binding.Members...)
+ }
+ }
+ return users, nil
+ }
+}
diff --git a/backend/legacyapi/activity.go b/backend/legacyapi/activity.go
index 15d22d9c52..bb16256972 100644
--- a/backend/legacyapi/activity.go
+++ b/backend/legacyapi/activity.go
@@ -21,6 +21,8 @@ const (
ActivityIssueFieldUpdate ActivityType = "bb.issue.field.update"
// ActivityIssueStatusUpdate is the type for updating issue status.
ActivityIssueStatusUpdate ActivityType = "bb.issue.status.update"
+ // ActivityIssueApprovalNotify is the type for notifying issue approval.
+ ActivityIssueApprovalNotify ActivityType = "bb.issue.approval.notify"
// ActivityPipelineStageStatusUpdate is the type for stage begins or ends.
ActivityPipelineStageStatusUpdate ActivityType = "bb.pipeline.stage.status.update"
// ActivityPipelineTaskStatusUpdate is the type for updating pipeline task status.
@@ -137,6 +139,12 @@ type ActivityIssueStatusUpdatePayload struct {
IssueName string `json:"issueName"`
}
+// ActivityIssueApprovalNotifyPayload is the API message payloads for notifying issue approval.
+type ActivityIssueApprovalNotifyPayload struct {
+ // ProtoPayload is protojson.Marshal(storepb.ActivityIssueApprovalNotifyPayload).
+ ProtoPayload string `json:"protoPayload,omitempty"`
+}
+
// ActivityPipelineStageStatusUpdatePayload is the API message payloads for stage status updates.
type ActivityPipelineStageStatusUpdatePayload struct {
StageID int `json:"stageId"`
diff --git a/backend/plugin/webhook/dingtalk.go b/backend/plugin/webhook/dingtalk.go
index f9b8b89e20..d1287dcb84 100644
--- a/backend/plugin/webhook/dingtalk.go
+++ b/backend/plugin/webhook/dingtalk.go
@@ -23,10 +23,17 @@ type DingTalkWebhookMarkdown struct {
Text string `json:"text"`
}
+// DingTalkMention is the API message for DingTalk webhook to mention users in DingTalk.
+// https://open.dingtalk.com/document/orgapp/custom-robots-send-group-messages
+type DingTalkMention struct {
+ Mobiles []string `json:"atMobiles"`
+}
+
// DingTalkWebhook is the API message for DingTalk webhook.
type DingTalkWebhook struct {
MessageType string `json:"msgtype"`
Markdown DingTalkWebhookMarkdown `json:"markdown"`
+ Mention DingTalkMention `json:"at"`
}
func init() {
@@ -48,6 +55,13 @@ func (*DingTalkReceiver) post(context Context) error {
if context.Description != "" {
text = fmt.Sprintf("# %s\n> %s\n%s\n##### [View in Bytebase](%s)", context.Title, context.Description, strings.Join(metaStrList, "\n"), context.Link)
}
+ if context.Approval != nil && len(context.Approval.MentionUsersByPhone) > 0 {
+ var ats []string
+ for _, phone := range context.Approval.MentionUsersByPhone {
+ ats = append(ats, fmt.Sprintf("@%s", phone))
+ }
+ text += "\n" + strings.Join(ats, " ")
+ }
post := DingTalkWebhook{
MessageType: "markdown",
@@ -56,6 +70,10 @@ func (*DingTalkReceiver) post(context Context) error {
Text: text,
},
}
+ if context.Approval != nil {
+ post.Mention.Mobiles = append(post.Mention.Mobiles, context.Approval.MentionUsersByPhone...)
+ }
+
body, err := json.Marshal(post)
if err != nil {
return errors.Wrapf(err, "failed to marshal webhook POST request to %s", context.URL)
diff --git a/backend/plugin/webhook/webhook.go b/backend/plugin/webhook/webhook.go
index 2bb6321b32..ea52acc970 100644
--- a/backend/plugin/webhook/webhook.go
+++ b/backend/plugin/webhook/webhook.go
@@ -62,6 +62,11 @@ type Project struct {
Name string `json:"name"`
}
+// Approval object of issue approval.
+type Approval struct {
+ MentionUsersByPhone []string
+}
+
// Context is the context of webhook.
type Context struct {
URL string
@@ -77,6 +82,7 @@ type Context struct {
Issue *Issue
Project *Project
TaskResult *TaskResult
+ Approval *Approval
}
// Receiver is the webhook receiver.
diff --git a/backend/runner/approval/runner.go b/backend/runner/approval/runner.go
index aacb65ac8f..ba7d231b58 100644
--- a/backend/runner/approval/runner.go
+++ b/backend/runner/approval/runner.go
@@ -264,6 +264,37 @@ func (r *Runner) findApprovalTemplateForIssue(ctx context.Context, issue *store.
}
}
+ if err := func() error {
+ protoPayload, err := protojson.Marshal(&storepb.ActivityIssueApprovalNotifyPayload{
+ ApprovalStep: utils.FindNextPendingStep(payload.Approval.ApprovalTemplates[0], payload.Approval.Approvers),
+ })
+ if err != nil {
+ return err
+ }
+ activityPayload, err := json.Marshal(api.ActivityIssueApprovalNotifyPayload{
+ ProtoPayload: string(protoPayload),
+ })
+ if err != nil {
+ return err
+ }
+
+ create := &api.ActivityCreate{
+ CreatorID: api.SystemBotID,
+ ContainerID: issue.UID,
+ Type: api.ActivityIssueApprovalNotify,
+ Level: api.ActivityInfo,
+ Comment: "",
+ Payload: string(activityPayload),
+ }
+ if _, err := r.activityManager.CreateActivity(ctx, create, &activity.Metadata{Issue: issue}); err != nil {
+ return err
+ }
+
+ return nil
+ }(); err != nil {
+ log.Error("failed to create approval step pending activity after creating review", zap.Error(err))
+ }
+
return true, nil
}
diff --git a/backend/store/activity.go b/backend/store/activity.go
index ad479f5270..8677b902f8 100644
--- a/backend/store/activity.go
+++ b/backend/store/activity.go
@@ -504,7 +504,7 @@ func convertAPIPayloadToProtoPayload(activityType api.ActivityType, payload stri
if err != nil {
return "", err
}
- payload = string(newPayload)
+ return string(newPayload), nil
case api.ActivityIssueCommentCreate:
var originalPayload api.ActivityIssueCommentCreatePayload
if err := json.Unmarshal([]byte(payload), &originalPayload); err != nil {
@@ -541,9 +541,16 @@ func convertAPIPayloadToProtoPayload(activityType api.ActivityType, payload stri
if err != nil {
return "", err
}
- payload = string(newPayload)
+ return string(newPayload), nil
+ case api.ActivityIssueApprovalNotify:
+ var originalPayload api.ActivityIssueApprovalNotifyPayload
+ if err := json.Unmarshal([]byte(payload), &originalPayload); err != nil {
+ return "", err
+ }
+ return originalPayload.ProtoPayload, nil
+ default:
+ return payload, nil
}
- return payload, nil
}
func convertProtoPayloadToAPIPayload(activityType api.ActivityType, payload string) (string, error) {
@@ -561,7 +568,7 @@ func convertProtoPayloadToAPIPayload(activityType api.ActivityType, payload stri
if err != nil {
return "", err
}
- payload = string(newPayload)
+ return string(newPayload), nil
case api.ActivityIssueCommentCreate:
var protoPayload storepb.ActivityIssueCommentCreatePayload
if err := protojson.Unmarshal([]byte(payload), &protoPayload); err != nil {
@@ -599,8 +606,23 @@ func convertProtoPayloadToAPIPayload(activityType api.ActivityType, payload stri
}
}
}
+ newPayload, err := json.Marshal(originalPayload)
+ if err != nil {
+ return "", err
+ }
+ return string(newPayload), nil
+ case api.ActivityIssueApprovalNotify:
+ originalPayload := &api.ActivityIssueApprovalNotifyPayload{
+ ProtoPayload: payload,
+ }
+ newPayload, err := json.Marshal(originalPayload)
+ if err != nil {
+ return "", err
+ }
+ return string(newPayload), nil
+ default:
+ return payload, nil
}
- return payload, nil
}
func convertAPIExternalApprovalEventActionToStorePBAction(action api.ExternalApprovalEventActionType) storepb.ActivityIssueCommentCreatePayload_ExternalApprovalEvent_Action {
diff --git a/frontend/src/types/proto/store/activity.ts b/frontend/src/types/proto/store/activity.ts
index 5c47b0024d..a0732225d7 100644
--- a/frontend/src/types/proto/store/activity.ts
+++ b/frontend/src/types/proto/store/activity.ts
@@ -1,6 +1,7 @@
/* eslint-disable */
import * as Long from "long";
import * as _m0 from "protobufjs/minimal";
+import { ApprovalStep } from "./approval";
export const protobufPackage = "bytebase.store";
@@ -172,6 +173,10 @@ export function activityIssueCommentCreatePayload_ApprovalEvent_StatusToJSON(
}
}
+export interface ActivityIssueApprovalNotifyPayload {
+ approvalStep?: ApprovalStep;
+}
+
function createBaseActivityIssueCreatePayload(): ActivityIssueCreatePayload {
return { issueName: "" };
}
@@ -616,6 +621,65 @@ export const ActivityIssueCommentCreatePayload_ApprovalEvent = {
},
};
+function createBaseActivityIssueApprovalNotifyPayload(): ActivityIssueApprovalNotifyPayload {
+ return { approvalStep: undefined };
+}
+
+export const ActivityIssueApprovalNotifyPayload = {
+ encode(message: ActivityIssueApprovalNotifyPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.approvalStep !== undefined) {
+ ApprovalStep.encode(message.approvalStep, writer.uint32(10).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): ActivityIssueApprovalNotifyPayload {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseActivityIssueApprovalNotifyPayload();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.approvalStep = ApprovalStep.decode(reader, reader.uint32());
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ActivityIssueApprovalNotifyPayload {
+ return { approvalStep: isSet(object.approvalStep) ? ApprovalStep.fromJSON(object.approvalStep) : undefined };
+ },
+
+ toJSON(message: ActivityIssueApprovalNotifyPayload): unknown {
+ const obj: any = {};
+ message.approvalStep !== undefined &&
+ (obj.approvalStep = message.approvalStep ? ApprovalStep.toJSON(message.approvalStep) : undefined);
+ return obj;
+ },
+
+ create(base?: DeepPartial<ActivityIssueApprovalNotifyPayload>): ActivityIssueApprovalNotifyPayload {
+ return ActivityIssueApprovalNotifyPayload.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<ActivityIssueApprovalNotifyPayload>): ActivityIssueApprovalNotifyPayload {
+ const message = createBaseActivityIssueApprovalNotifyPayload();
+ message.approvalStep = (object.approvalStep !== undefined && object.approvalStep !== null)
+ ? ApprovalStep.fromPartial(object.approvalStep)
+ : undefined;
+ return message;
+ },
+};
+
declare var self: any | undefined;
declare var window: any | undefined;
declare var global: any | undefined;
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index 7c5ae23334..9f0b7d1268 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -3,17 +3,6 @@
## Table of Contents
-- [store/activity.proto](#store_activity-proto)
- - [ActivityIssueCommentCreatePayload](#bytebase-store-ActivityIssueCommentCreatePayload)
- - [ActivityIssueCommentCreatePayload.ApprovalEvent](#bytebase-store-ActivityIssueCommentCreatePayload-ApprovalEvent)
- - [ActivityIssueCommentCreatePayload.ExternalApprovalEvent](#bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent)
- - [ActivityIssueCommentCreatePayload.TaskRollbackBy](#bytebase-store-ActivityIssueCommentCreatePayload-TaskRollbackBy)
- - [ActivityIssueCreatePayload](#bytebase-store-ActivityIssueCreatePayload)
-
- - [ActivityIssueCommentCreatePayload.ApprovalEvent.Status](#bytebase-store-ActivityIssueCommentCreatePayload-ApprovalEvent-Status)
- - [ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Action](#bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent-Action)
- - [ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Type](#bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent-Type)
-
- [store/approval.proto](#store_approval-proto)
- [ApprovalFlow](#bytebase-store-ApprovalFlow)
- [ApprovalNode](#bytebase-store-ApprovalNode)
@@ -27,6 +16,18 @@
- [ApprovalStep.Type](#bytebase-store-ApprovalStep-Type)
- [IssuePayloadApproval.Approver.Status](#bytebase-store-IssuePayloadApproval-Approver-Status)
+- [store/activity.proto](#store_activity-proto)
+ - [ActivityIssueApprovalNotifyPayload](#bytebase-store-ActivityIssueApprovalNotifyPayload)
+ - [ActivityIssueCommentCreatePayload](#bytebase-store-ActivityIssueCommentCreatePayload)
+ - [ActivityIssueCommentCreatePayload.ApprovalEvent](#bytebase-store-ActivityIssueCommentCreatePayload-ApprovalEvent)
+ - [ActivityIssueCommentCreatePayload.ExternalApprovalEvent](#bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent)
+ - [ActivityIssueCommentCreatePayload.TaskRollbackBy](#bytebase-store-ActivityIssueCommentCreatePayload-TaskRollbackBy)
+ - [ActivityIssueCreatePayload](#bytebase-store-ActivityIssueCreatePayload)
+
+ - [ActivityIssueCommentCreatePayload.ApprovalEvent.Status](#bytebase-store-ActivityIssueCommentCreatePayload-ApprovalEvent-Status)
+ - [ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Action](#bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent-Action)
+ - [ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Type](#bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent-Type)
+
- [store/common.proto](#store_common-proto)
- [PageToken](#bytebase-store-PageToken)
@@ -110,138 +111,175 @@
-<a name="store_activity-proto"></a>
+<a name="store_approval-proto"></a>
<p align="right"><a href="#top">Top</a></p>
-## store/activity.proto
+## store/approval.proto
-<a name="bytebase-store-ActivityIssueCommentCreatePayload"></a>
+<a name="bytebase-store-ApprovalFlow"></a>
+
+### ApprovalFlow
-### ActivityIssueCommentCreatePayload
-ActivityIssueCommentCreatePayload is the payloads for creating issue comments.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| external_approval_event | [ActivityIssueCommentCreatePayload.ExternalApprovalEvent](#bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent) | | |
-| task_rollback_by | [ActivityIssueCommentCreatePayload.TaskRollbackBy](#bytebase-store-ActivityIssueCommentCreatePayload-TaskRollbackBy) | | |
-| approval_event | [ActivityIssueCommentCreatePayload.ApprovalEvent](#bytebase-store-ActivityIssueCommentCreatePayload-ApprovalEvent) | | |
-| issue_name | [string](#string) | | Used by inbox to display info without paying the join cost |
+| steps | [ApprovalStep](#bytebase-store-ApprovalStep) | repeated | |
-<a name="bytebase-store-ActivityIssueCommentCreatePayload-ApprovalEvent"></a>
+<a name="bytebase-store-ApprovalNode"></a>
-### ActivityIssueCommentCreatePayload.ApprovalEvent
+### ApprovalNode
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| status | [ActivityIssueCommentCreatePayload.ApprovalEvent.Status](#bytebase-store-ActivityIssueCommentCreatePayload-ApprovalEvent-Status) | | The new status. |
+| type | [ApprovalNode.Type](#bytebase-store-ApprovalNode-Type) | | |
+| group_value | [ApprovalNode.GroupValue](#bytebase-store-ApprovalNode-GroupValue) | | |
+| role | [string](#string) | | Format: roles/{role} |
-<a name="bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent"></a>
+<a name="bytebase-store-ApprovalStep"></a>
-### ActivityIssueCommentCreatePayload.ExternalApprovalEvent
+### ApprovalStep
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| type | [ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Type](#bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent-Type) | | |
-| action | [ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Action](#bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent-Action) | | |
-| stage_name | [string](#string) | | |
+| type | [ApprovalStep.Type](#bytebase-store-ApprovalStep-Type) | | |
+| nodes | [ApprovalNode](#bytebase-store-ApprovalNode) | repeated | |
-<a name="bytebase-store-ActivityIssueCommentCreatePayload-TaskRollbackBy"></a>
+<a name="bytebase-store-ApprovalTemplate"></a>
+
+### ApprovalTemplate
-### ActivityIssueCommentCreatePayload.TaskRollbackBy
-TaskRollbackBy records an issue rollback activity.
-The task with taskID in IssueID is rollbacked by the task with RollbackByTaskID in RollbackByIssueID.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| issue_id | [int64](#int64) | | |
-| task_id | [int64](#int64) | | |
-| rollback_by_issue_id | [int64](#int64) | | |
-| rollback_by_task_id | [int64](#int64) | | |
+| flow | [ApprovalFlow](#bytebase-store-ApprovalFlow) | | |
+| title | [string](#string) | | |
+| description | [string](#string) | | |
+| creator_id | [int32](#int32) | | |
-<a name="bytebase-store-ActivityIssueCreatePayload"></a>
+<a name="bytebase-store-IssuePayloadApproval"></a>
-### ActivityIssueCreatePayload
-ActivityIssueCreatePayload is the payloads for creating issues.
-These payload types are only used when marshalling to the json format for saving into the database.
-So we annotate with json tag using camelCase naming which is consistent with normal
-json naming convention. More importantly, frontend code can simply use JSON.parse to
-convert to the expected struct there.
+### IssuePayloadApproval
+IssuePayloadApproval is a part of the payload of an issue.
+IssuePayloadApproval records the approval template used and the approval history.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| issue_name | [string](#string) | | Used by inbox to display info without paying the join cost |
+| approval_templates | [ApprovalTemplate](#bytebase-store-ApprovalTemplate) | repeated | |
+| approvers | [IssuePayloadApproval.Approver](#bytebase-store-IssuePayloadApproval-Approver) | repeated | |
+| approval_finding_done | [bool](#bool) | | If the value is `false`, it means that the backend is still finding matching approval templates. If `true`, other fields are available. |
+| approval_finding_error | [string](#string) | | |
-
+<a name="bytebase-store-IssuePayloadApproval-Approver"></a>
-<a name="bytebase-store-ActivityIssueCommentCreatePayload-ApprovalEvent-Status"></a>
+### IssuePayloadApproval.Approver
-### ActivityIssueCommentCreatePayload.ApprovalEvent.Status
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| status | [IssuePayloadApproval.Approver.Status](#bytebase-store-IssuePayloadApproval-Approver-Status) | | The new status. |
+| principal_id | [int32](#int32) | | The principal id of the approver. |
+
+
+
+
+
+
+
+
+<a name="bytebase-store-ApprovalNode-GroupValue"></a>
+
+### ApprovalNode.GroupValue
+The predefined user groups are:
+- WORKSPACE_OWNER
+- WORKSPACE_DBA
+- PROJECT_OWNER
+- PROJECT_MEMBER
+
| Name | Number | Description |
| ---- | ------ | ----------- |
-| STATUS_UNSPECIFIED | 0 | |
-| PENDING | 1 | |
-| APPROVED | 2 | |
+| GROUP_VALUE_UNSPECIFILED | 0 | |
+| WORKSPACE_OWNER | 1 | |
+| WORKSPACE_DBA | 2 | |
+| PROJECT_OWNER | 3 | |
+| PROJECT_MEMBER | 4 | |
-<a name="bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent-Action"></a>
+<a name="bytebase-store-ApprovalNode-Type"></a>
-### ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Action
+### ApprovalNode.Type
+Type of the ApprovalNode.
+type determines who should approve this node.
+ANY_IN_GROUP means the ApprovalNode can be approved by an user from our predefined user group.
+See GroupValue below for the predefined user groups.
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | |
+| ANY_IN_GROUP | 1 | |
+
+
+
+<a name="bytebase-store-ApprovalStep-Type"></a>
+
+### ApprovalStep.Type
+Type of the ApprovalStep
+ALL means every node must be approved to proceed.
+ANY means approving any node will proceed.
| Name | Number | Description |
| ---- | ------ | ----------- |
-| ACTION_UNSPECIFIED | 0 | |
-| ACTION_APPROVE | 1 | |
-| ACTION_REJECT | 2 | |
+| TYPE_UNSPECIFIED | 0 | |
+| ALL | 1 | |
+| ANY | 2 | |
-<a name="bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent-Type"></a>
+<a name="bytebase-store-IssuePayloadApproval-Approver-Status"></a>
-### ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Type
+### IssuePayloadApproval.Approver.Status
| Name | Number | Description |
| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | |
-| TYPE_FEISHU | 1 | |
+| STATUS_UNSPECIFIED | 0 | |
+| PENDING | 1 | |
+| APPROVED | 2 | |
@@ -252,108 +290,110 @@ convert to the expected struct there.
-<a name="store_approval-proto"></a>
+<a name="store_activity-proto"></a>
<p align="right"><a href="#top">Top</a></p>
-## store/approval.proto
+## store/activity.proto
-<a name="bytebase-store-ApprovalFlow"></a>
+<a name="bytebase-store-ActivityIssueApprovalNotifyPayload"></a>
-### ApprovalFlow
+### ActivityIssueApprovalNotifyPayload
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| steps | [ApprovalStep](#bytebase-store-ApprovalStep) | repeated | |
-
+| approval_step | [ApprovalStep](#bytebase-store-ApprovalStep) | | |
-<a name="bytebase-store-ApprovalNode"></a>
-### ApprovalNode
+<a name="bytebase-store-ActivityIssueCommentCreatePayload"></a>
+### ActivityIssueCommentCreatePayload
+ActivityIssueCommentCreatePayload is the payloads for creating issue comments.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| type | [ApprovalNode.Type](#bytebase-store-ApprovalNode-Type) | | |
-| group_value | [ApprovalNode.GroupValue](#bytebase-store-ApprovalNode-GroupValue) | | |
-| role | [string](#string) | | Format: roles/{role} |
+| external_approval_event | [ActivityIssueCommentCreatePayload.ExternalApprovalEvent](#bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent) | | |
+| task_rollback_by | [ActivityIssueCommentCreatePayload.TaskRollbackBy](#bytebase-store-ActivityIssueCommentCreatePayload-TaskRollbackBy) | | |
+| approval_event | [ActivityIssueCommentCreatePayload.ApprovalEvent](#bytebase-store-ActivityIssueCommentCreatePayload-ApprovalEvent) | | |
+| issue_name | [string](#string) | | Used by inbox to display info without paying the join cost |
-<a name="bytebase-store-ApprovalStep"></a>
+<a name="bytebase-store-ActivityIssueCommentCreatePayload-ApprovalEvent"></a>
-### ApprovalStep
+### ActivityIssueCommentCreatePayload.ApprovalEvent
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| type | [ApprovalStep.Type](#bytebase-store-ApprovalStep-Type) | | |
-| nodes | [ApprovalNode](#bytebase-store-ApprovalNode) | repeated | |
+| status | [ActivityIssueCommentCreatePayload.ApprovalEvent.Status](#bytebase-store-ActivityIssueCommentCreatePayload-ApprovalEvent-Status) | | The new status. |
-<a name="bytebase-store-ApprovalTemplate"></a>
+<a name="bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent"></a>
-### ApprovalTemplate
+### ActivityIssueCommentCreatePayload.ExternalApprovalEvent
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| flow | [ApprovalFlow](#bytebase-store-ApprovalFlow) | | |
-| title | [string](#string) | | |
-| description | [string](#string) | | |
-| creator_id | [int32](#int32) | | |
+| type | [ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Type](#bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent-Type) | | |
+| action | [ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Action](#bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent-Action) | | |
+| stage_name | [string](#string) | | |
-<a name="bytebase-store-IssuePayloadApproval"></a>
+<a name="bytebase-store-ActivityIssueCommentCreatePayload-TaskRollbackBy"></a>
-### IssuePayloadApproval
-IssuePayloadApproval is a part of the payload of an issue.
-IssuePayloadApproval records the approval template used and the approval history.
+### ActivityIssueCommentCreatePayload.TaskRollbackBy
+TaskRollbackBy records an issue rollback activity.
+The task with taskID in IssueID is rollbacked by the task with RollbackByTaskID in RollbackByIssueID.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| approval_templates | [ApprovalTemplate](#bytebase-store-ApprovalTemplate) | repeated | |
-| approvers | [IssuePayloadApproval.Approver](#bytebase-store-IssuePayloadApproval-Approver) | repeated | |
-| approval_finding_done | [bool](#bool) | | If the value is `false`, it means that the backend is still finding matching approval templates. If `true`, other fields are available. |
-| approval_finding_error | [string](#string) | | |
-
+| issue_id | [int64](#int64) | | |
+| task_id | [int64](#int64) | | |
+| rollback_by_issue_id | [int64](#int64) | | |
+| rollback_by_task_id | [int64](#int64) | | |
-<a name="bytebase-store-IssuePayloadApproval-Approver"></a>
-### IssuePayloadApproval.Approver
+<a name="bytebase-store-ActivityIssueCreatePayload"></a>
+### ActivityIssueCreatePayload
+ActivityIssueCreatePayload is the payloads for creating issues.
+These payload types are only used when marshalling to the json format for saving into the database.
+So we annotate with json tag using camelCase naming which is consistent with normal
+json naming convention. More importantly, frontend code can simply use JSON.parse to
+convert to the expected struct there.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| status | [IssuePayloadApproval.Approver.Status](#bytebase-store-IssuePayloadApproval-Approver-Status) | | The new status. |
-| principal_id | [int32](#int32) | | The principal id of the approver. |
+| issue_name | [string](#string) | | Used by inbox to display info without paying the join cost |
@@ -362,65 +402,41 @@ IssuePayloadApproval records the approval template used and the approval history
-<a name="bytebase-store-ApprovalNode-GroupValue"></a>
-
-### ApprovalNode.GroupValue
-The predefined user groups are:
-- WORKSPACE_OWNER
-- WORKSPACE_DBA
-- PROJECT_OWNER
-- PROJECT_MEMBER
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| GROUP_VALUE_UNSPECIFILED | 0 | |
-| WORKSPACE_OWNER | 1 | |
-| WORKSPACE_DBA | 2 | |
-| PROJECT_OWNER | 3 | |
-| PROJECT_MEMBER | 4 | |
-
-
+<a name="bytebase-store-ActivityIssueCommentCreatePayload-ApprovalEvent-Status"></a>
-<a name="bytebase-store-ApprovalNode-Type"></a>
+### ActivityIssueCommentCreatePayload.ApprovalEvent.Status
-### ApprovalNode.Type
-Type of the ApprovalNode.
-type determines who should approve this node.
-ANY_IN_GROUP means the ApprovalNode can be approved by an user from our predefined user group.
-See GroupValue below for the predefined user groups.
| Name | Number | Description |
| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | |
-| ANY_IN_GROUP | 1 | |
+| STATUS_UNSPECIFIED | 0 | |
+| PENDING | 1 | |
+| APPROVED | 2 | |
-<a name="bytebase-store-ApprovalStep-Type"></a>
+<a name="bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent-Action"></a>
+
+### ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Action
-### ApprovalStep.Type
-Type of the ApprovalStep
-ALL means every node must be approved to proceed.
-ANY means approving any node will proceed.
| Name | Number | Description |
| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | |
-| ALL | 1 | |
-| ANY | 2 | |
+| ACTION_UNSPECIFIED | 0 | |
+| ACTION_APPROVE | 1 | |
+| ACTION_REJECT | 2 | |
-<a name="bytebase-store-IssuePayloadApproval-Approver-Status"></a>
+<a name="bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent-Type"></a>
-### IssuePayloadApproval.Approver.Status
+### ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Type
| Name | Number | Description |
| ---- | ------ | ----------- |
-| STATUS_UNSPECIFIED | 0 | |
-| PENDING | 1 | |
-| APPROVED | 2 | |
+| TYPE_UNSPECIFIED | 0 | |
+| TYPE_FEISHU | 1 | |
diff --git a/proto/generated-go/store/activity.pb.go b/proto/generated-go/store/activity.pb.go
index dd54d1c66f..e3627342ef 100644
--- a/proto/generated-go/store/activity.pb.go
+++ b/proto/generated-go/store/activity.pb.go
@@ -325,6 +325,53 @@ func (*ActivityIssueCommentCreatePayload_TaskRollbackBy_) isActivityIssueComment
func (*ActivityIssueCommentCreatePayload_ApprovalEvent_) isActivityIssueCommentCreatePayload_Event() {
}
+type ActivityIssueApprovalNotifyPayload struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ApprovalStep *ApprovalStep `protobuf:"bytes,1,opt,name=approval_step,json=approvalStep,proto3" json:"approval_step,omitempty"`
+}
+
+func (x *ActivityIssueApprovalNotifyPayload) Reset() {
+ *x = ActivityIssueApprovalNotifyPayload{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_store_activity_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ActivityIssueApprovalNotifyPayload) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ActivityIssueApprovalNotifyPayload) ProtoMessage() {}
+
+func (x *ActivityIssueApprovalNotifyPayload) ProtoReflect() protoreflect.Message {
+ mi := &file_store_activity_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ActivityIssueApprovalNotifyPayload.ProtoReflect.Descriptor instead.
+func (*ActivityIssueApprovalNotifyPayload) Descriptor() ([]byte, []int) {
+ return file_store_activity_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ActivityIssueApprovalNotifyPayload) GetApprovalStep() *ApprovalStep {
+ if x != nil {
+ return x.ApprovalStep
+ }
+ return nil
+}
+
// TaskRollbackBy records an issue rollback activity.
// The task with taskID in IssueID is rollbacked by the task with RollbackByTaskID in RollbackByIssueID.
type ActivityIssueCommentCreatePayload_TaskRollbackBy struct {
@@ -341,7 +388,7 @@ type ActivityIssueCommentCreatePayload_TaskRollbackBy struct {
func (x *ActivityIssueCommentCreatePayload_TaskRollbackBy) Reset() {
*x = ActivityIssueCommentCreatePayload_TaskRollbackBy{}
if protoimpl.UnsafeEnabled {
- mi := &file_store_activity_proto_msgTypes[2]
+ mi := &file_store_activity_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -354,7 +401,7 @@ func (x *ActivityIssueCommentCreatePayload_TaskRollbackBy) String() string {
func (*ActivityIssueCommentCreatePayload_TaskRollbackBy) ProtoMessage() {}
func (x *ActivityIssueCommentCreatePayload_TaskRollbackBy) ProtoReflect() protoreflect.Message {
- mi := &file_store_activity_proto_msgTypes[2]
+ mi := &file_store_activity_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -411,7 +458,7 @@ type ActivityIssueCommentCreatePayload_ExternalApprovalEvent struct {
func (x *ActivityIssueCommentCreatePayload_ExternalApprovalEvent) Reset() {
*x = ActivityIssueCommentCreatePayload_ExternalApprovalEvent{}
if protoimpl.UnsafeEnabled {
- mi := &file_store_activity_proto_msgTypes[3]
+ mi := &file_store_activity_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -424,7 +471,7 @@ func (x *ActivityIssueCommentCreatePayload_ExternalApprovalEvent) String() strin
func (*ActivityIssueCommentCreatePayload_ExternalApprovalEvent) ProtoMessage() {}
func (x *ActivityIssueCommentCreatePayload_ExternalApprovalEvent) ProtoReflect() protoreflect.Message {
- mi := &file_store_activity_proto_msgTypes[3]
+ mi := &file_store_activity_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -473,7 +520,7 @@ type ActivityIssueCommentCreatePayload_ApprovalEvent struct {
func (x *ActivityIssueCommentCreatePayload_ApprovalEvent) Reset() {
*x = ActivityIssueCommentCreatePayload_ApprovalEvent{}
if protoimpl.UnsafeEnabled {
- mi := &file_store_activity_proto_msgTypes[4]
+ mi := &file_store_activity_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -486,7 +533,7 @@ func (x *ActivityIssueCommentCreatePayload_ApprovalEvent) String() string {
func (*ActivityIssueCommentCreatePayload_ApprovalEvent) ProtoMessage() {}
func (x *ActivityIssueCommentCreatePayload_ApprovalEvent) ProtoReflect() protoreflect.Message {
- mi := &file_store_activity_proto_msgTypes[4]
+ mi := &file_store_activity_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -514,84 +561,92 @@ var File_store_activity_proto protoreflect.FileDescriptor
var file_store_activity_proto_rawDesc = []byte{
0x0a, 0x14, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
- 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0x3b, 0x0a, 0x1a, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69,
- 0x74, 0x79, 0x49, 0x73, 0x73, 0x75, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79,
- 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x6e, 0x61,
- 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x73, 0x73, 0x75, 0x65, 0x4e,
- 0x61, 0x6d, 0x65, 0x22, 0xf8, 0x08, 0x0a, 0x21, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79,
- 0x49, 0x73, 0x73, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61,
- 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x81, 0x01, 0x0a, 0x17, 0x65, 0x78,
- 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x5f,
- 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x62, 0x79,
- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x74,
- 0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x73, 0x73, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,
- 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x45,
- 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x45,
- 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x15, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
- 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x6c, 0x0a,
- 0x10, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x62,
- 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74,
- 0x79, 0x49, 0x73, 0x73, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65,
- 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52,
- 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x42, 0x79, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x61, 0x73,
- 0x6b, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x42, 0x79, 0x12, 0x68, 0x0a, 0x0e, 0x61,
- 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73,
- 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x73, 0x73,
- 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50,
- 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x45,
- 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c,
- 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x6e,
- 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x73, 0x73, 0x75, 0x65,
- 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0xa4, 0x01, 0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x6f, 0x6c,
- 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x42, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65,
- 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x69, 0x73, 0x73, 0x75, 0x65,
- 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x03, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x14, 0x72,
- 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x62, 0x79, 0x5f, 0x69, 0x73, 0x73, 0x75, 0x65,
- 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x72, 0x6f, 0x6c, 0x6c, 0x62,
- 0x61, 0x63, 0x6b, 0x42, 0x79, 0x49, 0x73, 0x73, 0x75, 0x65, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x13,
- 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x62, 0x79, 0x5f, 0x74, 0x61, 0x73, 0x6b,
- 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x72, 0x6f, 0x6c, 0x6c, 0x62,
- 0x61, 0x63, 0x6b, 0x42, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x1a, 0xf8, 0x02, 0x0a, 0x15,
- 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c,
- 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x60, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x0e, 0x32, 0x4c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73,
- 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x73, 0x73,
- 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50,
- 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41,
- 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x79, 0x70,
- 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x66, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74,
- 0x79, 0x49, 0x73, 0x73, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65,
- 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72,
- 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74,
- 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12,
- 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2d,
- 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55,
- 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b,
- 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x45, 0x49, 0x53, 0x48, 0x55, 0x10, 0x01, 0x22, 0x47, 0x0a,
- 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x43, 0x54, 0x49, 0x4f,
- 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12,
- 0x12, 0x0a, 0x0e, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56,
- 0x45, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45,
- 0x4a, 0x45, 0x43, 0x54, 0x10, 0x02, 0x1a, 0xac, 0x01, 0x0a, 0x0d, 0x41, 0x70, 0x70, 0x72, 0x6f,
- 0x76, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x5e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74,
- 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x46, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
- 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69,
- 0x74, 0x79, 0x49, 0x73, 0x73, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x72,
- 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x41, 0x70, 0x70, 0x72,
- 0x6f, 0x76, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
- 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3b, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74,
- 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53,
- 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45,
- 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x50, 0x50, 0x52, 0x4f,
- 0x56, 0x45, 0x44, 0x10, 0x02, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x14,
- 0x5a, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73,
- 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x1a, 0x14, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70,
+ 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3b, 0x0a, 0x1a,
+ 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x73, 0x73, 0x75, 0x65, 0x43, 0x72, 0x65,
+ 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73,
+ 0x73, 0x75, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
+ 0x69, 0x73, 0x73, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xf8, 0x08, 0x0a, 0x21, 0x41, 0x63,
+ 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x73, 0x73, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65,
+ 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12,
+ 0x81, 0x01, 0x0a, 0x17, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x70, 0x70,
+ 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x47, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f,
+ 0x72, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x73, 0x73, 0x75, 0x65,
+ 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79,
+ 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x70,
+ 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x15, 0x65, 0x78,
+ 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x45, 0x76,
+ 0x65, 0x6e, 0x74, 0x12, 0x6c, 0x0a, 0x10, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x72, 0x6f, 0x6c, 0x6c,
+ 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41,
+ 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x73, 0x73, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x6d,
+ 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64,
+ 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x42, 0x79, 0x48,
+ 0x00, 0x52, 0x0e, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x42,
+ 0x79, 0x12, 0x68, 0x0a, 0x0e, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x5f, 0x65, 0x76,
+ 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76,
+ 0x69, 0x74, 0x79, 0x49, 0x73, 0x73, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x43,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x41, 0x70, 0x70,
+ 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x61, 0x70,
+ 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69,
+ 0x73, 0x73, 0x75, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x09, 0x69, 0x73, 0x73, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0xa4, 0x01, 0x0a, 0x0e, 0x54,
+ 0x61, 0x73, 0x6b, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x42, 0x79, 0x12, 0x19, 0x0a,
+ 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
+ 0x07, 0x69, 0x73, 0x73, 0x75, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b,
+ 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49,
+ 0x64, 0x12, 0x2f, 0x0a, 0x14, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x62, 0x79,
+ 0x5f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52,
+ 0x11, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x42, 0x79, 0x49, 0x73, 0x73, 0x75, 0x65,
+ 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x13, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x62,
+ 0x79, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52,
+ 0x10, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x42, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x49,
+ 0x64, 0x1a, 0xf8, 0x02, 0x0a, 0x15, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70,
+ 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x60, 0x0a, 0x04, 0x74,
+ 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4c, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76,
+ 0x69, 0x74, 0x79, 0x49, 0x73, 0x73, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x43,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x45, 0x78, 0x74,
+ 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x45, 0x76, 0x65,
+ 0x6e, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x66, 0x0a,
+ 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4e, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41,
+ 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x73, 0x73, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x6d,
+ 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64,
+ 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61,
+ 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x6e,
+ 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x67, 0x65,
+ 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2d, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10,
+ 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44,
+ 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x45, 0x49, 0x53, 0x48,
+ 0x55, 0x10, 0x01, 0x22, 0x47, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a,
+ 0x12, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,
+ 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f,
+ 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56, 0x45, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x43, 0x54,
+ 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x02, 0x1a, 0xac, 0x01, 0x0a,
+ 0x0d, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x5e,
+ 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x46,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e,
+ 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x73, 0x73, 0x75, 0x65, 0x43, 0x6f, 0x6d,
+ 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61,
+ 0x64, 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e,
+ 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3b,
+ 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54,
+ 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00,
+ 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0c, 0x0a,
+ 0x08, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x02, 0x42, 0x07, 0x0a, 0x05, 0x65,
+ 0x76, 0x65, 0x6e, 0x74, 0x22, 0x67, 0x0a, 0x22, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79,
+ 0x49, 0x73, 0x73, 0x75, 0x65, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x4e, 0x6f, 0x74,
+ 0x69, 0x66, 0x79, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x41, 0x0a, 0x0d, 0x61, 0x70,
+ 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f,
+ 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x65, 0x70, 0x52,
+ 0x0c, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x65, 0x70, 0x42, 0x14, 0x5a,
+ 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73, 0x74,
+ 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -607,29 +662,32 @@ func file_store_activity_proto_rawDescGZIP() []byte {
}
var file_store_activity_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
-var file_store_activity_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
+var file_store_activity_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_store_activity_proto_goTypes = []interface{}{
(ActivityIssueCommentCreatePayload_ExternalApprovalEvent_Type)(0), // 0: bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Type
(ActivityIssueCommentCreatePayload_ExternalApprovalEvent_Action)(0), // 1: bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Action
(ActivityIssueCommentCreatePayload_ApprovalEvent_Status)(0), // 2: bytebase.store.ActivityIssueCommentCreatePayload.ApprovalEvent.Status
(*ActivityIssueCreatePayload)(nil), // 3: bytebase.store.ActivityIssueCreatePayload
(*ActivityIssueCommentCreatePayload)(nil), // 4: bytebase.store.ActivityIssueCommentCreatePayload
- (*ActivityIssueCommentCreatePayload_TaskRollbackBy)(nil), // 5: bytebase.store.ActivityIssueCommentCreatePayload.TaskRollbackBy
- (*ActivityIssueCommentCreatePayload_ExternalApprovalEvent)(nil), // 6: bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent
- (*ActivityIssueCommentCreatePayload_ApprovalEvent)(nil), // 7: bytebase.store.ActivityIssueCommentCreatePayload.ApprovalEvent
+ (*ActivityIssueApprovalNotifyPayload)(nil), // 5: bytebase.store.ActivityIssueApprovalNotifyPayload
+ (*ActivityIssueCommentCreatePayload_TaskRollbackBy)(nil), // 6: bytebase.store.ActivityIssueCommentCreatePayload.TaskRollbackBy
+ (*ActivityIssueCommentCreatePayload_ExternalApprovalEvent)(nil), // 7: bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent
+ (*ActivityIssueCommentCreatePayload_ApprovalEvent)(nil), // 8: bytebase.store.ActivityIssueCommentCreatePayload.ApprovalEvent
+ (*ApprovalStep)(nil), // 9: bytebase.store.ApprovalStep
}
var file_store_activity_proto_depIdxs = []int32{
- 6, // 0: bytebase.store.ActivityIssueCommentCreatePayload.external_approval_event:type_name -> bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent
- 5, // 1: bytebase.store.ActivityIssueCommentCreatePayload.task_rollback_by:type_name -> bytebase.store.ActivityIssueCommentCreatePayload.TaskRollbackBy
- 7, // 2: bytebase.store.ActivityIssueCommentCreatePayload.approval_event:type_name -> bytebase.store.ActivityIssueCommentCreatePayload.ApprovalEvent
- 0, // 3: bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent.type:type_name -> bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Type
- 1, // 4: bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent.action:type_name -> bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Action
- 2, // 5: bytebase.store.ActivityIssueCommentCreatePayload.ApprovalEvent.status:type_name -> bytebase.store.ActivityIssueCommentCreatePayload.ApprovalEvent.Status
- 6, // [6:6] is the sub-list for method output_type
- 6, // [6:6] is the sub-list for method input_type
- 6, // [6:6] is the sub-list for extension type_name
- 6, // [6:6] is the sub-list for extension extendee
- 0, // [0:6] is the sub-list for field type_name
+ 7, // 0: bytebase.store.ActivityIssueCommentCreatePayload.external_approval_event:type_name -> bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent
+ 6, // 1: bytebase.store.ActivityIssueCommentCreatePayload.task_rollback_by:type_name -> bytebase.store.ActivityIssueCommentCreatePayload.TaskRollbackBy
+ 8, // 2: bytebase.store.ActivityIssueCommentCreatePayload.approval_event:type_name -> bytebase.store.ActivityIssueCommentCreatePayload.ApprovalEvent
+ 9, // 3: bytebase.store.ActivityIssueApprovalNotifyPayload.approval_step:type_name -> bytebase.store.ApprovalStep
+ 0, // 4: bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent.type:type_name -> bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Type
+ 1, // 5: bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent.action:type_name -> bytebase.store.ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Action
+ 2, // 6: bytebase.store.ActivityIssueCommentCreatePayload.ApprovalEvent.status:type_name -> bytebase.store.ActivityIssueCommentCreatePayload.ApprovalEvent.Status
+ 7, // [7:7] is the sub-list for method output_type
+ 7, // [7:7] is the sub-list for method input_type
+ 7, // [7:7] is the sub-list for extension type_name
+ 7, // [7:7] is the sub-list for extension extendee
+ 0, // [0:7] is the sub-list for field type_name
}
func init() { file_store_activity_proto_init() }
@@ -637,6 +695,7 @@ func file_store_activity_proto_init() {
if File_store_activity_proto != nil {
return
}
+ file_store_approval_proto_init()
if !protoimpl.UnsafeEnabled {
file_store_activity_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ActivityIssueCreatePayload); i {
@@ -663,7 +722,7 @@ func file_store_activity_proto_init() {
}
}
file_store_activity_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ActivityIssueCommentCreatePayload_TaskRollbackBy); i {
+ switch v := v.(*ActivityIssueApprovalNotifyPayload); i {
case 0:
return &v.state
case 1:
@@ -675,7 +734,7 @@ func file_store_activity_proto_init() {
}
}
file_store_activity_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ActivityIssueCommentCreatePayload_ExternalApprovalEvent); i {
+ switch v := v.(*ActivityIssueCommentCreatePayload_TaskRollbackBy); i {
case 0:
return &v.state
case 1:
@@ -687,6 +746,18 @@ func file_store_activity_proto_init() {
}
}
file_store_activity_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ActivityIssueCommentCreatePayload_ExternalApprovalEvent); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_store_activity_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ActivityIssueCommentCreatePayload_ApprovalEvent); i {
case 0:
return &v.state
@@ -710,7 +781,7 @@ func file_store_activity_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_store_activity_proto_rawDesc,
NumEnums: 3,
- NumMessages: 5,
+ NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/proto/store/activity.proto b/proto/store/activity.proto
index 12f54e4c9b..f5815869a2 100644
--- a/proto/store/activity.proto
+++ b/proto/store/activity.proto
@@ -2,6 +2,8 @@ syntax = "proto3";
package bytebase.store;
+import "store/approval.proto";
+
option go_package = "generated-go/store";
// ActivityIssueCreatePayload is the payloads for creating issues.
@@ -59,3 +61,7 @@ message ActivityIssueCommentCreatePayload {
// Used by inbox to display info without paying the join cost
string issue_name = 4;
}
+
+message ActivityIssueApprovalNotifyPayload {
+ ApprovalStep approval_step = 1;
+}