mezon-js-protobuf 1.7.29 → 1.7.30

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
@@ -359,6 +359,8 @@ export interface SessionRefreshRequest {
359
359
  token: string;
360
360
  /** Extra information that will be bundled in the session token. */
361
361
  vars: { [key: string]: string };
362
+ /** Whether to enable "Remember Me" for extended session duration. */
363
+ is_remember: boolean | undefined;
362
364
  }
363
365
 
364
366
  export interface SessionRefreshRequest_VarsEntry {
@@ -509,6 +511,8 @@ export interface AuthenticateMezonRequest {
509
511
  | undefined;
510
512
  /** Set the username on the account at register. Must be unique. */
511
513
  username: string;
514
+ /** Whether to enable "Remember Me" for extended session duration. */
515
+ is_remember: boolean | undefined;
512
516
  }
513
517
 
514
518
  /** Authenticate against the server with Steam. */
@@ -705,6 +709,8 @@ export interface MessageAttachment {
705
709
  width: number;
706
710
  /** Attachment width */
707
711
  height: number;
712
+ /** thumbnail */
713
+ thumbnail: string;
708
714
  }
709
715
 
710
716
  /** Message reference */
@@ -1416,6 +1422,8 @@ export interface Session {
1416
1422
  refresh_token: string;
1417
1423
  /** User id */
1418
1424
  user_id: string;
1425
+ /** Whether to enable "Remember Me" for extended session duration. */
1426
+ is_remember: boolean;
1419
1427
  }
1420
1428
 
1421
1429
  /** Update a user's account details. */
@@ -1529,16 +1537,20 @@ export interface User {
1529
1537
  | undefined;
1530
1538
  /** The Apple Sign In ID in the user's account. */
1531
1539
  apple_id: string;
1532
- /** */
1540
+ /** About me */
1533
1541
  about_me: string;
1534
- /** */
1542
+ /** Join time */
1535
1543
  join_time:
1536
1544
  | Date
1537
1545
  | undefined;
1538
- /** platform */
1546
+ /** Platform */
1539
1547
  is_mobile: boolean;
1540
- /** */
1541
- dob: Date | undefined;
1548
+ /** dob */
1549
+ dob:
1550
+ | Date
1551
+ | undefined;
1552
+ /** Mezone id */
1553
+ mezon_id: string;
1542
1554
  }
1543
1555
 
1544
1556
  /** A list of groups belonging to a user, along with the user's role in each group. */
@@ -3514,6 +3526,8 @@ export interface LoginRequest {
3514
3526
  export interface ConfirmLoginRequest {
3515
3527
  /** loginId */
3516
3528
  login_id: string;
3529
+ /** Whether to enable "Remember Me" for extended session duration. */
3530
+ is_remember: boolean | undefined;
3517
3531
  }
3518
3532
 
3519
3533
  export interface SendTokenRequest {
@@ -6149,7 +6163,7 @@ export const AddGroupUsersRequest = {
6149
6163
  };
6150
6164
 
6151
6165
  function createBaseSessionRefreshRequest(): SessionRefreshRequest {
6152
- return { token: "", vars: {} };
6166
+ return { token: "", vars: {}, is_remember: undefined };
6153
6167
  }
6154
6168
 
6155
6169
  export const SessionRefreshRequest = {
@@ -6160,6 +6174,9 @@ export const SessionRefreshRequest = {
6160
6174
  Object.entries(message.vars).forEach(([key, value]) => {
6161
6175
  SessionRefreshRequest_VarsEntry.encode({ key: key as any, value }, writer.uint32(18).fork()).ldelim();
6162
6176
  });
6177
+ if (message.is_remember !== undefined) {
6178
+ BoolValue.encode({ value: message.is_remember! }, writer.uint32(26).fork()).ldelim();
6179
+ }
6163
6180
  return writer;
6164
6181
  },
6165
6182
 
@@ -6187,6 +6204,13 @@ export const SessionRefreshRequest = {
6187
6204
  message.vars[entry2.key] = entry2.value;
6188
6205
  }
6189
6206
  continue;
6207
+ case 3:
6208
+ if (tag !== 26) {
6209
+ break;
6210
+ }
6211
+
6212
+ message.is_remember = BoolValue.decode(reader, reader.uint32()).value;
6213
+ continue;
6190
6214
  }
6191
6215
  if ((tag & 7) === 4 || tag === 0) {
6192
6216
  break;
@@ -6205,6 +6229,7 @@ export const SessionRefreshRequest = {
6205
6229
  return acc;
6206
6230
  }, {})
6207
6231
  : {},
6232
+ is_remember: isSet(object.is_remember) ? Boolean(object.is_remember) : undefined,
6208
6233
  };
6209
6234
  },
6210
6235
 
@@ -6222,6 +6247,9 @@ export const SessionRefreshRequest = {
6222
6247
  });
