jr-common-micro 1.1.112 → 1.1.113

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.
@@ -329,6 +329,13 @@ export interface AdminTaskItem {
329
329
  active: boolean;
330
330
  sort: number;
331
331
  completions_7d: number;
332
+ titles: {
333
+ [key: string]: string;
334
+ };
335
+ }
336
+ export interface AdminTaskItem_TitlesEntry {
337
+ key: string;
338
+ value: string;
332
339
  }
333
340
  export interface AdminTasksResponse {
334
341
  status: ResponseStatus | undefined;
@@ -466,12 +473,26 @@ export interface AdminSetTaskRequest {
466
473
  title_en: string;
467
474
  max_count?: number | undefined;
468
475
  sort?: number | undefined;
476
+ titles: {
477
+ [key: string]: string;
478
+ };
479
+ }
480
+ export interface AdminSetTaskRequest_TitlesEntry {
481
+ key: string;
482
+ value: string;
469
483
  }
470
484
  export interface AdminGiftPreviewRequest {
471
485
  usernames: string[];
472
486
  all_miners: boolean;
473
487
  amount: string;
474
488
  note: string;
489
+ notes: {
490
+ [key: string]: string;
491
+ };
492
+ }
493
+ export interface AdminGiftPreviewRequest_NotesEntry {
494
+ key: string;
495
+ value: string;
475
496
  }
476
497
  export interface AdminGiftRecipient {
477
498
  user_id: string;
@@ -509,6 +530,13 @@ export interface AdminGift {
509
530
  total_paid: string;
510
531
  created_at: string;
511
532
  finished_at: string;
533
+ notes: {
534
+ [key: string]: string;
535
+ };
536
+ }
537
+ export interface AdminGift_NotesEntry {
538
+ key: string;
539
+ value: string;
512
540
  }
513
541
  export interface AdminGiftResponse {
514
542
  status: ResponseStatus | undefined;
@@ -674,6 +674,9 @@ export declare class AdminTaskItem extends Message<AdminTaskItem> {
674
674
  active: boolean;
675
675
  sort: number;
676
676
  completions7d: number;
677
+ titles: {
678
+ [key: string]: string;
679
+ };
677
680
  constructor(data?: PartialMessage<AdminTaskItem>);
678
681
  static readonly runtime: typeof proto3;
679
682
  static readonly typeName = "micro.v1.mining.AdminTaskItem";
@@ -947,6 +950,9 @@ export declare class AdminSetTaskRequest extends Message<AdminSetTaskRequest> {
947
950
  titleEn: string;
948
951
  maxCount?: number;
949
952
  sort?: number;
953
+ titles: {
954
+ [key: string]: string;
955
+ };
950
956
  constructor(data?: PartialMessage<AdminSetTaskRequest>);
951
957
  static readonly runtime: typeof proto3;
952
958
  static readonly typeName = "micro.v1.mining.AdminSetTaskRequest";
@@ -961,6 +967,9 @@ export declare class AdminGiftPreviewRequest extends Message<AdminGiftPreviewReq
961
967
  allMiners: boolean;
962
968
  amount: string;
963
969
  note: string;
970
+ notes: {
971
+ [key: string]: string;
972
+ };
964
973
  constructor(data?: PartialMessage<AdminGiftPreviewRequest>);
965
974
  static readonly runtime: typeof proto3;
966
975
  static readonly typeName = "micro.v1.mining.AdminGiftPreviewRequest";
@@ -1030,6 +1039,9 @@ export declare class AdminGift extends Message<AdminGift> {
1030
1039
  totalPaid: string;
1031
1040
  createdAt: string;
1032
1041
  finishedAt: string;
1042
+ notes: {
1043
+ [key: string]: string;
1044
+ };
1033
1045
  constructor(data?: PartialMessage<AdminGift>);
1034
1046
  static readonly runtime: typeof proto3;
1035
1047
  static readonly typeName = "micro.v1.mining.AdminGift";
@@ -1467,6 +1467,7 @@ class AdminTaskItem extends protobuf_1.Message {
1467
1467
  active = false;
1468
1468
  sort = 0;
1469
1469
  completions7d = 0;
1470
+ titles = {};
1470
1471
  constructor(data) {
1471
1472
  super();
1472
1473
  protobuf_1.proto3.util.initPartial(data, this);
@@ -1485,6 +1486,7 @@ class AdminTaskItem extends protobuf_1.Message {
1485
1486
  { no: 9, name: "active", kind: "scalar", T: 8 },
1486
1487
  { no: 10, name: "sort", kind: "scalar", T: 5 },
1487
1488
  { no: 11, name: "completions_7d", kind: "scalar", T: 5 },
1489
+ { no: 12, name: "titles", kind: "map", K: 9, V: { kind: "scalar", T: 9 } },
1488
1490
  ]);
1489
1491
  static fromBinary(bytes, options) {
1490
1492
  return new AdminTaskItem().fromBinary(bytes, options);
@@ -2068,6 +2070,7 @@ class AdminSetTaskRequest extends protobuf_1.Message {
2068
2070
  titleEn = "";
2069
2071
  maxCount;
2070
2072
  sort;
2073
+ titles = {};
2071
2074
  constructor(data) {
2072
2075
  super();
2073
2076
  protobuf_1.proto3.util.initPartial(data, this);
@@ -2082,6 +2085,7 @@ class AdminSetTaskRequest extends protobuf_1.Message {
2082
2085
  { no: 5, name: "title_en", kind: "scalar", T: 9 },
2083
2086
  { no: 6, name: "max_count", kind: "scalar", T: 5, opt: true },
2084
2087
  { no: 7, name: "sort", kind: "scalar", T: 5, opt: true },
2088
+ { no: 8, name: "titles", kind: "map", K: 9, V: { kind: "scalar", T: 9 } },
2085
2089
  ]);
2086
2090
  static fromBinary(bytes, options) {
2087
2091
  return new AdminSetTaskRequest().fromBinary(bytes, options);
@@ -2102,6 +2106,7 @@ class AdminGiftPreviewRequest extends protobuf_1.Message {
2102
2106
  allMiners = false;
2103
2107
  amount = "";
2104
2108
  note = "";
2109
+ notes = {};
2105
2110
  constructor(data) {
2106
2111
  super();
2107
2112
  protobuf_1.proto3.util.initPartial(data, this);
@@ -2113,6 +2118,7 @@ class AdminGiftPreviewRequest extends protobuf_1.Message {
2113
2118
  { no: 2, name: "all_miners", kind: "scalar", T: 8 },
2114
2119
  { no: 3, name: "amount", kind: "scalar", T: 9 },
2115
2120
  { no: 4, name: "note", kind: "scalar", T: 9 },
2121
+ { no: 5, name: "notes", kind: "map", K: 9, V: { kind: "scalar", T: 9 } },
2116
2122
  ]);
2117
2123
  static fromBinary(bytes, options) {
2118
2124
  return new AdminGiftPreviewRequest().fromBinary(bytes, options);
@@ -2244,6 +2250,7 @@ class AdminGift extends protobuf_1.Message {
2244
2250
  totalPaid = "";
2245
2251
  createdAt = "";
2246
2252
  finishedAt = "";
2253
+ notes = {};
2247
2254
  constructor(data) {
2248
2255
  super();
2249
2256
  protobuf_1.proto3.util.initPartial(data, this);
@@ -2263,6 +2270,7 @@ class AdminGift extends protobuf_1.Message {
2263
2270
  { no: 10, name: "total_paid", kind: "scalar", T: 9 },
2264
2271
  { no: 11, name: "created_at", kind: "scalar", T: 9 },
2265
2272
  { no: 12, name: "finished_at", kind: "scalar", T: 9 },
2273
+ { no: 13, name: "notes", kind: "map", K: 9, V: { kind: "scalar", T: 9 } },
2266
2274
  ]);
2267
2275
  static fromBinary(bytes, options) {
2268
2276
  return new AdminGift().fromBinary(bytes, options);
@@ -102,10 +102,23 @@ export interface SendNotificationRequest {
102
102
  criteria: string;
103
103
  title: string;
104
104
  notificationMessage: SendNotificationRequest_NotificationMessage | undefined;
105
+ titles: {
106
+ [key: string]: string;
107
+ };
105
108
  }
106
109
  export interface SendNotificationRequest_NotificationMessage {
107
110
  en: string;
108
111
  tr: string;
112
+ es: string;
113
+ pt: string;
114
+ de: string;
115
+ ru: string;
116
+ id: string;
117
+ vi: string;
118
+ }
119
+ export interface SendNotificationRequest_TitlesEntry {
120
+ key: string;
121
+ value: string;
109
122
  }
110
123
  export interface SendUserPushRequest {
111
124
  user_ids: string[];
@@ -120,11 +133,25 @@ export interface SendUserPushRequest {
120
133
  collapse_id: string;
121
134
  ttl_seconds: number;
122
135
  priority: string;
136
+ titles: {
137
+ [key: string]: string;
138
+ };
139
+ bodies: {
140
+ [key: string]: string;
141
+ };
123
142
  }
124
143
  export interface SendUserPushRequest_DataEntry {
125
144
  key: string;
126
145
  value: string;
127
146
  }
147
+ export interface SendUserPushRequest_TitlesEntry {
148
+ key: string;
149
+ value: string;
150
+ }
151
+ export interface SendUserPushRequest_BodiesEntry {
152
+ key: string;
153
+ value: string;
154
+ }
128
155
  export interface SendChatMentionRequest {
129
156
  user_ids: string[];
130
157
  sender_username: string;
@@ -215,6 +215,9 @@ export declare class SendNotificationRequest extends Message<SendNotificationReq
215
215
  criteria: string;
216
216
  title: string;
217
217
  notificationMessage?: SendNotificationRequest_NotificationMessage;
218
+ titles: {
219
+ [key: string]: string;
220
+ };
218
221
  constructor(data?: PartialMessage<SendNotificationRequest>);
219
222
  static readonly runtime: typeof proto3;
220
223
  static readonly typeName = "micro.v1.notification.SendNotificationRequest";
@@ -227,6 +230,12 @@ export declare class SendNotificationRequest extends Message<SendNotificationReq
227
230
  export declare class SendNotificationRequest_NotificationMessage extends Message<SendNotificationRequest_NotificationMessage> {
228
231
  en: string;
229
232
  tr: string;
233
+ es: string;
234
+ pt: string;
235
+ de: string;
236
+ ru: string;
237
+ id: string;
238
+ vi: string;
230
239
  constructor(data?: PartialMessage<SendNotificationRequest_NotificationMessage>);
231
240
  static readonly runtime: typeof proto3;
232
241
  static readonly typeName = "micro.v1.notification.SendNotificationRequest.NotificationMessage";
@@ -249,6 +258,12 @@ export declare class SendUserPushRequest extends Message<SendUserPushRequest> {
249
258
  collapseId: string;
250
259
  ttlSeconds: number;
251
260
  priority: string;
261
+ titles: {
262
+ [key: string]: string;
263
+ };
264
+ bodies: {
265
+ [key: string]: string;
266
+ };
252
267
  constructor(data?: PartialMessage<SendUserPushRequest>);
253
268
  static readonly runtime: typeof proto3;
254
269
  static readonly typeName = "micro.v1.notification.SendUserPushRequest";
@@ -469,6 +469,7 @@ class SendNotificationRequest extends protobuf_1.Message {
469
469
  criteria = "";
470
470
  title = "";
471
471
  notificationMessage;
472
+ titles = {};
472
473
  constructor(data) {
473
474
  super();
474
475
  protobuf_1.proto3.util.initPartial(data, this);
@@ -479,6 +480,7 @@ class SendNotificationRequest extends protobuf_1.Message {
479
480
  { no: 1, name: "criteria", kind: "scalar", T: 9 },
480
481
  { no: 2, name: "title", kind: "scalar", T: 9 },
481
482
  { no: 3, name: "notificationMessage", kind: "message", T: SendNotificationRequest_NotificationMessage },
483
+ { no: 4, name: "titles", kind: "map", K: 9, V: { kind: "scalar", T: 9 } },
482
484
  ]);
483
485
  static fromBinary(bytes, options) {
484
486
  return new SendNotificationRequest().fromBinary(bytes, options);
@@ -497,6 +499,12 @@ exports.SendNotificationRequest = SendNotificationRequest;
497
499
  class SendNotificationRequest_NotificationMessage extends protobuf_1.Message {
498
500
  en = "";
499
501
  tr = "";
502
+ es = "";
503
+ pt = "";
504
+ de = "";
505
+ ru = "";
506
+ id = "";
507
+ vi = "";
500
508
  constructor(data) {
501
509
  super();
502
510
  protobuf_1.proto3.util.initPartial(data, this);
@@ -506,6 +514,12 @@ class SendNotificationRequest_NotificationMessage extends protobuf_1.Message {
506
514
  static fields = protobuf_1.proto3.util.newFieldList(() => [
507
515
  { no: 1, name: "en", kind: "scalar", T: 9 },
508
516
  { no: 2, name: "tr", kind: "scalar", T: 9 },
517
+ { no: 3, name: "es", kind: "scalar", T: 9 },
518
+ { no: 4, name: "pt", kind: "scalar", T: 9 },
519
+ { no: 5, name: "de", kind: "scalar", T: 9 },
520
+ { no: 6, name: "ru", kind: "scalar", T: 9 },
521
+ { no: 7, name: "id", kind: "scalar", T: 9 },
522
+ { no: 8, name: "vi", kind: "scalar", T: 9 },
509
523
  ]);
510
524
  static fromBinary(bytes, options) {
511
525
  return new SendNotificationRequest_NotificationMessage().fromBinary(bytes, options);
@@ -532,6 +546,8 @@ class SendUserPushRequest extends protobuf_1.Message {
532
546
  collapseId = "";
533
547
  ttlSeconds = 0;
534
548
  priority = "";
549
+ titles = {};
550
+ bodies = {};
535
551
  constructor(data) {
536
552
  super();
537
553
  protobuf_1.proto3.util.initPartial(data, this);
@@ -549,6 +565,8 @@ class SendUserPushRequest extends protobuf_1.Message {
549
565
  { no: 8, name: "collapse_id", kind: "scalar", T: 9 },
550
566
  { no: 9, name: "ttl_seconds", kind: "scalar", T: 5 },
551
567
  { no: 10, name: "priority", kind: "scalar", T: 9 },
568
+ { no: 11, name: "titles", kind: "map", K: 9, V: { kind: "scalar", T: 9 } },
569
+ { no: 12, name: "bodies", kind: "map", K: 9, V: { kind: "scalar", T: 9 } },
552
570
  ]);
553
571
  static fromBinary(bytes, options) {
554
572
  return new SendUserPushRequest().fromBinary(bytes, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jr-common-micro",
3
- "version": "1.1.112",
3
+ "version": "1.1.113",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -472,6 +472,9 @@ message AdminTaskItem {
472
472
  int32 sort = 10;
473
473
  // Completions in the last 7 days (for the panel's context).
474
474
  int32 completions_7d = 11;
475
+ // The title in the app's other languages (es, pt, de, ru, id, vi); one
476
+ // missing reads title_en.
477
+ map<string, string> titles = 12;
475
478
  }
476
479
 
477
480
  message AdminTasksResponse {
@@ -682,6 +685,10 @@ message AdminSetTaskRequest {
682
685
  string title_en = 5;
683
686
  optional int32 max_count = 6;
684
687
  optional int32 sort = 7;
688
+ // The other languages' titles (es, pt, de, ru, id, vi). Any key sent
689
+ // replaces them all ('' = that language reads title_en); none sent
690
+ // leaves them as they are.
691
+ map<string, string> titles = 8;
685
692
  }
686
693
 
687
694
  // ---- admin gifts ------------------------------------------------------------
@@ -693,8 +700,13 @@ message AdminGiftPreviewRequest {
693
700
  bool all_miners = 2;
694
701
  // JR per person, at most the weekly limit.
695
702
  string amount = 3;
696
- // Why; required. In the panel's log and in the person's history.
703
+ // Why, optional ('' = no note). In the panel's log and the person's
704
+ // history; the push carries it too.
697
705
  string note = 4;
706
+ // The note per app language (tr, en, es, pt, de, ru, id, vi), all
707
+ // optional: a language without one reads the English, then the Turkish,
708
+ // then `note`.
709
+ map<string, string> notes = 5;
698
710
  }
699
711
 
700
712
  message AdminGiftRecipient {
@@ -744,6 +756,8 @@ message AdminGift {
744
756
  string total_paid = 10;
745
757
  string created_at = 11;
746
758
  string finished_at = 12;
759
+ // The note per language, as sent (see AdminGiftPreviewRequest).
760
+ map<string, string> notes = 13;
747
761
  }
748
762
 
749
763
  message AdminGiftResponse {
@@ -125,12 +125,23 @@ message SendTestNotificationRequest {
125
125
 
126
126
  message SendNotificationRequest {
127
127
  string criteria = 1;
128
+ // The Turkish title (and every language's, before `titles`).
128
129
  string title = 2;
130
+ // Body per app language; empty ones read the English, then the Turkish.
129
131
  message NotificationMessage {
130
132
  string en = 1;
131
133
  string tr = 2;
134
+ string es = 3;
135
+ string pt = 4;
136
+ string de = 5;
137
+ string ru = 6;
138
+ string id = 7;
139
+ string vi = 8;
132
140
  }
133
141
  NotificationMessage notificationMessage = 3;
142
+ // Title per language (en, es, pt, de, ru, id, vi); one missing reads the
143
+ // English, then `title`.
144
+ map<string, string> titles = 4;
134
145
  }
135
146
 
136
147
  // Generic targeted push: one text per language, the same data for every
@@ -150,6 +161,10 @@ message SendUserPushRequest {
150
161
  int32 ttl_seconds = 9;
151
162
  // default | normal | high
152
163
  string priority = 10;
164
+ // Language code (es, pt, de, ru, id, vi …) → text, for devices in the
165
+ // app's other languages; the _tr/_en fields above stay the fallback.
166
+ map<string, string> titles = 11;
167
+ map<string, string> bodies = 12;
153
168
  }
154
169
 
155
170
  // Targeted push for chat mentions (localized body built micro-side).