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
24 changes: 18 additions & 6 deletions src/bitdrift/public/unary/admin/v1/keys.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,15 @@ message SdkKeyResponse {
// The app/bundle ID regex that the key is associated with.
string bundle_id_regex = 2;

// An optional postfix for the app ID associated with the key. The server
// appends this to the base app ID during authentication.
optional string app_id_postfix = 3;
oneof app_id_transform {
// An optional postfix for the app ID associated with the key. The server
// appends this to the base app ID during authentication.
string app_id_postfix = 3 [(validate.rules).string = {max_len: 255}];

// An optional replacement for the app ID associated with the key. The server
// replaces the base app ID during authentication.
string app_id_replacement = 4 [(validate.rules).string = {max_len: 255}];
}
}

message ApiKeyResponse {
Expand Down Expand Up @@ -78,9 +84,15 @@ message CreateKeyRequest {
max_len: 2048
}];

// An optional postfix for the app ID associated with the key. The server
// appends this to the base app ID during authentication.
optional string app_id_postfix = 2 [(validate.rules).string = {max_len: 255}];
oneof app_id_transform {
// An optional postfix for the app ID associated with the key. The server
// appends this to the base app ID during authentication.
string app_id_postfix = 2 [(validate.rules).string = {max_len: 255}];

// An optional replacement for the app ID associated with the key. The server
// replaces the base app ID during authentication.
string app_id_replacement = 3 [(validate.rules).string = {max_len: 255}];
}
}

message ApiKeyRequest {
Expand Down
2 changes: 2 additions & 0 deletions src/bitdrift/public/unary/admin/v1/permission.proto
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ enum Permission {
CONNECTOR_READ = 17;
// Allows reading debug file metadata.
DEBUG_FILE_READ = 15;
// Allows reading system status information.
SYSTEM_STATUS_READ = 18;
}
36 changes: 36 additions & 0 deletions src/bitdrift/public/unary/health/v1/health.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// 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.unary.health.v1;

import "google/protobuf/duration.proto";

// The HealthService provides methods for checking the health and status of the system, including
// the number of connected SDK clients and the current queue delays for processing ingested data.
service HealthService {
// Get the overall system status, including the number of SDK clients connected and the current
// queue delay for processing ingested data.
rpc GetSystemStatus(.bitdrift.public.unary.health.v1.GetSystemStatusRequest) returns (.bitdrift.public.unary.health.v1.GetSystemStatusResponse);
}

message GetSystemStatusRequest {}

message GetSystemStatusResponse {
// The approximate number of SDK clients currently connected. In practice this will be the
// smoothed average over the previous minute.
uint64 connected_clients = 1;

// The approximate current queue delay for processing ingested metrics.
.google.protobuf.Duration metrics_ingestion_delay = 2;

// The approximate current queue delay for processing ingested issues.
.google.protobuf.Duration issues_ingestion_delay = 3;

// The approximate current queue delay for processing ingested logs.
.google.protobuf.Duration logs_ingestion_delay = 4;
}
150 changes: 150 additions & 0 deletions src/bitdrift/public/webhook/v1/notification.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
// 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.webhook.v1;

import "google/protobuf/timestamp.proto";

// Describes a webhook notification event delivered to an external destination.
message WebhookNotification {
// Timestamp when the notification was generated.
.google.protobuf.Timestamp timestamp = 1;

oneof notification_type {
// A test notification.
.bitdrift.public.webhook.v1.TestNotification test = 2;

// A workflow session capture notification.
.bitdrift.public.webhook.v1.SessionCaptureNotification session_capture = 3;

// A workflow alert fired.
.bitdrift.public.webhook.v1.AlertNotification alert = 4;

// An issue alert fired.
.bitdrift.public.webhook.v1.IssueAlertNotification issue_alert = 5;

// A notification for a new issue report.
.bitdrift.public.webhook.v1.IssueReportNotification issue_report_notification = 6;

// A notification for a new issue.
.bitdrift.public.webhook.v1.IssueNotification issue_notification = 7;
}
}

// Represents a webhook test event used to validate delivery.
message TestNotification {}

// Describes a webhook notification for a captured workflow session.
message SessionCaptureNotification {
// Timeline URL for the captured session.
string timeline_url = 1;

// Workflow URL for the captured session.
string workflow_url = 2;

// Session identifier.
string session_id = 3;

// Exploration name.
string exploration_name = 5;

// Workflow name.
string workflow_name = 6;

// Title of the workflow session capture node that triggered the capture.
string rule_title = 7;
}

// Describes a webhook notification for a workflow alert.
message AlertNotification {
// Alert name.
string alert_name = 1;

// Alert URL.
string alert_url = 2;

// Workflow name.
string workflow_name = 3;

// Workflow URL
string workflow_url = 4;

// Exploration name.
string exploration_name = 5;

// Custom notification text.
string custom_notification_text = 6;
}

// Describes an issue referenced by an issue webhook notification.
message IssueDetails {
// Issue URL.
string issue_url = 1;

// Reason/description of the issue.
string reason = 2;
}

// Describes a webhook notification for an issue alert.
message IssueAlertNotification {
// Indicates that the alert applies to the full view instead of specific issues.
message GlobalAlert {}

// Lists the issues that triggered a per-issue alert.
message PerIssueAlert {
// List of issues that triggered the alert.
repeated .bitdrift.public.webhook.v1.IssueDetails issues = 1;
}

// Alert URL.
string alert_url = 1;

// View URL.
string view_url = 2;

// View name.
string view_name = 3;

oneof scope {
// Global alert (no per issue details).
.bitdrift.public.webhook.v1.IssueAlertNotification.GlobalAlert global = 4;

// Per-issue alert with affected issues.
.bitdrift.public.webhook.v1.IssueAlertNotification.PerIssueAlert per_issue = 5;
}

// Custom notification text.
string custom_notification_text = 6;
}

// Describes a webhook notification for a newly created issue report.
message IssueReportNotification {
// Report URL.
string report_url = 1;

// View URL.
string view_url = 2;

// View name.
string view_name = 3;
}

// Describes a webhook notification for a newly created issue.
message IssueNotification {
// Issue URL.
string issue_url = 1;

// View URL.
string view_url = 2;

// View name.
string view_name = 3;

// Issue reason/description.
string reason = 6;
}
Loading