6223
6248
  }
6224
6249
  }
6250
+ if (message.is_remember !== undefined) {
6251
+ obj.is_remember = message.is_remember;
6252
+ }
6225
6253
  return obj;
6226
6254
  },
6227
6255
 
@@ -6237,6 +6265,7 @@ export const SessionRefreshRequest = {
6237
6265
  }
6238
6266
  return acc;
6239
6267
  }, {});
6268
+ message.is_remember = object.is_remember ?? undefined;
6240
6269
  return message;
6241
6270
  },
6242
6271
  };
@@ -7288,7 +7317,7 @@ export const AuthenticateGoogleRequest = {
7288
7317
  };
7289
7318
 
7290
7319
  function createBaseAuthenticateMezonRequest(): AuthenticateMezonRequest {
7291
- return { account: undefined, create: undefined, username: "" };
7320
+ return { account: undefined, create: undefined, username: "", is_remember: undefined };
7292
7321
  }
7293
7322
 
7294
7323
  export const AuthenticateMezonRequest = {
@@ -7302,6 +7331,9 @@ export const AuthenticateMezonRequest = {
7302
7331
  if (message.username !== "") {
7303
7332
  writer.uint32(26).string(message.username);
7304
7333
  }
7334
+ if (message.is_remember !== undefined) {
7335
+ BoolValue.encode({ value: message.is_remember! }, writer.uint32(34).fork()).ldelim();
7336
+ }
7305
7337
  return writer;
7306
7338
  },
7307
7339
 
@@ -7333,6 +7365,13 @@ export const AuthenticateMezonRequest = {
7333
7365
 
7334
7366
  message.username = reader.string();
7335
7367
  continue;
7368
+ case 4:
7369
+ if (tag !== 34) {
7370
+ break;
7371
+ }
7372
+
7373
+ message.is_remember = BoolValue.decode(reader, reader.uint32()).value;
7374
+ continue;
7336
7375
  }
7337
7376
  if ((tag & 7) === 4 || tag === 0) {
7338
7377
  break;
@@ -7347,6 +7386,7 @@ export const AuthenticateMezonRequest = {
7347
7386
  account: isSet(object.account) ? AccountMezon.fromJSON(object.account) : undefined,
7348
7387
  create: isSet(object.create) ? Boolean(object.create) : undefined,
7349
7388
  username: isSet(object.username) ? globalThis.String(object.username) : "",
7389
+ is_remember: isSet(object.is_remember) ? Boolean(object.is_remember) : undefined,
7350
7390
  };
7351
7391
  },
7352
7392
 
@@ -7361,6 +7401,9 @@ export const AuthenticateMezonRequest = {
7361
7401
  if (message.username !== "") {
7362
7402
  obj.username = message.username;
7363
7403
  }
7404
+ if (message.is_remember !== undefined) {
7405
+ obj.is_remember = message.is_remember;
7406
+ }
7364
7407
  return obj;
7365
7408
  },
7366
7409
 
@@ -7374,6 +7417,7 @@ export const AuthenticateMezonRequest = {
7374
7417
  : undefined;
7375
7418
  message.create = object.create ?? undefined;
7376
7419
  message.username = object.username ?? "";
7420
+ message.is_remember = object.is_remember ?? undefined;
7377
7421
  return message;
7378
7422
  },
7379
7423
  };
@@ -8800,7 +8844,7 @@ export const MessageReaction = {
8800
8844
  };
8801
8845
 
8802
8846
  function createBaseMessageAttachment(): MessageAttachment {
8803
- return { filename: "", size: 0, url: "", filetype: "", width: 0, height: 0 };
8847
+ return { filename: "", size: 0, url: "", filetype: "", width: 0, height: 0, thumbnail: "" };
8804
8848
  }
8805
8849
 
