mezon-js-protobuf 1.5.79 → 1.5.80

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
@@ -3065,6 +3065,16 @@ export interface PermissionRoleChannelListEventResponse {
3065
3065
  permission_role_channel: PermissionRoleChannel[];
3066
3066
  }
3067
3067
 
3068
+ /** */
3069
+ export interface CountClanBadgeResponse {
3070
+ badges: CountClanBadgeResponse_Badge[];
3071
+ }
3072
+
3073
+ export interface CountClanBadgeResponse_Badge {
3074
+ clan_id: string;
3075
+ count: number;
3076
+ }
3077
+
3068
3078
  function createBaseAccount(): Account {
3069
3079
  return {
3070
3080
  user: undefined,
@@ -28917,6 +28927,141 @@ export const PermissionRoleChannelListEventResponse = {
28917
28927
  },
28918
28928
  };
28919
28929
 
28930
+ function createBaseCountClanBadgeResponse(): CountClanBadgeResponse {
28931
+ return { badges: [] };
28932
+ }
28933
+
28934
+ export const CountClanBadgeResponse = {
28935
+ encode(message: CountClanBadgeResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
28936
+ for (const v of message.badges) {
28937
+ CountClanBadgeResponse_Badge.encode(v!, writer.uint32(10).fork()).ldelim();
28938
+ }
28939
+ return writer;
28940
+ },
28941
+
28942
+ decode(input: _m0.Reader | Uint8Array, length?: number): CountClanBadgeResponse {
28943
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
28944
+ let end = length === undefined ? reader.len : reader.pos + length;
28945
+ const message = createBaseCountClanBadgeResponse();
28946
+ while (reader.pos < end) {
28947
+ const tag = reader.uint32();
28948
+ switch (tag >>> 3) {
28949
+ case 1:
28950
+ if (tag !== 10) {
28951
+ break;
28952
+ }
28953
+
28954
+ message.badges.push(CountClanBadgeResponse_Badge.decode(reader, reader.uint32()));
28955
+ continue;
28956
+ }
28957
+ if ((tag & 7) === 4 || tag === 0) {
28958
+ break;
28959
+ }
28960
+ reader.skipType(tag & 7);
28961
+ }
28962
+ return message;
28963
+ },
28964
+
28965
+ fromJSON(object: any): CountClanBadgeResponse {
28966
+ return {
28967
+ badges: globalThis.Array.isArray(object?.badges)
28968
+ ? object.badges.map((e: any) => CountClanBadgeResponse_Badge.fromJSON(e))
28969
+ : [],
28970
+ };
28971
+ },
28972
+
28973
+ toJSON(message: CountClanBadgeResponse): unknown {
28974
+ const obj: any = {};
28975
+ if (message.badges?.length) {
28976
+ obj.badges = message.badges.map((e) => CountClanBadgeResponse_Badge.toJSON(e));
28977
+ }
28978
+ return obj;
28979
+ },
28980
+
28981
+ create<I extends Exact<DeepPartial<CountClanBadgeResponse>, I>>(base?: I): CountClanBadgeResponse {
28982
+ return CountClanBadgeResponse.fromPartial(base ?? ({} as any));
28983
+ },
28984
+ fromPartial<I extends Exact<DeepPartial<CountClanBadgeResponse>, I>>(object: I): CountClanBadgeResponse {
28985
+ const message = createBaseCountClanBadgeResponse();
28986
+ message.badges = object.badges?.map((e) => CountClanBadgeResponse_Badge.fromPartial(e)) || [];
28987
+ return message;
28988
+ },
28989
+ };
28990
+
28991
+ function createBaseCountClanBadgeResponse_Badge(): CountClanBadgeResponse_Badge {
28992
+ return { clan_id: "", count: 0 };
28993
+ }
28994
+
28995
+ export const CountClanBadgeResponse_Badge = {
28996
+ encode(message: CountClanBadgeResponse_Badge, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
28997
+ if (message.clan_id !== "") {
28998
+ writer.uint32(10).string(message.clan_id);
28999
+ }
29000
+ if (message.count !== 0) {
29001
+ writer.uint32(16).int32(message.count);
29002
+ }
29003
+ return writer;
29004
+ },
29005
+
29006
+ decode(input: _m0.Reader | Uint8Array, length?: number): CountClanBadgeResponse_Badge {
29007
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
29008
+ let end = length === undefined ? reader.len : reader.pos + length;
29009
+ const message = createBaseCountClanBadgeResponse_Badge();
29010
+ while (reader.pos < end) {
29011
+ const tag = reader.uint32();
29012
+ switch (tag >>> 3) {
29013
+ case 1:
29014
+ if (tag !== 10) {
29015
+ break;
29016
+ }
29017
+
29018
+ message.clan_id = reader.string();
29019
+ continue;
29020
+ case 2:
29021
+ if (tag !== 16) {
29022
+ break;
29023
+ }
29024
+
29025
+ message.count = reader.int32();
29026
+ continue;
29027
+ }
29028
+ if ((tag & 7) === 4 || tag === 0) {
29029
+ break;
29030
+ }
29031
+ reader.skipType(tag & 7);
29032
+ }
29033
+ return message;
29034
+ },
29035
+
29036
+ fromJSON(object: any): CountClanBadgeResponse_Badge {
29037
+ return {
29038
+ clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
29039
+ count: isSet(object.count) ? globalThis.Number(object.count) : 0,
29040
+ };
29041
+ },
29042
+
29043
+ toJSON(message: CountClanBadgeResponse_Badge): unknown {
29044
+ const obj: any = {};
29045
+ if (message.clan_id !== "") {
29046
+ obj.clan_id = message.clan_id;
29047
+ }
29048
+ if (message.count !== 0) {
29049
+ obj.count = Math.round(message.count);
29050
+ }
29051
+ return obj;
29052
+ },
29053
+
29054
+ create<I extends Exact<DeepPartial<CountClanBadgeResponse_Badge>, I>>(base?: I): CountClanBadgeResponse_Badge {
29055
+ return CountClanBadgeResponse_Badge.fromPartial(base ?? ({} as any));
29056
+ },
29057
+ fromPartial<I extends Exact<DeepPartial<CountClanBadgeResponse_Badge>, I>>(object: I): CountClanBadgeResponse_Badge {
29058
+ const message = createBaseCountClanBadgeResponse_Badge();
29059
+ message.clan_id = object.clan_id ?? "";
29060
+ message.count = object.count ?? 0;
29061
+ return message;
29062
+ },
29063
+ };
29064
+
28920
29065
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
28921
29066
 
28922
29067
  export type DeepPartial<T> = T extends Builtin ? T
@@ -2437,6 +2437,14 @@ export interface PermissionRoleChannelListEventResponse {
2437
2437
  /** list of permission role channel */
2438
2438
  permission_role_channel: PermissionRoleChannel[];
2439
2439
  }
2440
+ /** */
2441
+ export interface CountClanBadgeResponse {
2442
+ badges: CountClanBadgeResponse_Badge[];
2443
+ }
2444
+ export interface CountClanBadgeResponse_Badge {
2445
+ clan_id: string;
2446
+ count: number;
2447
+ }
2440
2448
  export declare const Account: {
2441
2449
  encode(message: Account, writer?: _m0.Writer): _m0.Writer;
2442
2450
  decode(input: _m0.Reader | Uint8Array, length?: number): Account;
@@ -16599,6 +16607,72 @@ export declare const PermissionRoleChannelListEventResponse: {
16599
16607
  }[]>]: never; }) | undefined;
