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
9 changes: 5 additions & 4 deletions src/bitdrift/public/unary/charts/v1/chart_id.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
58 changes: 58 additions & 0 deletions src/bitdrift/public/unary/usage/v1/api.proto
Original file line number Diff line number Diff line change
@@ -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);
}
Loading