-
Notifications
You must be signed in to change notification settings - Fork 0
/
Analytics.proto
62 lines (53 loc) · 1.75 KB
/
Analytics.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
option java_package = "com.idamobile.instabank.dto.protobuf";
option java_outer_classname = "Analytics";
import "Entities.proto";
message AnalyticsQuery {
enum Context {
// Search should be done in all transaction's human readable text fields
// (including comments, description, category name, venue name, system message)
NO_CONTEXT = 1;
NAME_CATEGORY = 2;
NAME_VENUE = 3;
ID_CATEGORY = 4;
ID_VENUE = 5;
ID_USER = 6;
}
required Context context = 1;
// ID or text to search depending on context
optional string query = 2;
optional string title = 3;
}
// While searching:
// URL: "/getSearchSuggestions"
message AnalyticsSuggestionsRequestProtobufDTO {
// If not present, server should response with the most recent/popular queries
optional string query = 1;
}
message AnalyticsSuggestionsResponseProtobufDTO {
repeated AnalyticsQuery suggestions = 1;
}
// Analytics screen:
// URL: "/getAnalyticsReport"
message AnalyticsReportRequestProtobufDTO {
required AnalyticsQuery query = 1;
required int64 minTimestamp = 2;
// Till now if not present
optional int64 maxTimestamp = 3;
}
message AnalyticsReportResponseProtobufDTO {
required int64 spentAmount = 1;
required int64 incomeAmount = 2;
required int64 transactionsCount = 3;
required int64 latestTransactionTimestamp = 4;
}
// URL: "/getAnalyticsTransactions"
message AnalyticsTransactionsRequestProtobufDTO {
required AnalyticsQuery query = 1;
required int32 pageSize = 2;
required int64 minTimestamp = 3;
required int64 maxTimestamp = 4;
repeated string edgeItemIds = 5;
}
message AnalyticsTransactionsResponseProtobufDTO {
repeated TransactionProtobufDTO transactions = 1;
}