8806
8850
  export const MessageAttachment = {
@@ -8823,6 +8867,9 @@ export const MessageAttachment = {
8823
8867
  if (message.height !== 0) {
8824
8868
  writer.uint32(48).int32(message.height);
8825
8869
  }
8870
+ if (message.thumbnail !== "") {
8871
+ writer.uint32(58).string(message.thumbnail);
8872
+ }
8826
8873
  return writer;
8827
8874
  },
8828
8875
 
@@ -8875,6 +8922,13 @@ export const MessageAttachment = {
8875
8922
 
8876
8923
  message.height = reader.int32();
8877
8924
  continue;
8925
+ case 7:
8926
+ if (tag !== 58) {
8927
+ break;
8928
+ }
8929
+
8930
+ message.thumbnail = reader.string();
8931
+ continue;
8878
8932
  }
8879
8933
  if ((tag & 7) === 4 || tag === 0) {
8880
8934
  break;
@@ -8892,6 +8946,7 @@ export const MessageAttachment = {
8892
8946
  filetype: isSet(object.filetype) ? globalThis.String(object.filetype) : "",
8893
8947
  width: isSet(object.width) ? globalThis.Number(object.width) : 0,
8894
8948
  height: isSet(object.height) ? globalThis.Number(object.height) : 0,
8949
+ thumbnail: isSet(object.thumbnail) ? globalThis.String(object.thumbnail) : "",
8895
8950
  };
8896
8951
  },
8897
8952
 
@@ -8915,6 +8970,9 @@ export const MessageAttachment = {
8915
8970
  if (message.height !== 0) {
8916
8971
  obj.height = Math.round(message.height);
8917
8972
  }
8973
+ if (message.thumbnail !== "") {
8974
+ obj.thumbnail = message.thumbnail;
8975
+ }
8918
8976
  return obj;
8919
8977
  },
8920
8978
 
@@ -8929,6 +8987,7 @@ export const MessageAttachment = {
8929
8987
  message.filetype = object.filetype ?? "";
8930
8988
  message.width = object.width ?? 0;
8931
8989
  message.height = object.height ?? 0;
8990
+ message.thumbnail = object.thumbnail ?? "";
8932
8991
  return message;
8933
8992
  },
8934
8993
  };
@@ -13795,7 +13854,7 @@ export const Rpc = {
13795
13854
  };
13796
13855
 
13797
13856
  function createBaseSession(): Session {
13798
- return { created: false, token: "", refresh_token: "", user_id: "" };
13857
+ return { created: false, token: "", refresh_token: "", user_id: "", is_remember: false };
13799
13858
  }
13800
13859
 
13801
13860
  export const Session = {
@@ -13812,6 +13871,9 @@ export const Session = {
13812
13871
  if (message.user_id !== "") {
13813
13872
  writer.uint32(34).string(message.user_id);
13814
13873
  }
13874
+ if (message.is_remember !== false) {
13875
+ writer.uint32(40).bool(message.is_remember);
13876
+ }
13815
13877
  return writer;
13816
13878
  },
13817
13879
 
@@ -13850,6 +13912,13 @@ export const Session = {
13850
13912
 
13851
13913
  message.user_id = reader.string();
13852
13914
  continue;
13915
+ case 5:
13916
+ if (tag !== 40) {
13917
+ break;
13918
+ }
13919
+
13920
+ message.is_remember = reader.bool();
13921
+ continue;
13853
13922
  }
13854
13923
  if ((tag & 7) === 4 || tag === 0) {
13855
13924
  break;
@@ -13865,6 +13934,7 @@ export const Session = {
13865
13934
  token: isSet(object.token) ? globalThis.String(object.token) : "",
13866
13935
  refresh_token: isSet(object.refresh_token) ? globalThis.String(object.refresh_token) : "",
13867
13936
  user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "",
13937
+ is_remember: isSet(object.is_remember) ? globalThis.Boolean(object.is_remember) : false,
13868
13938
  };
13869
13939
  },
13870
13940
 
@@ -13882,6 +13952,9 @@ export const Session = {
13882
13952
  if (message.user_id !== "") {
13883
13953
  obj.user_id = message.user_id;
13884
13954
  }
13955
+ if (message.is_remember !== false) {
13956
+ obj.is_remember = message.is_remember;
13957
+ }
13885
13958
  return obj;
13886
13959
  },
13887
13960
 
@@ -13894,6 +13967,7 @@ export const Session = {
13894
13967
  message.token = object.token ?? "";
13895
13968
  message.refresh_token = object.refresh_token ?? "";
13896
13969
  message.user_id = object.user_id ?? "";
13970
+ message.is_remember = object.is_remember ?? false;
13897
13971
  return message;
13898
13972
  },
13899
13973
  };
@@ -14372,6 +14446,7 @@ function createBaseUser(): User {
14372
14446
  join_time: undefined,
14373
14447
  is_mobile: false,
14374
14448
  dob: undefined,
14449
+ mezon_id: "",
14375
14450
  };
14376
14451
  }
14377
14452
 
@@ -14440,6 +14515,9 @@ export const User = {
14440
14515
  if (message.dob !== undefined) {
14441
14516
  Timestamp.encode(toTimestamp(message.dob), writer.uint32(170).fork()).ldelim();
14442
14517
  }
14518
+ if (message.mezon_id !== "") {
14519
+ writer.uint32(178).string(message.mezon_id);
14520
+ }
14443
14521
  return writer;
14444
14522
  },
14445
14523
 
