From 4a4d30ad46feb0aa20aa81e27a4cf72472118d66 Mon Sep 17 00:00:00 2001 From: "bitdrift-proto-sync[bot]" <154373124+bitdrift-proto-sync[bot]@users.noreply.github.com> Date: Thu, 26 Nov 2026 17:30:27 +0000 Subject: [PATCH] Sync public API export @ 11c6c7b Automated sync of public API export. --- src/bitdrift/public/unary/admin/v1/view.proto | 21 ++++++- .../public/unary/alerts/v1/alerts.proto | 11 ++++ .../public/unary/alerts/v1/issue_alerts.proto | 37 ++++++++++++ .../unary/charts/v1/chart_metadata.proto | 10 ++++ .../public/unary/common/v1/common.proto | 12 ++++ .../public/unary/dashboards/v1/api.proto | 56 ++++++++++++++++++- .../unary/device_debug/v1/device_debug.proto | 51 +++++++++-------- .../public/unary/workflows/v1/workflow.proto | 18 +----- 8 files changed, 174 insertions(+), 42 deletions(-) diff --git a/src/bitdrift/public/unary/admin/v1/view.proto b/src/bitdrift/public/unary/admin/v1/view.proto index 100879b..9e6b13d 100644 --- a/src/bitdrift/public/unary/admin/v1/view.proto +++ b/src/bitdrift/public/unary/admin/v1/view.proto @@ -10,6 +10,7 @@ syntax = "proto3"; package bitdrift.public.unary.admin.v1; import "bitdrift/public/unary/admin/v1/access.proto"; +import "bitdrift/public/unary/alerts/v1/alerts.proto"; import "bitdrift/public/unary/common/v1/common.proto"; import "bitdrift/public/unary/issues/v1/issues.proto"; import "bitdrift/public/unary/workflows/v1/workflow.proto"; @@ -30,6 +31,11 @@ message ViewFilters { .bitdrift.public.unary.workflows.v1.WorkflowListQuery workflow_query = 1; } + message AlertList { + // The filters saved for the unified Alerts list. + .bitdrift.public.unary.alerts.v1.AlertFilter filter = 1; + } + // Selects the saved criteria for one supported view type. oneof type { option (validate.required) = true; @@ -38,6 +44,9 @@ message ViewFilters { // The saved criteria for a workflow view. .bitdrift.public.unary.admin.v1.ViewFilters.WorkflowList workflow_list = 3; + + // The saved criteria for an Alert View. + .bitdrift.public.unary.admin.v1.ViewFilters.AlertList alert_list = 5; } } @@ -50,6 +59,9 @@ message ViewSort { // Orders workflow views using workflow list sort criteria. .bitdrift.public.unary.workflows.v1.ListWorkflowsRequest.Sort workflow = 2; + + // Orders Alert Views using unified alert list sort criteria. + .bitdrift.public.unary.alerts.v1.GetAlertsRequest.Sort alert = 3; } } @@ -121,7 +133,7 @@ message UpsertViewRequest { // The saved filters for the new view. .bitdrift.public.unary.admin.v1.ViewFilters view_filters = 3 [(validate.rules).message = {required: true}]; - // The default sort order for the new view. + // The default sort order for the new view. Alert Views support up to 8 sort criteria. .bitdrift.public.unary.admin.v1.ViewSortList default_sort = 5; // An optional icon to display for the new view. @@ -142,10 +154,11 @@ message UpsertViewRequest { // An optional replacement description for the view. optional string description = 3 [(validate.rules).string = {max_len: 1000}]; - // Optional replacement filters for the view. + // Optional replacement filters for the view. Updates cannot convert a view to or from an + // Alert View. optional .bitdrift.public.unary.admin.v1.ViewFilters view_filters = 4; - // Optional replacement default sort criteria. + // Optional replacement default sort criteria. Alert Views support up to 8 sort criteria. .bitdrift.public.unary.admin.v1.ViewSortList default_sort = 6; // Optional replacement icon for the view. @@ -220,6 +233,8 @@ message ListViewsRequest { ISSUE_GROUP = 1; // Returns workflow views. WORKFLOWS = 2; + // Returns Alert Views. + ALERTS = 3; } // Selects which service's views to return. diff --git a/src/bitdrift/public/unary/alerts/v1/alerts.proto b/src/bitdrift/public/unary/alerts/v1/alerts.proto index 968d7e6..dfca155 100644 --- a/src/bitdrift/public/unary/alerts/v1/alerts.proto +++ b/src/bitdrift/public/unary/alerts/v1/alerts.proto @@ -939,6 +939,17 @@ message GetAlertsRequest { // Pagination parameters for the result set. .bitdrift.public.unary.common.v1.Pagination pagination = 5; + + // Applies a saved Alert View visible to the caller. Each field present in `filter` replaces + // the matching saved field; unset fields retain the saved value. Messages replace whole + // fields, and empty repeated fields do not override saved values. A non-empty `sort` replaces + // the saved sort. Pagination always comes from this request. Missing or hidden views return + // `NotFound`; views of another type are rejected. Requires view read permission in addition to + // alert read permission. + optional string view_id = 6 [(validate.rules).string = { + min_len: 1 + max_len: 100 + }]; } // Describes a principal assigned to an alert. diff --git a/src/bitdrift/public/unary/alerts/v1/issue_alerts.proto b/src/bitdrift/public/unary/alerts/v1/issue_alerts.proto index aecd4a2..ce910d6 100644 --- a/src/bitdrift/public/unary/alerts/v1/issue_alerts.proto +++ b/src/bitdrift/public/unary/alerts/v1/issue_alerts.proto @@ -18,6 +18,21 @@ import "validate/validate.proto"; // Defines the issue alert configuration for an issues view. message IssuesAlertConfig { + // User-facing category, independent of the conditions used to evaluate the alert. + enum AlertType { + // Omit the optional category when it is unknown. Requests that explicitly supply this value + // are rejected. + ALERT_TYPE_UNSPECIFIED = 0; + // Category for alerts that monitor issue volume against a threshold. + ALERT_TYPE_FREQUENT_ERROR = 1; + // Category for alerts that monitor increases in issue volume. + ALERT_TYPE_TRENDING_ERROR = 2; + // Category for rate-limited notifications when a matching issue group first appears. + ALERT_TYPE_NEW_ERROR = 3; + // Category for rate-limited notifications when a matching issue event occurs. + ALERT_TYPE_EVERY_ERROR = 4; + } + // Groups multiple issue alert conditions under a logical operator. message IssuesAlertConditionList { // Conditions combined by the surrounding logical operator. @@ -106,6 +121,14 @@ message IssuesAlertConfig { min_len: 1 max_len: 255 }]; + + // Client-supplied category, preserved on save and returned unchanged. May be absent on + // existing alerts; the server does not infer or populate it from the alert ID or conditions. + // Evaluation continues to use the condition, independently of this category. + optional .bitdrift.public.unary.alerts.v1.IssuesAlertConfig.AlertType alert_type = 6 [(validate.rules).enum = { + defined_only: true + not_in: [0] + }]; } // Rate limited notifications for new issue events within the view. @@ -116,6 +139,20 @@ message IssuesAlertConfig { // Alerts for the view. repeated .bitdrift.public.unary.alerts.v1.IssuesAlertConfig.IssuesAlert alerts = 3 [(validate.rules).repeated = {max_items: 20}]; + + // Client-supplied category for new_issue_event_notification. Preserved unchanged when supplied; + // omitted values remain unset so clients can infer the category for existing configurations. + optional .bitdrift.public.unary.alerts.v1.IssuesAlertConfig.AlertType new_issue_event_alert_type = 4 [(validate.rules).enum = { + defined_only: true + not_in: [0] + }]; + + // Client-supplied category for new_issue_group_notification. Preserved unchanged when supplied; + // omitted values remain unset so clients can infer the category for existing configurations. + optional .bitdrift.public.unary.alerts.v1.IssuesAlertConfig.AlertType new_issue_group_alert_type = 5 [(validate.rules).enum = { + defined_only: true + not_in: [0] + }]; } // Requests the issues alert configuration for a view. diff --git a/src/bitdrift/public/unary/charts/v1/chart_metadata.proto b/src/bitdrift/public/unary/charts/v1/chart_metadata.proto index e8b1fc1..878d8ff 100644 --- a/src/bitdrift/public/unary/charts/v1/chart_metadata.proto +++ b/src/bitdrift/public/unary/charts/v1/chart_metadata.proto @@ -130,6 +130,16 @@ message ChartMetadata { // Required for histogram-backed exports; counters must leave this unset. .bitdrift.public.unary.charts.v1.ChartMetadata.MetricChartMetadata.TimeSeriesMetadata.ConnectorExportConfig.OtlpConnectorExportConfig.HistogramConfiguration histogram_configuration = 6; + + // Optional, counter only, from 1 through 1440 minutes (24 hours). On a successful + // query, repeat the cumulative value for previously observed series with no activity. + // After this many quiet minutes, send a stale marker and forget the series. If charts + // share the same export, the longest configured timeout wins. If all omit it, the + // export stays sparse. + optional uint32 idle_timeout_minutes = 7 [(validate.rules).uint32 = { + gte: 1 + lte: 1440 + }]; } message CloudwatchConnectorExportConfig { diff --git a/src/bitdrift/public/unary/common/v1/common.proto b/src/bitdrift/public/unary/common/v1/common.proto index 6d09123..bf9cfc1 100644 --- a/src/bitdrift/public/unary/common/v1/common.proto +++ b/src/bitdrift/public/unary/common/v1/common.proto @@ -13,6 +13,18 @@ import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "validate/validate.proto"; +// A tag assigned to a resource. +message Tag { + // The raw value of the tag, used for filtering. + string value = 1 [(validate.rules).string = { + min_len: 1 + max_len: 100 + }]; + + // The principal who created this tag. + .bitdrift.public.unary.common.v1.Owner created_by = 2; +} + message Owner { // The email address of this owner. string email = 1 [(validate.rules).string = {max_len: 255}]; diff --git a/src/bitdrift/public/unary/dashboards/v1/api.proto b/src/bitdrift/public/unary/dashboards/v1/api.proto index 19964dc..4bb5695 100644 --- a/src/bitdrift/public/unary/dashboards/v1/api.proto +++ b/src/bitdrift/public/unary/dashboards/v1/api.proto @@ -360,7 +360,10 @@ message Dashboard { }]; // The union of tags associated with the workflows referenced in this dashboard. - repeated .bitdrift.public.unary.workflows.v1.Workflow.WorkflowTag workflow_tags = 11 [(validate.rules).repeated = {max_items: 100}]; + repeated .bitdrift.public.unary.common.v1.Tag workflow_tags = 11 [(validate.rules).repeated = {max_items: 100}]; + + // Tags assigned directly to this dashboard, independently of `workflow_tags`. + repeated .bitdrift.public.unary.common.v1.Tag tags = 12 [(validate.rules).repeated = {max_items: 100}]; } oneof type { @@ -1140,6 +1143,48 @@ message UpsertCustomDashboardRequest { repeated .bitdrift.public.unary.workflows.v1.GroupBy.Value dashboard_variables = 5 [(validate.rules).repeated = {max_items: 10}]; } +message UpsertCustomDashboardTagsRequest { + // The ID of the custom dashboard to update. + string dashboard_id = 1 [(validate.rules).string = { + min_len: 1 + max_len: 100 + }]; + + // The complete set of direct dashboard tags. An empty set removes all direct tags. + // Values use the same tag catalog as workflows. Workflow assignments are unchanged. + repeated string tags = 2 [(validate.rules).repeated = { + max_items: 100 + items: { + string: { + min_len: 1 + max_len: 100 + } + } + }]; +} + +message UpsertCustomDashboardTagsResponse { + // The direct dashboard tags after the update. + repeated .bitdrift.public.unary.common.v1.Tag tags = 1; +} + +message ListDashboardTagOptionsRequest { + // When true, returns only tag values directly assigned to at least one dashboard. + // Otherwise, returns the shared dashboard and workflow tag catalog. + bool explicit_only = 1; + + // Pagination for tag values in alphabetical order. The default page size is 100. + .bitdrift.public.unary.common.v1.TokenPagination pagination = 2; +} + +message ListDashboardTagOptionsResponse { + // The tag options in the requested scope, from the shared catalog. + repeated .bitdrift.public.unary.common.v1.Tag tags = 1 [(validate.rules).repeated.max_items = 100]; + + // Continues listing tag values. Absent when no more values are available. + optional string next_page_token = 2 [(validate.rules).string.max_len = 4096]; +} + // Response for `UpsertCustomDashboard`. message UpsertCustomDashboardResponse { // The saved dashboard. @@ -1258,6 +1303,15 @@ service DashboardService { // semantics for compatibility with older clients. rpc UpsertCustomDashboard(.bitdrift.public.unary.dashboards.v1.UpsertCustomDashboardRequest) returns (.bitdrift.public.unary.dashboards.v1.UpsertCustomDashboardResponse); + // Replaces the tags assigned directly to a custom dashboard. + // + // Requires dashboard write permission and edit access. An empty tag set removes all direct + // tags. Tags inherited from workflows and the workflows themselves are unchanged. + rpc UpsertCustomDashboardTags(.bitdrift.public.unary.dashboards.v1.UpsertCustomDashboardTagsRequest) returns (.bitdrift.public.unary.dashboards.v1.UpsertCustomDashboardTagsResponse); + + // Lists tag options from the shared dashboard and workflow catalog. + rpc ListDashboardTagOptions(.bitdrift.public.unary.dashboards.v1.ListDashboardTagOptionsRequest) returns (.bitdrift.public.unary.dashboards.v1.ListDashboardTagOptionsResponse); + // Deletes a custom dashboard. rpc DeleteCustomDashboard(.bitdrift.public.unary.dashboards.v1.DeleteCustomDashboardRequest) returns (.bitdrift.public.unary.dashboards.v1.DeleteCustomDashboardResponse); diff --git a/src/bitdrift/public/unary/device_debug/v1/device_debug.proto b/src/bitdrift/public/unary/device_debug/v1/device_debug.proto index 13c1a82..3612d28 100644 --- a/src/bitdrift/public/unary/device_debug/v1/device_debug.proto +++ b/src/bitdrift/public/unary/device_debug/v1/device_debug.proto @@ -111,7 +111,7 @@ message SendDeviceCommandResponse { } } -// Requests a device command's status, optionally waiting for execution and upload to complete. +// Requests a device command's status, optionally waiting for execution, upload, and processing. message GetDeviceCommandRequest { // The opaque identifier returned by SendDeviceCommand. string command_id = 1 [(validate.rules).string = { @@ -120,16 +120,14 @@ message GetDeviceCommandRequest { }]; // Maximum readiness wait in seconds, from 0 to 30. Omitted or zero returns immediately. - // Returns on success, failure, or expiry; a deadline returns the latest observed `pending` - // snapshot. Success confirms finalized original upload, not optional attachment processing. + // Returns on success, failure, or expiry. A wait timeout can return `pending` or `processing`. // Set the transport timeout above this wait plus ordinary response latency. optional uint32 wait_seconds = 2 [(validate.rules).uint32.lte = 30]; } // Returns a snapshot of command state, upload progress, and terminal context, never attachment bytes. // -// Poll while `pending`; stop on `succeeded`, `failed`, or `expired`. A successful command's declared -// attachment upload is complete, but optional server-side processing can still be pending. +// Poll while `pending` or `processing`; stop on `succeeded`, `failed`, or `expired`. message GetDeviceCommandResponse { // The command is awaiting execution, executing, or uploading its result. No partial attachment // can be downloaded, even when progress reports persisted bytes. @@ -138,11 +136,18 @@ message GetDeviceCommandResponse { .google.protobuf.Timestamp updated_at = 1 [(validate.rules).message.required = true]; } + // Execution and upload have completed; required server-side processing is queued or running. + message Processing { + // The time of the latest execution or processing update. + .google.protobuf.Timestamp updated_at = 1 [(validate.rules).message.required = true]; + } + // Describes a command that completed successfully. // // Success confirms that any declared attachment is fully uploaded and persisted, whether uploaded // in one transfer or progressively. Its original logical contents are final and will not grow on - // later retrievals. If `attachment` is omitted, the command completed without an attachment; do + // later retrievals, and any required processing is complete. If `attachment` is omitted, the + // command completed without an attachment; do // not keep polling for one. `GetDeviceCommand` never returns attachment bytes. // // When `attachment` is present, download it with @@ -154,7 +159,9 @@ message GetDeviceCommandResponse { // bytes. Set the transport timeout above this wait plus download time. // // Append `?variant=raw` for the finalized original attachment, or assembled log JSON. This skips - // optional processing, not the command-success requirement. Omit `variant` for the default + // processing but requires a finalized upload and successful device execution. Raw remains + // downloadable while processing, after processing failure, and after processing expiry, subject + // to retention. Omit `variant` for the default // representation: an attachment without processing returns its original contents; an attachment // with processing returns the processed result when ready. Processing still pending returns // HTTP 409 with `Retry-After: 2` and a JSON `processing_state`. Failed processing returns a @@ -173,8 +180,8 @@ message GetDeviceCommandResponse { // Download HTTP 409 without a processing response means the command is still pending; poll // `GetDeviceCommand` within a caller-chosen deadline. HTTP 404 can mean an unknown or unretained // command, failed or expired execution, no attachment, or attachment bytes no longer retained. - // Status reads return HTTP 404 for unknown, unretained, failed, or expired commands; successful - // commands without attachments instead return HTTP 200 with `raw_available: false`. + // Command status reads return HTTP 404 for unknown or unretained commands. For the attachment + // status route, inspect `raw_available` and `processed_available` independently. // HTTP 400 means an invalid UUID or download variant; correct the request. HTTP 401 requires // authentication and HTTP 403 requires permission. These plain HTTP routes do not promise a // uniform JSON error body. @@ -187,8 +194,8 @@ message GetDeviceCommandResponse { // Default, raw, and processed representations can differ. Finalized original contents are stable // while retained, but identical HTTP serialization, compression, or headers are not guaranteed. message Succeeded { - // Metadata for a fully uploaded, finalized original attachment, not its bytes. Optional - // processing can still be pending. Historical bytes may expire independently of this metadata. + // Metadata for a finalized original attachment, not its bytes. Historical bytes may expire + // independently of this metadata. message Attachment { // The MIME type of the original attachment. The download's Content-Type identifies the // selected representation, which can differ after processing or a failure fallback. @@ -206,7 +213,6 @@ message GetDeviceCommandResponse { .bitdrift_public.protobuf.client.v1.DeviceCommandResultContext context = 3; // The finalized attachment metadata. Omission means no attachment, not an upload still pending. - // Presence confirms completed upload, not completed processing or indefinite storage retention. // Downloading bytes no longer retained returns HTTP 404. .bitdrift.public.unary.device_debug.v1.GetDeviceCommandResponse.Succeeded.Attachment attachment = 4; } @@ -223,7 +229,7 @@ message GetDeviceCommandResponse { optional string failure_message = 3 [(validate.rules).string.max_bytes = 4096]; } - // The execution deadline passed without a persisted terminal outcome. + // The command deadline passed before execution, upload, or required processing completed. message Expired { .google.protobuf.Timestamp expired_at = 1 [(validate.rules).message.required = true]; } @@ -244,9 +250,11 @@ message GetDeviceCommandResponse { // The command could not be completed. .bitdrift.public.unary.device_debug.v1.GetDeviceCommandResponse.Failed failed = 5; - // Execution or upload expired. Recorded progress remains visible throughout history retention, - // but incomplete attachment contents cannot be downloaded. + // Execution, upload, or processing expired. Incomplete uploads cannot be downloaded. .bitdrift.public.unary.device_debug.v1.GetDeviceCommandResponse.Expired expired = 6; + + // The original upload is finalized; required processing has not finished. + .bitdrift.public.unary.device_debug.v1.GetDeviceCommandResponse.Processing processing = 7; } } @@ -465,14 +473,11 @@ service DebugService { // Retrieves the state and available results of a device command. // // Omit `wait_seconds` or use zero for an immediate snapshot. A positive value waits up to 30 - // seconds for success, failure, or expiry; timeout returns the latest observed `pending` snapshot. - // Retry pending reads within a caller-chosen deadline. `failed` and `expired` are terminal. - // When `succeeded.attachment` is present, its original upload is complete and finalized; fetch - // bytes with `GET /v1/device-commands/{command_id}/attachment?variant=raw`, substituting - // `device_command.command_id`. No further upload polling is needed. Optional processing is a - // separate stage: inspect `GET /v1/device-commands/{command_id}/attachment/status`, or add - // `wait_seconds=1` through `wait_seconds=30` to the download to wait for its representation. - // A download wait timeout preserves HTTP 409; status-route reads remain immediate. + // seconds for success, failure, or expiry; a timeout can return `pending` or `processing`. + // Retry either state within a caller-chosen deadline. `failed` and `expired` are terminal. + // Fetch a finalized original with `GET /v1/device-commands/{command_id}/attachment?variant=raw` + // even when processing fails or expires. The attachment status route reports which variants + // are available. A download wait timeout preserves HTTP 409. // See `GetDeviceCommandResponse.Succeeded` // for variants, download headers, and HTTP 4xx meanings. Success without `attachment` means there // is nothing to download. This method never includes attachment bytes or tracks workflow commands. diff --git a/src/bitdrift/public/unary/workflows/v1/workflow.proto b/src/bitdrift/public/unary/workflows/v1/workflow.proto index 0cf2175..cb11016 100644 --- a/src/bitdrift/public/unary/workflows/v1/workflow.proto +++ b/src/bitdrift/public/unary/workflows/v1/workflow.proto @@ -110,18 +110,6 @@ message GroupBy { // A workflow definition: its flows, actions, targeting, and deployment state. message Workflow { - // A tag assigned to a workflow. - message WorkflowTag { - // The raw value of the tag. This is what gets stored and used for filtering. - string value = 1 [(validate.rules).string = { - min_len: 1 - max_len: 100 - }]; - - // The user who created this tag. - .bitdrift.public.unary.common.v1.Owner created_by = 2; - } - // The deployment state of a workflow. enum WorkflowState { // The workflow is not currently running and it has not been deployed. @@ -188,7 +176,7 @@ message Workflow { // A list of tags that have been assigned to this workflow. These can be used for filtering // purposes within a view. - repeated .bitdrift.public.unary.workflows.v1.Workflow.WorkflowTag tags = 32 [(validate.rules).repeated = {max_items: 100}]; + repeated .bitdrift.public.unary.common.v1.Tag tags = 32 [(validate.rules).repeated = {max_items: 100}]; // The access permissions currently set for this workflow. .bitdrift.public.unary.admin.v1.AccessPermission current_access_permissions = 33; @@ -5038,7 +5026,7 @@ message UpsertWorkflowTagsRequest { // Response containing the workflow's tags after the update. message UpsertWorkflowTagsResponse { // The tags that are assigned to the workflow after the update completes. - repeated .bitdrift.public.unary.workflows.v1.Workflow.WorkflowTag tags = 1; + repeated .bitdrift.public.unary.common.v1.Tag tags = 1; } // Request to list workflow tags. @@ -5047,7 +5035,7 @@ message ListTagsRequest {} // Response containing workflow tags. message ListTagsResponse { // The available workflow tags. - repeated .bitdrift.public.unary.workflows.v1.Workflow.WorkflowTag tags = 1; + repeated .bitdrift.public.unary.common.v1.Tag tags = 1; } // Request to delete a workflow.