mezon-js-protobuf 1.5.6 → 1.5.8

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
@@ -164,106 +164,6 @@ export function operatorToJSON(object: Operator): string {
164
164
  }
165
165
  }
166
166
 
167
- export enum AppRole {
168
- USER_ROLE_UNKNOWN = 0,
169
- /** USER_ROLE_ADMIN - All access */
170
- USER_ROLE_ADMIN = 1,
171
- /** USER_ROLE_DEVELOPER - Best for developers, also enables APIs and API explorer */
172
- USER_ROLE_DEVELOPER = 2,
173
- /** USER_ROLE_MAINTAINER - Best for users who regularly update player information. */
174
- USER_ROLE_MAINTAINER = 3,
175
- /** USER_ROLE_READONLY - Read-only role for those only need to view data */
176
- USER_ROLE_READONLY = 4,
177
- UNRECOGNIZED = -1,
178
- }
179
-
180
- export function appRoleFromJSON(object: any): AppRole {
181
- switch (object) {
182
- case 0:
183
- case "USER_ROLE_UNKNOWN":
184
- return AppRole.USER_ROLE_UNKNOWN;
185
- case 1:
186
- case "USER_ROLE_ADMIN":
187
- return AppRole.USER_ROLE_ADMIN;
188
- case 2:
189
- case "USER_ROLE_DEVELOPER":
190
- return AppRole.USER_ROLE_DEVELOPER;
191
- case 3:
192
- case "USER_ROLE_MAINTAINER":
193
- return AppRole.USER_ROLE_MAINTAINER;
194
- case 4:
195
- case "USER_ROLE_READONLY":
196
- return AppRole.USER_ROLE_READONLY;
197
- case -1:
198
- case "UNRECOGNIZED":
199
- default:
200
- return AppRole.UNRECOGNIZED;
201
- }
202
- }
203
-
204
- export function appRoleToJSON(object: AppRole): string {
205
- switch (object) {
206
- case AppRole.USER_ROLE_UNKNOWN:
207
- return "USER_ROLE_UNKNOWN";
208
- case AppRole.USER_ROLE_ADMIN:
209
- return "USER_ROLE_ADMIN";
210
- case AppRole.USER_ROLE_DEVELOPER:
211
- return "USER_ROLE_DEVELOPER";
212
- case AppRole.USER_ROLE_MAINTAINER:
213
- return "USER_ROLE_MAINTAINER";
214
- case AppRole.USER_ROLE_READONLY:
215
- return "USER_ROLE_READONLY";
216
- case AppRole.UNRECOGNIZED:
217
- default:
218
- return "UNRECOGNIZED";
219
- }
220
- }
221
-
222
- export enum StatusHealth {
223
- STATUS_HEALTH_OK = 0,
224
- STATUS_HEALTH_ERROR = 1,
225
- STATUS_HEALTH_CONNECTING = 2,
226
- STATUS_HEALTH_DISCONNECTING = 3,
227
- UNRECOGNIZED = -1,
228
- }
229
-
230
- export function statusHealthFromJSON(object: any): StatusHealth {
231
- switch (object) {
232
- case 0:
233
- case "STATUS_HEALTH_OK":
234
- return StatusHealth.STATUS_HEALTH_OK;
235
- case 1:
236
- case "STATUS_HEALTH_ERROR":
237
- return StatusHealth.STATUS_HEALTH_ERROR;
238
- case 2:
239
- case "STATUS_HEALTH_CONNECTING":
240
- return StatusHealth.STATUS_HEALTH_CONNECTING;
241
- case 3:
242
- case "STATUS_HEALTH_DISCONNECTING":
243
- return StatusHealth.STATUS_HEALTH_DISCONNECTING;
244
- case -1:
245
- case "UNRECOGNIZED":
246
- default:
247
- return StatusHealth.UNRECOGNIZED;
248
- }
249
- }
250
-
251
- export function statusHealthToJSON(object: StatusHealth): string {
252
- switch (object) {
253
- case StatusHealth.STATUS_HEALTH_OK:
254
- return "STATUS_HEALTH_OK";
255
- case StatusHealth.STATUS_HEALTH_ERROR:
256
- return "STATUS_HEALTH_ERROR";
257
- case StatusHealth.STATUS_HEALTH_CONNECTING:
258
- return "STATUS_HEALTH_CONNECTING";
259
- case StatusHealth.STATUS_HEALTH_DISCONNECTING:
260
- return "STATUS_HEALTH_DISCONNECTING";
261
- case StatusHealth.UNRECOGNIZED:
262
- default:
263
- return "UNRECOGNIZED";
264
- }
265
- }
266
-
267
167
  /** A user with additional account details. Always the current user. */
