mezon-js-protobuf 1.8.53 → 1.8.54

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
@@ -1763,7 +1763,12 @@ export interface BannedUser {
1763
1763
  reason: string;
1764
1764
  }
1765
1765
 
1766
- export interface bannedUserList {
1766
+ export interface BannedUserListRequest {
1767
+ clan_id: string;
1768
+ channel_id: string;
1769
+ }
1770
+
1771
+ export interface BannedUserList {
1767
1772
  banned_users: BannedUser[];
1768
1773
  }
1769
1774
 
@@ -1944,10 +1949,6 @@ export interface SetNotificationRequest {
1944
1949
  channel_category_id: string;
1945
1950
  /** notification_type */
1946
1951
  notification_type: number;
1947
- /** time mute channel category */
1948
- time_mute:
1949
- | Date
1950
- | undefined;
1951
1952
  /** */
1952
1953
  clan_id: string;
1953
1954
  }
@@ -1960,11 +1961,12 @@ export interface PinMessageRequest {
1960
1961
  }
1961
1962
 
1962
1963
  /** set notification */
1963
- export interface SetMuteNotificationRequest {
1964
+ export interface SetMuteRequest {
1964
1965
  /** channel_id and category_id */
1965
1966
  id: string;
1966
- notification_type: number;
1967
+ mute_time: number;
1967
1968
  active: number;
1969
+ clan_id: string;
1968
1970
  }
1969
1971
 
1970
1972
  export interface HashtagDmListRequest {
@@ -2026,12 +2028,8 @@ export interface SetDefaultNotificationRequest {
2026
2028
  export interface RoleList {
2027
2029
  /** A list of role. */
2028
2030
  roles: Role[];
2029
- /** The cursor to send when retrieving the next page, if any. */
2030
- next_cursor: string;
2031
- /** The cursor to send when retrieving the previous page, if any. */
2032
- prev_cursor: string;
2033
- /** Cacheable cursor to list newer role description. Durable and designed to be stored, unlike next/prev cursors. */
2034
- cacheable_cursor: string;
2031
+ /** level permission max */
2032
+ max_level_permission: number;
2035
2033
  }
2036
2034
 
2037
2035
  export interface EventList {
@@ -16577,22 +16575,96 @@ export const BannedUser = {
16577
16575
  },
16578
16576
  };
16579
16577
 
16580
- function createBasebannedUserList(): bannedUserList {
16578
+ function createBaseBannedUserListRequest(): BannedUserListRequest {
16579
+ return { clan_id: "", channel_id: "" };
16580
+ }
16581
+
16582
+ export const BannedUserListRequest = {
16583
+ encode(message: BannedUserListRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
16584
+ if (message.clan_id !== "") {
16585
+ writer.uint32(10).string(message.clan_id);
16586
+ }
16587
+ if (message.channel_id !== "") {
16588
+ writer.uint32(18).string(message.channel_id);
16589
+ }
16590
+ return writer;
16591
+ },
16592
+
16593
+ decode(input: _m0.Reader | Uint8Array, length?: number): BannedUserListRequest {
16594
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
16595
+ let end = length === undefined ? reader.len : reader.pos + length;
16596
+ const message = createBaseBannedUserListRequest();
16597
+ while (reader.pos < end) {
16598
+ const tag = reader.uint32();
16599
+ switch (tag >>> 3) {
16600
+ case 1:
16601
+ if (tag !== 10) {
16602
+ break;
16603
+ }
16604
+
16605
+ message.clan_id = reader.string();
16606
+ continue;
16607
+ case 2:
16608
+ if (tag !== 18) {
16609
+ break;
16610
+ }
16611
+
16612
+ message.channel_id = reader.string();
16613
+ continue;
16614
+ }
16615
+ if ((tag & 7) === 4 || tag === 0) {
16616
+ break;
16617
+ }
16618
+ reader.skipType(tag & 7);
16619
+ }
16620
+ return message;
16621
+ },
16622
+
16623
+ fromJSON(object: any): BannedUserListRequest {
16624
+ return {
16625
+ clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
16626
+ channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
16627
+ };
16628
+ },
16629
+
16630
+ toJSON(message: BannedUserListRequest): unknown {
16631
+ const obj: any = {};
16632
+ if (message.clan_id !== "") {
16633
+ obj.clan_id = message.clan_id;
16634
+ }
16635
+ if (message.channel_id !== "") {
16636
+ obj.channel_id = message.channel_id;
16637
+ }
16638
+ return obj;
16639
+ },
16640
+
16641
+ create<I extends Exact<DeepPartial<BannedUserListRequest>, I>>(base?: I): BannedUserListRequest {
16642
+ return BannedUserListRequest.fromPartial(base ?? ({} as any));
16643
+ },
16644
+ fromPartial<I extends Exact<DeepPartial<BannedUserListRequest>, I>>(object: I): BannedUserListRequest {
16645
+ const message = createBaseBannedUserListRequest();
16646
+ message.clan_id = object.clan_id ?? "";
16647
+ message.channel_id = object.channel_id ?? "";
16648
+ return message;
16649
+ },
16650
+ };
16651
+
16652
+ function createBaseBannedUserList(): BannedUserList {
16581
16653
  return { banned_users: [] };
16582
16654
  }
16583
16655
 
16584
- export const bannedUserList = {
16585
- encode(message: bannedUserList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
16656
+ export const BannedUserList = {
16657
+ encode(message: BannedUserList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
16586
16658
  for (const v of message.banned_users) {
16587
16659
  BannedUser.encode(v!, writer.uint32(10).fork()).ldelim();
16588
16660
  }
16589
16661
  return writer;
16590
16662
  },
16591
16663
 
16592
- decode(input: _m0.Reader | Uint8Array, length?: number): bannedUserList {
16664
+ decode(input: _m0.Reader | Uint8Array, length?: number): BannedUserList {
16593
16665
  const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
16594
16666
  let end = length === undefined ? reader.len : reader.pos + length;
16595
- const message = createBasebannedUserList();
16667
+ const message = createBaseBannedUserList();
16596
16668
  while (reader.pos < end) {
16597
16669
  const tag = reader.uint32();
16598
16670
  switch (tag >>> 3) {
@@ -16612,7 +16684,7 @@ export const bannedUserList = {
16612
16684
  return message;
16613
16685
  },
16614
16686
 
16615
- fromJSON(object: any): bannedUserList {
16687
+ fromJSON(object: any): BannedUserList {
16616
16688
  return {
16617
16689
  banned_users: globalThis.Array.isArray(object?.banned_users)
16618
16690
  ? object.banned_users.map((e: any) => BannedUser.fromJSON(e))
@@ -16620,7 +16692,7 @@ export const bannedUserList = {
16620
16692
  };
16621
16693
  },
16622
16694
 
16623
- toJSON(message: bannedUserList): unknown {
16695
+ toJSON(message: BannedUserList): unknown {
16624
16696
  const obj: any = {};
16625
16697
  if (message.banned_users?.length) {
16626
16698
  obj.banned_users = message.banned_users.map((e) => BannedUser.toJSON(e));
@@ -16628,11 +16700,11 @@ export const bannedUserList = {
16628
16700
  return obj;
16629
16701
  },
16630
16702
 
16631
- create<I extends Exact<DeepPartial<bannedUserList>, I>>(base?: I): bannedUserList {
16632
- return bannedUserList.fromPartial(base ?? ({} as any));
16703
+ create<I extends Exact<DeepPartial<BannedUserList>, I>>(base?: I): BannedUserList {
16704
+ return BannedUserList.fromPartial(base ?? ({} as any));
16633
16705
  },
16634
- fromPartial<I extends Exact<DeepPartial<bannedUserList>, I>>(object: I): bannedUserList {
16635
- const message = createBasebannedUserList();
16706
+ fromPartial<I extends Exact<DeepPartial<BannedUserList>, I>>(object: I): BannedUserList {
16707
+ const message = createBaseBannedUserList();
16636
16708
  message.banned_users = object.banned_users?.map((e) => BannedUser.fromPartial(e)) || [];
16637
16709
  return message;
16638
16710
  },
@@ -18497,7 +18569,7 @@ export const NotificationSettingList = {
18497
18569
  };
18498
18570
 
18499
18571
  function createBaseSetNotificationRequest(): SetNotificationRequest {
18500
- return { channel_category_id: "", notification_type: 0, time_mute: undefined, clan_id: "" };
18572
+ return { channel_category_id: "", notification_type: 0, clan_id: "" };
18501
18573
  }
18502
18574
 
18503
18575
  export const SetNotificationRequest = {
@@ -18508,11 +18580,8 @@ export const SetNotificationRequest = {
18508
18580
  if (message.notification_type !== 0) {
18509
18581
  writer.uint32(16).int32(message.notification_type);
18510
18582
  }
18511
- if (message.time_mute !== undefined) {
18512
- Timestamp.encode(toTimestamp(message.time_mute), writer.uint32(26).fork()).ldelim();
18513
- }
18514
18583
  if (message.clan_id !== "") {
18515
- writer.uint32(34).string(message.clan_id);
18584
+ writer.uint32(26).string(message.clan_id);
18516
18585
  }
18517
18586
  return writer;
18518
18587
  },
@@ -18543,13 +18612,6 @@ export const SetNotificationRequest = {
18543
18612
  break;
18544
18613
  }
18545
18614
 
18546
- message.time_mute = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
18547
- continue;
18548
- case 4:
18549
- if (tag !== 34) {
18550
- break;
18551
- }
18552
-
18553
18615
  message.clan_id = reader.string();
18554
18616
  continue;
18555
18617
  }
@@ -18565,7 +18627,6 @@ export const SetNotificationRequest = {
18565
18627
  return {
18566
18628
  channel_category_id: isSet(object.channel_category_id) ? globalThis.String(object.channel_category_id) : "",
18567
18629
  notification_type: isSet(object.notification_type) ? globalThis.Number(object.notification_type) : 0,
18568
- time_mute: isSet(object.time_mute) ? fromJsonTimestamp(object.time_mute) : undefined,
18569
18630
  clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
18570
18631
  };
18571
18632
  },
@@ -18578,9 +18639,6 @@ export const SetNotificationRequest = {
18578
18639
  if (message.notification_type !== 0) {
18579
18640
  obj.notification_type = Math.round(message.notification_type);
18580
18641
  }
18581
- if (message.time_mute !== undefined) {
18582
- obj.time_mute = message.time_mute.toISOString();
18583
- }
18584
18642
  if (message.clan_id !== "") {
18585
18643
  obj.clan_id = message.clan_id;
18586
18644
  }
@@ -18594,7 +18652,6 @@ export const SetNotificationRequest = {
18594
18652
  const message = createBaseSetNotificationRequest();
18595
18653
  message.channel_category_id = object.channel_category_id ?? "";
18596
18654
  message.notification_type = object.notification_type ?? 0;
18597
- message.time_mute = object.time_mute ?? undefined;
18598
18655
  message.clan_id = object.clan_id ?? "";
18599
18656
  return message;
18600
18657
  },
@@ -18689,28 +18746,31 @@ export const PinMessageRequest = {
18689
18746
  },
18690
18747
  };
18691
18748
 
18692
- function createBaseSetMuteNotificationRequest(): SetMuteNotificationRequest {
18693
- return { id: "", notification_type: 0, active: 0 };
18749
+ function createBaseSetMuteRequest(): SetMuteRequest {
18750
+ return { id: "", mute_time: 0, active: 0, clan_id: "" };
18694
18751
  }
18695
18752
 
18696
- export const SetMuteNotificationRequest = {
18697
- encode(message: SetMuteNotificationRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
18753
+ export const SetMuteRequest = {
18754
+ encode(message: SetMuteRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
18698
18755
  if (message.id !== "") {
18699
18756
  writer.uint32(10).string(message.id);
18700
18757
  }
18701
- if (message.notification_type !== 0) {
18702
- writer.uint32(16).int32(message.notification_type);
18758
+ if (message.mute_time !== 0) {
18759
+ writer.uint32(16).int32(message.mute_time);
18703
18760
  }
18704
18761
  if (message.active !== 0) {
18705
18762
  writer.uint32(24).int32(message.active);
18706
18763
  }
18764
+ if (message.clan_id !== "") {
18765
+ writer.uint32(34).string(message.clan_id);
18766
+ }
18707
18767
  return writer;
18708
18768
  },
18709
18769
 
18710
- decode(input: _m0.Reader | Uint8Array, length?: number): SetMuteNotificationRequest {
18770
+ decode(input: _m0.Reader | Uint8Array, length?: number): SetMuteRequest {
18711
18771
  const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
18712
18772
  let end = length === undefined ? reader.len : reader.pos + length;
18713
- const message = createBaseSetMuteNotificationRequest();
18773
+ const message = createBaseSetMuteRequest();
18714
18774
  while (reader.pos < end) {
18715
18775
  const tag = reader.uint32();
18716
18776
  switch (tag >>> 3) {
@@ -18726,7 +18786,7 @@ export const SetMuteNotificationRequest = {
18726
18786
  break;
18727
18787
  }
18728
18788
 
18729
- message.notification_type = reader.int32();
18789
+ message.mute_time = reader.int32();
18730
18790
  continue;
18731
18791
  case 3:
18732
18792
  if (tag !== 24) {
@@ -18735,6 +18795,13 @@ export const SetMuteNotificationRequest = {
18735
18795
 
18736
18796
  message.active = reader.int32();
18737
18797
  continue;
18798
+ case 4:
18799
+ if (tag !== 34) {
18800
+ break;
18801
+ }
18802
+
18803
+ message.clan_id = reader.string();
18804
+ continue;
18738
18805
  }
18739
18806
  if ((tag & 7) === 4 || tag === 0) {
18740
18807
  break;
@@ -18744,36 +18811,41 @@ export const SetMuteNotificationRequest = {
18744
18811
  return message;
18745
18812
  },
18746
18813
 
18747
- fromJSON(object: any): SetMuteNotificationRequest {
18814
+ fromJSON(object: any): SetMuteRequest {
18748
18815
  return {
18749
18816
  id: isSet(object.id) ? globalThis.String(object.id) : "",
18750
- notification_type: isSet(object.notification_type) ? globalThis.Number(object.notification_type) : 0,
18817
+ mute_time: isSet(object.mute_time) ? globalThis.Number(object.mute_time) : 0,
18751
18818
  active: isSet(object.active) ? globalThis.Number(object.active) : 0,
18819
+ clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
18752
18820
  };
18753
18821
  },
18754
18822
 
18755
- toJSON(message: SetMuteNotificationRequest): unknown {
18823
+ toJSON(message: SetMuteRequest): unknown {
18756
18824
  const obj: any = {};
18757
18825
  if (message.id !== "") {
18758
18826
  obj.id = message.id;
18759
18827
  }
18760
- if (message.notification_type !== 0) {
18761
- obj.notification_type = Math.round(message.notification_type);
18828
+ if (message.mute_time !== 0) {
18829
+ obj.mute_time = Math.round(message.mute_time);
18762
18830
  }
18763
18831
  if (message.active !== 0) {
18764
18832
  obj.active = Math.round(message.active);
18765
18833
  }
18834
+ if (message.clan_id !== "") {
18835
+ obj.clan_id = message.clan_id;
18836
+ }
18766
18837
  return obj;
18767
18838
  },
18768
18839
 
18769
- create<I extends Exact<DeepPartial<SetMuteNotificationRequest>, I>>(base?: I): SetMuteNotificationRequest {
18770
- return SetMuteNotificationRequest.fromPartial(base ?? ({} as any));
18840
+ create<I extends Exact<DeepPartial<SetMuteRequest>, I>>(base?: I): SetMuteRequest {
18841
+ return SetMuteRequest.fromPartial(base ?? ({} as any));
18771
18842
  },
18772
- fromPartial<I extends Exact<DeepPartial<SetMuteNotificationRequest>, I>>(object: I): SetMuteNotificationRequest {
18773
- const message = createBaseSetMuteNotificationRequest();
18843
+ fromPartial<I extends Exact<DeepPartial<SetMuteRequest>, I>>(object: I): SetMuteRequest {
18844
+ const message = createBaseSetMuteRequest();
18774
18845
  message.id = object.id ?? "";
18775
- message.notification_type = object.notification_type ?? 0;
18846
+ message.mute_time = object.mute_time ?? 0;
18776
18847
  message.active = object.active ?? 0;
18848
+ message.clan_id = object.clan_id ?? "";
18777
18849
  return message;
18778
18850
  },
18779
18851
  };
@@ -19382,7 +19454,7 @@ export const SetDefaultNotificationRequest = {
19382
19454
  };
19383
19455
 
19384
19456
  function createBaseRoleList(): RoleList {
19385
- return { roles: [], next_cursor: "", prev_cursor: "", cacheable_cursor: "" };
19457
+ return { roles: [], max_level_permission: 0 };
19386
19458
  }
19387
19459
 
19388
19460
  export const RoleList = {
@@ -19390,14 +19462,8 @@ export const RoleList = {
19390
19462
  for (const v of message.roles) {
19391
19463
  Role.encode(v!, writer.uint32(10).fork()).ldelim();
19392
19464
  }
19393
- if (message.next_cursor !== "") {
19394
- writer.uint32(18).string(message.next_cursor);
19395
- }
19396
- if (message.prev_cursor !== "") {
19397
- writer.uint32(26).string(message.prev_cursor);
19398
- }
19399
- if (message.cacheable_cursor !== "") {
19400
- writer.uint32(34).string(message.cacheable_cursor);
19465
+ if (message.max_level_permission !== 0) {
19466
+ writer.uint32(16).int32(message.max_level_permission);
19401
19467
  }
19402
19468
  return writer;
19403
19469
  },
@@ -19417,25 +19483,11 @@ export const RoleList = {
19417
19483
  message.roles.push(Role.decode(reader, reader.uint32()));
19418
19484
  continue;
19419
19485
  case 2:
19420
- if (tag !== 18) {
19421
- break;
19422
- }
19423
-
19424
- message.next_cursor = reader.string();
19425
- continue;
19426
- case 3:
19427
- if (tag !== 26) {
19428
- break;
19429
- }
19430
-
19431
- message.prev_cursor = reader.string();
19432
- continue;
19433
- case 4:
19434
- if (tag !== 34) {
19486
+ if (tag !== 16) {
19435
19487
  break;
19436
19488
  }
19437
19489
 
19438
- message.cacheable_cursor = reader.string();
19490
+ message.max_level_permission = reader.int32();
19439
19491
  continue;
19440
19492
  }
19441
19493
  if ((tag & 7) === 4 || tag === 0) {
@@ -19449,9 +19501,7 @@ export const RoleList = {
19449
19501
  fromJSON(object: any): RoleList {
19450
19502
  return {
19451
19503
  roles: globalThis.Array.isArray(object?.roles) ? object.roles.map((e: any) => Role.fromJSON(e)) : [],
19452
- next_cursor: isSet(object.next_cursor) ? globalThis.String(object.next_cursor) : "",
19453
- prev_cursor: isSet(object.prev_cursor) ? globalThis.String(object.prev_cursor) : "",
19454
- cacheable_cursor: isSet(object.cacheable_cursor) ? globalThis.String(object.cacheable_cursor) : "",
19504
+ max_level_permission: isSet(object.max_level_permission) ? globalThis.Number(object.max_level_permission) : 0,
19455
19505
  };
19456
19506
  },
19457
19507
 
@@ -19460,14 +19510,8 @@ export const RoleList = {
19460
19510
  if (message.roles?.length) {
19461
19511
  obj.roles = message.roles.map((e) => Role.toJSON(e));
19462
19512
  }
19463
- if (message.next_cursor !== "") {
19464
- obj.next_cursor = message.next_cursor;
19465
- }
19466
- if (message.prev_cursor !== "") {
19467
- obj.prev_cursor = message.prev_cursor;
19468
- }
19469
- if (message.cacheable_cursor !== "") {
19470
- obj.cacheable_cursor = message.cacheable_cursor;
19513
+ if (message.max_level_permission !== 0) {
19514
+ obj.max_level_permission = Math.round(message.max_level_permission);
19471
19515
  }
19472
19516
  return obj;
19473
19517
  },
@@ -19478,9 +19522,7 @@ export const RoleList = {
19478
19522
  fromPartial<I extends Exact<DeepPartial<RoleList>, I>>(object: I): RoleList {
19479
19523
  const message = createBaseRoleList();
19480
19524
  message.roles = object.roles?.map((e) => Role.fromPartial(e)) || [];
19481
- message.next_cursor = object.next_cursor ?? "";
19482
- message.prev_cursor = object.prev_cursor ?? "";
19483
- message.cacheable_cursor = object.cacheable_cursor ?? "";
19525
+ message.max_level_permission = object.max_level_permission ?? 0;
19484
19526
  return message;
19485
19527
  },
19486
19528
  };