mezon-js-protobuf 1.7.40 → 1.7.42

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
@@ -1961,7 +1961,7 @@ export interface ChannelDescription {
1961
1961
  /** clan_name */
1962
1962
  clan_name: string;
1963
1963
  /** app url */
1964
- app_url: string;
1964
+ app_id: string;
1965
1965
  /** channel all message */
1966
1966
  is_mute: boolean;
1967
1967
  /** age restricted */
@@ -2025,6 +2025,12 @@ export interface ListChannelDescsRequest {
2025
2025
  channel_type: number;
2026
2026
  }
2027
2027
 
2028
+ /** List channel description detail */
2029
+ export interface ListChannelDetailRequest {
2030
+ /** channel id */
2031
+ channel_id: string;
2032
+ }
2033
+
2028
2034
  /** Add a role for channel. */
2029
2035
  export interface AddRoleChannelDescRequest {
2030
2036
  /** This is the role that needs to be added to the channel */
@@ -2054,7 +2060,7 @@ export interface CreateChannelDescRequest {
2054
2060
  /** The users to add. */
2055
2061
  user_ids: string[];
2056
2062
  /** app url for channel type app */
2057
- app_url: string | undefined;
2063
+ app_id: string;
2058
2064
  }
2059
2065
 
2060
2066
  /** Delete a channel the user has access to. */
@@ -2076,9 +2082,7 @@ export interface UpdateChannelDescRequest {
2076
2082
  | string
2077
2083
  | undefined;
2078
2084
  /** app url for channel type app */
2079
- app_url:
2080
- | string
2081
- | undefined;
2085
+ app_id: string;
2082
2086
  /** topic */
2083
2087
  topic: string;
2084
2088
  /** */
@@ -2920,6 +2924,8 @@ export interface App {
2920
2924
  role: number;
2921
2925
  /** about */
2922
2926
  about: string;
2927
+ /** app url */
2928
+ app_url: string;
2923
2929
  }
2924
2930
 
2925
2931
  /** Delete a app. */
@@ -2952,6 +2958,12 @@ export interface AddAppRequest {
2952
2958
  role: number;
2953
2959
  /** Is shadow. */
2954
2960
  is_shadow: boolean;
2961
+ /** App url. */
2962
+ app_url: string;
2963
+ /** app logo */
2964
+ app_logo: string;
2965
+ /** about me */
2966
+ about_me: string;
2955
2967
  }
2956
2968
 
2957
2969
  /** List (and optionally filter) users. */
@@ -2986,6 +2998,8 @@ export interface UpdateAppRequest {
2986
2998
  | undefined;
2987
2999
  /** about the app. */
2988
3000
  about: string;
3001
+ /** App url. */
3002
+ app_url: string;
2989
3003
  }
2990
3004
 
2991
3005
  /** The identifier for an app. */
@@ -17544,7 +17558,7 @@ function createBaseChannelDescription(): ChannelDescription {
17544
17558
  metadata: [],
17545
17559
  about_me: [],
17546
17560
  clan_name: "",
17547
- app_url: "",
17561
+ app_id: "",
17548
17562
  is_mute: false,
17549
17563
  age_restricted: 0,
17550
17564
  topic: "",
@@ -17632,8 +17646,8 @@ export const ChannelDescription = {
17632
17646
  if (message.clan_name !== "") {
17633
17647
  writer.uint32(202).string(message.clan_name);
17634
17648
  }
17635
- if (message.app_url !== "") {
17636
- writer.uint32(210).string(message.app_url);
17649
+ if (message.app_id !== "") {
17650
+ writer.uint32(210).string(message.app_id);
17637
17651
  }
17638
17652
  if (message.is_mute !== false) {
17639
17653
  writer.uint32(216).bool(message.is_mute);
@@ -17850,7 +17864,7 @@ export const ChannelDescription = {
17850
17864
  break;
17851
17865
  }
17852
17866
 
17853
- message.app_url = reader.string();
17867
+ message.app_id = reader.string();
17854
17868
  continue;
17855
17869
  case 27:
17856
17870
  if (tag !== 216) {
@@ -17935,7 +17949,7 @@ export const ChannelDescription = {
17935
17949
  : [],
17936
17950
  about_me: globalThis.Array.isArray(object?.about_me) ? object.about_me.map((e: any) => globalThis.String(e)) : [],
17937
17951
  clan_name: isSet(object.clan_name) ? globalThis.String(object.clan_name) : "",
17938
- app_url: isSet(object.app_url) ? globalThis.String(object.app_url) : "",
17952
+ app_id: isSet(object.app_id) ? globalThis.String(object.app_id) : "",
17939
17953
  is_mute: isSet(object.is_mute) ? globalThis.Boolean(object.is_mute) : false,
17940
17954
  age_restricted: isSet(object.age_restricted) ? globalThis.Number(object.age_restricted) : 0,
17941
17955
  topic: isSet(object.topic) ? globalThis.String(object.topic) : "",
@@ -18023,8 +18037,8 @@ export const ChannelDescription = {
18023
18037
  if (message.clan_name !== "") {
18024
18038
  obj.clan_name = message.clan_name;
18025
18039
  }
18026
- if (message.app_url !== "") {
18027
- obj.app_url = message.app_url;
18040
+ if (message.app_id !== "") {
18041
+ obj.app_id = message.app_id;
18028
18042
  }
18029
18043
  if (message.is_mute !== false) {
18030
18044
  obj.is_mute = message.is_mute;
@@ -18078,7 +18092,7 @@ export const ChannelDescription = {
18078
18092
  message.metadata = object.metadata?.map((e) => e) || [];
18079
18093
  message.about_me = object.about_me?.map((e) => e) || [];
18080
18094
  message.clan_name = object.clan_name ?? "";
18081
- message.app_url = object.app_url ?? "";
18095
+ message.app_id = object.app_id ?? "";
18082
18096
  message.is_mute = object.is_mute ?? false;
18083
18097
  message.age_restricted = object.age_restricted ?? 0;
18084
18098
  message.topic = object.topic ?? "";
@@ -18462,6 +18476,63 @@ export const ListChannelDescsRequest = {
18462
18476
  },
18463
18477
  };
18464
18478
 
18479
+ function createBaseListChannelDetailRequest(): ListChannelDetailRequest {
18480
+ return { channel_id: "" };
18481
+ }
18482
+
18483
+ export const ListChannelDetailRequest = {
18484
+ encode(message: ListChannelDetailRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
18485
+ if (message.channel_id !== "") {
18486
+ writer.uint32(10).string(message.channel_id);
18487
+ }
18488
+ return writer;
18489
+ },
18490
+
18491
+ decode(input: _m0.Reader | Uint8Array, length?: number): ListChannelDetailRequest {
18492
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
18493
+ let end = length === undefined ? reader.len : reader.pos + length;
18494
+ const message = createBaseListChannelDetailRequest();
18495
+ while (reader.pos < end) {
18496
+ const tag = reader.uint32();
18497
+ switch (tag >>> 3) {
18498
+ case 1:
18499
+ if (tag !== 10) {
18500
+ break;
18501
+ }
18502
+
18503
+ message.channel_id = reader.string();
18504
+ continue;
18505
+ }
18506
+ if ((tag & 7) === 4 || tag === 0) {
18507
+ break;
18508
+ }
18509
+ reader.skipType(tag & 7);
18510
+ }
18511
+ return message;
18512
+ },
18513
+
18514
+ fromJSON(object: any): ListChannelDetailRequest {
18515
+ return { channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "" };
18516
+ },
18517
+
18518
+ toJSON(message: ListChannelDetailRequest): unknown {
18519
+ const obj: any = {};
18520
+ if (message.channel_id !== "") {
18521
+ obj.channel_id = message.channel_id;
18522
+ }
18523
+ return obj;
18524
+ },
18525
+
18526
+ create<I extends Exact<DeepPartial<ListChannelDetailRequest>, I>>(base?: I): ListChannelDetailRequest {
18527
+ return ListChannelDetailRequest.fromPartial(base ?? ({} as any));
18528
+ },
18529
+ fromPartial<I extends Exact<DeepPartial<ListChannelDetailRequest>, I>>(object: I): ListChannelDetailRequest {
18530
+ const message = createBaseListChannelDetailRequest();
18531
+ message.channel_id = object.channel_id ?? "";
18532
+ return message;
18533
+ },
18534
+ };
18535
+
18465
18536
  function createBaseAddRoleChannelDescRequest(): AddRoleChannelDescRequest {
18466
18537
  return { role_ids: [], channel_id: "" };
18467
18538
  }
@@ -18546,7 +18617,7 @@ function createBaseCreateChannelDescRequest(): CreateChannelDescRequest {
18546
18617
  channel_label: "",
18547
18618
  channel_private: 0,
18548
18619
  user_ids: [],
18549
- app_url: undefined,
18620
+ app_id: "",
18550
18621
  };
18551
18622
  }
18552
18623
 
@@ -18576,8 +18647,8 @@ export const CreateChannelDescRequest = {
18576
18647
  for (const v of message.user_ids) {
18577
18648
  writer.uint32(66).string(v!);
18578
18649
  }
18579
- if (message.app_url !== undefined) {
18580
- StringValue.encode({ value: message.app_url! }, writer.uint32(74).fork()).ldelim();
18650
+ if (message.app_id !== "") {
18651
+ writer.uint32(74).string(message.app_id);
18581
18652
  }
18582
18653
  return writer;
18583
18654
  },
@@ -18650,7 +18721,7 @@ export const CreateChannelDescRequest = {
18650
18721
  break;
18651
18722
  }
18652
18723
 
18653
- message.app_url = StringValue.decode(reader, reader.uint32()).value;
18724
+ message.app_id = reader.string();
18654
18725
  continue;
18655
18726
  }
18656
18727
  if ((tag & 7) === 4 || tag === 0) {
@@ -18671,7 +18742,7 @@ export const CreateChannelDescRequest = {
18671
18742
  channel_label: isSet(object.channel_label) ? globalThis.String(object.channel_label) : "",
18672
18743
  channel_private: isSet(object.channel_private) ? globalThis.Number(object.channel_private) : 0,
18673
18744
  user_ids: globalThis.Array.isArray(object?.user_ids) ? object.user_ids.map((e: any) => globalThis.String(e)) : [],
18674
- app_url: isSet(object.app_url) ? String(object.app_url) : undefined,
18745
+ app_id: isSet(object.app_id) ? globalThis.String(object.app_id) : "",
18675
18746
  };
18676
18747
  },
18677
18748
 
@@ -18701,8 +18772,8 @@ export const CreateChannelDescRequest = {
18701
18772
  if (message.user_ids?.length) {
18702
18773
  obj.user_ids = message.user_ids;
18703
18774
  }
18704
- if (message.app_url !== undefined) {
18705
- obj.app_url = message.app_url;
18775
+ if (message.app_id !== "") {
18776
+ obj.app_id = message.app_id;
18706
18777
  }
18707
18778
  return obj;
18708
18779
  },
@@ -18720,7 +18791,7 @@ export const CreateChannelDescRequest = {
18720
18791
  message.channel_label = object.channel_label ?? "";
18721
18792
  message.channel_private = object.channel_private ?? 0;
18722
18793
  message.user_ids = object.user_ids?.map((e) => e) || [];
18723
- message.app_url = object.app_url ?? undefined;
18794
+ message.app_id = object.app_id ?? "";
18724
18795
  return message;
18725
18796
  },
18726
18797
  };
@@ -18787,7 +18858,7 @@ function createBaseUpdateChannelDescRequest(): UpdateChannelDescRequest {
18787
18858
  channel_id: "",
18788
18859
  channel_label: undefined,
18789
18860
  category_id: undefined,
18790
- app_url: undefined,
18861
+ app_id: "",
18791
18862
  topic: "",
18792
18863
  age_restricted: 0,
18793
18864
  e2ee: 0,
@@ -18805,8 +18876,8 @@ export const UpdateChannelDescRequest = {
18805
18876
  if (message.category_id !== undefined) {
18806
18877
  StringValue.encode({ value: message.category_id! }, writer.uint32(26).fork()).ldelim();
18807
18878
  }
18808
- if (message.app_url !== undefined) {
18809
- StringValue.encode({ value: message.app_url! }, writer.uint32(34).fork()).ldelim();
18879
+ if (message.app_id !== "") {
18880
+ writer.uint32(34).string(message.app_id);
18810
18881
  }
18811
18882
  if (message.topic !== "") {
18812
18883
  writer.uint32(42).string(message.topic);
@@ -18853,7 +18924,7 @@ export const UpdateChannelDescRequest = {
18853
18924
  break;
18854
18925
  }
18855
18926
 
18856
- message.app_url = StringValue.decode(reader, reader.uint32()).value;
18927
+ message.app_id = reader.string();
18857
18928
  continue;
18858
18929
  case 5:
18859
18930
  if (tag !== 42) {
@@ -18890,7 +18961,7 @@ export const UpdateChannelDescRequest = {
18890
18961
  channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
18891
18962
  channel_label: isSet(object.channel_label) ? String(object.channel_label) : undefined,
18892
18963
  category_id: isSet(object.category_id) ? String(object.category_id) : undefined,
18893
- app_url: isSet(object.app_url) ? String(object.app_url) : undefined,
18964
+ app_id: isSet(object.app_id) ? globalThis.String(object.app_id) : "",
18894
18965
  topic: isSet(object.topic) ? globalThis.String(object.topic) : "",
18895
18966
  age_restricted: isSet(object.age_restricted) ? globalThis.Number(object.age_restricted) : 0,
18896
18967
  e2ee: isSet(object.e2ee) ? globalThis.Number(object.e2ee) : 0,
@@ -18908,8 +18979,8 @@ export const UpdateChannelDescRequest = {
18908
18979
  if (message.category_id !== undefined) {
18909
18980
  obj.category_id = message.category_id;
18910
18981
  }
18911
- if (message.app_url !== undefined) {
18912
- obj.app_url = message.app_url;
18982
+ if (message.app_id !== "") {
18983
+ obj.app_id = message.app_id;
18913
18984
  }
18914
18985
  if (message.topic !== "") {
18915
18986
  obj.topic = message.topic;
@@ -18931,7 +19002,7 @@ export const UpdateChannelDescRequest = {
18931
19002
  message.channel_id = object.channel_id ?? "";
18932
19003
  message.channel_label = object.channel_label ?? undefined;
18933
19004
  message.category_id = object.category_id ?? undefined;
18934
- message.app_url = object.app_url ?? undefined;
19005
+ message.app_id = object.app_id ?? "";
18935
19006
  message.topic = object.topic ?? "";
18936
19007
  message.age_restricted = object.age_restricted ?? 0;
18937
19008
  message.e2ee = object.e2ee ?? 0;
@@ -27953,6 +28024,7 @@ function createBaseApp(): App {
27953
28024
  token: "",
27954
28025
  role: 0,
27955
28026
  about: "",
28027
+ app_url: "",
27956
28028
  };
27957
28029
  }
27958
28030
 
@@ -27985,6 +28057,9 @@ export const App = {
27985
28057
  if (message.about !== "") {
27986
28058
  writer.uint32(74).string(message.about);
27987
28059
  }
28060
+ if (message.app_url !== "") {
28061
+ writer.uint32(82).string(message.app_url);
28062
+ }
27988
28063
  return writer;
27989
28064
  },
27990
28065
 
@@ -28058,6 +28133,13 @@ export const App = {
28058
28133
 
28059
28134
  message.about = reader.string();
28060
28135
  continue;
28136
+ case 10:
28137
+ if (tag !== 82) {
28138
+ break;
28139
+ }
28140
+
28141
+ message.app_url = reader.string();
28142
+ continue;
28061
28143
  }
28062
28144
  if ((tag & 7) === 4 || tag === 0) {
28063
28145
  break;
@@ -28078,6 +28160,7 @@ export const App = {
28078
28160
  token: isSet(object.token) ? globalThis.String(object.token) : "",
28079
28161
  role: isSet(object.role) ? globalThis.Number(object.role) : 0,
28080
28162
  about: isSet(object.about) ? globalThis.String(object.about) : "",
28163
+ app_url: isSet(object.app_url) ? globalThis.String(object.app_url) : "",
28081
28164
  };
28082
28165
  },
28083
28166
 
@@ -28110,6 +28193,9 @@ export const App = {
28110
28193
  if (message.about !== "") {
28111
28194
  obj.about = message.about;
28112
28195
  }
28196
+ if (message.app_url !== "") {
28197
+ obj.app_url = message.app_url;
28198
+ }
28113
28199
  return obj;
28114
28200
  },
28115
28201
 
@@ -28127,6 +28213,7 @@ export const App = {
28127
28213
  message.token = object.token ?? "";
28128
28214
  message.role = object.role ?? 0;
28129
28215
  message.about = object.about ?? "";
28216
+ message.app_url = object.app_url ?? "";
28130
28217
  return message;
28131
28218
  },
28132
28219
  };
@@ -28295,7 +28382,7 @@ export const AppList = {
28295
28382
  };
28296
28383
 
28297
28384
  function createBaseAddAppRequest(): AddAppRequest {
28298
- return { appname: "", token: "", creator_id: "", role: 0, is_shadow: false };
28385
+ return { appname: "", token: "", creator_id: "", role: 0, is_shadow: false, app_url: "", app_logo: "", about_me: "" };
28299
28386
  }
28300
28387
 
28301
28388
  export const AddAppRequest = {
@@ -28315,6 +28402,15 @@ export const AddAppRequest = {
28315
28402
  if (message.is_shadow !== false) {
28316
28403
  writer.uint32(40).bool(message.is_shadow);
28317
28404
  }
28405
+ if (message.app_url !== "") {
28406
+ writer.uint32(50).string(message.app_url);
28407
+ }
28408
+ if (message.app_logo !== "") {
28409
+ writer.uint32(58).string(message.app_logo);
28410
+ }
28411
+ if (message.about_me !== "") {
28412
+ writer.uint32(66).string(message.about_me);
28413
+ }
28318
28414
  return writer;
28319
28415
  },
28320
28416
 
@@ -28360,6 +28456,27 @@ export const AddAppRequest = {
28360
28456
 
28361
28457
  message.is_shadow = reader.bool();
28362
28458
  continue;
28459
+ case 6:
28460
+ if (tag !== 50) {
28461
+ break;
28462
+ }
28463
+
28464
+ message.app_url = reader.string();
28465
+ continue;
28466
+ case 7:
28467
+ if (tag !== 58) {
28468
+ break;
28469
+ }
28470
+
28471
+ message.app_logo = reader.string();
28472
+ continue;
28473
+ case 8:
28474
+ if (tag !== 66) {
28475
+ break;
28476
+ }
28477
+
28478
+ message.about_me = reader.string();
28479
+ continue;
28363
28480
  }
28364
28481
  if ((tag & 7) === 4 || tag === 0) {
28365
28482
  break;
@@ -28376,6 +28493,9 @@ export const AddAppRequest = {
28376
28493
  creator_id: isSet(object.creator_id) ? globalThis.String(object.creator_id) : "",
28377
28494
  role: isSet(object.role) ? globalThis.Number(object.role) : 0,
28378
28495
  is_shadow: isSet(object.is_shadow) ? globalThis.Boolean(object.is_shadow) : false,
28496
+ app_url: isSet(object.app_url) ? globalThis.String(object.app_url) : "",
28497
+ app_logo: isSet(object.app_logo) ? globalThis.String(object.app_logo) : "",
28498
+ about_me: isSet(object.about_me) ? globalThis.String(object.about_me) : "",
28379
28499
  };
28380
28500
  },
28381
28501
 
@@ -28396,6 +28516,15 @@ export const AddAppRequest = {
28396
28516
  if (message.is_shadow !== false) {
28397
28517
  obj.is_shadow = message.is_shadow;
28398
28518
  }
28519
+ if (message.app_url !== "") {
28520
+ obj.app_url = message.app_url;
28521
+ }
28522
+ if (message.app_logo !== "") {
28523
+ obj.app_logo = message.app_logo;
28524
+ }
28525
+ if (message.about_me !== "") {
28526
+ obj.about_me = message.about_me;
28527
+ }
28399
28528
  return obj;
28400
28529
  },
28401
28530
 
@@ -28409,6 +28538,9 @@ export const AddAppRequest = {
28409
28538
  message.creator_id = object.creator_id ?? "";
28410
28539
  message.role = object.role ?? 0;
28411
28540
  message.is_shadow = object.is_shadow ?? false;
28541
+ message.app_url = object.app_url ?? "";
28542
+ message.app_logo = object.app_logo ?? "";
28543
+ message.about_me = object.about_me ?? "";
28412
28544
  return message;
28413
28545
  },
28414
28546
  };
@@ -28503,7 +28635,15 @@ export const ListAppsRequest = {
28503
28635
  };
28504
28636
 
28505
28637
  function createBaseUpdateAppRequest(): UpdateAppRequest {
28506
- return { id: "", appname: undefined, metadata: undefined, applogo: undefined, token: undefined, about: "" };
28638
+ return {
28639
+ id: "",
28640
+ appname: undefined,
28641
+ metadata: undefined,
28642
+ applogo: undefined,
28643
+ token: undefined,
28644
+ about: "",
28645
+ app_url: "",
28646
+ };
28507
28647
  }
28508
28648
 
28509
28649
  export const UpdateAppRequest = {
@@ -28526,6 +28666,9 @@ export const UpdateAppRequest = {
28526
28666
  if (message.about !== "") {
28527
28667
  writer.uint32(50).string(message.about);
28528
28668
  }
28669
+ if (message.app_url !== "") {
28670
+ writer.uint32(58).string(message.app_url);
28671
+ }
28529
28672
  return writer;
28530
28673
  },
28531
28674
 
@@ -28578,6 +28721,13 @@ export const UpdateAppRequest = {
28578
28721
 
28579
28722
  message.about = reader.string();
28580
28723
  continue;
28724
+ case 7:
28725
+ if (tag !== 58) {
28726
+ break;
28727
+ }
28728
+
28729
+ message.app_url = reader.string();
28730
+ continue;
28581
28731
  }
28582
28732
  if ((tag & 7) === 4 || tag === 0) {
28583
28733
  break;
@@ -28595,6 +28745,7 @@ export const UpdateAppRequest = {
28595
28745
  applogo: isSet(object.applogo) ? String(object.applogo) : undefined,
28596
28746
  token: isSet(object.token) ? String(object.token) : undefined,
28597
28747
  about: isSet(object.about) ? globalThis.String(object.about) : "",
28748
+ app_url: isSet(object.app_url) ? globalThis.String(object.app_url) : "",
28598
28749
  };
28599
28750
  },
28600
28751
 
@@ -28618,6 +28769,9 @@ export const UpdateAppRequest = {
28618
28769
  if (message.about !== "") {
28619
28770
  obj.about = message.about;
28620
28771
  }
28772
+ if (message.app_url !== "") {
28773
+ obj.app_url = message.app_url;
28774
+ }
28621
28775
  return obj;
28622
28776
  },
28623
28777
 
@@ -28632,6 +28786,7 @@ export const UpdateAppRequest = {
28632
28786
  message.applogo = object.applogo ?? undefined;
28633
28787
  message.token = object.token ?? undefined;
28634
28788
  message.about = object.about ?? "";
28789
+ message.app_url = object.app_url ?? "";
28635
28790
  return message;
28636
28791
  },
28637
28792
  };