Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/bitdrift/public/shared/alerts/v1/alert_group.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Use of this source code and APIs are governed by a source available license that can be found in
// the LICENSE file or at:
// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt

syntax = "proto3";

package bitdrift.public.shared.alerts.v1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Use of this source code and APIs are governed by a source available license that can be found in
// the LICENSE file or at:
// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt

syntax = "proto3";

package bitdrift.public.shared.annotations;
Expand Down
18 changes: 18 additions & 0 deletions src/bitdrift/public/shared/annotations/dashboard_layout.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// api - bitdrift's client/server API definitions
// Copyright Bitdrift, Inc. All rights reserved.
//
// Use of this source code and APIs are governed by a source available license that can be found in
// the LICENSE file or at:
// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt

syntax = "proto3";

package bitdrift.public.shared.annotations;

import "google/protobuf/descriptor.proto";

// The minimum number of dashboard grid rows required by this enum value.
extend .google.protobuf.EnumValueOptions {
// The minimum number of dashboard grid rows required by this enum value.
uint32 minimum_row_span = 50012;
}
1 change: 1 addition & 0 deletions src/bitdrift/public/shared/platform/v1/platform.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Use of this source code and APIs are governed by a source available license that can be found in
// the LICENSE file or at:
// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt

syntax = "proto3";

package bitdrift.public.shared.platform.v1;
Expand Down
10 changes: 3 additions & 7 deletions src/bitdrift/public/shared/workflows/v1/time_series.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Use of this source code and APIs are governed by a source available license that can be found in
// the LICENSE file or at:
// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt

syntax = "proto3";