16600
16608
  } & { [K_5 in Exclude<keyof I_1, keyof PermissionRoleChannelListEventResponse>]: never; }>(object: I_1): PermissionRoleChannelListEventResponse;
16601
16609
  };
16610
+ export declare const CountClanBadgeResponse: {
16611
+ encode(message: CountClanBadgeResponse, writer?: _m0.Writer): _m0.Writer;
16612
+ decode(input: _m0.Reader | Uint8Array, length?: number): CountClanBadgeResponse;
16613
+ fromJSON(object: any): CountClanBadgeResponse;
16614
+ toJSON(message: CountClanBadgeResponse): unknown;
16615
+ create<I extends {
16616
+ badges?: {
16617
+ clan_id?: string | undefined;
16618
+ count?: number | undefined;
16619
+ }[] | undefined;
16620
+ } & {
16621
+ badges?: ({
16622
+ clan_id?: string | undefined;
16623
+ count?: number | undefined;
16624
+ }[] & ({
16625
+ clan_id?: string | undefined;
16626
+ count?: number | undefined;
16627
+ } & {
16628
+ clan_id?: string | undefined;
16629
+ count?: number | undefined;
16630
+ } & { [K in Exclude<keyof I["badges"][number], keyof CountClanBadgeResponse_Badge>]: never; })[] & { [K_1 in Exclude<keyof I["badges"], keyof {
16631
+ clan_id?: string | undefined;
16632
+ count?: number | undefined;
16633
+ }[]>]: never; }) | undefined;
16634
+ } & { [K_2 in Exclude<keyof I, "badges">]: never; }>(base?: I | undefined): CountClanBadgeResponse;
16635
+ fromPartial<I_1 extends {
16636
+ badges?: {
16637
+ clan_id?: string | undefined;
16638
+ count?: number | undefined;
16639
+ }[] | undefined;
16640
+ } & {
16641
+ badges?: ({
16642
+ clan_id?: string | undefined;
16643
+ count?: number | undefined;
16644
+ }[] & ({
16645
+ clan_id?: string | undefined;
16646
+ count?: number | undefined;
16647
+ } & {
16648
+ clan_id?: string | undefined;
16649
+ count?: number | undefined;
16650
+ } & { [K_3 in Exclude<keyof I_1["badges"][number], keyof CountClanBadgeResponse_Badge>]: never; })[] & { [K_4 in Exclude<keyof I_1["badges"], keyof {
16651
+ clan_id?: string | undefined;
16652
+ count?: number | undefined;
16653
+ }[]>]: never; }) | undefined;
16654
+ } & { [K_5 in Exclude<keyof I_1, "badges">]: never; }>(object: I_1): CountClanBadgeResponse;
16655
+ };
16656
+ export declare const CountClanBadgeResponse_Badge: {
16657
+ encode(message: CountClanBadgeResponse_Badge, writer?: _m0.Writer): _m0.Writer;
16658
+ decode(input: _m0.Reader | Uint8Array, length?: number): CountClanBadgeResponse_Badge;
16659
+ fromJSON(object: any): CountClanBadgeResponse_Badge;
16660
+ toJSON(message: CountClanBadgeResponse_Badge): unknown;
16661
+ create<I extends {
16662
+ clan_id?: string | undefined;
16663
+ count?: number | undefined;
16664
+ } & {
16665
+ clan_id?: string | undefined;
16666
+ count?: number | undefined;
16667
+ } & { [K in Exclude<keyof I, keyof CountClanBadgeResponse_Badge>]: never; }>(base?: I | undefined): CountClanBadgeResponse_Badge;
16668
+ fromPartial<I_1 extends {
16669
+ clan_id?: string | undefined;
16670
+ count?: number | undefined;
16671
+ } & {
16672
+ clan_id?: string | undefined;
16673
+ count?: number | undefined;
16674
+ } & { [K_1 in Exclude<keyof I_1, keyof CountClanBadgeResponse_Badge>]: never; }>(object: I_1): CountClanBadgeResponse_Badge;
16675
+ };
16602
16676
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
16603
16677
  export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
16604
16678
  [K in keyof T]?: DeepPartial<T[K]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js-protobuf",
3
- "version": "1.5.79",
3
+ "version": "1.5.80",
4
4
  "description": "Websocket adapter adding protocol buffer support to the Mezon Javascript client.",
5
5
  "main": "dist/mezon-js-protobuf.cjs.js",
6
6
  "module": "dist/mezon-js-protobuf.esm.mjs",