Skip to content

Commit 6d02eb6

Browse files
authored
chore: proto update (#162)
* chore: proto update * chore: update docs * fix: ci * fix: test * chore: drop risk * chore: update * fix: lint
1 parent 721a41a commit 6d02eb6

29 files changed

Lines changed: 87 additions & 1122 deletions

api/client.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -189,18 +189,6 @@ type Client interface {
189189
// DeleteReviewConfig deletes the review config.
190190
DeleteReviewConfig(ctx context.Context, reviewConfigName string) error
191191

192-
// Risk
193-
// ListRisk lists the risk.
194-
ListRisk(ctx context.Context) ([]*v1pb.Risk, error)
195-
// GetRisk gets the risk by full name.
196-
GetRisk(ctx context.Context, name string) (*v1pb.Risk, error)
197-
// CreateRisk creates the risk.
198-
CreateRisk(ctx context.Context, risk *v1pb.Risk) (*v1pb.Risk, error)
199-
// UpdateRisk updates the risk.
200-
UpdateRisk(ctx context.Context, patch *v1pb.Risk, updateMasks []string) (*v1pb.Risk, error)
201-
// DeleteRisk deletes the risk.
202-
DeleteRisk(ctx context.Context, riskName string) error
203-
204192
// ListDatabaseGroup list all database groups in a project.
205193
ListDatabaseGroup(ctx context.Context, project string) (*v1pb.ListDatabaseGroupsResponse, error)
206194
// CreateDatabaseGroup creates the database group.

client/client.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ type client struct {
3535
settingClient bytebasev1connect.SettingServiceClient
3636
orgPolicyClient bytebasev1connect.OrgPolicyServiceClient
3737
reviewConfigClient bytebasev1connect.ReviewConfigServiceClient
38-
riskClient bytebasev1connect.RiskServiceClient
3938
celClient bytebasev1connect.CelServiceClient
4039
}
4140

@@ -86,7 +85,6 @@ func NewClient(url, email, password string) (api.Client, error) {
8685
c.settingClient = bytebasev1connect.NewSettingServiceClient(c.client, c.url, interceptors)
8786
c.orgPolicyClient = bytebasev1connect.NewOrgPolicyServiceClient(c.client, c.url, interceptors)
8887
c.reviewConfigClient = bytebasev1connect.NewReviewConfigServiceClient(c.client, c.url, interceptors)
89-
c.riskClient = bytebasev1connect.NewRiskServiceClient(c.client, c.url, interceptors)
9088
c.celClient = bytebasev1connect.NewCelServiceClient(c.client, c.url, interceptors)
9189

9290
return &c, nil

client/risk.go

Lines changed: 0 additions & 95 deletions
This file was deleted.

docs/data-sources/group.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ The group data source.
2222
### Read-Only
2323

2424
- `description` (String) The group description.
25+
- `email` (String) The group email.
2526
- `id` (String) The ID of this resource.
2627
- `members` (Set of Object) The members in the group. (see [below for nested schema](#nestedatt--members))
2728
- `source` (String) Source means where the group comes from. For now we support Entra ID SCIM sync, so the source could be Entra ID.

docs/data-sources/group_list.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ The group data source list.
3131
Read-Only:
3232

3333
- `description` (String)
34+
- `email` (String)
3435
- `members` (Set of Object) (see [below for nested schema](#nestedobjatt--groups--members))
3536
- `name` (String)
3637
- `source` (String)

docs/data-sources/risk.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

docs/data-sources/risk_list.md

Lines changed: 0 additions & 35 deletions
This file was deleted.

docs/data-sources/setting.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ Optional:
168168
- `disallow_password_signin` (Boolean) Whether to disallow password signin (except workspace admins). Require ENTERPRISE subscription
169169
- `disallow_signup` (Boolean) Disallow self-service signup, users can only be invited by the owner. Require PRO subscription.
170170
- `domains` (List of String) The workspace domain, e.g. bytebase.com. Required for the group
171+
- `enable_audit_log_stdout` (Boolean) Enable audit logging to stdout in structured JSON format. Requires TEAM or ENTERPRISE license.
171172
- `enforce_identity_domain` (Boolean) Only user and group from the domains can be created and login.
172173
- `external_url` (String) The URL user visits Bytebase. The external URL is used for: 1. Constructing the correct callback URL when configuring the VCS provider. The callback URL points to the frontend; 2. Creating the correct webhook endpoint when configuring the project GitOps workflow. The webhook endpoint points to the backend.
173174
- `maximum_role_expiration_in_seconds` (Number) The max duration in seconds for role expired. If the value is less than or equal to 0, we will remove the setting. AKA no limit.
@@ -189,32 +190,23 @@ Optional:
189190

190191
Read-Only:
191192

192-
- `rules` (List of Object) (see [below for nested schema](#nestedatt--approval_flow--rules))
193+
- `rules` (List of Object) Rules are evaluated in order, first matching rule applies. (see [below for nested schema](#nestedatt--approval_flow--rules))
193194

194195
<a id="nestedatt--approval_flow--rules"></a>
195196
### Nested Schema for `approval_flow.rules`
196197

197198
Read-Only:
198199

199-
- `conditions` (List of Object) (see [below for nested schema](#nestedobjatt--approval_flow--rules--conditions))
200+
- `condition` (String)
200201
- `flow` (List of Object) (see [below for nested schema](#nestedobjatt--approval_flow--rules--flow))
201-
202-
<a id="nestedobjatt--approval_flow--rules--conditions"></a>
203-
### Nested Schema for `approval_flow.rules.conditions`
204-
205-
Read-Only:
206-
207-
- `level` (String)
208202
- `source` (String)
209203

210-
211204
<a id="nestedobjatt--approval_flow--rules--flow"></a>
212205
### Nested Schema for `approval_flow.rules.flow`
213206

214207
Read-Only:
215208

216209
- `description` (String)
217-
- `id` (String)
218210
- `roles` (List of String)
219211
- `title` (String)
220212

docs/resources/risk.md

Lines changed: 0 additions & 34 deletions
This file was deleted.

docs/resources/setting.md

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,22 @@ The setting resource.
3737

3838
Required:
3939

40-
- `rules` (Block List, Min: 1) (see [below for nested schema](#nestedblock--approval_flow--rules))
40+
- `rules` (Block List, Min: 1) Rules are evaluated in order, first matching rule applies. (see [below for nested schema](#nestedblock--approval_flow--rules))
4141

4242
<a id="nestedblock--approval_flow--rules"></a>
4343
### Nested Schema for `approval_flow.rules`
4444

4545
Required:
4646

47+
- `condition` (String) The condition that is associated with the rule. Check the proto message https://github.com/bytebase/bytebase/blob/c7304123902610b8a2c83e49fcd1c4d4eb972f0d/proto/v1/v1/setting_service.proto#L280 for details.
4748
- `flow` (Block List, Min: 1) (see [below for nested schema](#nestedblock--approval_flow--rules--flow))
48-
49-
Optional:
50-
51-
- `conditions` (Block List) Match any condition will trigger this approval flow. (see [below for nested schema](#nestedblock--approval_flow--rules--conditions))
49+
- `source` (String)
5250

5351
<a id="nestedblock--approval_flow--rules--flow"></a>
5452
### Nested Schema for `approval_flow.rules.flow`
5553

5654
Required:
5755

58-
- `id` (String) The approval template ID. Built-in templates use 'bb.*' prefix (e.g., 'bb.project-owner', 'bb.workspace-dba'), custom templates use UUIDs.
5956
- `roles` (List of String) The role require to review in this step
6057
- `title` (String)
6158

@@ -64,15 +61,6 @@ Optional:
6461
- `description` (String)
6562

6663

67-
<a id="nestedblock--approval_flow--rules--conditions"></a>
68-
### Nested Schema for `approval_flow.rules.conditions`
69-
70-
Optional:
71-
72-
- `level` (String)
73-
- `source` (String)
74-
75-
7664

7765

7866
<a id="nestedblock--classification"></a>
@@ -237,6 +225,7 @@ Optional:
237225
- `disallow_password_signin` (Boolean) Whether to disallow password signin (except workspace admins). Require ENTERPRISE subscription
238226
- `disallow_signup` (Boolean) Disallow self-service signup, users can only be invited by the owner. Require PRO subscription.
239227
- `domains` (List of String) The workspace domain, e.g. bytebase.com. Required for the group
228+
- `enable_audit_log_stdout` (Boolean) Enable audit logging to stdout in structured JSON format. Requires TEAM or ENTERPRISE license.
240229
- `enforce_identity_domain` (Boolean) Only user and group from the domains can be created and login.
241230
- `external_url` (String) The URL user visits Bytebase. The external URL is used for: 1. Constructing the correct callback URL when configuring the VCS provider. The callback URL points to the frontend; 2. Creating the correct webhook endpoint when configuring the project GitOps workflow. The webhook endpoint points to the backend.
242231
- `maximum_role_expiration_in_seconds` (Number) The max duration in seconds for role expired. If the value is less than or equal to 0, we will remove the setting. AKA no limit.

0 commit comments

Comments
 (0)