jr-common-micro 1.1.100 → 1.1.102

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.
@@ -120,6 +120,8 @@ export interface MiningState {
120
120
  sessions_completed: number;
121
121
  streak_days: number;
122
122
  inactive: boolean;
123
+ status: string;
124
+ status_reason: string;
123
125
  }
124
126
  export interface MiningMeResponse {
125
127
  status: ResponseStatus | undefined;
@@ -320,6 +322,107 @@ export interface AdminTasksResponse {
320
322
  status: ResponseStatus | undefined;
321
323
  data: AdminTaskItem[];
322
324
  }
325
+ export interface AdminUsersRequest {
326
+ query: string;
327
+ status: string;
328
+ page: number;
329
+ per_page: number;
330
+ }
331
+ export interface AdminUserItem {
332
+ user_id: string;
333
+ username: string;
334
+ badge: string;
335
+ status: string;
336
+ status_reason: string;
337
+ code: string;
338
+ created_at: string;
339
+ activated_at: string;
340
+ last_seen_at: string;
341
+ sessions_completed: number;
342
+ balance: string;
343
+ invitees: number;
344
+ invitees_active: number;
345
+ device: string;
346
+ same_device: boolean;
347
+ gift_paid: boolean;
348
+ device_siblings: number;
349
+ referred_by: string;
350
+ risk_score: number;
351
+ referred_by_username: string;
352
+ }
353
+ export interface AdminUsersResponse {
354
+ status: ResponseStatus | undefined;
355
+ data: AdminUserItem[];
356
+ pagination: PaginationMetaResult | undefined;
357
+ }
358
+ export interface AdminActionItem {
359
+ id: string;
360
+ action: string;
361
+ reason: string;
362
+ note: string;
363
+ by_user_id: string;
364
+ by_username: string;
365
+ reversed_total: string;
366
+ detail: string;
367
+ created_at: string;
368
+ }
369
+ export interface AdminUserResponse {
370
+ status: ResponseStatus | undefined;
371
+ profile?: AdminUserItem | undefined;
372
+ invitees: AdminUserItem[];
373
+ device_siblings: AdminUserItem[];
374
+ ledger: HistoryItem[];
375
+ actions: AdminActionItem[];
376
+ credits: AdminCreditSource[];
377
+ pending_total: string;
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[];
403
+ }
404
+ export interface AdminCreditSource {
405
+ from_user_id: string;
406
+ from_username: string;
407
+ level1: string;
408
+ level2: string;
409
+ gifts: string;
410
+ }
411
+ export interface AdminModerateRequest {
412
+ user_id: string;
413
+ action: string;
414
+ reason: string;
415
+ note: string;
416
+ cascade_invitees: boolean;
417
+ }
418
+ export interface AdminDeviceCluster {
419
+ device: string;
420
+ users: AdminUserItem[];
421
+ }
422
+ export interface AdminDeviceClustersResponse {
423
+ status: ResponseStatus | undefined;
424
+ data: AdminDeviceCluster[];
425
+ }
323
426
  export interface AdminSetTaskRequest {
324
427
  id: string;
325
428
  multiplier: string;
@@ -201,6 +201,8 @@ export declare class MiningState extends Message<MiningState> {
201
201
  sessionsCompleted: number;
202
202
  streakDays: number;
203
203
  inactive: boolean;
204
+ status: string;
205
+ statusReason: string;
204
206
  constructor(data?: PartialMessage<MiningState>);
205
207
  static readonly runtime: typeof proto3;
206
208
  static readonly typeName = "micro.v1.mining.MiningState";
@@ -665,6 +667,211 @@ export declare class AdminTasksResponse extends Message<AdminTasksResponse> {
665
667
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AdminTasksResponse;
666
668
  static equals(a: AdminTasksResponse | PlainMessage<AdminTasksResponse> | undefined, b: AdminTasksResponse | PlainMessage<AdminTasksResponse> | undefined): boolean;
667
669
  }
670
+ export declare class AdminUsersRequest extends Message<AdminUsersRequest> {
671
+ query: string;
672
+ status: string;
673
+ page: number;
674
+ perPage: number;
675
+ constructor(data?: PartialMessage<AdminUsersRequest>);
676
+ static readonly runtime: typeof proto3;
677
+ static readonly typeName = "micro.v1.mining.AdminUsersRequest";
678
+ static readonly fields: FieldList;
679
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AdminUsersRequest;
680
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AdminUsersRequest;
681
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AdminUsersRequest;
682
+ static equals(a: AdminUsersRequest | PlainMessage<AdminUsersRequest> | undefined, b: AdminUsersRequest | PlainMessage<AdminUsersRequest> | undefined): boolean;
683
+ }
684
+ export declare class AdminUserItem extends Message<AdminUserItem> {
685
+ userId: string;
686
+ username: string;
687
+ badge: string;
688
+ status: string;
689
+ statusReason: string;
690
+ code: string;
691
+ createdAt: string;
692
+ activatedAt: string;
693
+ lastSeenAt: string;
694
+ sessionsCompleted: number;
695
+ balance: string;
696
+ invitees: number;
697
+ inviteesActive: number;
698
+ device: string;
699
+ sameDevice: boolean;
700
+ giftPaid: boolean;
701
+ deviceSiblings: number;
702
+ referredBy: string;
703
+ riskScore: number;
704
+ referredByUsername: string;
705
+ constructor(data?: PartialMessage<AdminUserItem>);
706
+ static readonly runtime: typeof proto3;
707
+ static readonly typeName = "micro.v1.mining.AdminUserItem";
708
+ static readonly fields: FieldList;
709
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AdminUserItem;
710
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AdminUserItem;
711
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AdminUserItem;
712
+ static equals(a: AdminUserItem | PlainMessage<AdminUserItem> | undefined, b: AdminUserItem | PlainMessage<AdminUserItem> | undefined): boolean;
713
+ }
714
+ export declare class AdminUsersResponse extends Message<AdminUsersResponse> {
715
+ status?: ResponseStatus;
716
+ data: AdminUserItem[];
717
+ pagination?: PaginationMetaResult;
718
+ constructor(data?: PartialMessage<AdminUsersResponse>);
719
+ static readonly runtime: typeof proto3;
720
+ static readonly typeName = "micro.v1.mining.AdminUsersResponse";
721
+ static readonly fields: FieldList;
722
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AdminUsersResponse;
723
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AdminUsersResponse;
724
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AdminUsersResponse;
725
+ static equals(a: AdminUsersResponse | PlainMessage<AdminUsersResponse> | undefined, b: AdminUsersResponse | PlainMessage<AdminUsersResponse> | undefined): boolean;
726
+ }
727
+ export declare class AdminActionItem extends Message<AdminActionItem> {
728
+ id: string;
729
+ action: string;
730
+ reason: string;
731
+ note: string;
732
+ byUserId: string;
733
+ byUsername: string;
734
+ reversedTotal: string;
735
+ detail: string;
736
+ createdAt: string;
737
+ constructor(data?: PartialMessage<AdminActionItem>);
738
+ static readonly runtime: typeof proto3;
739
+ static readonly typeName = "micro.v1.mining.AdminActionItem";
740
+ static readonly fields: FieldList;
741
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AdminActionItem;
742
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AdminActionItem;
743
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AdminActionItem;
744
+ static equals(a: AdminActionItem | PlainMessage<AdminActionItem> | undefined, b: AdminActionItem | PlainMessage<AdminActionItem> | undefined): boolean;
745
+ }
746
+ export declare class AdminUserResponse extends Message<AdminUserResponse> {
747
+ status?: ResponseStatus;
748
+ profile?: AdminUserItem;
749
+ invitees: AdminUserItem[];
750
+ deviceSiblings: AdminUserItem[];
751
+ ledger: HistoryItem[];
752
+ actions: AdminActionItem[];
753
+ credits: AdminCreditSource[];
754
+ pendingTotal: string;
755
+ totalReceivedGifts: string;
756
+ risk?: AdminRiskFlag;
757
+ constructor(data?: PartialMessage<AdminUserResponse>);
758
+ static readonly runtime: typeof proto3;
759
+ static readonly typeName = "micro.v1.mining.AdminUserResponse";
760
+ static readonly fields: FieldList;
761
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AdminUserResponse;
762
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AdminUserResponse;
763
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AdminUserResponse;
764
+ static equals(a: AdminUserResponse | PlainMessage<AdminUserResponse> | undefined, b: AdminUserResponse | PlainMessage<AdminUserResponse> | undefined): boolean;
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
+ }
821
+ export declare class AdminCreditSource extends Message<AdminCreditSource> {
822
+ fromUserId: string;
823
+ fromUsername: string;
824
+ level1: string;
825
+ level2: string;
826
+ gifts: string;
827
+ constructor(data?: PartialMessage<AdminCreditSource>);
828
+ static readonly runtime: typeof proto3;
829
+ static readonly typeName = "micro.v1.mining.AdminCreditSource";
830
+ static readonly fields: FieldList;
831
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AdminCreditSource;
832
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AdminCreditSource;
833
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AdminCreditSource;
834
+ static equals(a: AdminCreditSource | PlainMessage<AdminCreditSource> | undefined, b: AdminCreditSource | PlainMessage<AdminCreditSource> | undefined): boolean;
835
+ }
836
+ export declare class AdminModerateRequest extends Message<AdminModerateRequest> {
837
+ userId: string;
838
+ action: string;
839
+ reason: string;
840
+ note: string;
841
+ cascadeInvitees: boolean;
842
+ constructor(data?: PartialMessage<AdminModerateRequest>);
843
+ static readonly runtime: typeof proto3;
844
+ static readonly typeName = "micro.v1.mining.AdminModerateRequest";
845
+ static readonly fields: FieldList;
846
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AdminModerateRequest;
847
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AdminModerateRequest;
848
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AdminModerateRequest;
849
+ static equals(a: AdminModerateRequest | PlainMessage<AdminModerateRequest> | undefined, b: AdminModerateRequest | PlainMessage<AdminModerateRequest> | undefined): boolean;
850
+ }
851
+ export declare class AdminDeviceCluster extends Message<AdminDeviceCluster> {
852
+ device: string;
853
+ users: AdminUserItem[];
854
+ constructor(data?: PartialMessage<AdminDeviceCluster>);
855
+ static readonly runtime: typeof proto3;
856
+ static readonly typeName = "micro.v1.mining.AdminDeviceCluster";
857
+ static readonly fields: FieldList;
858
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AdminDeviceCluster;
859
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AdminDeviceCluster;
860
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AdminDeviceCluster;
861
+ static equals(a: AdminDeviceCluster | PlainMessage<AdminDeviceCluster> | undefined, b: AdminDeviceCluster | PlainMessage<AdminDeviceCluster> | undefined): boolean;
862
+ }
863
+ export declare class AdminDeviceClustersResponse extends Message<AdminDeviceClustersResponse> {
864
+ status?: ResponseStatus;
865
+ data: AdminDeviceCluster[];
866
+ constructor(data?: PartialMessage<AdminDeviceClustersResponse>);
867
+ static readonly runtime: typeof proto3;
868
+ static readonly typeName = "micro.v1.mining.AdminDeviceClustersResponse";
869
+ static readonly fields: FieldList;
870
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AdminDeviceClustersResponse;
871
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AdminDeviceClustersResponse;
872
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AdminDeviceClustersResponse;
873
+ static equals(a: AdminDeviceClustersResponse | PlainMessage<AdminDeviceClustersResponse> | undefined, b: AdminDeviceClustersResponse | PlainMessage<AdminDeviceClustersResponse> | undefined): boolean;
874
+ }
668
875
  export declare class AdminSetTaskRequest extends Message<AdminSetTaskRequest> {
669
876
  id: string;
670
877
  multiplier: string;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AdminSetTaskRequest = 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;
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;
4
5
  const protobuf_1 = require("@bufbuild/protobuf");
5
6
  const general_pb_js_1 = require("../general_pb.js");
6
7
  class SessionInfo extends protobuf_1.Message {
@@ -415,6 +416,8 @@ class MiningState extends protobuf_1.Message {
415
416
  sessionsCompleted = 0;
416
417
  streakDays = 0;
417
418
  inactive = false;
419
+ status = "";
420
+ statusReason = "";
418
421
  constructor(data) {
419
422
  super();
420
423
  protobuf_1.proto3.util.initPartial(data, this);
@@ -439,6 +442,8 @@ class MiningState extends protobuf_1.Message {
439
442
  { no: 15, name: "sessions_completed", kind: "scalar", T: 5 },
440
443
  { no: 16, name: "streak_days", kind: "scalar", T: 5 },
441
444
  { no: 17, name: "inactive", kind: "scalar", T: 8 },
445
+ { no: 18, name: "status", kind: "scalar", T: 9 },
446
+ { no: 19, name: "status_reason", kind: "scalar", T: 9 },
442
447
  ]);
443
448
  static fromBinary(bytes, options) {
444
449
  return new MiningState().fromBinary(bytes, options);
@@ -1460,6 +1465,455 @@ class AdminTasksResponse extends protobuf_1.Message {
1460
1465
  }
1461
1466
  }
1462
1467
  exports.AdminTasksResponse = AdminTasksResponse;
1468
+ class AdminUsersRequest extends protobuf_1.Message {
1469
+ query = "";
1470
+ status = "";
1471
+ page = 0;
1472
+ perPage = 0;
1473
+ constructor(data) {
1474
+ super();
1475
+ protobuf_1.proto3.util.initPartial(data, this);
1476
+ }
1477
+ static runtime = protobuf_1.proto3;
1478
+ static typeName = "micro.v1.mining.AdminUsersRequest";
1479
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
1480
+ { no: 1, name: "query", kind: "scalar", T: 9 },
1481
+ { no: 2, name: "status", kind: "scalar", T: 9 },
1482
+ { no: 3, name: "page", kind: "scalar", T: 5 },
1483
+ { no: 4, name: "per_page", kind: "scalar", T: 5 },
1484
+ ]);
1485
+ static fromBinary(bytes, options) {
1486
+ return new AdminUsersRequest().fromBinary(bytes, options);
1487
+ }
1488
+ static fromJson(jsonValue, options) {
1489
+ return new AdminUsersRequest().fromJson(jsonValue, options);
1490
+ }
1491
+ static fromJsonString(jsonString, options) {
1492
+ return new AdminUsersRequest().fromJsonString(jsonString, options);
1493
+ }
1494
+ static equals(a, b) {
1495
+ return protobuf_1.proto3.util.equals(AdminUsersRequest, a, b);
1496
+ }
1497
+ }
1498
+ exports.AdminUsersRequest = AdminUsersRequest;
1499
+ class AdminUserItem extends protobuf_1.Message {
1500
+ userId = "";
1501
+ username = "";
1502
+ badge = "";
1503
+ status = "";
1504
+ statusReason = "";
1505
+ code = "";
1506
+ createdAt = "";
1507
+ activatedAt = "";
1508
+ lastSeenAt = "";
1509
+ sessionsCompleted = 0;
1510
+ balance = "";
1511
+ invitees = 0;
1512
+ inviteesActive = 0;
1513
+ device = "";
1514
+ sameDevice = false;
1515
+ giftPaid = false;
1516
+ deviceSiblings = 0;
1517
+ referredBy = "";
1518
+ riskScore = 0;
1519
+ referredByUsername = "";
1520
+ constructor(data) {
1521
+ super();
1522
+ protobuf_1.proto3.util.initPartial(data, this);
1523
+ }
1524
+ static runtime = protobuf_1.proto3;
1525
+ static typeName = "micro.v1.mining.AdminUserItem";
1526
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
1527
+ { no: 1, name: "user_id", kind: "scalar", T: 9 },
1528
+ { no: 2, name: "username", kind: "scalar", T: 9 },
1529
+ { no: 3, name: "badge", kind: "scalar", T: 9 },
1530
+ { no: 4, name: "status", kind: "scalar", T: 9 },
1531
+ { no: 5, name: "status_reason", kind: "scalar", T: 9 },
1532
+ { no: 6, name: "code", kind: "scalar", T: 9 },
1533
+ { no: 7, name: "created_at", kind: "scalar", T: 9 },
1534
+ { no: 8, name: "activated_at", kind: "scalar", T: 9 },
1535
+ { no: 9, name: "last_seen_at", kind: "scalar", T: 9 },
1536
+ { no: 10, name: "sessions_completed", kind: "scalar", T: 5 },
1537
+ { no: 11, name: "balance", kind: "scalar", T: 9 },
1538
+ { no: 12, name: "invitees", kind: "scalar", T: 5 },
1539
+ { no: 13, name: "invitees_active", kind: "scalar", T: 5 },
1540
+ { no: 14, name: "device", kind: "scalar", T: 9 },
1541
+ { no: 15, name: "same_device", kind: "scalar", T: 8 },
1542
+ { no: 16, name: "gift_paid", kind: "scalar", T: 8 },
1543
+ { no: 17, name: "device_siblings", kind: "scalar", T: 5 },
1544
+ { no: 18, name: "referred_by", kind: "scalar", T: 9 },
1545
+ { no: 20, name: "risk_score", kind: "scalar", T: 5 },
1546
+ { no: 19, name: "referred_by_username", kind: "scalar", T: 9 },
1547
+ ]);
1548
+ static fromBinary(bytes, options) {
1549
+ return new AdminUserItem().fromBinary(bytes, options);
1550
+ }
1551
+ static fromJson(jsonValue, options) {
1552
+ return new AdminUserItem().fromJson(jsonValue, options);
1553
+ }
1554
+ static fromJsonString(jsonString, options) {
1555
+ return new AdminUserItem().fromJsonString(jsonString, options);
1556
+ }
1557
+ static equals(a, b) {
1558
+ return protobuf_1.proto3.util.equals(AdminUserItem, a, b);
1559
+ }
1560
+ }
1561
+ exports.AdminUserItem = AdminUserItem;
1562
+ class AdminUsersResponse extends protobuf_1.Message {
1563
+ status;
1564
+ data = [];
1565
+ pagination;
1566
+ constructor(data) {
1567
+ super();
1568
+ protobuf_1.proto3.util.initPartial(data, this);
1569
+ }
1570
+ static runtime = protobuf_1.proto3;
1571
+ static typeName = "micro.v1.mining.AdminUsersResponse";
1572
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
1573
+ { no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
1574
+ { no: 2, name: "data", kind: "message", T: AdminUserItem, repeated: true },
1575
+ { no: 3, name: "pagination", kind: "message", T: general_pb_js_1.PaginationMetaResult },
1576
+ ]);
1577
+ static fromBinary(bytes, options) {
1578
+ return new AdminUsersResponse().fromBinary(bytes, options);
1579
+ }
1580
+ static fromJson(jsonValue, options) {
1581
+ return new AdminUsersResponse().fromJson(jsonValue, options);
1582
+ }
1583
+ static fromJsonString(jsonString, options) {
1584
+ return new AdminUsersResponse().fromJsonString(jsonString, options);
1585
+ }
1586
+ static equals(a, b) {
1587
+ return protobuf_1.proto3.util.equals(AdminUsersResponse, a, b);
1588
+ }
1589
+ }
1590
+ exports.AdminUsersResponse = AdminUsersResponse;
1591
+ class AdminActionItem extends protobuf_1.Message {
1592
+ id = "";
1593
+ action = "";
1594
+ reason = "";
1595
+ note = "";
1596
+ byUserId = "";
1597
+ byUsername = "";
1598
+ reversedTotal = "";
1599
+ detail = "";
1600
+ createdAt = "";
1601
+ constructor(data) {
1602
+ super();
1603
+ protobuf_1.proto3.util.initPartial(data, this);
1604
+ }
1605
+ static runtime = protobuf_1.proto3;
1606
+ static typeName = "micro.v1.mining.AdminActionItem";
1607
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
1608
+ { no: 1, name: "id", kind: "scalar", T: 9 },
1609
+ { no: 2, name: "action", kind: "scalar", T: 9 },
1610
+ { no: 3, name: "reason", kind: "scalar", T: 9 },
1611
+ { no: 4, name: "note", kind: "scalar", T: 9 },
1612
+ { no: 5, name: "by_user_id", kind: "scalar", T: 9 },
1613
+ { no: 6, name: "by_username", kind: "scalar", T: 9 },
1614
+ { no: 7, name: "reversed_total", kind: "scalar", T: 9 },
1615
+ { no: 8, name: "detail", kind: "scalar", T: 9 },
1616
+ { no: 9, name: "created_at", kind: "scalar", T: 9 },
1617
+ ]);
1618
+ static fromBinary(bytes, options) {
1619
+ return new AdminActionItem().fromBinary(bytes, options);
1620
+ }
1621
+ static fromJson(jsonValue, options) {
1622
+ return new AdminActionItem().fromJson(jsonValue, options);
1623
+ }
1624
+ static fromJsonString(jsonString, options) {
1625
+ return new AdminActionItem().fromJsonString(jsonString, options);
1626
+ }
1627
+ static equals(a, b) {
1628
+ return protobuf_1.proto3.util.equals(AdminActionItem, a, b);
1629
+ }
1630
+ }
1631
+ exports.AdminActionItem = AdminActionItem;
1632
+ class AdminUserResponse extends protobuf_1.Message {
1633
+ status;
1634
+ profile;
1635
+ invitees = [];
1636
+ deviceSiblings = [];
1637
+ ledger = [];
1638
+ actions = [];
1639
+ credits = [];
1640
+ pendingTotal = "";
1641
+ totalReceivedGifts = "";
1642
+ risk;
1643
+ constructor(data) {
1644
+ super();
1645
+ protobuf_1.proto3.util.initPartial(data, this);
1646
+ }
1647
+ static runtime = protobuf_1.proto3;
1648
+ static typeName = "micro.v1.mining.AdminUserResponse";
1649
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
1650
+ { no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
1651
+ { no: 2, name: "profile", kind: "message", T: AdminUserItem, opt: true },
1652
+ { no: 3, name: "invitees", kind: "message", T: AdminUserItem, repeated: true },
1653
+ { no: 4, name: "device_siblings", kind: "message", T: AdminUserItem, repeated: true },
1654
+ { no: 5, name: "ledger", kind: "message", T: HistoryItem, repeated: true },
1655
+ { no: 6, name: "actions", kind: "message", T: AdminActionItem, repeated: true },
1656
+ { no: 7, name: "credits", kind: "message", T: AdminCreditSource, repeated: true },
1657
+ { no: 8, name: "pending_total", kind: "scalar", T: 9 },
1658
+ { no: 9, name: "total_received_gifts", kind: "scalar", T: 9 },
1659
+ { no: 10, name: "risk", kind: "message", T: AdminRiskFlag, opt: true },
1660
+ ]);
1661
+ static fromBinary(bytes, options) {
1662
+ return new AdminUserResponse().fromBinary(bytes, options);
1663
+ }
1664
+ static fromJson(jsonValue, options) {
1665
+ return new AdminUserResponse().fromJson(jsonValue, options);
1666
+ }
1667
+ static fromJsonString(jsonString, options) {
1668
+ return new AdminUserResponse().fromJsonString(jsonString, options);
1669
+ }
1670
+ static equals(a, b) {
1671
+ return protobuf_1.proto3.util.equals(AdminUserResponse, a, b);
1672
+ }
1673
+ }
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;
1797
+ class AdminCreditSource extends protobuf_1.Message {
1798
+ fromUserId = "";
1799
+ fromUsername = "";
1800
+ level1 = "";
1801
+ level2 = "";
1802
+ gifts = "";
1803
+ constructor(data) {
1804
+ super();
1805
+ protobuf_1.proto3.util.initPartial(data, this);
1806
+ }
1807
+ static runtime = protobuf_1.proto3;
1808
+ static typeName = "micro.v1.mining.AdminCreditSource";
1809
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
1810
+ { no: 1, name: "from_user_id", kind: "scalar", T: 9 },
1811
+ { no: 2, name: "from_username", kind: "scalar", T: 9 },
1812
+ { no: 3, name: "level1", kind: "scalar", T: 9 },
1813
+ { no: 4, name: "level2", kind: "scalar", T: 9 },
1814
+ { no: 5, name: "gifts", kind: "scalar", T: 9 },
1815
+ ]);
1816
+ static fromBinary(bytes, options) {
1817
+ return new AdminCreditSource().fromBinary(bytes, options);
1818
+ }
1819
+ static fromJson(jsonValue, options) {
1820
+ return new AdminCreditSource().fromJson(jsonValue, options);
1821
+ }
1822
+ static fromJsonString(jsonString, options) {
1823
+ return new AdminCreditSource().fromJsonString(jsonString, options);
1824
+ }
1825
+ static equals(a, b) {
1826
+ return protobuf_1.proto3.util.equals(AdminCreditSource, a, b);
1827
+ }
1828
+ }
1829
+ exports.AdminCreditSource = AdminCreditSource;
1830
+ class AdminModerateRequest extends protobuf_1.Message {
1831
+ userId = "";
1832
+ action = "";
1833
+ reason = "";
1834
+ note = "";
1835
+ cascadeInvitees = false;
1836
+ constructor(data) {
1837
+ super();
1838
+ protobuf_1.proto3.util.initPartial(data, this);
1839
+ }
1840
+ static runtime = protobuf_1.proto3;
1841
+ static typeName = "micro.v1.mining.AdminModerateRequest";
1842
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
1843
+ { no: 1, name: "user_id", kind: "scalar", T: 9 },
1844
+ { no: 2, name: "action", kind: "scalar", T: 9 },
1845
+ { no: 3, name: "reason", kind: "scalar", T: 9 },
1846
+ { no: 4, name: "note", kind: "scalar", T: 9 },
1847
+ { no: 5, name: "cascade_invitees", kind: "scalar", T: 8 },
1848
+ ]);
1849
+ static fromBinary(bytes, options) {
1850
+ return new AdminModerateRequest().fromBinary(bytes, options);
1851
+ }
1852
+ static fromJson(jsonValue, options) {
1853
+ return new AdminModerateRequest().fromJson(jsonValue, options);
1854
+ }
1855
+ static fromJsonString(jsonString, options) {
1856
+ return new AdminModerateRequest().fromJsonString(jsonString, options);
1857
+ }
1858
+ static equals(a, b) {
1859
+ return protobuf_1.proto3.util.equals(AdminModerateRequest, a, b);
1860
+ }
1861
+ }
1862
+ exports.AdminModerateRequest = AdminModerateRequest;
1863
+ class AdminDeviceCluster extends protobuf_1.Message {
1864
+ device = "";
1865
+ users = [];
1866
+ constructor(data) {
1867
+ super();
1868
+ protobuf_1.proto3.util.initPartial(data, this);
1869
+ }
1870
+ static runtime = protobuf_1.proto3;
1871
+ static typeName = "micro.v1.mining.AdminDeviceCluster";
1872
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
1873
+ { no: 1, name: "device", kind: "scalar", T: 9 },
1874
+ { no: 2, name: "users", kind: "message", T: AdminUserItem, repeated: true },
1875
+ ]);
1876
+ static fromBinary(bytes, options) {
1877
+ return new AdminDeviceCluster().fromBinary(bytes, options);
1878
+ }
1879
+ static fromJson(jsonValue, options) {
1880
+ return new AdminDeviceCluster().fromJson(jsonValue, options);
1881
+ }
1882
+ static fromJsonString(jsonString, options) {
1883
+ return new AdminDeviceCluster().fromJsonString(jsonString, options);
1884
+ }
1885
+ static equals(a, b) {
1886
+ return protobuf_1.proto3.util.equals(AdminDeviceCluster, a, b);
1887
+ }
1888
+ }
1889
+ exports.AdminDeviceCluster = AdminDeviceCluster;
1890
+ class AdminDeviceClustersResponse extends protobuf_1.Message {
1891
+ status;
1892
+ data = [];
1893
+ constructor(data) {
1894
+ super();
1895
+ protobuf_1.proto3.util.initPartial(data, this);
1896
+ }
1897
+ static runtime = protobuf_1.proto3;
1898
+ static typeName = "micro.v1.mining.AdminDeviceClustersResponse";
1899
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
1900
+ { no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
1901
+ { no: 2, name: "data", kind: "message", T: AdminDeviceCluster, repeated: true },
1902
+ ]);
1903
+ static fromBinary(bytes, options) {
1904
+ return new AdminDeviceClustersResponse().fromBinary(bytes, options);
1905
+ }
1906
+ static fromJson(jsonValue, options) {
1907
+ return new AdminDeviceClustersResponse().fromJson(jsonValue, options);
1908
+ }
1909
+ static fromJsonString(jsonString, options) {
1910
+ return new AdminDeviceClustersResponse().fromJsonString(jsonString, options);
1911
+ }
1912
+ static equals(a, b) {
1913
+ return protobuf_1.proto3.util.equals(AdminDeviceClustersResponse, a, b);
1914
+ }
1915
+ }
1916
+ exports.AdminDeviceClustersResponse = AdminDeviceClustersResponse;
1463
1917
  class AdminSetTaskRequest extends protobuf_1.Message {
1464
1918
  id = "";
1465
1919
  multiplier = "";
@@ -1,5 +1,5 @@
1
1
  import { ByIdRequest, EmptyRequest, EmptyResponse } from "../general_pb.js";
2
- import { AdminOverviewRequest, AdminOverviewResponse, AdminSetTaskRequest, AdminTasksResponse, 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";
@@ -124,6 +124,36 @@ export declare const PMiningService: {
124
124
  readonly O: typeof AdminTasksResponse;
125
125
  readonly kind: MethodKind.ServerStreaming;
126
126
  };
127
+ readonly adminUsers: {
128
+ readonly name: "AdminUsers";
129
+ readonly I: typeof AdminUsersRequest;
130
+ readonly O: typeof AdminUsersResponse;
131
+ readonly kind: MethodKind.ServerStreaming;
132
+ };
133
+ readonly adminUser: {
134
+ readonly name: "AdminUser";
135
+ readonly I: typeof ByIdRequest;
136
+ readonly O: typeof AdminUserResponse;
137
+ readonly kind: MethodKind.ServerStreaming;
138
+ };
139
+ readonly adminModerate: {
140
+ readonly name: "AdminModerate";
141
+ readonly I: typeof AdminModerateRequest;
142
+ readonly O: typeof AdminUserResponse;
143
+ readonly kind: MethodKind.ServerStreaming;
144
+ };
145
+ readonly adminDeviceClusters: {
146
+ readonly name: "AdminDeviceClusters";
147
+ readonly I: typeof EmptyRequest;
148
+ readonly O: typeof AdminDeviceClustersResponse;
149
+ readonly kind: MethodKind.ServerStreaming;
150
+ };
151
+ readonly adminRiskQueue: {
152
+ readonly name: "AdminRiskQueue";
153
+ readonly I: typeof AdminRiskQueueRequest;
154
+ readonly O: typeof AdminRiskQueueResponse;
155
+ readonly kind: MethodKind.ServerStreaming;
156
+ };
127
157
  readonly removeUserData: {
128
158
  readonly name: "RemoveUserData";
129
159
  readonly I: typeof ByIdRequest;
@@ -127,6 +127,36 @@ exports.PMiningService = {
127
127
  O: mining_messages_pb_js_1.AdminTasksResponse,
128
128
  kind: protobuf_1.MethodKind.ServerStreaming,
129
129
  },
130
+ adminUsers: {
131
+ name: "AdminUsers",
132
+ I: mining_messages_pb_js_1.AdminUsersRequest,
133
+ O: mining_messages_pb_js_1.AdminUsersResponse,
134
+ kind: protobuf_1.MethodKind.ServerStreaming,
135
+ },
136
+ adminUser: {
137
+ name: "AdminUser",
138
+ I: general_pb_js_1.ByIdRequest,
139
+ O: mining_messages_pb_js_1.AdminUserResponse,
140
+ kind: protobuf_1.MethodKind.ServerStreaming,
141
+ },
142
+ adminModerate: {
143
+ name: "AdminModerate",
144
+ I: mining_messages_pb_js_1.AdminModerateRequest,
145
+ O: mining_messages_pb_js_1.AdminUserResponse,
146
+ kind: protobuf_1.MethodKind.ServerStreaming,
147
+ },
148
+ adminDeviceClusters: {
149
+ name: "AdminDeviceClusters",
150
+ I: general_pb_js_1.EmptyRequest,
151
+ O: mining_messages_pb_js_1.AdminDeviceClustersResponse,
152
+ kind: protobuf_1.MethodKind.ServerStreaming,
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
+ },
130
160
  removeUserData: {
131
161
  name: "RemoveUserData",
132
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 { AdminOverviewRequest, AdminOverviewResponse, AdminSetTaskRequest, AdminTasksResponse, 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 {
@@ -25,6 +25,11 @@ export interface PMiningServiceClient {
25
25
  adminSetParameter(request: SetParameterRequest, metadata?: Metadata): Observable<ParametersResponse>;
26
26
  adminTasks(request: EmptyRequest, metadata?: Metadata): Observable<AdminTasksResponse>;
27
27
  adminSetTask(request: AdminSetTaskRequest, metadata?: Metadata): Observable<AdminTasksResponse>;
28
+ adminUsers(request: AdminUsersRequest, metadata?: Metadata): Observable<AdminUsersResponse>;
29
+ adminUser(request: ByIdRequest, metadata?: Metadata): Observable<AdminUserResponse>;
30
+ adminModerate(request: AdminModerateRequest, metadata?: Metadata): Observable<AdminUserResponse>;
31
+ adminDeviceClusters(request: EmptyRequest, metadata?: Metadata): Observable<AdminDeviceClustersResponse>;
32
+ adminRiskQueue(request: AdminRiskQueueRequest, metadata?: Metadata): Observable<AdminRiskQueueResponse>;
28
33
  removeUserData(request: ByIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
29
34
  }
30
35
  export interface PMiningServiceController {
@@ -48,6 +53,11 @@ export interface PMiningServiceController {
48
53
  adminSetParameter(request: SetParameterRequest, metadata?: Metadata): Observable<ParametersResponse>;
49
54
  adminTasks(request: EmptyRequest, metadata?: Metadata): Observable<AdminTasksResponse>;
50
55
  adminSetTask(request: AdminSetTaskRequest, metadata?: Metadata): Observable<AdminTasksResponse>;
56
+ adminUsers(request: AdminUsersRequest, metadata?: Metadata): Observable<AdminUsersResponse>;
57
+ adminUser(request: ByIdRequest, metadata?: Metadata): Observable<AdminUserResponse>;
58
+ adminModerate(request: AdminModerateRequest, metadata?: Metadata): Observable<AdminUserResponse>;
59
+ adminDeviceClusters(request: EmptyRequest, metadata?: Metadata): Observable<AdminDeviceClustersResponse>;
60
+ adminRiskQueue(request: AdminRiskQueueRequest, metadata?: Metadata): Observable<AdminRiskQueueResponse>;
51
61
  removeUserData(request: ByIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
52
62
  }
53
63
  export declare function PMiningServiceControllerMethods(): (constructor: Function) => void;
@@ -28,6 +28,11 @@ function PMiningServiceControllerMethods() {
28
28
  "adminSetParameter",
29
29
  "adminTasks",
30
30
  "adminSetTask",
31
+ "adminUsers",
32
+ "adminUser",
33
+ "adminModerate",
34
+ "adminDeviceClusters",
35
+ "adminRiskQueue",
31
36
  "removeUserData",
32
37
  ];
33
38
  for (const method of grpcMethods) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jr-common-micro",
3
- "version": "1.1.100",
3
+ "version": "1.1.102",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -190,6 +190,11 @@ message MiningState {
190
190
  int32 streak_days = 16;
191
191
  // Email not verified yet: nothing runs until it is.
192
192
  bool inactive = 17;
193
+ // normal | restricted | banned (a review decision; mining stops, the
194
+ // person is told and may appeal through support).
195
+ string status = 18;
196
+ // Reason code of the decision ('' while normal).
197
+ string status_reason = 19;
193
198
  }
194
199
 
195
200
  message MiningMeResponse {
@@ -453,6 +458,149 @@ message AdminTasksResponse {
453
458
  repeated AdminTaskItem data = 2;
454
459
  }
455
460
 
461
+ // ---- admin review ---------------------------------------------------------
462
+
463
+ message AdminUsersRequest {
464
+ // Username, user id, invite code or device hash prefix; '' = newest.
465
+ string query = 1;
466
+ // all | normal | restricted | banned
467
+ string status = 2;
468
+ int32 page = 3;
469
+ int32 per_page = 4;
470
+ }
471
+
472
+ // One person in a list (search result, invitee, device sibling).
473
+ message AdminUserItem {
474
+ string user_id = 1;
475
+ string username = 2;
476
+ string badge = 3;
477
+ // normal | restricted | banned
478
+ string status = 4;
479
+ string status_reason = 5;
480
+ string code = 6;
481
+ string created_at = 7;
482
+ string activated_at = 8;
483
+ string last_seen_at = 9;
484
+ int32 sessions_completed = 10;
485
+ string balance = 11;
486
+ int32 invitees = 12;
487
+ // Of the invitees, how many are activated.
488
+ int32 invitees_active = 13;
489
+ // Hash of the install this account was first seen on (shortened).
490
+ string device = 14;
491
+ // In an invitee list: this invitee is on the same device as the referrer.
492
+ bool same_device = 15;
493
+ // In an invitee list: the referrer's gift for this invitee was paid.
494
+ bool gift_paid = 16;
495
+ // Other mining accounts on the same device.
496
+ int32 device_siblings = 17;
497
+ string referred_by = 18;
498
+ // The nightly scorer's score (0 = no flag).
499
+ int32 risk_score = 20;
500
+ string referred_by_username = 19;
501
+ }
502
+
503
+ message AdminUsersResponse {
504
+ ResponseStatus status = 1;
505
+ repeated AdminUserItem data = 2;
506
+ PaginationMetaResult pagination = 3;
507
+ }
508
+
509
+ // A past review decision on a person.
510
+ message AdminActionItem {
511
+ string id = 1;
512
+ // clear | restrict | ban | unban
513
+ string action = 2;
514
+ string reason = 3;
515
+ string note = 4;
516
+ string by_user_id = 5;
517
+ string by_username = 6;
518
+ // JR taken back by this decision (sum over everyone it touched).
519
+ string reversed_total = 7;
520
+ // JSON: per reversal {user_id, kind, requested, taken, shortfall}.
521
+ string detail = 8;
522
+ string created_at = 9;
523
+ }
524
+
525
+ message AdminUserResponse {
526
+ ResponseStatus status = 1;
527
+ optional AdminUserItem profile = 2;
528
+ repeated AdminUserItem invitees = 3;
529
+ repeated AdminUserItem device_siblings = 4;
530
+ // Newest first, the last 50.
531
+ repeated HistoryItem ledger = 5;
532
+ repeated AdminActionItem actions = 6;
533
+ // Referral money this person received, by source (for the review).
534
+ repeated AdminCreditSource credits = 7;
535
+ string pending_total = 8;
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;
572
+ }
573
+
574
+ message AdminCreditSource {
575
+ string from_user_id = 1;
576
+ string from_username = 2;
577
+ string level1 = 3;
578
+ string level2 = 4;
579
+ string gifts = 5;
580
+ }
581
+
582
+ message AdminModerateRequest {
583
+ string user_id = 1;
584
+ // clear | restrict | ban | unban
585
+ string action = 2;
586
+ // fake_accounts | same_device | self_referral | farm | appeal_accepted | other
587
+ string reason = 3;
588
+ string note = 4;
589
+ // ban only: also ban this person's invitees that look like ghosts
590
+ // (never activated or on the same device), each with its own reversal.
591
+ bool cascade_invitees = 5;
592
+ }
593
+
594
+ message AdminDeviceCluster {
595
+ string device = 1;
596
+ repeated AdminUserItem users = 2;
597
+ }
598
+
599
+ message AdminDeviceClustersResponse {
600
+ ResponseStatus status = 1;
601
+ repeated AdminDeviceCluster data = 2;
602
+ }
603
+
456
604
  // Only the editable fields; empty strings / unset leave a field as it is.
457
605
  // A new multiplier applies to completions from now on; one already in
458
606
  // force keeps the value it was done at.
@@ -43,6 +43,18 @@ service PMiningService {
43
43
  rpc AdminSetParameter(SetParameterRequest) returns(stream ParametersResponse) {}
44
44
  rpc AdminTasks(EmptyRequest) returns(stream AdminTasksResponse) {}
45
45
  rpc AdminSetTask(AdminSetTaskRequest) returns(stream AdminTasksResponse) {}
46
+ // Admin review (the "overwatch"): find people, see one person's invitees,
47
+ // device cluster, ledger and past decisions, and decide (clear, restrict,
48
+ // ban, unban) with the JR that came from fraud taken back.
49
+ rpc AdminUsers(AdminUsersRequest) returns(stream AdminUsersResponse) {}
50
+ rpc AdminUser(ByIdRequest) returns(stream AdminUserResponse) {}
51
+ rpc AdminModerate(AdminModerateRequest) returns(stream AdminUserResponse) {}
52
+ // Accounts that share an install (the first review signal).
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) {}
46
58
 
47
59
  // Account deletion parity with every other micro.
48
60
  rpc RemoveUserData(ByIdRequest) returns(stream EmptyResponse) {}