package bitdrift.public.shared.workflows.v1;
Expand Down Expand Up @@ -81,7 +82,8 @@ message TimeSeries {
//
// For workflow-backed time series, this maps back to one or more action IDs and can be reused as
// `charts.v1.LimitStrategy.IdentifierMatch.DimensionIdentifier.id` when selecting specific groups
// from a later `GetChartsData` request.
// from a later `GetChartsData` request. It also associates the result with configured display
// metadata, including its title, in resolved chart responses.
string id = 1 [(validate.rules).string = {min_len: 1}];

// The labels associated with this time series.
Expand All @@ -100,12 +102,6 @@ message TimeSeries {
// Note that this may not be set via all APIs.
optional .bitdrift.public.shared.workflows.v1.Legend legend = 5;

// A simple title for the time series. This is a more compact version of the
// legend that can be used when the legend is too verbose.
//
// Note that this may not be set via all APIs.
optional string title = 6;

// The unique devices count for the entire series based on the TrackUnique configuration.
// Deduplicates devices across the queried interval rather than summing bucket counts.
// Rates normally count denominator devices; basic alerts can select numerator devices.
Expand Down
1 change: 1 addition & 0 deletions src/bitdrift/public/stream/bdtail/v1/bdtail_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Use of this source code and APIs are governed by a source available license that can be found in
// the LICENSE file or at:
// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt

syntax = "proto3";

package bitdrift.public.stream.bdtail.v1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Use of this source code and APIs are governed by a source available license that can be found in
// the LICENSE file or at:
// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt

syntax = "proto3";

package bitdrift.public.stream.device_debug.v1;
Expand Down
53 changes: 48 additions & 5 deletions src/bitdrift/public/unary/admin/v1/access.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Use of this source code and APIs are governed by a source available license that can be found in
// the LICENSE file or at:
// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt

syntax = "proto3";

package bitdrift.public.unary.admin.v1;
Expand All @@ -14,35 +15,48 @@ import "validate/validate.proto";

// The level of access granted to a principal.
//
// In SetAccessRequest, an omitted access level defaults to VIEW.
// In `SetAccessRequest`, an omitted access level defaults to `VIEW`.
enum AccessLevel {
// The principal can view the entity.
VIEW = 0;
// The principal can view and edit the entity.
EDIT = 1;
// The principal has no access to the entity, even when a broader grant would otherwise allow it.
NONE = 2;
}

// Message used when receiving queries for access permission levels.
// Selects entities by the access level a user or team has to them.
message AccessPermissionQuery {
// An access level to match against.
enum AccessLevel {
// Matches entities the principal can at least view.
VIEW = 0;
// Matches entities the principal can edit.
EDIT = 1;
// Matches entities the principal owns.
OWNER = 2;
}

// How a condition compares the principal's access with the requested level.
enum Operator {
// Matches when the principal has the access level.
IS = 0;
// Matches when the principal does not have the access level.
IS_NOT = 1;
}

// A single predicate: e.g. "access IS EDIT" or "access IS_NOT OWNER".
message Condition {
// How to compare the principal's access with `level`.
.bitdrift.public.unary.admin.v1.AccessPermissionQuery.Operator operator = 1 [(validate.rules).enum = {defined_only: true}];

// The access level to compare against.
.bitdrift.public.unary.admin.v1.AccessPermissionQuery.AccessLevel level = 2 [(validate.rules).enum = {defined_only: true}];
}

// All conditions must be true (logical AND).
message AllOf {
// The conditions that must all match.
repeated .bitdrift.public.unary.admin.v1.AccessPermissionQuery.Condition conditions = 1 [(validate.rules).repeated = {
min_items: 1
max_items: 20
Expand All @@ -52,42 +66,53 @@ message AccessPermissionQuery {
// A filter that matches when at least one AllOf group is satisfied (logical OR of ANDs).
// Example: (IS VIEW AND IS_NOT OWNER) OR (IS EDIT)
message AccessFilter {
// The condition groups, at least one of which must match.
repeated .bitdrift.public.unary.admin.v1.AccessPermissionQuery.AllOf any_of = 1 [(validate.rules).repeated = {
min_items: 1
max_items: 20
}];
}

// Selects entities by the access a user has, directly or through their teams.
message Individual {
// The ID of the user whose access is evaluated.
string user_id = 1 [(validate.rules).string = {
min_len: 1
max_len: 100
}];

// The access conditions the user must satisfy.
.bitdrift.public.unary.admin.v1.AccessPermissionQuery.AccessFilter filter = 2;
}

// Selects entities by the access a team has.
message Team {
// The ID of the team whose access is evaluated.
string team_id = 1 [(validate.rules).string = {
min_len: 1
max_len: 100
}];

// The access conditions the team must satisfy.
.bitdrift.public.unary.admin.v1.AccessPermissionQuery.AccessFilter filter = 2;
}

oneof type {
option (validate.required) = true;
// Queries the access of a user.
.bitdrift.public.unary.admin.v1.AccessPermissionQuery.Individual individual = 1;

// Queries the access of a team.
.bitdrift.public.unary.admin.v1.AccessPermissionQuery.Team team = 2;
}
}

// Used to represent the current access permission of an entity.
// This gives the full scope of which users/teams have what level of access,
// the level of access given to the entire org, and the ownership of the entity (team or user).
// The current access permissions of an entity.
//
// Lists the access level granted to each user and team, the access level granted to the entire
// organization, and the user or team that owns the entity.
message AccessPermission {
// Access granted to a single user.
message Individual {
// The user who currently has access.
.bitdrift.public.unary.common.v1.Owner details = 1;
Expand All @@ -96,6 +121,7 @@ message AccessPermission {
.bitdrift.public.unary.admin.v1.AccessLevel access = 2 [(validate.rules).enum = {defined_only: true}];
}

// Access granted to a team.
message Team {
// The team that currently has access.
.bitdrift.public.unary.admin.v1.Team details = 1;
Expand All @@ -104,15 +130,19 @@ message AccessPermission {
.bitdrift.public.unary.admin.v1.AccessLevel access = 2 [(validate.rules).enum = {defined_only: true}];
}

// Access granted to the entire organization.
message Org {
// The access level currently granted to the organization.
.bitdrift.public.unary.admin.v1.AccessLevel access = 1 [(validate.rules).enum = {defined_only: true}];
}

// The user or team that owns the entity.
message Owner {
oneof id {
// The user that owns the entity.
.bitdrift.public.unary.common.v1.Owner user = 1;

// The team that owns the entity.
.bitdrift.public.unary.admin.v1.Team team = 2;
}
}
Expand All @@ -131,8 +161,11 @@ message AccessPermission {
.bitdrift.public.unary.admin.v1.AccessPermission.Owner owner = 4;
}

// Request to set the access permissions of a dashboard, view, or workflow.
message SetAccessRequest {
// The access permissions to set.
message SetAccessPermission {
// Access to grant a single user.
message Individual {
// The ID of the user to set access for.
string id = 1 [(validate.rules).string = {
Expand All @@ -144,6 +177,7 @@ message SetAccessRequest {
.bitdrift.public.unary.admin.v1.AccessLevel access = 2 [(validate.rules).enum = {defined_only: true}];
}

// Access to grant a team.
message Team {
// The ID of the team to set access for.
string id = 1 [(validate.rules).string = {
Expand All @@ -155,19 +189,23 @@ message SetAccessRequest {
.bitdrift.public.unary.admin.v1.AccessLevel access = 2 [(validate.rules).enum = {defined_only: true}];
}

// Access to grant the entire organization.
message Org {
// The access level to set for the organization. Defaults to VIEW when omitted.
.bitdrift.public.unary.admin.v1.AccessLevel access = 1 [(validate.rules).enum = {defined_only: true}];
}

// The user or team to make the owner of the entity.
message Owner {
oneof id {
option (validate.required) = true;
// The ID of the user to make the owner.
string user_id = 1 [(validate.rules).string = {
min_len: 1
max_len: 100
}];

// The ID of the team to make the owner.
string team_id = 2 [(validate.rules).string = {
min_len: 1
max_len: 100
Expand All @@ -189,27 +227,32 @@ message SetAccessRequest {
.bitdrift.public.unary.admin.v1.SetAccessRequest.SetAccessPermission.Owner owner = 4;
}

// The access permissions to set on the target entity.
.bitdrift.public.unary.admin.v1.SetAccessRequest.SetAccessPermission access_permission = 1;

oneof target {
option (validate.required) = true;
// The ID of the dashboard to update.
string dashboard_id = 2 [(validate.rules).string = {
min_len: 1
max_len: 100
}];

// The ID of the view to update.
string view_id = 3 [(validate.rules).string = {
min_len: 1
max_len: 100
}];

// The ID of the workflow to update.
string workflow_id = 4 [(validate.rules).string = {
min_len: 1
max_len: 100
}];
}
}

// Response containing the updated access permissions.
message SetAccessResponse {
// The new access permissions for the updated entity.
.bitdrift.public.unary.admin.v1.AccessPermission result = 1;
Expand Down
1 change: 1 addition & 0 deletions src/bitdrift/public/unary/admin/v1/admin.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Use of this source code and APIs are governed by a source available license that can be found in
// the LICENSE file or at:
// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt

syntax = "proto3";

package bitdrift.public.unary.admin.v1;
Expand Down
1 change: 1 addition & 0 deletions src/bitdrift/public/unary/admin/v1/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Use of this source code and APIs are governed by a source available license that can be found in
// the LICENSE file or at:
// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt

syntax = "proto3";

package bitdrift.public.unary.admin.v1;
Expand Down
1 change: 1 addition & 0 deletions src/bitdrift/public/unary/admin/v1/connector.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Use of this source code and APIs are governed by a source available license that can be found in
// the LICENSE file or at:
// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt

syntax = "proto3";

package bitdrift.public.unary.admin.v1;
Expand Down
1 change: 1 addition & 0 deletions src/bitdrift/public/unary/admin/v1/keys.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Use of this source code and APIs are governed by a source available license that can be found in
// the LICENSE file or at:
// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt

syntax = "proto3";

package bitdrift.public.unary.admin.v1;
Expand Down
1 change: 1 addition & 0 deletions src/bitdrift/public/unary/admin/v1/notifications.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Use of this source code and APIs are governed by a source available license that can be found in
// the LICENSE file or at:
// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt

syntax = "proto3";

package bitdrift.public.unary.admin.v1;
Expand Down
1 change: 1 addition & 0 deletions src/bitdrift/public/unary/admin/v1/permission.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Use of this source code and APIs are governed by a source available license that can be found in
// the LICENSE file or at:
// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt

syntax = "proto3";

package bitdrift.public.unary.admin.v1;
Expand Down
1 change: 1 addition & 0 deletions src/bitdrift/public/unary/admin/v1/teams.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Use of this source code and APIs are governed by a source available license that can be found in
// the LICENSE file or at:
// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt

syntax = "proto3";

package bitdrift.public.unary.admin.v1;
Expand Down
1 change: 1 addition & 0 deletions src/bitdrift/public/unary/admin/v1/users.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Use of this source code and APIs are governed by a source available license that can be found in
// the LICENSE file or at:
// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt

syntax = "proto3";

package bitdrift.public.unary.admin.v1;
Expand Down
6 changes: 2 additions & 4 deletions src/bitdrift/public/unary/admin/v1/view.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Use of this source code and APIs are governed by a source available license that can be found in
// the LICENSE file or at:
// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt

syntax = "proto3";

package bitdrift.public.unary.admin.v1;
Expand Down Expand Up @@ -224,10 +225,7 @@ message ListViewsRequest {
// Selects which service's views to return.
.bitdrift.public.unary.admin.v1.ListViewsRequest.ServiceType service_type = 1 [(validate.rules).enum = {defined_only: true}];

// The preferred pagination parameters for the request.
//
// If both pagination and deprecated_offset or deprecated_limit are provided,
// pagination takes precedence.
// Selects the page of views to return.
.bitdrift.public.unary.common.v1.Pagination pagination = 5;

// An optional name to filter by.
Expand Down
Loading
Loading