jr-common-micro 1.1.101 → 1.1.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/proto/micro/v1/mining/mining_messages_nest.d.ts +25 -0
- package/dist/proto/micro/v1/mining/mining_messages_pb.d.ts +57 -0
- package/dist/proto/micro/v1/mining/mining_messages_pb.js +128 -2
- package/dist/proto/micro/v1/mining/services_connect.d.ts +7 -1
- package/dist/proto/micro/v1/mining/services_connect.js +6 -0
- package/dist/proto/micro/v1/mining/services_nest.d.ts +3 -1
- package/dist/proto/micro/v1/mining/services_nest.js +1 -0
- package/dist/utils/entitlements.d.ts +3 -2
- package/dist/utils/entitlements.js +9 -1
- package/package.json +1 -1
- package/proto/micro/v1/mining/mining_messages.proto +37 -0
- package/proto/micro/v1/mining/services.proto +4 -0
|
@@ -347,6 +347,7 @@ export interface AdminUserItem {
|
|
|
347
347
|
gift_paid: boolean;
|
|
348
348
|
device_siblings: number;
|
|
349
349
|
referred_by: string;
|
|
350
|
+
risk_score: number;
|
|
350
351
|
referred_by_username: string;
|
|
351
352
|
}
|
|
352
353
|
export interface AdminUsersResponse {
|
|
@@ -375,6 +376,30 @@ export interface AdminUserResponse {
|
|
|
375
376
|
credits: AdminCreditSource[];
|
|
376
377
|
pending_total: string;
|
|
377
378
|
total_received_gifts: string;
|
|
379
|
+
risk?: AdminRiskFlag | undefined;
|
|
380
|
+
}
|
|
381
|
+
export interface AdminRiskSignal {
|
|
382
|
+
key: string;
|
|
383
|
+
count: number;
|
|
384
|
+
points: number;
|
|
385
|
+
detail: string;
|
|
386
|
+
}
|
|
387
|
+
export interface AdminRiskFlag {
|
|
388
|
+
user_id: string;
|
|
389
|
+
score: number;
|
|
390
|
+
status: string;
|
|
391
|
+
signals: AdminRiskSignal[];
|
|
392
|
+
first_flagged_at: string;
|
|
393
|
+
updated_at: string;
|
|
394
|
+
profile?: AdminUserItem | undefined;
|
|
395
|
+
}
|
|
396
|
+
export interface AdminRiskQueueRequest {
|
|
397
|
+
status: string;
|
|
398
|
+
limit: number;
|
|
399
|
+
}
|
|
400
|
+
export interface AdminRiskQueueResponse {
|
|
401
|
+
status: ResponseStatus | undefined;
|
|
402
|
+
data: AdminRiskFlag[];
|
|
378
403
|
}
|
|
379
404
|
export interface AdminCreditSource {
|
|
380
405
|
from_user_id: string;
|
|
@@ -700,6 +700,7 @@ export declare class AdminUserItem extends Message<AdminUserItem> {
|
|
|
700
700
|
giftPaid: boolean;
|
|
701
701
|
deviceSiblings: number;
|
|
702
702
|
referredBy: string;
|
|
703
|
+
riskScore: number;
|
|
703
704
|
referredByUsername: string;
|
|
704
705
|
constructor(data?: PartialMessage<AdminUserItem>);
|
|
705
706
|
static readonly runtime: typeof proto3;
|
|
@@ -752,6 +753,7 @@ export declare class AdminUserResponse extends Message<AdminUserResponse> {
|
|
|
752
753
|
credits: AdminCreditSource[];
|
|
753
754
|
pendingTotal: string;
|
|
754
755
|
totalReceivedGifts: string;
|
|
756
|
+
risk?: AdminRiskFlag;
|
|
755
757
|
constructor(data?: PartialMessage<AdminUserResponse>);
|
|
756
758
|
static readonly runtime: typeof proto3;
|
|
757
759
|
static readonly typeName = "micro.v1.mining.AdminUserResponse";
|
|
@@ -761,6 +763,61 @@ export declare class AdminUserResponse extends Message<AdminUserResponse> {
|
|
|
761
763
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AdminUserResponse;
|
|
762
764
|
static equals(a: AdminUserResponse | PlainMessage<AdminUserResponse> | undefined, b: AdminUserResponse | PlainMessage<AdminUserResponse> | undefined): boolean;
|
|
763
765
|
}
|
|
766
|
+
export declare class AdminRiskSignal extends Message<AdminRiskSignal> {
|
|
767
|
+
key: string;
|
|
768
|
+
count: number;
|
|
769
|
+
points: number;
|
|
770
|
+
detail: string;
|
|
771
|
+
constructor(data?: PartialMessage<AdminRiskSignal>);
|
|
772
|
+
static readonly runtime: typeof proto3;
|
|
773
|
+
static readonly typeName = "micro.v1.mining.AdminRiskSignal";
|
|
774
|
+
static readonly fields: FieldList;
|
|
775
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AdminRiskSignal;
|
|
776
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AdminRiskSignal;
|
|
777
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AdminRiskSignal;
|
|
778
|
+
static equals(a: AdminRiskSignal | PlainMessage<AdminRiskSignal> | undefined, b: AdminRiskSignal | PlainMessage<AdminRiskSignal> | undefined): boolean;
|
|
779
|
+
}
|
|
780
|
+
export declare class AdminRiskFlag extends Message<AdminRiskFlag> {
|
|
781
|
+
userId: string;
|
|
782
|
+
score: number;
|
|
783
|
+
status: string;
|
|
784
|
+
signals: AdminRiskSignal[];
|
|
785
|
+
firstFlaggedAt: string;
|
|
786
|
+
updatedAt: string;
|
|
787
|
+
profile?: AdminUserItem;
|
|
788
|
+
constructor(data?: PartialMessage<AdminRiskFlag>);
|
|
789
|
+
static readonly runtime: typeof proto3;
|
|
790
|
+
static readonly typeName = "micro.v1.mining.AdminRiskFlag";
|
|
791
|
+
static readonly fields: FieldList;
|
|
792
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AdminRiskFlag;
|
|
793
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AdminRiskFlag;
|
|
794
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AdminRiskFlag;
|
|
795
|
+
static equals(a: AdminRiskFlag | PlainMessage<AdminRiskFlag> | undefined, b: AdminRiskFlag | PlainMessage<AdminRiskFlag> | undefined): boolean;
|
|
796
|
+
}
|
|
797
|
+
export declare class AdminRiskQueueRequest extends Message<AdminRiskQueueRequest> {
|
|
798
|
+
status: string;
|
|
799
|
+
limit: number;
|
|
800
|
+
constructor(data?: PartialMessage<AdminRiskQueueRequest>);
|
|
801
|
+
static readonly runtime: typeof proto3;
|
|
802
|
+
static readonly typeName = "micro.v1.mining.AdminRiskQueueRequest";
|
|
803
|
+
static readonly fields: FieldList;
|
|
804
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AdminRiskQueueRequest;
|
|
805
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AdminRiskQueueRequest;
|
|
806
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AdminRiskQueueRequest;
|
|
807
|
+
static equals(a: AdminRiskQueueRequest | PlainMessage<AdminRiskQueueRequest> | undefined, b: AdminRiskQueueRequest | PlainMessage<AdminRiskQueueRequest> | undefined): boolean;
|
|
808
|
+
}
|
|
809
|
+
export declare class AdminRiskQueueResponse extends Message<AdminRiskQueueResponse> {
|
|
810
|
+
status?: ResponseStatus;
|
|
811
|
+
data: AdminRiskFlag[];
|
|
812
|
+
constructor(data?: PartialMessage<AdminRiskQueueResponse>);
|
|
813
|
+
static readonly runtime: typeof proto3;
|
|
814
|
+
static readonly typeName = "micro.v1.mining.AdminRiskQueueResponse";
|
|
815
|
+
static readonly fields: FieldList;
|
|
816
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AdminRiskQueueResponse;
|
|
817
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AdminRiskQueueResponse;
|
|
818
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AdminRiskQueueResponse;
|
|
819
|
+
static equals(a: AdminRiskQueueResponse | PlainMessage<AdminRiskQueueResponse> | undefined, b: AdminRiskQueueResponse | PlainMessage<AdminRiskQueueResponse> | undefined): boolean;
|
|
820
|
+
}
|
|
764
821
|
export declare class AdminCreditSource extends Message<AdminCreditSource> {
|
|
765
822
|
fromUserId: string;
|
|
766
823
|
fromUsername: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.AdminSetTaskRequest = exports.AdminDeviceClustersResponse = exports.AdminDeviceCluster = void 0;
|
|
3
|
+
exports.AdminRiskFlag = exports.AdminRiskSignal = exports.AdminUserResponse = exports.AdminActionItem = exports.AdminUsersResponse = exports.AdminUserItem = exports.AdminUsersRequest = exports.AdminTasksResponse = exports.AdminTaskItem = exports.SetParameterRequest = exports.ParametersResponse = exports.ParameterItem = exports.AdminOverviewResponse = exports.AdminTopReferrer = exports.AdminTaskStat = exports.AdminSeries = exports.AdminSeriesPoint = exports.AdminMetric = exports.AdminOverviewRequest = exports.ConfigResponse = exports.ResolveCodeResponse = exports.ResolveCodeRequest = exports.EnrollResponse = exports.EnrollRequest = exports.UpdateSettingsRequest = exports.HistoryResponse = exports.HistoryDay = exports.HistoryItem = exports.HistoryRequest = exports.TeamResponse = exports.SetTeamRequest = exports.ClaimResponse = exports.ReferralListResponse = exports.ReferralListRequest = exports.ReferralItem = exports.TaskEventResponse = exports.TaskEventRequest = exports.TasksResponse = exports.MiningMeResponse = exports.MiningState = exports.MiningSettings = exports.TasksSummary = exports.TaskInfo = exports.TeamInfo = exports.TeamWeek = exports.TeamMember = exports.ReferralInfo = exports.HalvingInfo = exports.RateInfo = exports.SessionInfo = void 0;
|
|
4
|
+
exports.AdminSetTaskRequest = exports.AdminDeviceClustersResponse = exports.AdminDeviceCluster = exports.AdminModerateRequest = exports.AdminCreditSource = exports.AdminRiskQueueResponse = exports.AdminRiskQueueRequest = void 0;
|
|
5
5
|
const protobuf_1 = require("@bufbuild/protobuf");
|
|
6
6
|
const general_pb_js_1 = require("../general_pb.js");
|
|
7
7
|
class SessionInfo extends protobuf_1.Message {
|
|
@@ -1515,6 +1515,7 @@ class AdminUserItem extends protobuf_1.Message {
|
|
|
1515
1515
|
giftPaid = false;
|
|
1516
1516
|
deviceSiblings = 0;
|
|
1517
1517
|
referredBy = "";
|
|
1518
|
+
riskScore = 0;
|
|
1518
1519
|
referredByUsername = "";
|
|
1519
1520
|
constructor(data) {
|
|
1520
1521
|
super();
|
|
@@ -1541,6 +1542,7 @@ class AdminUserItem extends protobuf_1.Message {
|
|
|
1541
1542
|
{ no: 16, name: "gift_paid", kind: "scalar", T: 8 },
|
|
1542
1543
|
{ no: 17, name: "device_siblings", kind: "scalar", T: 5 },
|
|
1543
1544
|
{ no: 18, name: "referred_by", kind: "scalar", T: 9 },
|
|
1545
|
+
{ no: 20, name: "risk_score", kind: "scalar", T: 5 },
|
|
1544
1546
|
{ no: 19, name: "referred_by_username", kind: "scalar", T: 9 },
|
|
1545
1547
|
]);
|
|
1546
1548
|
static fromBinary(bytes, options) {
|
|
@@ -1637,6 +1639,7 @@ class AdminUserResponse extends protobuf_1.Message {
|
|
|
1637
1639
|
credits = [];
|
|
1638
1640
|
pendingTotal = "";
|
|
1639
1641
|
totalReceivedGifts = "";
|
|
1642
|
+
risk;
|
|
1640
1643
|
constructor(data) {
|
|
1641
1644
|
super();
|
|
1642
1645
|
protobuf_1.proto3.util.initPartial(data, this);
|
|
@@ -1653,6 +1656,7 @@ class AdminUserResponse extends protobuf_1.Message {
|
|
|
1653
1656
|
{ no: 7, name: "credits", kind: "message", T: AdminCreditSource, repeated: true },
|
|
1654
1657
|
{ no: 8, name: "pending_total", kind: "scalar", T: 9 },
|
|
1655
1658
|
{ no: 9, name: "total_received_gifts", kind: "scalar", T: 9 },
|
|
1659
|
+
{ no: 10, name: "risk", kind: "message", T: AdminRiskFlag, opt: true },
|
|
1656
1660
|
]);
|
|
1657
1661
|
static fromBinary(bytes, options) {
|
|
1658
1662
|
return new AdminUserResponse().fromBinary(bytes, options);
|
|
@@ -1668,6 +1672,128 @@ class AdminUserResponse extends protobuf_1.Message {
|
|
|
1668
1672
|
}
|
|
1669
1673
|
}
|
|
1670
1674
|
exports.AdminUserResponse = AdminUserResponse;
|
|
1675
|
+
class AdminRiskSignal extends protobuf_1.Message {
|
|
1676
|
+
key = "";
|
|
1677
|
+
count = 0;
|
|
1678
|
+
points = 0;
|
|
1679
|
+
detail = "";
|
|
1680
|
+
constructor(data) {
|
|
1681
|
+
super();
|
|
1682
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
1683
|
+
}
|
|
1684
|
+
static runtime = protobuf_1.proto3;
|
|
1685
|
+
static typeName = "micro.v1.mining.AdminRiskSignal";
|
|
1686
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
1687
|
+
{ no: 1, name: "key", kind: "scalar", T: 9 },
|
|
1688
|
+
{ no: 2, name: "count", kind: "scalar", T: 5 },
|
|
1689
|
+
{ no: 3, name: "points", kind: "scalar", T: 5 },
|
|
1690
|
+
{ no: 4, name: "detail", kind: "scalar", T: 9 },
|
|
1691
|
+
]);
|
|
1692
|
+
static fromBinary(bytes, options) {
|
|
1693
|
+
return new AdminRiskSignal().fromBinary(bytes, options);
|
|
1694
|
+
}
|
|
1695
|
+
static fromJson(jsonValue, options) {
|
|
1696
|
+
return new AdminRiskSignal().fromJson(jsonValue, options);
|
|
1697
|
+
}
|
|
1698
|
+
static fromJsonString(jsonString, options) {
|
|
1699
|
+
return new AdminRiskSignal().fromJsonString(jsonString, options);
|
|
1700
|
+
}
|
|
1701
|
+
static equals(a, b) {
|
|
1702
|
+
return protobuf_1.proto3.util.equals(AdminRiskSignal, a, b);
|
|
1703
|
+
}
|
|
1704
|
+
}
|
|
1705
|
+
exports.AdminRiskSignal = AdminRiskSignal;
|
|
1706
|
+
class AdminRiskFlag extends protobuf_1.Message {
|
|
1707
|
+
userId = "";
|
|
1708
|
+
score = 0;
|
|
1709
|
+
status = "";
|
|
1710
|
+
signals = [];
|
|
1711
|
+
firstFlaggedAt = "";
|
|
1712
|
+
updatedAt = "";
|
|
1713
|
+
profile;
|
|
1714
|
+
constructor(data) {
|
|
1715
|
+
super();
|
|
1716
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
1717
|
+
}
|
|
1718
|
+
static runtime = protobuf_1.proto3;
|
|
1719
|
+
static typeName = "micro.v1.mining.AdminRiskFlag";
|
|
1720
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
1721
|
+
{ no: 1, name: "user_id", kind: "scalar", T: 9 },
|
|
1722
|
+
{ no: 2, name: "score", kind: "scalar", T: 5 },
|
|
1723
|
+
{ no: 3, name: "status", kind: "scalar", T: 9 },
|
|
1724
|
+
{ no: 4, name: "signals", kind: "message", T: AdminRiskSignal, repeated: true },
|
|
1725
|
+
{ no: 5, name: "first_flagged_at", kind: "scalar", T: 9 },
|
|
1726
|
+
{ no: 6, name: "updated_at", kind: "scalar", T: 9 },
|
|
1727
|
+
{ no: 7, name: "profile", kind: "message", T: AdminUserItem, opt: true },
|
|
1728
|
+
]);
|
|
1729
|
+
static fromBinary(bytes, options) {
|
|
1730
|
+
return new AdminRiskFlag().fromBinary(bytes, options);
|
|
1731
|
+
}
|
|
1732
|
+
static fromJson(jsonValue, options) {
|
|
1733
|
+
return new AdminRiskFlag().fromJson(jsonValue, options);
|
|
1734
|
+
}
|
|
1735
|
+
static fromJsonString(jsonString, options) {
|
|
1736
|
+
return new AdminRiskFlag().fromJsonString(jsonString, options);
|
|
1737
|
+
}
|
|
1738
|
+
static equals(a, b) {
|
|
1739
|
+
return protobuf_1.proto3.util.equals(AdminRiskFlag, a, b);
|
|
1740
|
+
}
|
|
1741
|
+
}
|
|
1742
|
+
exports.AdminRiskFlag = AdminRiskFlag;
|
|
1743
|
+
class AdminRiskQueueRequest extends protobuf_1.Message {
|
|
1744
|
+
status = "";
|
|
1745
|
+
limit = 0;
|
|
1746
|
+
constructor(data) {
|
|
1747
|
+
super();
|
|
1748
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
1749
|
+
}
|
|
1750
|
+
static runtime = protobuf_1.proto3;
|
|
1751
|
+
static typeName = "micro.v1.mining.AdminRiskQueueRequest";
|
|
1752
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
1753
|
+
{ no: 1, name: "status", kind: "scalar", T: 9 },
|
|
1754
|
+
{ no: 2, name: "limit", kind: "scalar", T: 5 },
|
|
1755
|
+
]);
|
|
1756
|
+
static fromBinary(bytes, options) {
|
|
1757
|
+
return new AdminRiskQueueRequest().fromBinary(bytes, options);
|
|
1758
|
+
}
|
|
1759
|
+
static fromJson(jsonValue, options) {
|
|
1760
|
+
return new AdminRiskQueueRequest().fromJson(jsonValue, options);
|
|
1761
|
+
}
|
|
1762
|
+
static fromJsonString(jsonString, options) {
|
|
1763
|
+
return new AdminRiskQueueRequest().fromJsonString(jsonString, options);
|
|
1764
|
+
}
|
|
1765
|
+
static equals(a, b) {
|
|
1766
|
+
return protobuf_1.proto3.util.equals(AdminRiskQueueRequest, a, b);
|
|
1767
|
+
}
|
|
1768
|
+
}
|
|
1769
|
+
exports.AdminRiskQueueRequest = AdminRiskQueueRequest;
|
|
1770
|
+
class AdminRiskQueueResponse extends protobuf_1.Message {
|
|
1771
|
+
status;
|
|
1772
|
+
data = [];
|
|
1773
|
+
constructor(data) {
|
|
1774
|
+
super();
|
|
1775
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
1776
|
+
}
|
|
1777
|
+
static runtime = protobuf_1.proto3;
|
|
1778
|
+
static typeName = "micro.v1.mining.AdminRiskQueueResponse";
|
|
1779
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
1780
|
+
{ no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
|
|
1781
|
+
{ no: 2, name: "data", kind: "message", T: AdminRiskFlag, repeated: true },
|
|
1782
|
+
]);
|
|
1783
|
+
static fromBinary(bytes, options) {
|
|
1784
|
+
return new AdminRiskQueueResponse().fromBinary(bytes, options);
|
|
1785
|
+
}
|
|
1786
|
+
static fromJson(jsonValue, options) {
|
|
1787
|
+
return new AdminRiskQueueResponse().fromJson(jsonValue, options);
|
|
1788
|
+
}
|
|
1789
|
+
static fromJsonString(jsonString, options) {
|
|
1790
|
+
return new AdminRiskQueueResponse().fromJsonString(jsonString, options);
|
|
1791
|
+
}
|
|
1792
|
+
static equals(a, b) {
|
|
1793
|
+
return protobuf_1.proto3.util.equals(AdminRiskQueueResponse, a, b);
|
|
1794
|
+
}
|
|
1795
|
+
}
|
|
1796
|
+
exports.AdminRiskQueueResponse = AdminRiskQueueResponse;
|
|
1671
1797
|
class AdminCreditSource extends protobuf_1.Message {
|
|
1672
1798
|
fromUserId = "";
|
|
1673
1799
|
fromUsername = "";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ByIdRequest, EmptyRequest, EmptyResponse } from "../general_pb.js";
|
|
2
|
-
import { AdminDeviceClustersResponse, AdminModerateRequest, AdminOverviewRequest, AdminOverviewResponse, AdminSetTaskRequest, AdminTasksResponse, AdminUserResponse, AdminUsersRequest, AdminUsersResponse, ClaimResponse, ConfigResponse, EnrollRequest, EnrollResponse, HistoryRequest, HistoryResponse, MiningMeResponse, ParametersResponse, ReferralListRequest, ReferralListResponse, ResolveCodeRequest, ResolveCodeResponse, SetParameterRequest, SetTeamRequest, TaskEventRequest, TaskEventResponse, TasksResponse, TeamResponse, UpdateSettingsRequest } from "./mining_messages_pb.js";
|
|
2
|
+
import { AdminDeviceClustersResponse, AdminModerateRequest, AdminOverviewRequest, AdminOverviewResponse, AdminRiskQueueRequest, AdminRiskQueueResponse, AdminSetTaskRequest, AdminTasksResponse, AdminUserResponse, AdminUsersRequest, AdminUsersResponse, ClaimResponse, ConfigResponse, EnrollRequest, EnrollResponse, HistoryRequest, HistoryResponse, MiningMeResponse, ParametersResponse, ReferralListRequest, ReferralListResponse, ResolveCodeRequest, ResolveCodeResponse, SetParameterRequest, SetTeamRequest, TaskEventRequest, TaskEventResponse, TasksResponse, TeamResponse, UpdateSettingsRequest } from "./mining_messages_pb.js";
|
|
3
3
|
import { MethodKind } from "@bufbuild/protobuf";
|
|
4
4
|
export declare const PMiningService: {
|
|
5
5
|
readonly typeName: "micro.v1.mining.PMiningService";
|
|
@@ -148,6 +148,12 @@ export declare const PMiningService: {
|
|
|
148
148
|
readonly O: typeof AdminDeviceClustersResponse;
|
|
149
149
|
readonly kind: MethodKind.ServerStreaming;
|
|
150
150
|
};
|
|
151
|
+
readonly adminRiskQueue: {
|
|
152
|
+
readonly name: "AdminRiskQueue";
|
|
153
|
+
readonly I: typeof AdminRiskQueueRequest;
|
|
154
|
+
readonly O: typeof AdminRiskQueueResponse;
|
|
155
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
156
|
+
};
|
|
151
157
|
readonly removeUserData: {
|
|
152
158
|
readonly name: "RemoveUserData";
|
|
153
159
|
readonly I: typeof ByIdRequest;
|
|
@@ -151,6 +151,12 @@ exports.PMiningService = {
|
|
|
151
151
|
O: mining_messages_pb_js_1.AdminDeviceClustersResponse,
|
|
152
152
|
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
153
153
|
},
|
|
154
|
+
adminRiskQueue: {
|
|
155
|
+
name: "AdminRiskQueue",
|
|
156
|
+
I: mining_messages_pb_js_1.AdminRiskQueueRequest,
|
|
157
|
+
O: mining_messages_pb_js_1.AdminRiskQueueResponse,
|
|
158
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
159
|
+
},
|
|
154
160
|
removeUserData: {
|
|
155
161
|
name: "RemoveUserData",
|
|
156
162
|
I: general_pb_js_1.ByIdRequest,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Metadata } from "@grpc/grpc-js";
|
|
2
2
|
import { Observable } from "rxjs";
|
|
3
3
|
import { ByIdRequest, EmptyRequest, EmptyResponse } from "../general_nest";
|
|
4
|
-
import { AdminDeviceClustersResponse, AdminModerateRequest, AdminOverviewRequest, AdminOverviewResponse, AdminSetTaskRequest, AdminTasksResponse, AdminUserResponse, AdminUsersRequest, AdminUsersResponse, ClaimResponse, ConfigResponse, EnrollRequest, EnrollResponse, HistoryRequest, HistoryResponse, MiningMeResponse, ParametersResponse, ReferralListRequest, ReferralListResponse, ResolveCodeRequest, ResolveCodeResponse, SetParameterRequest, SetTeamRequest, TaskEventRequest, TaskEventResponse, TasksResponse, TeamResponse, UpdateSettingsRequest } from "./mining_messages_nest";
|
|
4
|
+
import { AdminDeviceClustersResponse, AdminModerateRequest, AdminOverviewRequest, AdminOverviewResponse, AdminRiskQueueRequest, AdminRiskQueueResponse, AdminSetTaskRequest, AdminTasksResponse, AdminUserResponse, AdminUsersRequest, AdminUsersResponse, ClaimResponse, ConfigResponse, EnrollRequest, EnrollResponse, HistoryRequest, HistoryResponse, MiningMeResponse, ParametersResponse, ReferralListRequest, ReferralListResponse, ResolveCodeRequest, ResolveCodeResponse, SetParameterRequest, SetTeamRequest, TaskEventRequest, TaskEventResponse, TasksResponse, TeamResponse, UpdateSettingsRequest } from "./mining_messages_nest";
|
|
5
5
|
export declare const protobufPackage = "micro.v1.mining";
|
|
6
6
|
export declare const MICRO_V1_MINING_PACKAGE_NAME = "micro.v1.mining";
|
|
7
7
|
export interface PMiningServiceClient {
|
|
@@ -29,6 +29,7 @@ export interface PMiningServiceClient {
|
|
|
29
29
|
adminUser(request: ByIdRequest, metadata?: Metadata): Observable<AdminUserResponse>;
|
|
30
30
|
adminModerate(request: AdminModerateRequest, metadata?: Metadata): Observable<AdminUserResponse>;
|
|
31
31
|
adminDeviceClusters(request: EmptyRequest, metadata?: Metadata): Observable<AdminDeviceClustersResponse>;
|
|
32
|
+
adminRiskQueue(request: AdminRiskQueueRequest, metadata?: Metadata): Observable<AdminRiskQueueResponse>;
|
|
32
33
|
removeUserData(request: ByIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
33
34
|
}
|
|
34
35
|
export interface PMiningServiceController {
|
|
@@ -56,6 +57,7 @@ export interface PMiningServiceController {
|
|
|
56
57
|
adminUser(request: ByIdRequest, metadata?: Metadata): Observable<AdminUserResponse>;
|
|
57
58
|
adminModerate(request: AdminModerateRequest, metadata?: Metadata): Observable<AdminUserResponse>;
|
|
58
59
|
adminDeviceClusters(request: EmptyRequest, metadata?: Metadata): Observable<AdminDeviceClustersResponse>;
|
|
60
|
+
adminRiskQueue(request: AdminRiskQueueRequest, metadata?: Metadata): Observable<AdminRiskQueueResponse>;
|
|
59
61
|
removeUserData(request: ByIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
|
|
60
62
|
}
|
|
61
63
|
export declare function PMiningServiceControllerMethods(): (constructor: Function) => void;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { BadgeKey } from './badges';
|
|
2
|
-
export declare const PLAN_CODES: readonly ["premium"];
|
|
2
|
+
export declare const PLAN_CODES: readonly ["premium", "gold"];
|
|
3
3
|
export type PlanCode = (typeof PLAN_CODES)[number];
|
|
4
|
-
export declare const FEATURE_KEYS: readonly ["badge.premium", "chat.premium_group", "data.premium"];
|
|
4
|
+
export declare const FEATURE_KEYS: readonly ["badge.premium", "badge.gold", "chat.premium_group", "data.premium"];
|
|
5
5
|
export type FeatureKey = (typeof FEATURE_KEYS)[number];
|
|
6
6
|
export declare const PLAN_FEATURES: Record<PlanCode, readonly FeatureKey[]>;
|
|
7
7
|
export declare const PLAN_BADGE: Record<PlanCode, BadgeKey | null>;
|
|
8
|
+
export declare function higherPlan(a: PlanCode | null | undefined, b: PlanCode | null | undefined): PlanCode | null;
|
|
8
9
|
export declare function isPlanCode(value: string): value is PlanCode;
|
|
9
10
|
export declare function isFeatureKey(value: string): value is FeatureKey;
|
|
10
11
|
export type EntitlementMap = Partial<Record<FeatureKey, Date | null>>;
|
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ENTITLEMENT_CHANGED_CHANNEL = exports.PLAN_BADGE = exports.PLAN_FEATURES = exports.FEATURE_KEYS = exports.PLAN_CODES = void 0;
|
|
4
|
+
exports.higherPlan = higherPlan;
|
|
4
5
|
exports.isPlanCode = isPlanCode;
|
|
5
6
|
exports.isFeatureKey = isFeatureKey;
|
|
6
7
|
exports.hasEntitlement = hasEntitlement;
|
|
7
8
|
exports.entitlementMapFromWire = entitlementMapFromWire;
|
|
8
|
-
exports.PLAN_CODES = ['premium'];
|
|
9
|
+
exports.PLAN_CODES = ['premium', 'gold'];
|
|
9
10
|
exports.FEATURE_KEYS = [
|
|
10
11
|
'badge.premium',
|
|
12
|
+
'badge.gold',
|
|
11
13
|
'chat.premium_group',
|
|
12
14
|
'data.premium',
|
|
13
15
|
];
|
|
14
16
|
exports.PLAN_FEATURES = {
|
|
15
17
|
premium: ['badge.premium', 'chat.premium_group', 'data.premium'],
|
|
18
|
+
gold: ['badge.gold', 'chat.premium_group', 'data.premium'],
|
|
16
19
|
};
|
|
17
20
|
exports.PLAN_BADGE = {
|
|
18
21
|
premium: 'premium',
|
|
22
|
+
gold: 'gold',
|
|
19
23
|
};
|
|
24
|
+
function higherPlan(a, b) {
|
|
25
|
+
const rank = (p) => p ? exports.PLAN_CODES.indexOf(p) : -1;
|
|
26
|
+
return rank(a) >= rank(b) ? (a ?? null) : (b ?? null);
|
|
27
|
+
}
|
|
20
28
|
function isPlanCode(value) {
|
|
21
29
|
return exports.PLAN_CODES.includes(value);
|
|
22
30
|
}
|
package/package.json
CHANGED
|
@@ -495,6 +495,8 @@ message AdminUserItem {
|
|
|
495
495
|
// Other mining accounts on the same device.
|
|
496
496
|
int32 device_siblings = 17;
|
|
497
497
|
string referred_by = 18;
|
|
498
|
+
// The nightly scorer's score (0 = no flag).
|
|
499
|
+
int32 risk_score = 20;
|
|
498
500
|
string referred_by_username = 19;
|
|
499
501
|
}
|
|
500
502
|
|
|
@@ -532,6 +534,41 @@ message AdminUserResponse {
|
|
|
532
534
|
repeated AdminCreditSource credits = 7;
|
|
533
535
|
string pending_total = 8;
|
|
534
536
|
string total_received_gifts = 9;
|
|
537
|
+
optional AdminRiskFlag risk = 10;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
// One signal of the nightly scorer, with its evidence.
|
|
541
|
+
message AdminRiskSignal {
|
|
542
|
+
// same_device | session_sync | gift_and_gone | no_tasks | invite_velocity
|
|
543
|
+
string key = 1;
|
|
544
|
+
int32 count = 2;
|
|
545
|
+
int32 points = 3;
|
|
546
|
+
// JSON evidence (user ids, days) behind the count.
|
|
547
|
+
string detail = 4;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
// A person the scorer flagged. `cleared` by an admin stays cleared for
|
|
551
|
+
// the same signals; a new kind of signal reopens it.
|
|
552
|
+
message AdminRiskFlag {
|
|
553
|
+
string user_id = 1;
|
|
554
|
+
int32 score = 2;
|
|
555
|
+
// open | cleared | actioned
|
|
556
|
+
string status = 3;
|
|
557
|
+
repeated AdminRiskSignal signals = 4;
|
|
558
|
+
string first_flagged_at = 5;
|
|
559
|
+
string updated_at = 6;
|
|
560
|
+
optional AdminUserItem profile = 7;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
message AdminRiskQueueRequest {
|
|
564
|
+
// open (default) | cleared | actioned | all
|
|
565
|
+
string status = 1;
|
|
566
|
+
int32 limit = 2;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
message AdminRiskQueueResponse {
|
|
570
|
+
ResponseStatus status = 1;
|
|
571
|
+
repeated AdminRiskFlag data = 2;
|
|
535
572
|
}
|
|
536
573
|
|
|
537
574
|
message AdminCreditSource {
|
|
@@ -51,6 +51,10 @@ service PMiningService {
|
|
|
51
51
|
rpc AdminModerate(AdminModerateRequest) returns(stream AdminUserResponse) {}
|
|
52
52
|
// Accounts that share an install (the first review signal).
|
|
53
53
|
rpc AdminDeviceClusters(EmptyRequest) returns(stream AdminDeviceClustersResponse) {}
|
|
54
|
+
// Flags the nightly scorer raised (same device, synchronous sessions,
|
|
55
|
+
// gift-and-gone invitees, no tasks, invite bursts), by score. A flag is
|
|
56
|
+
// only ever a reason to look; the decision stays with AdminModerate.
|
|
57
|
+
rpc AdminRiskQueue(AdminRiskQueueRequest) returns(stream AdminRiskQueueResponse) {}
|
|
54
58
|
|
|
55
59
|
// Account deletion parity with every other micro.
|
|
56
60
|
rpc RemoveUserData(ByIdRequest) returns(stream EmptyResponse) {}
|