mezon-js-protobuf 1.7.19 → 1.7.21

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/api/api.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v1.181.2
4
- // protoc v3.20.3
4
+ // protoc v5.28.3
5
5
  // source: api/api.proto
6
6
 
7
7
  /* eslint-disable */
@@ -772,6 +772,8 @@ export interface DeleteGroupRequest {
772
772
  export interface DeleteNotificationsRequest {
773
773
  /** The id of notifications. */
774
774
  ids: string[];
775
+ /** The category of notifications. */
776
+ category: number;
775
777
  }
776
778
 
777
779
  /** Represents an event to be passed through the server to registered event handlers. */
@@ -1283,10 +1285,8 @@ export interface ListNotificationsRequest {
1283
1285
  clan_id: string;
1284
1286
  /** The current notification Id. */
1285
1287
  notification_id: string;
1286
- /** The code. */
1287
- code:
1288
- | number
1289
- | undefined;
1288
+ /** The category (0: for you, 1: mentions, 2: mesages). */
1289
+ category: number;
1290
1290
  /** True if listing should be older notifications to newer, false if reverse. */
1291
1291
  direction: number | undefined;
1292
1292
  }
@@ -1339,6 +1339,8 @@ export interface Notification {
1339
1339
  | undefined;
1340
1340
  /** */
1341
1341
  topic_id: string;
1342
+ /** category. */
1343
+ category: number;
1342
1344
  }
1343
1345
 
1344
1346
  /** A collection of zero or more notifications. */
@@ -9402,7 +9404,7 @@ export const DeleteGroupRequest = {
9402
9404
  };
9403
9405
 
9404
9406
  function createBaseDeleteNotificationsRequest(): DeleteNotificationsRequest {
9405
- return { ids: [] };
9407
+ return { ids: [], category: 0 };
9406
9408
  }
9407
9409
 
9408
9410
  export const DeleteNotificationsRequest = {
@@ -9410,6 +9412,9 @@ export const DeleteNotificationsRequest = {
9410
9412
  for (const v of message.ids) {
9411
9413
  writer.uint32(10).string(v!);
9412
9414
  }
9415
+ if (message.category !== 0) {
9416
+ writer.uint32(16).int32(message.category);
9417
+ }
9413
9418
  return writer;
9414
9419
  },
9415
9420
 
@@ -9427,6 +9432,13 @@ export const DeleteNotificationsRequest = {
9427
9432
 
9428
9433
  message.ids.push(reader.string());
9429
9434
  continue;
9435
+ case 2:
9436
+ if (tag !== 16) {
9437
+ break;
9438
+ }
9439
+
9440
+ message.category = reader.int32();
9441
+ continue;
9430
9442
  }
9431
9443
  if ((tag & 7) === 4 || tag === 0) {
9432
9444
  break;
@@ -9437,7 +9449,10 @@ export const DeleteNotificationsRequest = {
9437
9449
  },
9438
9450
 
9439
9451
  fromJSON(object: any): DeleteNotificationsRequest {
9440
- return { ids: globalThis.Array.isArray(object?.ids) ? object.ids.map((e: any) => globalThis.String(e)) : [] };
9452
+ return {
9453
+ ids: globalThis.Array.isArray(object?.ids) ? object.ids.map((e: any) => globalThis.String(e)) : [],
9454
+ category: isSet(object.category) ? globalThis.Number(object.category) : 0,
9455
+ };
9441
9456
  },
9442
9457
 
9443
9458
  toJSON(message: DeleteNotificationsRequest): unknown {
@@ -9445,6 +9460,9 @@ export const DeleteNotificationsRequest = {
9445
9460
  if (message.ids?.length) {
9446
9461
  obj.ids = message.ids;
9447
9462
  }
9463
+ if (message.category !== 0) {
9464
+ obj.category = Math.round(message.category);
9465
+ }
9448
9466
  return obj;
9449
9467
  },
9450
9468
 
@@ -9454,6 +9472,7 @@ export const DeleteNotificationsRequest = {
9454
9472
  fromPartial<I extends Exact<DeepPartial<DeleteNotificationsRequest>, I>>(object: I): DeleteNotificationsRequest {
9455
9473
  const message = createBaseDeleteNotificationsRequest();
9456
9474
  message.ids = object.ids?.map((e) => e) || [];
9475
+ message.category = object.category ?? 0;
9457
9476
  return message;
9458
9477
  },
9459
9478
  };
@@ -12638,7 +12657,7 @@ export const ListClanUsersRequest = {
12638
12657
  };
12639
12658
 
12640
12659
  function createBaseListNotificationsRequest(): ListNotificationsRequest {
12641
- return { limit: undefined, clan_id: "", notification_id: "", code: undefined, direction: undefined };
12660
+ return { limit: undefined, clan_id: "", notification_id: "", category: 0, direction: undefined };
12642
12661
  }
12643
12662
 
12644
12663
  export const ListNotificationsRequest = {
@@ -12652,8 +12671,8 @@ export const ListNotificationsRequest = {
12652
12671
  if (message.notification_id !== "") {
12653
12672
  writer.uint32(26).string(message.notification_id);
12654
12673
  }
12655
- if (message.code !== undefined) {
12656
- Int32Value.encode({ value: message.code! }, writer.uint32(34).fork()).ldelim();
12674
+ if (message.category !== 0) {
12675
+ writer.uint32(32).int32(message.category);
12657
12676
  }
12658
12677
  if (message.direction !== undefined) {
12659
12678
  Int32Value.encode({ value: message.direction! }, writer.uint32(42).fork()).ldelim();
@@ -12690,11 +12709,11 @@ export const ListNotificationsRequest = {
12690
12709
  message.notification_id = reader.string();
12691
12710
  continue;
12692
12711
  case 4:
12693
- if (tag !== 34) {
12712
+ if (tag !== 32) {
12694
12713
  break;
12695
12714
  }
12696
12715
 
12697
- message.code = Int32Value.decode(reader, reader.uint32()).value;
12716
+ message.category = reader.int32();
12698
12717
  continue;
12699
12718
  case 5:
12700
12719
  if (tag !== 42) {
@@ -12717,7 +12736,7 @@ export const ListNotificationsRequest = {
12717
12736
  limit: isSet(object.limit) ? Number(object.limit) : undefined,
12718
12737
  clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
12719
12738
  notification_id: isSet(object.notification_id) ? globalThis.String(object.notification_id) : "",
12720
- code: isSet(object.code) ? Number(object.code) : undefined,
12739
+ category: isSet(object.category) ? globalThis.Number(object.category) : 0,
12721
12740
  direction: isSet(object.direction) ? Number(object.direction) : undefined,
12722
12741
  };
12723
12742
  },
@@ -12733,8 +12752,8 @@ export const ListNotificationsRequest = {
12733
12752
  if (message.notification_id !== "") {
12734
12753
  obj.notification_id = message.notification_id;
12735
12754
  }
12736
- if (message.code !== undefined) {
12737
- obj.code = message.code;
12755
+ if (message.category !== 0) {
12756
+ obj.category = Math.round(message.category);
12738
12757
  }
12739
12758
  if (message.direction !== undefined) {
12740
12759
  obj.direction = message.direction;
@@ -12750,7 +12769,7 @@ export const ListNotificationsRequest = {
12750
12769
  message.limit = object.limit ?? undefined;
12751
12770
  message.clan_id = object.clan_id ?? "";
12752
12771
  message.notification_id = object.notification_id ?? "";
12753
- message.code = object.code ?? undefined;
12772
+ message.category = object.category ?? 0;
12754
12773
  message.direction = object.direction ?? undefined;
12755
12774
  return message;
12756
12775
  },
@@ -12875,6 +12894,7 @@ function createBaseNotification(): Notification {
12875
12894
  avatar_url: "",
12876
12895
  channel: undefined,
12877
12896
  topic_id: "",
12897
+ category: 0,
12878
12898
  };
12879
12899
  }
12880
12900
 
@@ -12919,6 +12939,9 @@ export const Notification = {
12919
12939
  if (message.topic_id !== "") {
12920
12940
  writer.uint32(106).string(message.topic_id);
12921
12941
  }
12942
+ if (message.category !== 0) {
12943
+ writer.uint32(112).int32(message.category);
12944
+ }
12922
12945
  return writer;
12923
12946
  },
12924
12947
 
@@ -13020,6 +13043,13 @@ export const Notification = {
13020
13043
 
13021
13044
  message.topic_id = reader.string();
13022
13045
  continue;
13046
+ case 14:
13047
+ if (tag !== 112) {
13048
+ break;
13049
+ }
13050
+
13051
+ message.category = reader.int32();
13052
+ continue;
13023
13053
  }
13024
13054
  if ((tag & 7) === 4 || tag === 0) {
13025
13055
  break;
@@ -13044,6 +13074,7 @@ export const Notification = {
13044
13074
  avatar_url: isSet(object.avatar_url) ? globalThis.String(object.avatar_url) : "",
13045
13075
  channel: isSet(object.channel) ? ChannelDescription.fromJSON(object.channel) : undefined,
13046
13076
  topic_id: isSet(object.topic_id) ? globalThis.String(object.topic_id) : "",
13077
+ category: isSet(object.category) ? globalThis.Number(object.category) : 0,
13047
13078
  };
13048
13079
  },
13049
13080
 
@@ -13088,6 +13119,9 @@ export const Notification = {
13088
13119
  if (message.topic_id !== "") {
13089
13120
  obj.topic_id = message.topic_id;
13090
13121
  }
13122
+ if (message.category !== 0) {
13123
+ obj.category = Math.round(message.category);
13124
+ }
13091
13125
  return obj;
13092
13126
  },
13093
13127
 
@@ -13111,6 +13145,7 @@ export const Notification = {
13111
13145
  ? ChannelDescription.fromPartial(object.channel)
13112
13146
  : undefined;
13113
13147
  message.topic_id = object.topic_id ?? "";
13148
+ message.category = object.category ?? 0;
13114
13149
  return message;
13115
13150
  },
13116
13151
  };
@@ -571,6 +571,8 @@ export interface DeleteGroupRequest {
571
571
  export interface DeleteNotificationsRequest {
572
572
  /** The id of notifications. */
573
573
  ids: string[];
574
+ /** The category of notifications. */
575
+ category: number;
574
576
  }
575
577
  /** Represents an event to be passed through the server to registered event handlers. */
576
578
  export interface Event {
@@ -930,8 +932,8 @@ export interface ListNotificationsRequest {
930
932
  clan_id: string;
931
933
  /** The current notification Id. */
932
934
  notification_id: string;
933
- /** The code. */
934
- code: number | undefined;
935
+ /** The category (0: for you, 1: mentions, 2: mesages). */
936
+ category: number;
935
937
  /** True if listing should be older notifications to newer, false if reverse. */
936
938
  direction: number | undefined;
937
939
  }
@@ -974,6 +976,8 @@ export interface Notification {
974
976
  channel: ChannelDescription | undefined;
975
977
  /** */
976
978
  topic_id: string;
979
+ /** category. */
980
+ category: number;
977
981
  }
978
982
  /** A collection of zero or more notifications. */
979
983
  export interface NotificationList {
@@ -6006,14 +6010,18 @@ export declare const DeleteNotificationsRequest: {
6006
6010
  toJSON(message: DeleteNotificationsRequest): unknown;
6007
6011
  create<I extends {
6008
6012
  ids?: string[] | undefined;
6013
+ category?: number | undefined;
6009
6014
  } & {
6010
6015
  ids?: (string[] & string[] & { [K in Exclude<keyof I["ids"], keyof string[]>]: never; }) | undefined;
6011
- } & { [K_1 in Exclude<keyof I, "ids">]: never; }>(base?: I | undefined): DeleteNotificationsRequest;
6016
+ category?: number | undefined;
6017
+ } & { [K_1 in Exclude<keyof I, keyof DeleteNotificationsRequest>]: never; }>(base?: I | undefined): DeleteNotificationsRequest;
6012
6018
  fromPartial<I_1 extends {
6013
6019
  ids?: string[] | undefined;
6020
+ category?: number | undefined;
6014
6021
  } & {
6015
6022
  ids?: (string[] & string[] & { [K_2 in Exclude<keyof I_1["ids"], keyof string[]>]: never; }) | undefined;
6016
- } & { [K_3 in Exclude<keyof I_1, "ids">]: never; }>(object: I_1): DeleteNotificationsRequest;
6023
+ category?: number | undefined;
6024
+ } & { [K_3 in Exclude<keyof I_1, keyof DeleteNotificationsRequest>]: never; }>(object: I_1): DeleteNotificationsRequest;
6017
6025
  };
6018
6026
  export declare const Event: {
6019
6027
  encode(message: Event, writer?: _m0.Writer): _m0.Writer;
@@ -8696,26 +8704,26 @@ export declare const ListNotificationsRequest: {
8696
8704
  limit?: number | undefined;
8697
8705
  clan_id?: string | undefined;
8698
8706
  notification_id?: string | undefined;
8699
- code?: number | undefined;
8707
+ category?: number | undefined;
8700
8708
  direction?: number | undefined;
8701
8709
  } & {
8702
8710
  limit?: number | undefined;
8703
8711
  clan_id?: string | undefined;
8704
8712
  notification_id?: string | undefined;
8705
- code?: number | undefined;
8713
+ category?: number | undefined;
8706
8714
  direction?: number | undefined;
8707
8715
  } & { [K in Exclude<keyof I, keyof ListNotificationsRequest>]: never; }>(base?: I | undefined): ListNotificationsRequest;
8708
8716
  fromPartial<I_1 extends {
8709
8717
  limit?: number | undefined;
8710
8718
  clan_id?: string | undefined;
8711
8719
  notification_id?: string | undefined;
8712
- code?: number | undefined;
8720
+ category?: number | undefined;
8713
8721
  direction?: number | undefined;
8714
8722
  } & {
8715
8723
  limit?: number | undefined;
8716
8724
  clan_id?: string | undefined;
8717
8725
  notification_id?: string | undefined;
8718
- code?: number | undefined;
8726
+ category?: number | undefined;
8719
8727
  direction?: number | undefined;
8720
8728
  } & { [K_1 in Exclude<keyof I_1, keyof ListNotificationsRequest>]: never; }>(object: I_1): ListNotificationsRequest;
8721
8729
  };
@@ -8818,6 +8826,7 @@ export declare const Notification: {
8818
8826
  display_names?: string[] | undefined;
8819
8827
  } | undefined;
8820
8828
  topic_id?: string | undefined;
8829
+ category?: number | undefined;
8821
8830
  } & {
8822
8831
  id?: string | undefined;
8823
8832
  subject?: string | undefined;
@@ -8956,6 +8965,7 @@ export declare const Notification: {
8956
8965
  display_names?: (string[] & string[] & { [K_10 in Exclude<keyof I["channel"]["display_names"], keyof string[]>]: never; }) | undefined;
8957
8966
  } & { [K_11 in Exclude<keyof I["channel"], keyof ChannelDescription>]: never; }) | undefined;
8958
8967
  topic_id?: string | undefined;
8968
+ category?: number | undefined;
8959
8969
  } & { [K_12 in Exclude<keyof I, keyof Notification>]: never; }>(base?: I | undefined): Notification;
8960
8970
  fromPartial<I_1 extends {
8961
8971
  id?: string | undefined;
@@ -9023,6 +9033,7 @@ export declare const Notification: {
9023
9033
  display_names?: string[] | undefined;
9024
9034
  } | undefined;
9025
9035
  topic_id?: string | undefined;
9036
+ category?: number | undefined;
9026
9037
  } & {
9027
9038
  id?: string | undefined;
9028
9039
  subject?: string | undefined;
@@ -9161,6 +9172,7 @@ export declare const Notification: {
9161
9172
  display_names?: (string[] & string[] & { [K_23 in Exclude<keyof I_1["channel"]["display_names"], keyof string[]>]: never; }) | undefined;
9162
9173
  } & { [K_24 in Exclude<keyof I_1["channel"], keyof ChannelDescription>]: never; }) | undefined;
9163
9174
  topic_id?: string | undefined;
9175
+ category?: number | undefined;
9164
9176
  } & { [K_25 in Exclude<keyof I_1, keyof Notification>]: never; }>(object: I_1): Notification;
9165
9177
  };
9166
9178
  export declare const NotificationList: {
@@ -9235,6 +9247,7 @@ export declare const NotificationList: {
9235
9247
  display_names?: string[] | undefined;
9236
9248
  } | undefined;
9237
9249
  topic_id?: string | undefined;
9250
+ category?: number | undefined;
9238
9251
  }[] | undefined;
9239
9252
  cacheable_cursor?: string | undefined;
9240
9253
  } & {
@@ -9304,6 +9317,7 @@ export declare const NotificationList: {
9304
9317
  display_names?: string[] | undefined;
9305
9318
  } | undefined;
9306
9319
  topic_id?: string | undefined;
9320
+ category?: number | undefined;
9307
9321
  }[] & ({
9308
9322
  id?: string | undefined;
9309
9323
  subject?: string | undefined;
@@ -9370,6 +9384,7 @@ export declare const NotificationList: {
9370
9384
  display_names?: string[] | undefined;
9371
9385
  } | undefined;
9372
9386
  topic_id?: string | undefined;
9387
+ category?: number | undefined;
9373
9388
  } & {
9374
9389
  id?: string | undefined;
9375
9390
  subject?: string | undefined;
@@ -9508,6 +9523,7 @@ export declare const NotificationList: {
9508
9523
  display_names?: (string[] & string[] & { [K_10 in Exclude<keyof I["notifications"][number]["channel"]["display_names"], keyof string[]>]: never; }) | undefined;
9509
9524
  } & { [K_11 in Exclude<keyof I["notifications"][number]["channel"], keyof ChannelDescription>]: never; }) | undefined;
9510
9525
  topic_id?: string | undefined;
9526
+ category?: number | undefined;
9511
9527
  } & { [K_12 in Exclude<keyof I["notifications"][number], keyof Notification>]: never; })[] & { [K_13 in Exclude<keyof I["notifications"], keyof {
9512
9528
  id?: string | undefined;
9513
9529
  subject?: string | undefined;
@@ -9574,6 +9590,7 @@ export declare const NotificationList: {
9574
9590
  display_names?: string[] | undefined;
9575
9591
  } | undefined;
9576
9592
  topic_id?: string | undefined;
9593
+ category?: number | undefined;
9577
9594
  }[]>]: never; }) | undefined;
9578
9595
  cacheable_cursor?: string | undefined;
9579
9596
  } & { [K_14 in Exclude<keyof I, keyof NotificationList>]: never; }>(base?: I | undefined): NotificationList;
@@ -9644,6 +9661,7 @@ export declare const NotificationList: {
9644
9661
  display_names?: string[] | undefined;
9645
9662
  } | undefined;
9646
9663
  topic_id?: string | undefined;
9664
+ category?: number | undefined;
9647
9665
  }[] | undefined;
9648
9666
  cacheable_cursor?: string | undefined;
9649
9667
  } & {
@@ -9713,6 +9731,7 @@ export declare const NotificationList: {
9713
9731
  display_names?: string[] | undefined;
9714
9732
  } | undefined;
9715
9733
  topic_id?: string | undefined;
9734
+ category?: number | undefined;
9716
9735
  }[] & ({
9717
9736
  id?: string | undefined;
9718
9737
  subject?: string | undefined;
@@ -9779,6 +9798,7 @@ export declare const NotificationList: {
9779
9798
  display_names?: string[] | undefined;
9780
9799
  } | undefined;
9781
9800
  topic_id?: string | undefined;
9801
+ category?: number | undefined;
9782
9802
  } & {
9783
9803
  id?: string | undefined;
9784
9804
  subject?: string | undefined;
@@ -9917,6 +9937,7 @@ export declare const NotificationList: {
9917
9937
  display_names?: (string[] & string[] & { [K_25 in Exclude<keyof I_1["notifications"][number]["channel"]["display_names"], keyof string[]>]: never; }) | undefined;
9918
9938
  } & { [K_26 in Exclude<keyof I_1["notifications"][number]["channel"], keyof ChannelDescription>]: never; }) | undefined;
9919
9939
  topic_id?: string | undefined;
9940
+ category?: number | undefined;
9920
9941
  } & { [K_27 in Exclude<keyof I_1["notifications"][number], keyof Notification>]: never; })[] & { [K_28 in Exclude<keyof I_1["notifications"], keyof {
9921
9942
  id?: string | undefined;
9922
9943
  subject?: string | undefined;
@@ -9983,6 +10004,7 @@ export declare const NotificationList: {
9983
10004
  display_names?: string[] | undefined;
9984
10005
  } | undefined;
9985
10006
  topic_id?: string | undefined;
10007
+ category?: number | undefined;
9986
10008
  }[]>]: never; }) | undefined;
9987
10009
  cacheable_cursor?: string | undefined;
9988
10010
  } & { [K_29 in Exclude<keyof I_1, keyof NotificationList>]: never; }>(object: I_1): NotificationList;