268
168
  export interface Account {
269
169
  /** The user object. */
@@ -819,22 +719,6 @@ export interface DeleteNotificationsRequest {
819
719
  ids: string[];
820
720
  }
821
721
 
822
- /** Storage objects to delete. */
823
- export interface DeleteStorageObjectId {
824
- /** The collection which stores the object. */
825
- collection: string;
826
- /** The key of the object within the collection. */
827
- key: string;
828
- /** The version hash of the object. */
829
- version: string;
830
- }
831
-
832
- /** Batch delete storage objects. */
833
- export interface DeleteStorageObjectsRequest {
834
- /** Batch of storage objects. */
835
- object_ids: DeleteStorageObjectId[];
836
- }
837
-
838
722
  /** Represents an event to be passed through the server to registered event handlers. */
839
723
  export interface Event {
840
724
  /** An event name, type, category, or identifier. */
@@ -1324,20 +1208,6 @@ export interface ListNotificationsRequest {
1324
1208
  cacheable_cursor: string;
1325
1209
  }
1326
1210
 
1327
- /** List publicly readable storage objects in a given collection. */
1328
- export interface ListStorageObjectsRequest {
1329
- /** ID of the user. */
1330
- user_id: string;
1331
- /** The collection which stores the object. */
1332
- collection: string;
1333
- /** The number of storage objects to list. Between 1 and 100. */
1334
- limit:
1335
- | number
1336
- | undefined;
1337
- /** The cursor to page through results from. */
1338
- cursor: string;
1339
- }
1340
-
1341
1211
  /** List the groups a user is part of, and their relationship to each. */
1342
1212
  export interface ListUserGroupsRequest {
1343
1213
  /** ID of the user. */
@@ -1406,22 +1276,6 @@ export interface DemoteGroupUsersRequest {
1406
1276
  user_ids: string[];
1407
1277
  }
1408
1278
 
1409
- /** Storage objects to get. */
1410
- export interface ReadStorageObjectId {
1411
- /** The collection which stores the object. */
1412
- collection: string;
1413
- /** The key of the object within the collection. */
1414
- key: string;
1415
- /** The user owner of the object. */
1416
- user_id: string;
1417
- }
1418
-
1419
- /** Batch get storage objects. */
1420
- export interface ReadStorageObjectsRequest {
1421
- /** Batch of storage objects. */
1422
- object_ids: ReadStorageObjectId[];
1423
- }
1424
-
1425
1279
  /** Execute an Lua function on the server. */
1426
1280
  export interface Rpc {
1427
1281
  /** The identifier of the function. */
@@ -1442,68 +1296,6 @@ export interface Session {
1442
1296
  refresh_token: string;
1443
1297
  }
1444
1298
 
1445
- /** An object within the storage engine. */
1446
- export interface StorageObject {
1447
- /** The collection which stores the object. */
1448
- collection: string;
1449
- /** The key of the object within the collection. */
1450
- key: string;
1451
- /** The user owner of the object. */
1452
- user_id: string;
1453
- /** The value of the object. */
1454
- value: string;
1455
- /** The version hash of the object. */
1456
- version: string;
1457
- /** The read access permissions for the object. */
1458
- permission_read: number;
1459
- /** The write access permissions for the object. */
1460
- permission_write: number;
1461
- /** The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created. */
1462
- create_time:
1463
- | Date
1464
- | undefined;
1465
- /** The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated. */
1466
- update_time: Date | undefined;
1467
- }
1468
-
1469
- /** A storage acknowledgement. */
1470
- export interface StorageObjectAck {
1471
- /** The collection which stores the object. */
1472
- collection: string;
1473
- /** The key of the object within the collection. */
1474
- key: string;
1475
- /** The version hash of the object. */
1476
- version: string;
1477
- /** The owner of the object. */
1478
- user_id: string;
1479
- /** The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created. */
1480
- create_time:
1481
- | Date
1482
- | undefined;
1483
- /** The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated. */
1484
- update_time: Date | undefined;
1485
- }
1486
-
1487
- /** Batch of acknowledgements for the storage object write. */
1488
- export interface StorageObjectAcks {
1489
- /** Batch of storage write acknowledgements. */
1490
- acks: StorageObjectAck[];
1491
- }
1492
-
1493
- /** Batch of storage objects. */
1494
- export interface StorageObjects {
1495
- /** The batch of storage objects. */
1496
- objects: StorageObject[];
1497
- }
1498
-
1499
- /** List of storage objects. */
1500
- export interface StorageObjectList {
1501
- /** The list of storage objects. */
1502
- objects: StorageObject[];
1503
- /** The cursor for the next page of results, if any. */
1504
- cursor: string;
1505
- }
1506
-
1507
1299
  /** Update a user's account details. */
1508
1300
  export interface UpdateAccountRequest {
1509
1301
  /** The username of the user's account. */
@@ -1684,50 +1476,6 @@ export interface Users {
1684
1476
  users: User[];
1685
1477
  }
1686
1478
 
1687
- /** The object to store. */
1688
- export interface WriteStorageObject {
1689
- /** The collection to store the object. */
1690
- collection: string;
1691
- /** The key for the object within the collection. */
1692
- key: string;
1693
- /** The value of the object. */
1694
- value: string;
1695
- /** The version hash of the object to check. Possible values are: ["", "*", "#hash#"]. */
1696
- version: string;
1697
- /** The read access permissions for the object. */
1698
- permission_read:
1699
- | number
1700
- | undefined;
1701
- /** The write access permissions for the object. */
1702
- permission_write: number | undefined;
1703
- }
1704
-
1705
- /** Write objects to the storage engine. */
1706
- export interface WriteStorageObjectsRequest {
1707
- /** The objects to store on the server. */
1708
- objects: WriteStorageObject[];
1709
- }
1710
-
1711
- /** A request to submit a score to a tournament. */
1712
- export interface WriteTournamentRecordRequest {
1713
- /** The tournament ID to write the record for. */
1714
- tournament_id: string;
1715
- /** Record input. */
1716
- record: WriteTournamentRecordRequest_TournamentRecordWrite | undefined;
1717
- }
1718
-
1719
- /** Record values to write. */
1720
- export interface WriteTournamentRecordRequest_TournamentRecordWrite {
1721
- /** The score value to submit. */
1722
- score: number;
1723
- /** An optional secondary value. */
1724
- subscore: number;
1725
- /** A JSON object of additional properties (optional). */
1726
- metadata: string;
1727
- /** Operator override. */
1728
- operator: Operator;
1729
- }
1730
-
1731
1479
  /** Clan profile information */
1732
1480
  export interface ClanDescProfile {
1733
1481
  /** Clan id */
@@ -2829,7 +2577,7 @@ export interface AddAppRequest {
2829
2577
  /** Creator of the app. */
2830
2578
  creator_id: string;
2831
2579
  /** Role of this app; */
2832
- role: AppRole;
2580
+ role: number;
2833
2581
  }
2834
2582
 
2835
2583
  /** List (and optionally filter) users. */
@@ -7894,156 +7642,6 @@ export const DeleteNotificationsRequest = {
7894
7642
  },
7895
7643
  };
7896
7644
 
7897
- function createBaseDeleteStorageObjectId(): DeleteStorageObjectId {
7898
- return { collection: "", key: "", version: "" };
7899
- }
7900
-
7901
- export const DeleteStorageObjectId = {
7902
- encode(message: DeleteStorageObjectId, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
7903
- if (message.collection !== "") {
7904
- writer.uint32(10).string(message.collection);
7905
- }
7906
- if (message.key !== "") {
7907
- writer.uint32(18).string(message.key);
7908
- }
7909
- if (message.version !== "") {
7910
- writer.uint32(26).string(message.version);
7911
- }
7912
- return writer;
7913
- },
7914
-
7915
- decode(input: _m0.Reader | Uint8Array, length?: number): DeleteStorageObjectId {
7916
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
7917
- let end = length === undefined ? reader.len : reader.pos + length;
7918
- const message = createBaseDeleteStorageObjectId();
7919
- while (reader.pos < end) {
7920
- const tag = reader.uint32();
7921
- switch (tag >>> 3) {
7922
- case 1:
7923
- if (tag !== 10) {
7924
- break;
7925
- }
7926
-
7927
- message.collection = reader.string();
7928
- continue;
7929
- case 2:
7930
- if (tag !== 18) {
7931
- break;
7932
- }
7933
-
7934
- message.key = reader.string();
7935
- continue;
7936
- case 3:
7937
- if (tag !== 26) {
7938
- break;
7939
- }
7940
-
7941
- message.version = reader.string();
7942
- continue;
7943
- }
7944
- if ((tag & 7) === 4 || tag === 0) {
7945
- break;
7946
- }
7947
- reader.skipType(tag & 7);
7948
- }
7949
- return message;
7950
- },
7951
-
7952
- fromJSON(object: any): DeleteStorageObjectId {
7953
- return {
7954
- collection: isSet(object.collection) ? globalThis.String(object.collection) : "",
7955
- key: isSet(object.key) ? globalThis.String(object.key) : "",
7956
- version: isSet(object.version) ? globalThis.String(object.version) : "",
7957
- };
7958
- },
7959
-
7960
- toJSON(message: DeleteStorageObjectId): unknown {
7961
- const obj: any = {};
7962
- if (message.collection !== "") {
7963
- obj.collection = message.collection;
7964
- }
7965
- if (message.key !== "") {
7966
- obj.key = message.key;
7967
- }
7968
- if (message.version !== "") {
7969
- obj.version = message.version;
7970
- }
7971
- return obj;
7972
- },
7973
-
7974
- create<I extends Exact<DeepPartial<DeleteStorageObjectId>, I>>(base?: I): DeleteStorageObjectId {
7975
- return DeleteStorageObjectId.fromPartial(base ?? ({} as any));
7976
- },
7977
- fromPartial<I extends Exact<DeepPartial<DeleteStorageObjectId>, I>>(object: I): DeleteStorageObjectId {
7978
- const message = createBaseDeleteStorageObjectId();
7979
- message.collection = object.collection ?? "";
7980
- message.key = object.key ?? "";
7981
- message.version = object.version ?? "";
7982
- return message;
7983
- },
7984
- };
7985
-
7986
- function createBaseDeleteStorageObjectsRequest(): DeleteStorageObjectsRequest {
7987
- return { object_ids: [] };
7988
- }
7989
-
7990
- export const DeleteStorageObjectsRequest = {
7991
- encode(message: DeleteStorageObjectsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
7992
- for (const v of message.object_ids) {
7993
- DeleteStorageObjectId.encode(v!, writer.uint32(10).fork()).ldelim();
7994
- }
7995
- return writer;
7996
- },
7997
-
7998
- decode(input: _m0.Reader | Uint8Array, length?: number): DeleteStorageObjectsRequest {
7999
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
8000
- let end = length === undefined ? reader.len : reader.pos + length;
8001
- const message = createBaseDeleteStorageObjectsRequest();
8002
- while (reader.pos < end) {
8003
- const tag = reader.uint32();
8004
- switch (tag >>> 3) {
8005
- case 1:
8006
- if (tag !== 10) {
8007
- break;
8008
- }
8009
-
8010
- message.object_ids.push(DeleteStorageObjectId.decode(reader, reader.uint32()));
8011
- continue;
8012
- }
8013
- if ((tag & 7) === 4 || tag === 0) {
8014
- break;
8015
- }
8016
- reader.skipType(tag & 7);
8017
- }
8018
- return message;
8019
- },
8020
-
8021
- fromJSON(object: any): DeleteStorageObjectsRequest {
8022
- return {
8023
- object_ids: globalThis.Array.isArray(object?.object_ids)
8024
- ? object.object_ids.map((e: any) => DeleteStorageObjectId.fromJSON(e))
8025
- : [],
8026
- };
8027
- },
8028
-
8029
- toJSON(message: DeleteStorageObjectsRequest): unknown {
8030
- const obj: any = {};
8031
- if (message.object_ids?.length) {
8032
- obj.object_ids = message.object_ids.map((e) => DeleteStorageObjectId.toJSON(e));
8033
- }
8034
- return obj;
8035
- },
8036
-
8037
- create<I extends Exact<DeepPartial<DeleteStorageObjectsRequest>, I>>(base?: I): DeleteStorageObjectsRequest {
8038
- return DeleteStorageObjectsRequest.fromPartial(base ?? ({} as any));
8039
- },
8040
- fromPartial<I extends Exact<DeepPartial<DeleteStorageObjectsRequest>, I>>(object: I): DeleteStorageObjectsRequest {
8041
- const message = createBaseDeleteStorageObjectsRequest();
8042
- message.object_ids = object.object_ids?.map((e) => DeleteStorageObjectId.fromPartial(e)) || [];
8043
- return message;
8044
- },
8045
- };
8046
-
8047
7645
  function createBaseEvent(): Event {
8048
7646
  return { name: "", properties: {}, timestamp: undefined, external: false };
8049
7647
  }
@@ -11098,20 +10696,20 @@ export const ListNotificationsRequest = {
11098
10696
  },
11099
10697
  };
11100
10698
 
11101
- function createBaseListStorageObjectsRequest(): ListStorageObjectsRequest {
11102
- return { user_id: "", collection: "", limit: undefined, cursor: "" };
10699
+ function createBaseListUserGroupsRequest(): ListUserGroupsRequest {
10700
+ return { user_id: "", limit: undefined, state: undefined, cursor: "" };
11103
10701
  }
11104
10702
 
11105
- export const ListStorageObjectsRequest = {
11106
- encode(message: ListStorageObjectsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
10703
+ export const ListUserGroupsRequest = {
10704
+ encode(message: ListUserGroupsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
11107
10705
  if (message.user_id !== "") {
11108
10706
  writer.uint32(10).string(message.user_id);
11109
10707
  }
11110
- if (message.collection !== "") {
11111
- writer.uint32(18).string(message.collection);
11112
- }
11113
10708
  if (message.limit !== undefined) {
11114
- Int32Value.encode({ value: message.limit! }, writer.uint32(26).fork()).ldelim();
10709
+ Int32Value.encode({ value: message.limit! }, writer.uint32(18).fork()).ldelim();
10710
+ }
10711
+ if (message.state !== undefined) {
10712
+ Int32Value.encode({ value: message.state! }, writer.uint32(26).fork()).ldelim();
11115
10713
  }
11116
10714
  if (message.cursor !== "") {
11117
10715
  writer.uint32(34).string(message.cursor);
@@ -11119,10 +10717,10 @@ export const ListStorageObjectsRequest = {
11119
10717
  return writer;
11120
10718
  },
11121
10719
 
11122
- decode(input: _m0.Reader | Uint8Array, length?: number): ListStorageObjectsRequest {
10720
+ decode(input: _m0.Reader | Uint8Array, length?: number): ListUserGroupsRequest {
11123
10721
  const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
11124
10722
  let end = length === undefined ? reader.len : reader.pos + length;
11125
- const message = createBaseListStorageObjectsRequest();
10723
+ const message = createBaseListUserGroupsRequest();
11126
10724
  while (reader.pos < end) {
11127
10725
  const tag = reader.uint32();
11128
10726
  switch (tag >>> 3) {
@@ -11138,14 +10736,14 @@ export const ListStorageObjectsRequest = {
11138
10736
  break;
11139
10737
  }
11140
10738
 
11141
- message.collection = reader.string();
10739
+ message.limit = Int32Value.decode(reader, reader.uint32()).value;
11142
10740
  continue;
11143
10741
  case 3:
11144
10742
  if (tag !== 26) {
11145
10743
  break;
11146
10744
  }
11147
10745
 
11148
- message.limit = Int32Value.decode(reader, reader.uint32()).value;
10746
+ message.state = Int32Value.decode(reader, reader.uint32()).value;
11149
10747
  continue;
11150
10748
  case 4:
11151
10749
  if (tag !== 34) {
@@ -11163,172 +10761,68 @@ export const ListStorageObjectsRequest = {
11163
10761
  return message;
11164
10762
  },
11165
10763
 
11166
- fromJSON(object: any): ListStorageObjectsRequest {
10764
+ fromJSON(object: any): ListUserGroupsRequest {
11167
10765
  return {
11168
10766
  user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "",
11169
- collection: isSet(object.collection) ? globalThis.String(object.collection) : "",
11170
10767
  limit: isSet(object.limit) ? Number(object.limit) : undefined,
10768
+ state: isSet(object.state) ? Number(object.state) : undefined,
11171
10769
  cursor: isSet(object.cursor) ? globalThis.String(object.cursor) : "",
11172
10770
  };
11173
10771
  },
11174
10772
 
11175
- toJSON(message: ListStorageObjectsRequest): unknown {
10773
+ toJSON(message: ListUserGroupsRequest): unknown {
11176
10774
  const obj: any = {};
11177
10775
  if (message.user_id !== "") {
11178
10776
  obj.user_id = message.user_id;
11179
10777
  }
11180
- if (message.collection !== "") {
11181
- obj.collection = message.collection;
11182
- }
11183
10778
  if (message.limit !== undefined) {
11184
10779
  obj.limit = message.limit;
11185
10780
  }
10781
+ if (message.state !== undefined) {
10782
+ obj.state = message.state;
10783
+ }
11186
10784
  if (message.cursor !== "") {
11187
10785
  obj.cursor = message.cursor;
11188
10786
  }
11189
10787
  return obj;
11190
10788
  },
11191
10789
 
11192
- create<I extends Exact<DeepPartial<ListStorageObjectsRequest>, I>>(base?: I): ListStorageObjectsRequest {
11193
- return ListStorageObjectsRequest.fromPartial(base ?? ({} as any));
10790
+ create<I extends Exact<DeepPartial<ListUserGroupsRequest>, I>>(base?: I): ListUserGroupsRequest {
10791
+ return ListUserGroupsRequest.fromPartial(base ?? ({} as any));
11194
10792
  },
11195
- fromPartial<I extends Exact<DeepPartial<ListStorageObjectsRequest>, I>>(object: I): ListStorageObjectsRequest {
11196
- const message = createBaseListStorageObjectsRequest();
10793
+ fromPartial<I extends Exact<DeepPartial<ListUserGroupsRequest>, I>>(object: I): ListUserGroupsRequest {
10794
+ const message = createBaseListUserGroupsRequest();
11197
10795
  message.user_id = object.user_id ?? "";
11198
- message.collection = object.collection ?? "";
11199
10796
  message.limit = object.limit ?? undefined;
10797
+ message.state = object.state ?? undefined;
11200
10798
  message.cursor = object.cursor ?? "";
11201
10799
  return message;
11202
10800
  },
11203
10801
  };
11204
10802
 
11205
- function createBaseListUserGroupsRequest(): ListUserGroupsRequest {
11206
- return { user_id: "", limit: undefined, state: undefined, cursor: "" };
10803
+ function createBaseNotification(): Notification {
10804
+ return {
10805
+ id: "",
10806
+ subject: "",
10807
+ content: "",
10808
+ code: 0,
10809
+ sender_id: "",
10810
+ create_time: undefined,
10811
+ persistent: false,
10812
+ clan_id: "",
10813
+ channel_id: "",
10814
+ channel_type: 0,
10815
+ avatar_url: "",
10816
+ };
11207
10817
  }
11208
10818
 
11209
- export const ListUserGroupsRequest = {
11210
- encode(message: ListUserGroupsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
11211
- if (message.user_id !== "") {
11212
- writer.uint32(10).string(message.user_id);
10819
+ export const Notification = {
10820
+ encode(message: Notification, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
10821
+ if (message.id !== "") {
10822
+ writer.uint32(10).string(message.id);
11213
10823
  }
11214
- if (message.limit !== undefined) {
11215
- Int32Value.encode({ value: message.limit! }, writer.uint32(18).fork()).ldelim();
11216
- }
11217
- if (message.state !== undefined) {
11218
- Int32Value.encode({ value: message.state! }, writer.uint32(26).fork()).ldelim();
11219
- }
11220
- if (message.cursor !== "") {
11221
- writer.uint32(34).string(message.cursor);
11222
- }
11223
- return writer;
11224
- },
11225
-
11226
- decode(input: _m0.Reader | Uint8Array, length?: number): ListUserGroupsRequest {
11227
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
11228
- let end = length === undefined ? reader.len : reader.pos + length;
11229
- const message = createBaseListUserGroupsRequest();
11230
- while (reader.pos < end) {
11231
- const tag = reader.uint32();
11232
- switch (tag >>> 3) {
11233
- case 1:
11234
- if (tag !== 10) {
11235
- break;
11236
- }
11237
-
11238
- message.user_id = reader.string();
11239
- continue;
11240
- case 2:
11241
- if (tag !== 18) {
11242
- break;
11243
- }
11244
-
11245
- message.limit = Int32Value.decode(reader, reader.uint32()).value;
11246
- continue;
11247
- case 3:
11248
- if (tag !== 26) {
11249
- break;
11250
- }
11251
-
11252
- message.state = Int32Value.decode(reader, reader.uint32()).value;
11253
- continue;
11254
- case 4:
11255
- if (tag !== 34) {
11256
- break;
11257
- }
11258
-
11259
- message.cursor = reader.string();
11260
- continue;
11261
- }
11262
- if ((tag & 7) === 4 || tag === 0) {
11263
- break;
11264
- }
11265
- reader.skipType(tag & 7);
11266
- }
11267
- return message;
11268
- },
11269
-
11270
- fromJSON(object: any): ListUserGroupsRequest {
11271
- return {
11272
- user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "",
11273
- limit: isSet(object.limit) ? Number(object.limit) : undefined,
11274
- state: isSet(object.state) ? Number(object.state) : undefined,
11275
- cursor: isSet(object.cursor) ? globalThis.String(object.cursor) : "",
11276
- };
11277
- },
11278
-
11279
- toJSON(message: ListUserGroupsRequest): unknown {
11280
- const obj: any = {};
11281
- if (message.user_id !== "") {
11282
- obj.user_id = message.user_id;
11283
- }
11284
- if (message.limit !== undefined) {
11285
- obj.limit = message.limit;
11286
- }
11287
- if (message.state !== undefined) {
11288
- obj.state = message.state;
11289
- }
11290
- if (message.cursor !== "") {
11291
- obj.cursor = message.cursor;
11292
- }
11293
- return obj;
11294
- },
11295
-
11296
- create<I extends Exact<DeepPartial<ListUserGroupsRequest>, I>>(base?: I): ListUserGroupsRequest {
11297
- return ListUserGroupsRequest.fromPartial(base ?? ({} as any));
11298
- },
11299
- fromPartial<I extends Exact<DeepPartial<ListUserGroupsRequest>, I>>(object: I): ListUserGroupsRequest {
11300
- const message = createBaseListUserGroupsRequest();
11301
- message.user_id = object.user_id ?? "";
11302
- message.limit = object.limit ?? undefined;
11303
- message.state = object.state ?? undefined;
11304
- message.cursor = object.cursor ?? "";
11305
- return message;
11306
- },
11307
- };
11308
-
11309
- function createBaseNotification(): Notification {
11310
- return {
11311
- id: "",
11312
- subject: "",
11313
- content: "",
11314
- code: 0,
11315
- sender_id: "",
11316
- create_time: undefined,
11317
- persistent: false,
11318
- clan_id: "",
11319
- channel_id: "",
11320
- channel_type: 0,
11321
- avatar_url: "",
11322
- };
11323
- }
11324
-
11325
- export const Notification = {
11326
- encode(message: Notification, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
11327
- if (message.id !== "") {
11328
- writer.uint32(10).string(message.id);
11329
- }
11330
- if (message.subject !== "") {
11331
- writer.uint32(18).string(message.subject);
10824
+ if (message.subject !== "") {
10825
+ writer.uint32(18).string(message.subject);
11332
10826
  }
11333
10827
  if (message.content !== "") {
11334
10828
  writer.uint32(26).string(message.content);
@@ -11751,156 +11245,6 @@ export const DemoteGroupUsersRequest = {
11751
11245
  },
11752
11246
  };
11753
11247
 
11754
- function createBaseReadStorageObjectId(): ReadStorageObjectId {
11755
- return { collection: "", key: "", user_id: "" };
11756
- }
11757
-
11758
- export const ReadStorageObjectId = {
11759
- encode(message: ReadStorageObjectId, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
11760
- if (message.collection !== "") {
11761
- writer.uint32(10).string(message.collection);
11762
- }
11763
- if (message.key !== "") {
11764
- writer.uint32(18).string(message.key);
11765
- }
11766
- if (message.user_id !== "") {
11767
- writer.uint32(26).string(message.user_id);
11768
- }
11769
- return writer;
11770
- },
11771
-
11772
- decode(input: _m0.Reader | Uint8Array, length?: number): ReadStorageObjectId {
11773
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
11774
- let end = length === undefined ? reader.len : reader.pos + length;
11775
- const message = createBaseReadStorageObjectId();
11776
- while (reader.pos < end) {
11777
- const tag = reader.uint32();
11778
- switch (tag >>> 3) {
11779
- case 1:
11780
- if (tag !== 10) {
11781
- break;
11782
- }
11783
-
11784
- message.collection = reader.string();
11785
- continue;
11786
- case 2:
11787
- if (tag !== 18) {
11788
- break;
11789
- }
11790
-
11791
- message.key = reader.string();
11792
- continue;
11793
- case 3:
11794
- if (tag !== 26) {
11795
- break;
11796
- }
11797
-
11798
- message.user_id = reader.string();
11799
- continue;
11800
- }
11801
- if ((tag & 7) === 4 || tag === 0) {
11802
- break;
11803
- }
11804
- reader.skipType(tag & 7);
11805
- }
11806
- return message;
11807
- },
11808
-
11809
- fromJSON(object: any): ReadStorageObjectId {
11810
- return {
11811
- collection: isSet(object.collection) ? globalThis.String(object.collection) : "",
11812
- key: isSet(object.key) ? globalThis.String(object.key) : "",
11813
- user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "",
11814
- };
11815
- },
11816
-
11817
- toJSON(message: ReadStorageObjectId): unknown {
11818
- const obj: any = {};
11819
- if (message.collection !== "") {
11820
- obj.collection = message.collection;
11821
- }
11822
- if (message.key !== "") {
11823
- obj.key = message.key;
11824
- }
11825
- if (message.user_id !== "") {
11826
- obj.user_id = message.user_id;
11827
- }
11828
- return obj;
11829
- },
11830
-
11831
- create<I extends Exact<DeepPartial<ReadStorageObjectId>, I>>(base?: I): ReadStorageObjectId {
11832
- return ReadStorageObjectId.fromPartial(base ?? ({} as any));
11833
- },
11834
- fromPartial<I extends Exact<DeepPartial<ReadStorageObjectId>, I>>(object: I): ReadStorageObjectId {
11835
- const message = createBaseReadStorageObjectId();
11836
- message.collection = object.collection ?? "";
11837
- message.key = object.key ?? "";
11838
- message.user_id = object.user_id ?? "";
11839
- return message;
11840
- },
11841
- };
11842
-
11843
- function createBaseReadStorageObjectsRequest(): ReadStorageObjectsRequest {
11844
- return { object_ids: [] };
11845
- }
11846
-
11847
- export const ReadStorageObjectsRequest = {
11848
- encode(message: ReadStorageObjectsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
11849
- for (const v of message.object_ids) {
11850
- ReadStorageObjectId.encode(v!, writer.uint32(10).fork()).ldelim();
11851
- }
11852
- return writer;
11853
- },
11854
-
11855
- decode(input: _m0.Reader | Uint8Array, length?: number): ReadStorageObjectsRequest {
11856
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
11857
- let end = length === undefined ? reader.len : reader.pos + length;
11858
- const message = createBaseReadStorageObjectsRequest();
11859
- while (reader.pos < end) {
11860
- const tag = reader.uint32();
11861
- switch (tag >>> 3) {
11862
- case 1:
11863
- if (tag !== 10) {
11864
- break;
11865
- }
11866
-
11867
- message.object_ids.push(ReadStorageObjectId.decode(reader, reader.uint32()));
11868
- continue;
11869
- }
11870
- if ((tag & 7) === 4 || tag === 0) {
11871
- break;
11872
- }
11873
- reader.skipType(tag & 7);
11874
- }
11875
- return message;
11876
- },
11877
-
11878
- fromJSON(object: any): ReadStorageObjectsRequest {
11879
- return {
11880
- object_ids: globalThis.Array.isArray(object?.object_ids)
11881
- ? object.object_ids.map((e: any) => ReadStorageObjectId.fromJSON(e))
11882
- : [],
11883
- };
11884
- },
11885
-
11886
- toJSON(message: ReadStorageObjectsRequest): unknown {
11887
- const obj: any = {};
11888
- if (message.object_ids?.length) {
11889
- obj.object_ids = message.object_ids.map((e) => ReadStorageObjectId.toJSON(e));
11890
- }
11891
- return obj;
11892
- },
11893
-
11894
- create<I extends Exact<DeepPartial<ReadStorageObjectsRequest>, I>>(base?: I): ReadStorageObjectsRequest {
11895
- return ReadStorageObjectsRequest.fromPartial(base ?? ({} as any));
11896
- },
11897
- fromPartial<I extends Exact<DeepPartial<ReadStorageObjectsRequest>, I>>(object: I): ReadStorageObjectsRequest {
11898
- const message = createBaseReadStorageObjectsRequest();
11899
- message.object_ids = object.object_ids?.map((e) => ReadStorageObjectId.fromPartial(e)) || [];
11900
- return message;
11901
- },
11902
- };
11903
-
11904
11248
  function createBaseRpc(): Rpc {
11905
11249
  return { id: "", payload: "", http_key: "" };
11906
11250
  }
@@ -12074,526 +11418,7 @@ export const Session = {
12074
11418
  const message = createBaseSession();
12075
11419
  message.created = object.created ?? false;
12076
11420
  message.token = object.token ?? "";
12077
- message.refresh_token = object.refresh_token ?? "";
12078
- return message;
12079
- },
12080
- };
12081
-
12082
- function createBaseStorageObject(): StorageObject {
12083
- return {
12084
- collection: "",
12085
- key: "",
12086
- user_id: "",
12087
- value: "",
12088
- version: "",
12089
- permission_read: 0,
12090
- permission_write: 0,
12091
- create_time: undefined,
12092
- update_time: undefined,
12093
- };
12094
- }
12095
-
12096
- export const StorageObject = {
12097
- encode(message: StorageObject, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
12098
- if (message.collection !== "") {
12099
- writer.uint32(10).string(message.collection);
12100
- }
12101
- if (message.key !== "") {
12102
- writer.uint32(18).string(message.key);
12103
- }
12104
- if (message.user_id !== "") {
12105
- writer.uint32(26).string(message.user_id);
12106
- }
12107
- if (message.value !== "") {
12108
- writer.uint32(34).string(message.value);
12109
- }
12110
- if (message.version !== "") {
12111
- writer.uint32(42).string(message.version);
12112
- }
12113
- if (message.permission_read !== 0) {
12114
- writer.uint32(48).int32(message.permission_read);
12115
- }
12116
- if (message.permission_write !== 0) {
12117
- writer.uint32(56).int32(message.permission_write);
12118
- }
12119
- if (message.create_time !== undefined) {
12120
- Timestamp.encode(toTimestamp(message.create_time), writer.uint32(66).fork()).ldelim();
12121
- }
12122
- if (message.update_time !== undefined) {
12123
- Timestamp.encode(toTimestamp(message.update_time), writer.uint32(74).fork()).ldelim();
12124
- }
12125
- return writer;
12126
- },
12127
-
12128
- decode(input: _m0.Reader | Uint8Array, length?: number): StorageObject {
12129
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
12130
- let end = length === undefined ? reader.len : reader.pos + length;
12131
- const message = createBaseStorageObject();
12132
- while (reader.pos < end) {
12133
- const tag = reader.uint32();
12134
- switch (tag >>> 3) {
12135
- case 1:
12136
- if (tag !== 10) {
12137
- break;
12138
- }
12139
-
12140
- message.collection = reader.string();
12141
- continue;
12142
- case 2:
12143
- if (tag !== 18) {
12144
- break;
12145
- }
12146
-
12147
- message.key = reader.string();
12148
- continue;
12149
- case 3:
12150
- if (tag !== 26) {
12151
- break;
12152
- }
12153
-
12154
- message.user_id = reader.string();
12155
- continue;
12156
- case 4:
12157
- if (tag !== 34) {
12158
- break;
12159
- }
12160
-
12161
- message.value = reader.string();
12162
- continue;
12163
- case 5:
12164
- if (tag !== 42) {
12165
- break;
12166
- }
12167
-
12168
- message.version = reader.string();
12169
- continue;
12170
- case 6:
12171
- if (tag !== 48) {
12172
- break;
12173
- }
12174
-
12175
- message.permission_read = reader.int32();
12176
- continue;
12177
- case 7:
12178
- if (tag !== 56) {
12179
- break;
12180
- }
12181
-
12182
- message.permission_write = reader.int32();
12183
- continue;
12184
- case 8:
12185
- if (tag !== 66) {
12186
- break;
12187
- }
12188
-
12189
- message.create_time = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
12190
- continue;
12191
- case 9:
12192
- if (tag !== 74) {
12193
- break;
12194
- }
12195
-
12196
- message.update_time = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
12197
- continue;
12198
- }
12199
- if ((tag & 7) === 4 || tag === 0) {
12200
- break;
12201
- }
12202
- reader.skipType(tag & 7);
12203
- }
12204
- return message;
12205
- },
12206
-
12207
- fromJSON(object: any): StorageObject {
12208
- return {
12209
- collection: isSet(object.collection) ? globalThis.String(object.collection) : "",
12210
- key: isSet(object.key) ? globalThis.String(object.key) : "",
12211
- user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "",
12212
- value: isSet(object.value) ? globalThis.String(object.value) : "",
12213
- version: isSet(object.version) ? globalThis.String(object.version) : "",
12214
- permission_read: isSet(object.permission_read) ? globalThis.Number(object.permission_read) : 0,
12215
- permission_write: isSet(object.permission_write) ? globalThis.Number(object.permission_write) : 0,
12216
- create_time: isSet(object.create_time) ? fromJsonTimestamp(object.create_time) : undefined,
12217
- update_time: isSet(object.update_time) ? fromJsonTimestamp(object.update_time) : undefined,
12218
- };
12219
- },
12220
-
12221
- toJSON(message: StorageObject): unknown {
12222
- const obj: any = {};
12223
- if (message.collection !== "") {
12224
- obj.collection = message.collection;
12225
- }
12226
- if (message.key !== "") {
12227
- obj.key = message.key;
12228
- }
12229
- if (message.user_id !== "") {
12230
- obj.user_id = message.user_id;
12231
- }
12232
- if (message.value !== "") {
12233
- obj.value = message.value;
12234
- }
12235
- if (message.version !== "") {
12236
- obj.version = message.version;
12237
- }
12238
- if (message.permission_read !== 0) {
12239
- obj.permission_read = Math.round(message.permission_read);
12240
- }
12241
- if (message.permission_write !== 0) {
12242
- obj.permission_write = Math.round(message.permission_write);
12243
- }
12244
- if (message.create_time !== undefined) {
12245
- obj.create_time = message.create_time.toISOString();
12246
- }
12247
- if (message.update_time !== undefined) {
12248
- obj.update_time = message.update_time.toISOString();
12249
- }
12250
- return obj;
12251
- },
12252
-
12253
- create<I extends Exact<DeepPartial<StorageObject>, I>>(base?: I): StorageObject {
12254
- return StorageObject.fromPartial(base ?? ({} as any));
12255
- },
12256
- fromPartial<I extends Exact<DeepPartial<StorageObject>, I>>(object: I): StorageObject {
12257
- const message = createBaseStorageObject();
12258
- message.collection = object.collection ?? "";
12259
- message.key = object.key ?? "";
12260
- message.user_id = object.user_id ?? "";
12261
- message.value = object.value ?? "";
12262
- message.version = object.version ?? "";
12263
- message.permission_read = object.permission_read ?? 0;
12264
- message.permission_write = object.permission_write ?? 0;
12265
- message.create_time = object.create_time ?? undefined;
12266
- message.update_time = object.update_time ?? undefined;
12267
- return message;
12268
- },
12269
- };
12270
-
12271
- function createBaseStorageObjectAck(): StorageObjectAck {
12272
- return { collection: "", key: "", version: "", user_id: "", create_time: undefined, update_time: undefined };
12273
- }
12274
-
12275
- export const StorageObjectAck = {
12276
- encode(message: StorageObjectAck, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
12277
- if (message.collection !== "") {
12278
- writer.uint32(10).string(message.collection);
12279
- }
12280
- if (message.key !== "") {
12281
- writer.uint32(18).string(message.key);
12282
- }
12283
- if (message.version !== "") {
12284
- writer.uint32(26).string(message.version);
12285
- }
12286
- if (message.user_id !== "") {
12287
- writer.uint32(34).string(message.user_id);
12288
- }
12289
- if (message.create_time !== undefined) {
12290
- Timestamp.encode(toTimestamp(message.create_time), writer.uint32(42).fork()).ldelim();
12291
- }
12292
- if (message.update_time !== undefined) {
12293
- Timestamp.encode(toTimestamp(message.update_time), writer.uint32(50).fork()).ldelim();
12294
- }
12295
- return writer;
12296
- },
12297
-
12298
- decode(input: _m0.Reader | Uint8Array, length?: number): StorageObjectAck {
12299
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
12300
- let end = length === undefined ? reader.len : reader.pos + length;
12301
- const message = createBaseStorageObjectAck();
12302
- while (reader.pos < end) {
12303
- const tag = reader.uint32();
12304
- switch (tag >>> 3) {
12305
- case 1:
12306
- if (tag !== 10) {
12307
- break;
12308
- }
12309
-
12310
- message.collection = reader.string();
12311
- continue;
12312
- case 2:
12313
- if (tag !== 18) {
12314
- break;
12315
- }
12316
-
12317
- message.key = reader.string();
12318
- continue;
12319
- case 3:
12320
- if (tag !== 26) {
12321
- break;
12322
- }
12323
-
12324
- message.version = reader.string();
12325
- continue;
12326
- case 4:
12327
- if (tag !== 34) {
12328
- break;
12329
- }
12330
-
12331
- message.user_id = reader.string();
12332
- continue;
12333
- case 5:
12334
- if (tag !== 42) {
12335
- break;
12336
- }
12337
-
12338
- message.create_time = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
12339
- continue;
12340
- case 6:
12341
- if (tag !== 50) {
12342
- break;
12343
- }
12344
-
12345
- message.update_time = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
12346
- continue;
12347
- }
12348
- if ((tag & 7) === 4 || tag === 0) {
12349
- break;
12350
- }
12351
- reader.skipType(tag & 7);
12352
- }
12353
- return message;
12354
- },
12355
-
12356
- fromJSON(object: any): StorageObjectAck {
12357
- return {
12358
- collection: isSet(object.collection) ? globalThis.String(object.collection) : "",
12359
- key: isSet(object.key) ? globalThis.String(object.key) : "",
12360
- version: isSet(object.version) ? globalThis.String(object.version) : "",
12361
- user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "",
12362
- create_time: isSet(object.create_time) ? fromJsonTimestamp(object.create_time) : undefined,
12363
- update_time: isSet(object.update_time) ? fromJsonTimestamp(object.update_time) : undefined,
12364
- };
12365
- },
12366
-
12367
- toJSON(message: StorageObjectAck): unknown {
12368
- const obj: any = {};
12369
- if (message.collection !== "") {
12370
- obj.collection = message.collection;
12371
- }
12372
- if (message.key !== "") {
12373
- obj.key = message.key;
12374
- }
12375
- if (message.version !== "") {
12376
- obj.version = message.version;
12377
- }
12378
- if (message.user_id !== "") {
12379
- obj.user_id = message.user_id;
12380
- }
12381
- if (message.create_time !== undefined) {
12382
- obj.create_time = message.create_time.toISOString();
12383
- }
12384
- if (message.update_time !== undefined) {
12385
- obj.update_time = message.update_time.toISOString();
12386
- }
12387
- return obj;
12388
- },
12389
-
12390
- create<I extends Exact<DeepPartial<StorageObjectAck>, I>>(base?: I): StorageObjectAck {
12391
- return StorageObjectAck.fromPartial(base ?? ({} as any));
12392
- },
12393
- fromPartial<I extends Exact<DeepPartial<StorageObjectAck>, I>>(object: I): StorageObjectAck {
12394
- const message = createBaseStorageObjectAck();
12395
- message.collection = object.collection ?? "";
12396
- message.key = object.key ?? "";
12397
- message.version = object.version ?? "";
12398
- message.user_id = object.user_id ?? "";
12399
- message.create_time = object.create_time ?? undefined;
12400
- message.update_time = object.update_time ?? undefined;
12401
- return message;
12402
- },
12403
- };
12404
-
12405
- function createBaseStorageObjectAcks(): StorageObjectAcks {
12406
- return { acks: [] };
12407
- }
12408
-
12409
- export const StorageObjectAcks = {
12410
- encode(message: StorageObjectAcks, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
12411
- for (const v of message.acks) {
12412
- StorageObjectAck.encode(v!, writer.uint32(10).fork()).ldelim();
12413
- }
12414
- return writer;
12415
- },
12416
-
12417
- decode(input: _m0.Reader | Uint8Array, length?: number): StorageObjectAcks {
12418
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
12419
- let end = length === undefined ? reader.len : reader.pos + length;
12420
- const message = createBaseStorageObjectAcks();
12421
- while (reader.pos < end) {
12422
- const tag = reader.uint32();
12423
- switch (tag >>> 3) {
12424
- case 1:
12425
- if (tag !== 10) {
12426
- break;
12427
- }
12428
-
12429
- message.acks.push(StorageObjectAck.decode(reader, reader.uint32()));
12430
- continue;
12431
- }
12432
- if ((tag & 7) === 4 || tag === 0) {
12433
- break;
12434
- }
12435
- reader.skipType(tag & 7);
12436
- }
12437
- return message;
12438
- },
12439
-
12440
- fromJSON(object: any): StorageObjectAcks {
12441
- return {
12442
- acks: globalThis.Array.isArray(object?.acks) ? object.acks.map((e: any) => StorageObjectAck.fromJSON(e)) : [],
12443
- };
12444
- },
12445
-
12446
- toJSON(message: StorageObjectAcks): unknown {
12447
- const obj: any = {};
12448
- if (message.acks?.length) {
12449
- obj.acks = message.acks.map((e) => StorageObjectAck.toJSON(e));
12450
- }
12451
- return obj;
12452
- },
12453
-
12454
- create<I extends Exact<DeepPartial<StorageObjectAcks>, I>>(base?: I): StorageObjectAcks {
12455
- return StorageObjectAcks.fromPartial(base ?? ({} as any));
12456
- },
12457
- fromPartial<I extends Exact<DeepPartial<StorageObjectAcks>, I>>(object: I): StorageObjectAcks {
12458
- const message = createBaseStorageObjectAcks();
12459
- message.acks = object.acks?.map((e) => StorageObjectAck.fromPartial(e)) || [];
12460
- return message;
12461
- },
12462
- };
12463
-
12464
- function createBaseStorageObjects(): StorageObjects {
12465
- return { objects: [] };
12466
- }
12467
-
12468
- export const StorageObjects = {
12469
- encode(message: StorageObjects, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
12470
- for (const v of message.objects) {
12471
- StorageObject.encode(v!, writer.uint32(10).fork()).ldelim();
12472
- }
12473
- return writer;
12474
- },
12475
-
12476
- decode(input: _m0.Reader | Uint8Array, length?: number): StorageObjects {
12477
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
12478
- let end = length === undefined ? reader.len : reader.pos + length;
12479
- const message = createBaseStorageObjects();
12480
- while (reader.pos < end) {
12481
- const tag = reader.uint32();
12482
- switch (tag >>> 3) {
12483
- case 1:
12484
- if (tag !== 10) {
12485
- break;
12486
- }
12487
-
12488
- message.objects.push(StorageObject.decode(reader, reader.uint32()));
12489
- continue;
12490
- }
12491
- if ((tag & 7) === 4 || tag === 0) {
12492
- break;
12493
- }
12494
- reader.skipType(tag & 7);
12495
- }
12496
- return message;
12497
- },
12498
-
12499
- fromJSON(object: any): StorageObjects {
12500
- return {
12501
- objects: globalThis.Array.isArray(object?.objects)
12502
- ? object.objects.map((e: any) => StorageObject.fromJSON(e))
12503
- : [],
12504
- };
12505
- },
12506
-
12507
- toJSON(message: StorageObjects): unknown {
12508
- const obj: any = {};
12509
- if (message.objects?.length) {
12510
- obj.objects = message.objects.map((e) => StorageObject.toJSON(e));
12511
- }
12512
- return obj;
12513
- },
12514
-
12515
- create<I extends Exact<DeepPartial<StorageObjects>, I>>(base?: I): StorageObjects {
12516
- return StorageObjects.fromPartial(base ?? ({} as any));
12517
- },
12518
- fromPartial<I extends Exact<DeepPartial<StorageObjects>, I>>(object: I): StorageObjects {
12519
- const message = createBaseStorageObjects();
12520
- message.objects = object.objects?.map((e) => StorageObject.fromPartial(e)) || [];
12521
- return message;
12522
- },
12523
- };
12524
-
12525
- function createBaseStorageObjectList(): StorageObjectList {
12526
- return { objects: [], cursor: "" };
12527
- }
12528
-
12529
- export const StorageObjectList = {
12530
- encode(message: StorageObjectList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
12531
- for (const v of message.objects) {
12532
- StorageObject.encode(v!, writer.uint32(10).fork()).ldelim();
12533
- }
12534
- if (message.cursor !== "") {
12535
- writer.uint32(18).string(message.cursor);
12536
- }
12537
- return writer;
12538
- },
12539
-
12540
- decode(input: _m0.Reader | Uint8Array, length?: number): StorageObjectList {
12541
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
12542
- let end = length === undefined ? reader.len : reader.pos + length;
12543
- const message = createBaseStorageObjectList();
12544
- while (reader.pos < end) {
12545
- const tag = reader.uint32();
12546
- switch (tag >>> 3) {
12547
- case 1:
12548
- if (tag !== 10) {
12549
- break;
12550
- }
12551
-
12552
- message.objects.push(StorageObject.decode(reader, reader.uint32()));
12553
- continue;
12554
- case 2:
12555
- if (tag !== 18) {
12556
- break;
12557
- }
12558
-
12559
- message.cursor = reader.string();
12560
- continue;
12561
- }
12562
- if ((tag & 7) === 4 || tag === 0) {
12563
- break;
12564
- }
12565
- reader.skipType(tag & 7);
12566
- }
12567
- return message;
12568
- },
12569
-
12570
- fromJSON(object: any): StorageObjectList {
12571
- return {
12572
- objects: globalThis.Array.isArray(object?.objects)
12573
- ? object.objects.map((e: any) => StorageObject.fromJSON(e))
12574
- : [],
12575
- cursor: isSet(object.cursor) ? globalThis.String(object.cursor) : "",
12576
- };
12577
- },
12578
-
12579
- toJSON(message: StorageObjectList): unknown {
12580
- const obj: any = {};
12581
- if (message.objects?.length) {
12582
- obj.objects = message.objects.map((e) => StorageObject.toJSON(e));
12583
- }
12584
- if (message.cursor !== "") {
12585
- obj.cursor = message.cursor;
12586
- }
12587
- return obj;
12588
- },
12589
-
12590
- create<I extends Exact<DeepPartial<StorageObjectList>, I>>(base?: I): StorageObjectList {
12591
- return StorageObjectList.fromPartial(base ?? ({} as any));
12592
- },
12593
- fromPartial<I extends Exact<DeepPartial<StorageObjectList>, I>>(object: I): StorageObjectList {
12594
- const message = createBaseStorageObjectList();
12595
- message.objects = object.objects?.map((e) => StorageObject.fromPartial(e)) || [];
12596
- message.cursor = object.cursor ?? "";
11421
+ message.refresh_token = object.refresh_token ?? "";
12597
11422
  return message;
12598
11423
  },
12599
11424
  };
@@ -13526,390 +12351,6 @@ export const Users = {
13526
12351
  },
13527
12352
  };
13528
12353
 
13529
- function createBaseWriteStorageObject(): WriteStorageObject {
13530
- return { collection: "", key: "", value: "", version: "", permission_read: undefined, permission_write: undefined };
13531
- }
13532
-
13533
- export const WriteStorageObject = {
13534
- encode(message: WriteStorageObject, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
13535
- if (message.collection !== "") {
13536
- writer.uint32(10).string(message.collection);
13537
- }
13538
- if (message.key !== "") {
13539
- writer.uint32(18).string(message.key);
13540
- }
13541
- if (message.value !== "") {
13542
- writer.uint32(26).string(message.value);
13543
- }
13544
- if (message.version !== "") {
13545
- writer.uint32(34).string(message.version);
13546
- }
13547
- if (message.permission_read !== undefined) {
13548
- Int32Value.encode({ value: message.permission_read! }, writer.uint32(42).fork()).ldelim();
13549
- }
13550
- if (message.permission_write !== undefined) {
13551
- Int32Value.encode({ value: message.permission_write! }, writer.uint32(50).fork()).ldelim();
13552
- }
13553
- return writer;
13554
- },
13555
-
13556
- decode(input: _m0.Reader | Uint8Array, length?: number): WriteStorageObject {
13557
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
13558
- let end = length === undefined ? reader.len : reader.pos + length;
13559
- const message = createBaseWriteStorageObject();
13560
- while (reader.pos < end) {
13561
- const tag = reader.uint32();
13562
- switch (tag >>> 3) {
13563
- case 1:
13564
- if (tag !== 10) {
13565
- break;
13566
- }
13567
-
13568
- message.collection = reader.string();
13569
- continue;
13570
- case 2:
13571
- if (tag !== 18) {
13572
- break;
13573
- }
13574
-
13575
- message.key = reader.string();
13576
- continue;
13577
- case 3:
13578
- if (tag !== 26) {
13579
- break;
13580
- }
13581
-
13582
- message.value = reader.string();
13583
- continue;
13584
- case 4:
13585
- if (tag !== 34) {
13586
- break;
13587
- }
13588
-
13589
- message.version = reader.string();
13590
- continue;
13591
- case 5:
13592
- if (tag !== 42) {
13593
- break;
13594
- }
13595
-
13596
- message.permission_read = Int32Value.decode(reader, reader.uint32()).value;
13597
- continue;
13598
- case 6:
13599
- if (tag !== 50) {
13600
- break;
13601
- }
13602
-
13603
- message.permission_write = Int32Value.decode(reader, reader.uint32()).value;
13604
- continue;
13605
- }
13606
- if ((tag & 7) === 4 || tag === 0) {
13607
- break;
13608
- }
13609
- reader.skipType(tag & 7);
13610
- }
13611
- return message;
13612
- },
13613
-
13614
- fromJSON(object: any): WriteStorageObject {
13615
- return {
13616
- collection: isSet(object.collection) ? globalThis.String(object.collection) : "",
13617
- key: isSet(object.key) ? globalThis.String(object.key) : "",
13618
- value: isSet(object.value) ? globalThis.String(object.value) : "",
13619
- version: isSet(object.version) ? globalThis.String(object.version) : "",
13620
- permission_read: isSet(object.permission_read) ? Number(object.permission_read) : undefined,
13621
- permission_write: isSet(object.permission_write) ? Number(object.permission_write) : undefined,
13622
- };
13623
- },
13624
-
13625
- toJSON(message: WriteStorageObject): unknown {
13626
- const obj: any = {};
13627
- if (message.collection !== "") {
13628
- obj.collection = message.collection;
13629
- }
13630
- if (message.key !== "") {
13631
- obj.key = message.key;
13632
- }
13633
- if (message.value !== "") {
13634
- obj.value = message.value;
13635
- }
13636
- if (message.version !== "") {
13637
- obj.version = message.version;
13638
- }
13639
- if (message.permission_read !== undefined) {
13640
- obj.permission_read = message.permission_read;
13641
- }
13642
- if (message.permission_write !== undefined) {
13643
- obj.permission_write = message.permission_write;
13644
- }
13645
- return obj;
13646
- },
13647
-
13648
- create<I extends Exact<DeepPartial<WriteStorageObject>, I>>(base?: I): WriteStorageObject {
13649
- return WriteStorageObject.fromPartial(base ?? ({} as any));
13650
- },
13651
- fromPartial<I extends Exact<DeepPartial<WriteStorageObject>, I>>(object: I): WriteStorageObject {
13652
- const message = createBaseWriteStorageObject();
13653
- message.collection = object.collection ?? "";
13654
- message.key = object.key ?? "";
13655
- message.value = object.value ?? "";
13656
- message.version = object.version ?? "";
13657
- message.permission_read = object.permission_read ?? undefined;
13658
- message.permission_write = object.permission_write ?? undefined;
13659
- return message;
13660
- },
13661
- };
13662
-
13663
- function createBaseWriteStorageObjectsRequest(): WriteStorageObjectsRequest {
13664
- return { objects: [] };
13665
- }
13666
-
13667
- export const WriteStorageObjectsRequest = {
13668
- encode(message: WriteStorageObjectsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
13669
- for (const v of message.objects) {
13670
- WriteStorageObject.encode(v!, writer.uint32(10).fork()).ldelim();
13671
- }
13672
- return writer;
13673
- },
13674
-
13675
- decode(input: _m0.Reader | Uint8Array, length?: number): WriteStorageObjectsRequest {
13676
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
13677
- let end = length === undefined ? reader.len : reader.pos + length;
13678
- const message = createBaseWriteStorageObjectsRequest();
13679
- while (reader.pos < end) {
13680
- const tag = reader.uint32();
13681
- switch (tag >>> 3) {
13682
- case 1:
13683
- if (tag !== 10) {
13684
- break;
13685
- }
13686
-
13687
- message.objects.push(WriteStorageObject.decode(reader, reader.uint32()));
13688
- continue;
13689
- }
13690
- if ((tag & 7) === 4 || tag === 0) {
13691
- break;
13692
- }
13693
- reader.skipType(tag & 7);
13694
- }
13695
- return message;
13696
- },
13697
-
13698
- fromJSON(object: any): WriteStorageObjectsRequest {
13699
- return {
13700
- objects: globalThis.Array.isArray(object?.objects)
13701
- ? object.objects.map((e: any) => WriteStorageObject.fromJSON(e))
13702
- : [],
13703
- };
13704
- },
13705
-
13706
- toJSON(message: WriteStorageObjectsRequest): unknown {
13707
- const obj: any = {};
13708
- if (message.objects?.length) {
13709
- obj.objects = message.objects.map((e) => WriteStorageObject.toJSON(e));
13710
- }
13711
- return obj;
13712
- },
13713
-
13714
- create<I extends Exact<DeepPartial<WriteStorageObjectsRequest>, I>>(base?: I): WriteStorageObjectsRequest {
13715
- return WriteStorageObjectsRequest.fromPartial(base ?? ({} as any));
13716
- },
13717
- fromPartial<I extends Exact<DeepPartial<WriteStorageObjectsRequest>, I>>(object: I): WriteStorageObjectsRequest {
13718
- const message = createBaseWriteStorageObjectsRequest();
13719
- message.objects = object.objects?.map((e) => WriteStorageObject.fromPartial(e)) || [];
13720
- return message;
13721
- },
13722
- };
13723
-
13724
- function createBaseWriteTournamentRecordRequest(): WriteTournamentRecordRequest {
13725
- return { tournament_id: "", record: undefined };
13726
- }
13727
-
13728
- export const WriteTournamentRecordRequest = {
13729
- encode(message: WriteTournamentRecordRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
13730
- if (message.tournament_id !== "") {
13731
- writer.uint32(10).string(message.tournament_id);
13732
- }
13733
- if (message.record !== undefined) {
13734
- WriteTournamentRecordRequest_TournamentRecordWrite.encode(message.record, writer.uint32(18).fork()).ldelim();
13735
- }
13736
- return writer;
13737
- },
13738
-
13739
- decode(input: _m0.Reader | Uint8Array, length?: number): WriteTournamentRecordRequest {
13740
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
13741
- let end = length === undefined ? reader.len : reader.pos + length;
13742
- const message = createBaseWriteTournamentRecordRequest();
13743
- while (reader.pos < end) {
13744
- const tag = reader.uint32();
13745
- switch (tag >>> 3) {
13746
- case 1:
13747
- if (tag !== 10) {
13748
- break;
13749
- }
13750
-
13751
- message.tournament_id = reader.string();
13752
- continue;
13753
- case 2:
13754
- if (tag !== 18) {
13755
- break;
13756
- }
13757
-
13758
- message.record = WriteTournamentRecordRequest_TournamentRecordWrite.decode(reader, reader.uint32());
13759
- continue;
13760
- }
13761
- if ((tag & 7) === 4 || tag === 0) {
13762
- break;
13763
- }
13764
- reader.skipType(tag & 7);
13765
- }
13766
- return message;
13767
- },
13768
-
13769
- fromJSON(object: any): WriteTournamentRecordRequest {
13770
- return {
13771
- tournament_id: isSet(object.tournament_id) ? globalThis.String(object.tournament_id) : "",
13772
- record: isSet(object.record)
13773
- ? WriteTournamentRecordRequest_TournamentRecordWrite.fromJSON(object.record)
13774
- : undefined,
13775
- };
13776
- },
13777
-
13778
- toJSON(message: WriteTournamentRecordRequest): unknown {
13779
- const obj: any = {};
13780
- if (message.tournament_id !== "") {
13781
- obj.tournament_id = message.tournament_id;
13782
- }
13783
- if (message.record !== undefined) {
13784
- obj.record = WriteTournamentRecordRequest_TournamentRecordWrite.toJSON(message.record);
13785
- }
13786
- return obj;
13787
- },
13788
-
13789
- create<I extends Exact<DeepPartial<WriteTournamentRecordRequest>, I>>(base?: I): WriteTournamentRecordRequest {
13790
- return WriteTournamentRecordRequest.fromPartial(base ?? ({} as any));
13791
- },
13792
- fromPartial<I extends Exact<DeepPartial<WriteTournamentRecordRequest>, I>>(object: I): WriteTournamentRecordRequest {
13793
- const message = createBaseWriteTournamentRecordRequest();
13794
- message.tournament_id = object.tournament_id ?? "";
13795
- message.record = (object.record !== undefined && object.record !== null)
13796
- ? WriteTournamentRecordRequest_TournamentRecordWrite.fromPartial(object.record)
13797
- : undefined;
13798
- return message;
13799
- },
13800
- };
13801
-
13802
- function createBaseWriteTournamentRecordRequest_TournamentRecordWrite(): WriteTournamentRecordRequest_TournamentRecordWrite {
13803
- return { score: 0, subscore: 0, metadata: "", operator: 0 };
13804
- }
13805
-
13806
- export const WriteTournamentRecordRequest_TournamentRecordWrite = {
13807
- encode(
13808
- message: WriteTournamentRecordRequest_TournamentRecordWrite,
13809
- writer: _m0.Writer = _m0.Writer.create(),
13810
- ): _m0.Writer {
13811
- if (message.score !== 0) {
13812
- writer.uint32(8).int64(message.score);
13813
- }
13814
- if (message.subscore !== 0) {
13815
- writer.uint32(16).int64(message.subscore);
13816
- }
13817
- if (message.metadata !== "") {
13818
- writer.uint32(26).string(message.metadata);
13819
- }
13820
- if (message.operator !== 0) {
13821
- writer.uint32(32).int32(message.operator);
13822
- }
13823
- return writer;
13824
- },
13825
-
13826
- decode(input: _m0.Reader | Uint8Array, length?: number): WriteTournamentRecordRequest_TournamentRecordWrite {
13827
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
13828
- let end = length === undefined ? reader.len : reader.pos + length;
13829
- const message = createBaseWriteTournamentRecordRequest_TournamentRecordWrite();
13830
- while (reader.pos < end) {
13831
- const tag = reader.uint32();
13832
- switch (tag >>> 3) {
13833
- case 1:
13834
- if (tag !== 8) {
13835
- break;
13836
- }
13837
-
13838
- message.score = longToNumber(reader.int64() as Long);
13839
- continue;
13840
- case 2:
13841
- if (tag !== 16) {
13842
- break;
13843
- }
13844
-
13845
- message.subscore = longToNumber(reader.int64() as Long);
13846
- continue;
13847
- case 3:
13848
- if (tag !== 26) {
13849
- break;
13850
- }
13851
-
13852
- message.metadata = reader.string();
13853
- continue;
13854
- case 4:
13855
- if (tag !== 32) {
13856
- break;
13857
- }
13858
-
13859
- message.operator = reader.int32() as any;
13860
- continue;
13861
- }
13862
- if ((tag & 7) === 4 || tag === 0) {
13863
- break;
13864
- }
13865
- reader.skipType(tag & 7);
13866
- }
13867
- return message;
13868
- },
13869
-
13870
- fromJSON(object: any): WriteTournamentRecordRequest_TournamentRecordWrite {
13871
- return {
13872
- score: isSet(object.score) ? globalThis.Number(object.score) : 0,
13873
- subscore: isSet(object.subscore) ? globalThis.Number(object.subscore) : 0,
13874
- metadata: isSet(object.metadata) ? globalThis.String(object.metadata) : "",
13875
- operator: isSet(object.operator) ? operatorFromJSON(object.operator) : 0,
13876
- };
13877
- },
13878
-
13879
- toJSON(message: WriteTournamentRecordRequest_TournamentRecordWrite): unknown {
13880
- const obj: any = {};
13881
- if (message.score !== 0) {
13882
- obj.score = Math.round(message.score);
13883
- }
13884
- if (message.subscore !== 0) {
13885
- obj.subscore = Math.round(message.subscore);
13886
- }
13887
- if (message.metadata !== "") {
13888
- obj.metadata = message.metadata;
13889
- }
13890
- if (message.operator !== 0) {
13891
- obj.operator = operatorToJSON(message.operator);
13892
- }
13893
- return obj;
13894
- },
13895
-
13896
- create<I extends Exact<DeepPartial<WriteTournamentRecordRequest_TournamentRecordWrite>, I>>(
13897
- base?: I,
13898
- ): WriteTournamentRecordRequest_TournamentRecordWrite {
13899
- return WriteTournamentRecordRequest_TournamentRecordWrite.fromPartial(base ?? ({} as any));
13900
- },
13901
- fromPartial<I extends Exact<DeepPartial<WriteTournamentRecordRequest_TournamentRecordWrite>, I>>(
13902
- object: I,
13903
- ): WriteTournamentRecordRequest_TournamentRecordWrite {
13904
- const message = createBaseWriteTournamentRecordRequest_TournamentRecordWrite();
13905
- message.score = object.score ?? 0;
13906
- message.subscore = object.subscore ?? 0;
13907
- message.metadata = object.metadata ?? "";
13908
- message.operator = object.operator ?? 0;
13909
- return message;
13910
- },
13911
- };
13912
-
13913
12354
  function createBaseClanDescProfile(): ClanDescProfile {
13914
12355
  return { clan_id: "", creator_id: "", nick_name: "", profile_banner: "", profile_theme: "", avatar_url: "" };
13915
12356
  }
@@ -24906,7 +23347,7 @@ export const AddAppRequest = {
24906
23347
  break;
24907
23348
  }
24908
23349
 
24909
- message.role = reader.int32() as any;
23350
+ message.role = reader.int32();
24910
23351
  continue;
24911
23352
  }
24912
23353
  if ((tag & 7) === 4 || tag === 0) {
@@ -24922,7 +23363,7 @@ export const AddAppRequest = {
24922
23363
  appname: isSet(object.appname) ? globalThis.String(object.appname) : "",
24923
23364
  token: isSet(object.token) ? globalThis.String(object.token) : "",
24924
23365
  creator_id: isSet(object.creator_id) ? globalThis.String(object.creator_id) : "",
24925
- role: isSet(object.role) ? appRoleFromJSON(object.role) : 0,
23366
+ role: isSet(object.role) ? globalThis.Number(object.role) : 0,
24926
23367
  };
24927
23368
  },
24928
23369
 
@@ -24938,7 +23379,7 @@ export const AddAppRequest = {
24938
23379
  obj.creator_id = message.creator_id;
24939
23380
  }
24940
23381
  if (message.role !== 0) {
24941
- obj.role = appRoleToJSON(message.role);
23382
+ obj.role = Math.round(message.role);
24942
23383
  }
24943
23384
  return obj;
24944
23385
  },