From e4b072edf60a2cfa0e7dba4df0dd90def484fa3d Mon Sep 17 00:00:00 2001 From: "bitdrift-proto-sync[bot]" <154373124+bitdrift-proto-sync[bot]@users.noreply.github.com> Date: Fri, 11 Sep 2026 14:01:15 +0000 Subject: [PATCH] Sync public API export @ dcae8c0 Automated sync of public API export. --- .../public/unary/charts/v1/chart_id.proto | 9 +-- src/bitdrift/public/unary/usage/v1/api.proto | 58 +++++++++++++++++++ 2 files changed, 63 insertions(+), 4 deletions(-) create mode 100644 src/bitdrift/public/unary/usage/v1/api.proto diff --git a/src/bitdrift/public/unary/charts/v1/chart_id.proto b/src/bitdrift/public/unary/charts/v1/chart_id.proto index 30fa5ef..9fd36fe 100644 --- a/src/bitdrift/public/unary/charts/v1/chart_id.proto +++ b/src/bitdrift/public/unary/charts/v1/chart_id.proto @@ -88,11 +88,12 @@ message ChartIdentifier { enum ActiveDevicesChartType { // This is a standard chart using 1m/15m/2h resolutions. NORMAL = 0; - // Includes three daily series: DAU for that day, WAU for the trailing 7 days, and MAU for - // the trailing 30 days. This chart is returned in a dashboard group with a minimum query - // interval of 7 days, so smaller time windows may return no data. + // Includes three daily series: daily active devices (DAD) for that day, weekly active devices + // (WAD) for the trailing 7 days, and monthly active devices (MAD) for the trailing 30 days. + // This chart is returned in a dashboard group with a minimum query interval of 7 days, so + // smaller time windows may return no data. LONG_TERM = 1; - // Shows stickiness as DAU/MAU, with the same minimum time-window expectations as LONG_TERM. + // Shows stickiness as DAD/MAD, with the same minimum time-window expectations as LONG_TERM. STICKINESS = 2; } diff --git a/src/bitdrift/public/unary/usage/v1/api.proto b/src/bitdrift/public/unary/usage/v1/api.proto new file mode 100644 index 0000000..5b00e0d --- /dev/null +++ b/src/bitdrift/public/unary/usage/v1/api.proto @@ -0,0 +1,58 @@ +// 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.usage.v1; + +import "google/protobuf/timestamp.proto"; +import "validate/validate.proto"; + +message GetMonthlyActiveDevicesUsageRequest { + // The number of UTC calendar months to return. Defaults to 12 when unset. + optional uint32 months = 1 [(validate.rules).uint32 = { + gte: 1 + lte: 60 + }]; +} + +message MonthlyActiveDevicesUsage { + message AppUsage { + // The app ID associated with the active-device count. + string app_id = 1 [ + (validate.rules).string.min_len = 1, + (validate.rules).string.max_len = 255 + ]; + + // The number of distinct active devices associated with the app ID during the month. + uint64 active_devices = 2; + } + + // The start of the UTC calendar month represented by this usage summary. + .google.protobuf.Timestamp month = 1; + + // The number of distinct active devices across all apps during the month. + // + // This is calculated independently and may differ from the sum of app-level counts because a + // device can be active in more than one app. + uint64 active_devices = 2; + + // The active-device counts for each app with a non-empty app ID during the month. + repeated .bitdrift.public.unary.usage.v1.MonthlyActiveDevicesUsage.AppUsage apps = 3; +} + +message GetMonthlyActiveDevicesUsageResponse { + // The monthly active-device usage summaries, ordered from newest to oldest. + repeated .bitdrift.public.unary.usage.v1.MonthlyActiveDevicesUsage usage = 1; +} + +// Provides monthly active-device usage summaries for an organization. +service UsageService { + // Retrieves monthly active-device usage across all apps. + // + // Results include the current partial UTC calendar month and are ordered from newest to oldest. + rpc GetMonthlyActiveDevicesUsage(.bitdrift.public.unary.usage.v1.GetMonthlyActiveDevicesUsageRequest) returns (.bitdrift.public.unary.usage.v1.GetMonthlyActiveDevicesUsageResponse); +}