@@ -14597,6 +14675,13 @@ export const User = {
14597
14675
 
14598
14676
  message.dob = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
14599
14677
  continue;
14678
+ case 22:
14679
+ if (tag !== 178) {
14680
+ break;
14681
+ }
14682
+
14683
+ message.mezon_id = reader.string();
14684
+ continue;
14600
14685
  }
14601
14686
  if ((tag & 7) === 4 || tag === 0) {
14602
14687
  break;
@@ -14629,6 +14714,7 @@ export const User = {
14629
14714
  join_time: isSet(object.join_time) ? fromJsonTimestamp(object.join_time) : undefined,
14630
14715
  is_mobile: isSet(object.is_mobile) ? globalThis.Boolean(object.is_mobile) : false,
14631
14716
  dob: isSet(object.dob) ? fromJsonTimestamp(object.dob) : undefined,
14717
+ mezon_id: isSet(object.mezon_id) ? globalThis.String(object.mezon_id) : "",
14632
14718
  };
14633
14719
  },
14634
14720
 
@@ -14697,6 +14783,9 @@ export const User = {
14697
14783
  if (message.dob !== undefined) {
14698
14784
  obj.dob = message.dob.toISOString();
14699
14785
  }
14786
+ if (message.mezon_id !== "") {
14787
+ obj.mezon_id = message.mezon_id;
14788
+ }
14700
14789
  return obj;
14701
14790
  },
14702
14791
 
@@ -14726,6 +14815,7 @@ export const User = {
14726
14815
  message.join_time = object.join_time ?? undefined;
14727
14816
  message.is_mobile = object.is_mobile ?? false;
14728
14817
  message.dob = object.dob ?? undefined;
14818
+ message.mezon_id = object.mezon_id ?? "";
14729
14819
  return message;
14730
14820
  },
14731
14821
  };
@@ -33736,7 +33826,7 @@ export const LoginRequest = {
33736
33826
  };
33737
33827
 
33738
33828
  function createBaseConfirmLoginRequest(): ConfirmLoginRequest {
33739
- return { login_id: "" };
33829
+ return { login_id: "", is_remember: undefined };
33740
33830
  }
33741
33831
 
33742
33832
  export const ConfirmLoginRequest = {
@@ -33744,6 +33834,9 @@ export const ConfirmLoginRequest = {
33744
33834
  if (message.login_id !== "") {
33745
33835
  writer.uint32(10).string(message.login_id);
33746
33836
  }
33837
+ if (message.is_remember !== undefined) {
33838
+ BoolValue.encode({ value: message.is_remember! }, writer.uint32(18).fork()).ldelim();
33839
+ }
33747
33840
  return writer;
33748
33841
  },
33749
33842
 
@@ -33761,6 +33854,13 @@ export const ConfirmLoginRequest = {
33761
33854
 
33762
33855
  message.login_id = reader.string();
33763
33856
  continue;
33857
+ case 2:
33858
+ if (tag !== 18) {
33859
+ break;
33860
+ }
33861
+
33862
+ message.is_remember = BoolValue.decode(reader, reader.uint32()).value;
33863
+ continue;
33764
33864
  }
33765
33865
  if ((tag & 7) === 4 || tag === 0) {
33766
33866
  break;
@@ -33771,7 +33871,10 @@ export const ConfirmLoginRequest = {
33771
33871
  },
33772
33872
 
33773
33873
  fromJSON(object: any): ConfirmLoginRequest {
33774
- return { login_id: isSet(object.login_id) ? globalThis.String(object.login_id) : "" };
33874
+ return {
33875
+ login_id: isSet(object.login_id) ? globalThis.String(object.login_id) : "",
33876
+ is_remember: isSet(object.is_remember) ? Boolean(object.is_remember) : undefined,
33877
+ };
33775
33878
  },
33776
33879
 
33777
33880
  toJSON(message: ConfirmLoginRequest): unknown {
@@ -33779,6 +33882,9 @@ export const ConfirmLoginRequest = {
33779
33882
  if (message.login_id !== "") {
33780
33883
  obj.login_id = message.login_id;
33781
33884
  }
33885
+ if (message.is_remember !== undefined) {
33886
+ obj.is_remember = message.is_remember;
33887
+ }
33782
33888
  return obj;
33783
33889
  },
33784
33890
 
@@ -33788,6 +33894,7 @@ export const ConfirmLoginRequest = {
33788
33894
  fromPartial<I extends Exact<DeepPartial<ConfirmLoginRequest>, I>>(object: I): ConfirmLoginRequest {
33789
33895
  const message = createBaseConfirmLoginRequest();
33790
33896
  message.login_id = object.login_id ?? "";
33897
+ message.is_remember = object.is_remember ?? undefined;
33791
33898
  return message;
33792
33899
  },
33793
33900
  };