@dcl/protocol 1.0.0-3175139283.commit-c671437 → 1.0.0-3199325469.commit-c9bc23f

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.
Files changed (83) hide show
  1. package/README.md +19 -0
  2. package/bff/authentication-service.proto +3 -0
  3. package/bff/comms-director-service.proto +33 -0
  4. package/bff/comms-service.proto +2 -26
  5. package/bff/http-endpoints.proto +9 -10
  6. package/bff/topics-service.proto +35 -0
  7. package/bff-services.proto +16 -0
  8. package/{kernel/apis/common → common}/ContentMapping.proto +1 -0
  9. package/common/Entity.proto +13 -0
  10. package/common/Vectors.proto +19 -0
  11. package/ecs/components/Animator.proto +1 -1
  12. package/ecs/components/AudioSource.proto +1 -1
  13. package/ecs/components/AudioStream.proto +1 -1
  14. package/ecs/components/AvatarAttach.proto +1 -1
  15. package/ecs/components/AvatarModifierArea.proto +2 -2
  16. package/ecs/components/AvatarShape.proto +2 -2
  17. package/ecs/components/Billboard.proto +1 -1
  18. package/ecs/components/BoxShape.proto +1 -1
  19. package/ecs/components/CameraMode.proto +2 -2
  20. package/ecs/components/CameraModeArea.proto +3 -3
  21. package/ecs/components/CylinderShape.proto +1 -1
  22. package/ecs/components/GltfContainer.proto +1 -1
  23. package/ecs/components/Material.proto +2 -2
  24. package/ecs/components/MeshCollider.proto +1 -1
  25. package/ecs/components/MeshRenderer.proto +1 -1
  26. package/ecs/components/NFTShape.proto +2 -2
  27. package/ecs/components/OnPointerDown.proto +2 -2
  28. package/ecs/components/OnPointerDownResult.proto +3 -3
  29. package/ecs/components/OnPointerUp.proto +2 -2
  30. package/ecs/components/OnPointerUpResult.proto +3 -3
  31. package/ecs/components/PlaneShape.proto +1 -1
  32. package/ecs/components/PointerEvents.proto +2 -2
  33. package/ecs/components/PointerEventsResult.proto +4 -4
  34. package/ecs/components/PointerLock.proto +1 -1
  35. package/ecs/components/README.md +1 -1
  36. package/ecs/components/Raycast.proto +2 -2
  37. package/ecs/components/RaycastResult.proto +2 -2
  38. package/ecs/components/SphereShape.proto +1 -1
  39. package/ecs/components/TextShape.proto +2 -2
  40. package/ecs/components/UiStyles.proto +2 -2
  41. package/ecs/components/UiText.proto +2 -2
  42. package/ecs/components/UiTransform.proto +1 -1
  43. package/ecs/components/VisibilityComponent.proto +1 -1
  44. package/ecs/components/common/ActionButton.proto +1 -1
  45. package/kernel/apis/EnvironmentAPI.proto +1 -1
  46. package/kernel/apis/ParcelIdentity.proto +1 -1
  47. package/kernel/apis/Players.proto +1 -1
  48. package/kernel/apis/UserIdentity.proto +1 -1
  49. package/kernel/apis/{common → common-sdk}/UserData.proto +0 -0
  50. package/kernel/comms/comms-rfc-4.proto +1 -0
  51. package/kernel/comms/v3/archipelago.proto +0 -4
  52. package/out-ts/bff/authentication-service.gen.ts +278 -0
  53. package/out-ts/bff/comms-director-service.gen.ts +225 -0
  54. package/out-ts/bff/comms-service.gen.ts +193 -0
  55. package/out-ts/bff/http-endpoints.gen.ts +662 -0
  56. package/out-ts/bff/topics-service.gen.ts +404 -0
  57. package/out-ts/bff-services.gen.ts +3 -0
  58. package/out-ts/common/ContentMapping.gen.ts +79 -0
  59. package/out-ts/common/Vectors.gen.ts +225 -0
  60. package/out-ts/google/api/annotations.gen.ts +3 -0
  61. package/out-ts/google/api/http.gen.ts +286 -0
  62. package/out-ts/google/protobuf/descriptor.gen.ts +2860 -0
  63. package/out-ts/google/protobuf/empty.gen.ts +66 -0
  64. package/out-ts/kernel/apis/CommunicationsController.gen.ts +128 -0
  65. package/out-ts/kernel/apis/DevTools.gen.ts +140 -0
  66. package/out-ts/kernel/apis/EngineAPI.gen.ts +2128 -0
  67. package/out-ts/kernel/apis/EnvironmentAPI.gen.ts +1050 -0
  68. package/out-ts/kernel/apis/EthereumController.gen.ts +806 -0
  69. package/out-ts/kernel/apis/ExperimentalAPI.gen.ts +278 -0
  70. package/out-ts/kernel/apis/ParcelIdentity.gen.ts +516 -0
  71. package/out-ts/kernel/apis/Permissions.gen.ts +332 -0
  72. package/out-ts/kernel/apis/Players.gen.ts +344 -0
  73. package/out-ts/kernel/apis/PortableExperiences.gen.ts +520 -0
  74. package/out-ts/kernel/apis/RestrictedActions.gen.ts +320 -0
  75. package/out-ts/kernel/apis/SceneStateStorageController.gen.ts +1331 -0
  76. package/out-ts/kernel/apis/SignedFetch.gen.ts +428 -0
  77. package/out-ts/kernel/apis/SocialController.gen.ts +195 -0
  78. package/out-ts/kernel/apis/UserActionModule.gen.ts +128 -0
  79. package/out-ts/kernel/apis/UserIdentity.gen.ts +230 -0
  80. package/out-ts/kernel/apis/common-sdk/UserData.gen.ts +298 -0
  81. package/out-ts/sdk-apis.gen.ts +3 -0
  82. package/package.json +16 -5
  83. package/sdk-apis.proto +22 -0
@@ -0,0 +1,2128 @@
1
+ /* eslint-disable */
2
+ import _m0 from "protobufjs/minimal";
3
+
4
+ export const protobufPackage = "";
5
+
6
+ export enum QueryType {
7
+ InvalidQueryType = 0,
8
+ HitFirst = 1,
9
+ HitAll = 2,
10
+ HitFirstAvatar = 3,
11
+ HitAllAvatars = 4,
12
+ UNRECOGNIZED = -1,
13
+ }
14
+
15
+ export function queryTypeFromJSON(object: any): QueryType {
16
+ switch (object) {
17
+ case 0:
18
+ case "InvalidQueryType":
19
+ return QueryType.InvalidQueryType;
20
+ case 1:
21
+ case "HitFirst":
22
+ return QueryType.HitFirst;
23
+ case 2:
24
+ case "HitAll":
25
+ return QueryType.HitAll;
26
+ case 3:
27
+ case "HitFirstAvatar":
28
+ return QueryType.HitFirstAvatar;
29
+ case 4:
30
+ case "HitAllAvatars":
31
+ return QueryType.HitAllAvatars;
32
+ case -1:
33
+ case "UNRECOGNIZED":
34
+ default:
35
+ return QueryType.UNRECOGNIZED;
36
+ }
37
+ }
38
+
39
+ export function queryTypeToJSON(object: QueryType): string {
40
+ switch (object) {
41
+ case QueryType.InvalidQueryType:
42
+ return "InvalidQueryType";
43
+ case QueryType.HitFirst:
44
+ return "HitFirst";
45
+ case QueryType.HitAll:
46
+ return "HitAll";
47
+ case QueryType.HitFirstAvatar:
48
+ return "HitFirstAvatar";
49
+ case QueryType.HitAllAvatars:
50
+ return "HitAllAvatars";
51
+ case QueryType.UNRECOGNIZED:
52
+ default:
53
+ return "UNRECOGNIZED";
54
+ }
55
+ }
56
+
57
+ export enum EAType {
58
+ InvalidEAType = 0,
59
+ OpenExternalUrl = 1,
60
+ OpenNFTDialog = 2,
61
+ CreateEntity = 3,
62
+ RemoveEntity = 4,
63
+ UpdateEntityComponent = 5,
64
+ AttachEntityComponent = 6,
65
+ ComponentRemoved = 7,
66
+ SetEntityParent = 8,
67
+ Query = 9,
68
+ ComponentCreated = 10,
69
+ ComponentDisposed = 11,
70
+ ComponentUpdated = 12,
71
+ InitMessagesFinished = 13,
72
+ UNRECOGNIZED = -1,
73
+ }
74
+
75
+ export function eATypeFromJSON(object: any): EAType {
76
+ switch (object) {
77
+ case 0:
78
+ case "InvalidEAType":
79
+ return EAType.InvalidEAType;
80
+ case 1:
81
+ case "OpenExternalUrl":
82
+ return EAType.OpenExternalUrl;
83
+ case 2:
84
+ case "OpenNFTDialog":
85
+ return EAType.OpenNFTDialog;
86
+ case 3:
87
+ case "CreateEntity":
88
+ return EAType.CreateEntity;
89
+ case 4:
90
+ case "RemoveEntity":
91
+ return EAType.RemoveEntity;
92
+ case 5:
93
+ case "UpdateEntityComponent":
94
+ return EAType.UpdateEntityComponent;
95
+ case 6:
96
+ case "AttachEntityComponent":
97
+ return EAType.AttachEntityComponent;
98
+ case 7:
99
+ case "ComponentRemoved":
100
+ return EAType.ComponentRemoved;
101
+ case 8:
102
+ case "SetEntityParent":
103
+ return EAType.SetEntityParent;
104
+ case 9:
105
+ case "Query":
106
+ return EAType.Query;
107
+ case 10:
108
+ case "ComponentCreated":
109
+ return EAType.ComponentCreated;
110
+ case 11:
111
+ case "ComponentDisposed":
112
+ return EAType.ComponentDisposed;
113
+ case 12:
114
+ case "ComponentUpdated":
115
+ return EAType.ComponentUpdated;
116
+ case 13:
117
+ case "InitMessagesFinished":
118
+ return EAType.InitMessagesFinished;
119
+ case -1:
120
+ case "UNRECOGNIZED":
121
+ default:
122
+ return EAType.UNRECOGNIZED;
123
+ }
124
+ }
125
+
126
+ export function eATypeToJSON(object: EAType): string {
127
+ switch (object) {
128
+ case EAType.InvalidEAType:
129
+ return "InvalidEAType";
130
+ case EAType.OpenExternalUrl:
131
+ return "OpenExternalUrl";
132
+ case EAType.OpenNFTDialog:
133
+ return "OpenNFTDialog";
134
+ case EAType.CreateEntity:
135
+ return "CreateEntity";
136
+ case EAType.RemoveEntity:
137
+ return "RemoveEntity";
138
+ case EAType.UpdateEntityComponent:
139
+ return "UpdateEntityComponent";
140
+ case EAType.AttachEntityComponent:
141
+ return "AttachEntityComponent";
142
+ case EAType.ComponentRemoved:
143
+ return "ComponentRemoved";
144
+ case EAType.SetEntityParent:
145
+ return "SetEntityParent";
146
+ case EAType.Query:
147
+ return "Query";
148
+ case EAType.ComponentCreated:
149
+ return "ComponentCreated";
150
+ case EAType.ComponentDisposed:
151
+ return "ComponentDisposed";
152
+ case EAType.ComponentUpdated:
153
+ return "ComponentUpdated";
154
+ case EAType.InitMessagesFinished:
155
+ return "InitMessagesFinished";
156
+ case EAType.UNRECOGNIZED:
157
+ default:
158
+ return "UNRECOGNIZED";
159
+ }
160
+ }
161
+
162
+ /** Events */
163
+ export enum EventDataType {
164
+ Generic = 0,
165
+ PositionChanged = 1,
166
+ RotationChanged = 2,
167
+ UNRECOGNIZED = -1,
168
+ }
169
+
170
+ export function eventDataTypeFromJSON(object: any): EventDataType {
171
+ switch (object) {
172
+ case 0:
173
+ case "Generic":
174
+ return EventDataType.Generic;
175
+ case 1:
176
+ case "PositionChanged":
177
+ return EventDataType.PositionChanged;
178
+ case 2:
179
+ case "RotationChanged":
180
+ return EventDataType.RotationChanged;
181
+ case -1:
182
+ case "UNRECOGNIZED":
183
+ default:
184
+ return EventDataType.UNRECOGNIZED;
185
+ }
186
+ }
187
+
188
+ export function eventDataTypeToJSON(object: EventDataType): string {
189
+ switch (object) {
190
+ case EventDataType.Generic:
191
+ return "Generic";
192
+ case EventDataType.PositionChanged:
193
+ return "PositionChanged";
194
+ case EventDataType.RotationChanged:
195
+ return "RotationChanged";
196
+ case EventDataType.UNRECOGNIZED:
197
+ default:
198
+ return "UNRECOGNIZED";
199
+ }
200
+ }
201
+
202
+ export interface OpenExternalUrlBody {
203
+ url: string;
204
+ }
205
+
206
+ export interface OpenNFTDialogBody {
207
+ assetContractAddress: string;
208
+ tokenId: string;
209
+ comment?: string | undefined;
210
+ }
211
+
212
+ export interface CreateEntityBody {
213
+ id: string;
214
+ }
215
+
216
+ export interface RemoveEntityBody {
217
+ id: string;
218
+ }
219
+
220
+ export interface UpdateEntityComponentBody {
221
+ entityId: string;
222
+ classId: number;
223
+ name: string;
224
+ json: string;
225
+ }
226
+
227
+ export interface AttachEntityComponentBody {
228
+ entityId: string;
229
+ name: string;
230
+ id: string;
231
+ }
232
+
233
+ export interface ComponentRemovedBody {
234
+ entityId: string;
235
+ name: string;
236
+ }
237
+
238
+ export interface SetEntityParentBody {
239
+ entityId: string;
240
+ parentId: string;
241
+ }
242
+
243
+ export interface QueryBody {
244
+ queryId: QueryType;
245
+ payload: string;
246
+ }
247
+
248
+ export interface ComponentCreatedBody {
249
+ id: string;
250
+ classId: number;
251
+ name: string;
252
+ }
253
+
254
+ export interface ComponentDisposedBody {
255
+ id: string;
256
+ }
257
+
258
+ export interface ComponentUpdatedBody {
259
+ id: string;
260
+ json: string;
261
+ }
262
+
263
+ export interface InitMessagesFinishedBody {
264
+ }
265
+
266
+ export interface Payload {
267
+ openExternalUrl?: OpenExternalUrlBody | undefined;
268
+ openNftDialog?: OpenNFTDialogBody | undefined;
269
+ createEntity?: CreateEntityBody | undefined;
270
+ removeEntity?: RemoveEntityBody | undefined;
271
+ updateEntityComponent?: UpdateEntityComponentBody | undefined;
272
+ attachEntityComponent?: AttachEntityComponentBody | undefined;
273
+ componentRemoved?: ComponentRemovedBody | undefined;
274
+ setEntityParent?: SetEntityParentBody | undefined;
275
+ query?: QueryBody | undefined;
276
+ componentCreated?: ComponentCreatedBody | undefined;
277
+ componentDisposed?: ComponentDisposedBody | undefined;
278
+ componentUpdated?: ComponentUpdatedBody | undefined;
279
+ initMessagesFinished?: InitMessagesFinishedBody | undefined;
280
+ }
281
+
282
+ export interface EntityAction {
283
+ type: EAType;
284
+ tag?: string | undefined;
285
+ payload: Payload | undefined;
286
+ }
287
+
288
+ export interface ManyEntityAction {
289
+ actions: EntityAction[];
290
+ }
291
+
292
+ export interface SendBatchResponse {
293
+ events: EventData[];
294
+ }
295
+
296
+ export interface UnsubscribeRequest {
297
+ eventId: string;
298
+ }
299
+
300
+ export interface SubscribeRequest {
301
+ eventId: string;
302
+ }
303
+
304
+ export interface SubscribeResponse {
305
+ }
306
+
307
+ export interface UnsubscribeResponse {
308
+ }
309
+
310
+ export interface GenericPayload {
311
+ eventId: string;
312
+ eventData: string;
313
+ }
314
+
315
+ export interface ReadOnlyVector3 {
316
+ x: number;
317
+ y: number;
318
+ z: number;
319
+ }
320
+
321
+ export interface ReadOnlyQuaternion {
322
+ x: number;
323
+ y: number;
324
+ z: number;
325
+ w: number;
326
+ }
327
+
328
+ export interface PositionChangedPayload {
329
+ position: ReadOnlyVector3 | undefined;
330
+ cameraPosition: ReadOnlyVector3 | undefined;
331
+ playerHeight: number;
332
+ }
333
+
334
+ export interface RotationChangedPayload {
335
+ rotation: ReadOnlyVector3 | undefined;
336
+ quaternion: ReadOnlyQuaternion | undefined;
337
+ }
338
+
339
+ export interface EventData {
340
+ type: EventDataType;
341
+ generic?: GenericPayload | undefined;
342
+ positionChanged?: PositionChangedPayload | undefined;
343
+ rotationChanged?: RotationChangedPayload | undefined;
344
+ }
345
+
346
+ function createBaseOpenExternalUrlBody(): OpenExternalUrlBody {
347
+ return { url: "" };
348
+ }
349
+
350
+ export const OpenExternalUrlBody = {
351
+ encode(message: OpenExternalUrlBody, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
352
+ if (message.url !== "") {
353
+ writer.uint32(10).string(message.url);
354
+ }
355
+ return writer;
356
+ },
357
+
358
+ decode(input: _m0.Reader | Uint8Array, length?: number): OpenExternalUrlBody {
359
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
360
+ let end = length === undefined ? reader.len : reader.pos + length;
361
+ const message = createBaseOpenExternalUrlBody();
362
+ while (reader.pos < end) {
363
+ const tag = reader.uint32();
364
+ switch (tag >>> 3) {
365
+ case 1:
366
+ message.url = reader.string();
367
+ break;
368
+ default:
369
+ reader.skipType(tag & 7);
370
+ break;
371
+ }
372
+ }
373
+ return message;
374
+ },
375
+
376
+ fromJSON(object: any): OpenExternalUrlBody {
377
+ return { url: isSet(object.url) ? String(object.url) : "" };
378
+ },
379
+
380
+ toJSON(message: OpenExternalUrlBody): unknown {
381
+ const obj: any = {};
382
+ message.url !== undefined && (obj.url = message.url);
383
+ return obj;
384
+ },
385
+
386
+ fromPartial<I extends Exact<DeepPartial<OpenExternalUrlBody>, I>>(object: I): OpenExternalUrlBody {
387
+ const message = createBaseOpenExternalUrlBody();
388
+ message.url = object.url ?? "";
389
+ return message;
390
+ },
391
+ };
392
+
393
+ function createBaseOpenNFTDialogBody(): OpenNFTDialogBody {
394
+ return { assetContractAddress: "", tokenId: "", comment: undefined };
395
+ }
396
+
397
+ export const OpenNFTDialogBody = {
398
+ encode(message: OpenNFTDialogBody, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
399
+ if (message.assetContractAddress !== "") {
400
+ writer.uint32(10).string(message.assetContractAddress);
401
+ }
402
+ if (message.tokenId !== "") {
403
+ writer.uint32(18).string(message.tokenId);
404
+ }
405
+ if (message.comment !== undefined) {
406
+ writer.uint32(26).string(message.comment);
407
+ }
408
+ return writer;
409
+ },
410
+
411
+ decode(input: _m0.Reader | Uint8Array, length?: number): OpenNFTDialogBody {
412
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
413
+ let end = length === undefined ? reader.len : reader.pos + length;
414
+ const message = createBaseOpenNFTDialogBody();
415
+ while (reader.pos < end) {
416
+ const tag = reader.uint32();
417
+ switch (tag >>> 3) {
418
+ case 1:
419
+ message.assetContractAddress = reader.string();
420
+ break;
421
+ case 2:
422
+ message.tokenId = reader.string();
423
+ break;
424
+ case 3:
425
+ message.comment = reader.string();
426
+ break;
427
+ default:
428
+ reader.skipType(tag & 7);
429
+ break;
430
+ }
431
+ }
432
+ return message;
433
+ },
434
+
435
+ fromJSON(object: any): OpenNFTDialogBody {
436
+ return {
437
+ assetContractAddress: isSet(object.assetContractAddress) ? String(object.assetContractAddress) : "",
438
+ tokenId: isSet(object.tokenId) ? String(object.tokenId) : "",
439
+ comment: isSet(object.comment) ? String(object.comment) : undefined,
440
+ };
441
+ },
442
+
443
+ toJSON(message: OpenNFTDialogBody): unknown {
444
+ const obj: any = {};
445
+ message.assetContractAddress !== undefined && (obj.assetContractAddress = message.assetContractAddress);
446
+ message.tokenId !== undefined && (obj.tokenId = message.tokenId);
447
+ message.comment !== undefined && (obj.comment = message.comment);
448
+ return obj;
449
+ },
450
+
451
+ fromPartial<I extends Exact<DeepPartial<OpenNFTDialogBody>, I>>(object: I): OpenNFTDialogBody {
452
+ const message = createBaseOpenNFTDialogBody();
453
+ message.assetContractAddress = object.assetContractAddress ?? "";
454
+ message.tokenId = object.tokenId ?? "";
455
+ message.comment = object.comment ?? undefined;
456
+ return message;
457
+ },
458
+ };
459
+
460
+ function createBaseCreateEntityBody(): CreateEntityBody {
461
+ return { id: "" };
462
+ }
463
+
464
+ export const CreateEntityBody = {
465
+ encode(message: CreateEntityBody, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
466
+ if (message.id !== "") {
467
+ writer.uint32(10).string(message.id);
468
+ }
469
+ return writer;
470
+ },
471
+
472
+ decode(input: _m0.Reader | Uint8Array, length?: number): CreateEntityBody {
473
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
474
+ let end = length === undefined ? reader.len : reader.pos + length;
475
+ const message = createBaseCreateEntityBody();
476
+ while (reader.pos < end) {
477
+ const tag = reader.uint32();
478
+ switch (tag >>> 3) {
479
+ case 1:
480
+ message.id = reader.string();
481
+ break;
482
+ default:
483
+ reader.skipType(tag & 7);
484
+ break;
485
+ }
486
+ }
487
+ return message;
488
+ },
489
+
490
+ fromJSON(object: any): CreateEntityBody {
491
+ return { id: isSet(object.id) ? String(object.id) : "" };
492
+ },
493
+
494
+ toJSON(message: CreateEntityBody): unknown {
495
+ const obj: any = {};
496
+ message.id !== undefined && (obj.id = message.id);
497
+ return obj;
498
+ },
499
+
500
+ fromPartial<I extends Exact<DeepPartial<CreateEntityBody>, I>>(object: I): CreateEntityBody {
501
+ const message = createBaseCreateEntityBody();
502
+ message.id = object.id ?? "";
503
+ return message;
504
+ },
505
+ };
506
+
507
+ function createBaseRemoveEntityBody(): RemoveEntityBody {
508
+ return { id: "" };
509
+ }
510
+
511
+ export const RemoveEntityBody = {
512
+ encode(message: RemoveEntityBody, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
513
+ if (message.id !== "") {
514
+ writer.uint32(10).string(message.id);
515
+ }
516
+ return writer;
517
+ },
518
+
519
+ decode(input: _m0.Reader | Uint8Array, length?: number): RemoveEntityBody {
520
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
521
+ let end = length === undefined ? reader.len : reader.pos + length;
522
+ const message = createBaseRemoveEntityBody();
523
+ while (reader.pos < end) {
524
+ const tag = reader.uint32();
525
+ switch (tag >>> 3) {
526
+ case 1:
527
+ message.id = reader.string();
528
+ break;
529
+ default:
530
+ reader.skipType(tag & 7);
531
+ break;
532
+ }
533
+ }
534
+ return message;
535
+ },
536
+
537
+ fromJSON(object: any): RemoveEntityBody {
538
+ return { id: isSet(object.id) ? String(object.id) : "" };
539
+ },
540
+
541
+ toJSON(message: RemoveEntityBody): unknown {
542
+ const obj: any = {};
543
+ message.id !== undefined && (obj.id = message.id);
544
+ return obj;
545
+ },
546
+
547
+ fromPartial<I extends Exact<DeepPartial<RemoveEntityBody>, I>>(object: I): RemoveEntityBody {
548
+ const message = createBaseRemoveEntityBody();
549
+ message.id = object.id ?? "";
550
+ return message;
551
+ },
552
+ };
553
+
554
+ function createBaseUpdateEntityComponentBody(): UpdateEntityComponentBody {
555
+ return { entityId: "", classId: 0, name: "", json: "" };
556
+ }
557
+
558
+ export const UpdateEntityComponentBody = {
559
+ encode(message: UpdateEntityComponentBody, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
560
+ if (message.entityId !== "") {
561
+ writer.uint32(10).string(message.entityId);
562
+ }
563
+ if (message.classId !== 0) {
564
+ writer.uint32(16).int32(message.classId);
565
+ }
566
+ if (message.name !== "") {
567
+ writer.uint32(26).string(message.name);
568
+ }
569
+ if (message.json !== "") {
570
+ writer.uint32(34).string(message.json);
571
+ }
572
+ return writer;
573
+ },
574
+
575
+ decode(input: _m0.Reader | Uint8Array, length?: number): UpdateEntityComponentBody {
576
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
577
+ let end = length === undefined ? reader.len : reader.pos + length;
578
+ const message = createBaseUpdateEntityComponentBody();
579
+ while (reader.pos < end) {
580
+ const tag = reader.uint32();
581
+ switch (tag >>> 3) {
582
+ case 1:
583
+ message.entityId = reader.string();
584
+ break;
585
+ case 2:
586
+ message.classId = reader.int32();
587
+ break;
588
+ case 3:
589
+ message.name = reader.string();
590
+ break;
591
+ case 4:
592
+ message.json = reader.string();
593
+ break;
594
+ default:
595
+ reader.skipType(tag & 7);
596
+ break;
597
+ }
598
+ }
599
+ return message;
600
+ },
601
+
602
+ fromJSON(object: any): UpdateEntityComponentBody {
603
+ return {
604
+ entityId: isSet(object.entityId) ? String(object.entityId) : "",
605
+ classId: isSet(object.classId) ? Number(object.classId) : 0,
606
+ name: isSet(object.name) ? String(object.name) : "",
607
+ json: isSet(object.json) ? String(object.json) : "",
608
+ };
609
+ },
610
+
611
+ toJSON(message: UpdateEntityComponentBody): unknown {
612
+ const obj: any = {};
613
+ message.entityId !== undefined && (obj.entityId = message.entityId);
614
+ message.classId !== undefined && (obj.classId = Math.round(message.classId));
615
+ message.name !== undefined && (obj.name = message.name);
616
+ message.json !== undefined && (obj.json = message.json);
617
+ return obj;
618
+ },
619
+
620
+ fromPartial<I extends Exact<DeepPartial<UpdateEntityComponentBody>, I>>(object: I): UpdateEntityComponentBody {
621
+ const message = createBaseUpdateEntityComponentBody();
622
+ message.entityId = object.entityId ?? "";
623
+ message.classId = object.classId ?? 0;
624
+ message.name = object.name ?? "";
625
+ message.json = object.json ?? "";
626
+ return message;
627
+ },
628
+ };
629
+
630
+ function createBaseAttachEntityComponentBody(): AttachEntityComponentBody {
631
+ return { entityId: "", name: "", id: "" };
632
+ }
633
+
634
+ export const AttachEntityComponentBody = {
635
+ encode(message: AttachEntityComponentBody, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
636
+ if (message.entityId !== "") {
637
+ writer.uint32(10).string(message.entityId);
638
+ }
639
+ if (message.name !== "") {
640
+ writer.uint32(18).string(message.name);
641
+ }
642
+ if (message.id !== "") {
643
+ writer.uint32(26).string(message.id);
644
+ }
645
+ return writer;
646
+ },
647
+
648
+ decode(input: _m0.Reader | Uint8Array, length?: number): AttachEntityComponentBody {
649
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
650
+ let end = length === undefined ? reader.len : reader.pos + length;
651
+ const message = createBaseAttachEntityComponentBody();
652
+ while (reader.pos < end) {
653
+ const tag = reader.uint32();
654
+ switch (tag >>> 3) {
655
+ case 1:
656
+ message.entityId = reader.string();
657
+ break;
658
+ case 2:
659
+ message.name = reader.string();
660
+ break;
661
+ case 3:
662
+ message.id = reader.string();
663
+ break;
664
+ default:
665
+ reader.skipType(tag & 7);
666
+ break;
667
+ }
668
+ }
669
+ return message;
670
+ },
671
+
672
+ fromJSON(object: any): AttachEntityComponentBody {
673
+ return {
674
+ entityId: isSet(object.entityId) ? String(object.entityId) : "",
675
+ name: isSet(object.name) ? String(object.name) : "",
676
+ id: isSet(object.id) ? String(object.id) : "",
677
+ };
678
+ },
679
+
680
+ toJSON(message: AttachEntityComponentBody): unknown {
681
+ const obj: any = {};
682
+ message.entityId !== undefined && (obj.entityId = message.entityId);
683
+ message.name !== undefined && (obj.name = message.name);
684
+ message.id !== undefined && (obj.id = message.id);
685
+ return obj;
686
+ },
687
+
688
+ fromPartial<I extends Exact<DeepPartial<AttachEntityComponentBody>, I>>(object: I): AttachEntityComponentBody {
689
+ const message = createBaseAttachEntityComponentBody();
690
+ message.entityId = object.entityId ?? "";
691
+ message.name = object.name ?? "";
692
+ message.id = object.id ?? "";
693
+ return message;
694
+ },
695
+ };
696
+
697
+ function createBaseComponentRemovedBody(): ComponentRemovedBody {
698
+ return { entityId: "", name: "" };
699
+ }
700
+
701
+ export const ComponentRemovedBody = {
702
+ encode(message: ComponentRemovedBody, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
703
+ if (message.entityId !== "") {
704
+ writer.uint32(10).string(message.entityId);
705
+ }
706
+ if (message.name !== "") {
707
+ writer.uint32(18).string(message.name);
708
+ }
709
+ return writer;
710
+ },
711
+
712
+ decode(input: _m0.Reader | Uint8Array, length?: number): ComponentRemovedBody {
713
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
714
+ let end = length === undefined ? reader.len : reader.pos + length;
715
+ const message = createBaseComponentRemovedBody();
716
+ while (reader.pos < end) {
717
+ const tag = reader.uint32();
718
+ switch (tag >>> 3) {
719
+ case 1:
720
+ message.entityId = reader.string();
721
+ break;
722
+ case 2:
723
+ message.name = reader.string();
724
+ break;
725
+ default:
726
+ reader.skipType(tag & 7);
727
+ break;
728
+ }
729
+ }
730
+ return message;
731
+ },
732
+
733
+ fromJSON(object: any): ComponentRemovedBody {
734
+ return {
735
+ entityId: isSet(object.entityId) ? String(object.entityId) : "",
736
+ name: isSet(object.name) ? String(object.name) : "",
737
+ };
738
+ },
739
+
740
+ toJSON(message: ComponentRemovedBody): unknown {
741
+ const obj: any = {};
742
+ message.entityId !== undefined && (obj.entityId = message.entityId);
743
+ message.name !== undefined && (obj.name = message.name);
744
+ return obj;
745
+ },
746
+
747
+ fromPartial<I extends Exact<DeepPartial<ComponentRemovedBody>, I>>(object: I): ComponentRemovedBody {
748
+ const message = createBaseComponentRemovedBody();
749
+ message.entityId = object.entityId ?? "";
750
+ message.name = object.name ?? "";
751
+ return message;
752
+ },
753
+ };
754
+
755
+ function createBaseSetEntityParentBody(): SetEntityParentBody {
756
+ return { entityId: "", parentId: "" };
757
+ }
758
+
759
+ export const SetEntityParentBody = {
760
+ encode(message: SetEntityParentBody, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
761
+ if (message.entityId !== "") {
762
+ writer.uint32(10).string(message.entityId);
763
+ }
764
+ if (message.parentId !== "") {
765
+ writer.uint32(18).string(message.parentId);
766
+ }
767
+ return writer;
768
+ },
769
+
770
+ decode(input: _m0.Reader | Uint8Array, length?: number): SetEntityParentBody {
771
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
772
+ let end = length === undefined ? reader.len : reader.pos + length;
773
+ const message = createBaseSetEntityParentBody();
774
+ while (reader.pos < end) {
775
+ const tag = reader.uint32();
776
+ switch (tag >>> 3) {
777
+ case 1:
778
+ message.entityId = reader.string();
779
+ break;
780
+ case 2:
781
+ message.parentId = reader.string();
782
+ break;
783
+ default:
784
+ reader.skipType(tag & 7);
785
+ break;
786
+ }
787
+ }
788
+ return message;
789
+ },
790
+
791
+ fromJSON(object: any): SetEntityParentBody {
792
+ return {
793
+ entityId: isSet(object.entityId) ? String(object.entityId) : "",
794
+ parentId: isSet(object.parentId) ? String(object.parentId) : "",
795
+ };
796
+ },
797
+
798
+ toJSON(message: SetEntityParentBody): unknown {
799
+ const obj: any = {};
800
+ message.entityId !== undefined && (obj.entityId = message.entityId);
801
+ message.parentId !== undefined && (obj.parentId = message.parentId);
802
+ return obj;
803
+ },
804
+
805
+ fromPartial<I extends Exact<DeepPartial<SetEntityParentBody>, I>>(object: I): SetEntityParentBody {
806
+ const message = createBaseSetEntityParentBody();
807
+ message.entityId = object.entityId ?? "";
808
+ message.parentId = object.parentId ?? "";
809
+ return message;
810
+ },
811
+ };
812
+
813
+ function createBaseQueryBody(): QueryBody {
814
+ return { queryId: 0, payload: "" };
815
+ }
816
+
817
+ export const QueryBody = {
818
+ encode(message: QueryBody, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
819
+ if (message.queryId !== 0) {
820
+ writer.uint32(8).int32(message.queryId);
821
+ }
822
+ if (message.payload !== "") {
823
+ writer.uint32(18).string(message.payload);
824
+ }
825
+ return writer;
826
+ },
827
+
828
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryBody {
829
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
830
+ let end = length === undefined ? reader.len : reader.pos + length;
831
+ const message = createBaseQueryBody();
832
+ while (reader.pos < end) {
833
+ const tag = reader.uint32();
834
+ switch (tag >>> 3) {
835
+ case 1:
836
+ message.queryId = reader.int32() as any;
837
+ break;
838
+ case 2:
839
+ message.payload = reader.string();
840
+ break;
841
+ default:
842
+ reader.skipType(tag & 7);
843
+ break;
844
+ }
845
+ }
846
+ return message;
847
+ },
848
+
849
+ fromJSON(object: any): QueryBody {
850
+ return {
851
+ queryId: isSet(object.queryId) ? queryTypeFromJSON(object.queryId) : 0,
852
+ payload: isSet(object.payload) ? String(object.payload) : "",
853
+ };
854
+ },
855
+
856
+ toJSON(message: QueryBody): unknown {
857
+ const obj: any = {};
858
+ message.queryId !== undefined && (obj.queryId = queryTypeToJSON(message.queryId));
859
+ message.payload !== undefined && (obj.payload = message.payload);
860
+ return obj;
861
+ },
862
+
863
+ fromPartial<I extends Exact<DeepPartial<QueryBody>, I>>(object: I): QueryBody {
864
+ const message = createBaseQueryBody();
865
+ message.queryId = object.queryId ?? 0;
866
+ message.payload = object.payload ?? "";
867
+ return message;
868
+ },
869
+ };
870
+
871
+ function createBaseComponentCreatedBody(): ComponentCreatedBody {
872
+ return { id: "", classId: 0, name: "" };
873
+ }
874
+
875
+ export const ComponentCreatedBody = {
876
+ encode(message: ComponentCreatedBody, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
877
+ if (message.id !== "") {
878
+ writer.uint32(10).string(message.id);
879
+ }
880
+ if (message.classId !== 0) {
881
+ writer.uint32(16).int32(message.classId);
882
+ }
883
+ if (message.name !== "") {
884
+ writer.uint32(26).string(message.name);
885
+ }
886
+ return writer;
887
+ },
888
+
889
+ decode(input: _m0.Reader | Uint8Array, length?: number): ComponentCreatedBody {
890
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
891
+ let end = length === undefined ? reader.len : reader.pos + length;
892
+ const message = createBaseComponentCreatedBody();
893
+ while (reader.pos < end) {
894
+ const tag = reader.uint32();
895
+ switch (tag >>> 3) {
896
+ case 1:
897
+ message.id = reader.string();
898
+ break;
899
+ case 2:
900
+ message.classId = reader.int32();
901
+ break;
902
+ case 3:
903
+ message.name = reader.string();
904
+ break;
905
+ default:
906
+ reader.skipType(tag & 7);
907
+ break;
908
+ }
909
+ }
910
+ return message;
911
+ },
912
+
913
+ fromJSON(object: any): ComponentCreatedBody {
914
+ return {
915
+ id: isSet(object.id) ? String(object.id) : "",
916
+ classId: isSet(object.classId) ? Number(object.classId) : 0,
917
+ name: isSet(object.name) ? String(object.name) : "",
918
+ };
919
+ },
920
+
921
+ toJSON(message: ComponentCreatedBody): unknown {
922
+ const obj: any = {};
923
+ message.id !== undefined && (obj.id = message.id);
924
+ message.classId !== undefined && (obj.classId = Math.round(message.classId));
925
+ message.name !== undefined && (obj.name = message.name);
926
+ return obj;
927
+ },
928
+
929
+ fromPartial<I extends Exact<DeepPartial<ComponentCreatedBody>, I>>(object: I): ComponentCreatedBody {
930
+ const message = createBaseComponentCreatedBody();
931
+ message.id = object.id ?? "";
932
+ message.classId = object.classId ?? 0;
933
+ message.name = object.name ?? "";
934
+ return message;
935
+ },
936
+ };
937
+
938
+ function createBaseComponentDisposedBody(): ComponentDisposedBody {
939
+ return { id: "" };
940
+ }
941
+
942
+ export const ComponentDisposedBody = {
943
+ encode(message: ComponentDisposedBody, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
944
+ if (message.id !== "") {
945
+ writer.uint32(10).string(message.id);
946
+ }
947
+ return writer;
948
+ },
949
+
950
+ decode(input: _m0.Reader | Uint8Array, length?: number): ComponentDisposedBody {
951
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
952
+ let end = length === undefined ? reader.len : reader.pos + length;
953
+ const message = createBaseComponentDisposedBody();
954
+ while (reader.pos < end) {
955
+ const tag = reader.uint32();
956
+ switch (tag >>> 3) {
957
+ case 1:
958
+ message.id = reader.string();
959
+ break;
960
+ default:
961
+ reader.skipType(tag & 7);
962
+ break;
963
+ }
964
+ }
965
+ return message;
966
+ },
967
+
968
+ fromJSON(object: any): ComponentDisposedBody {
969
+ return { id: isSet(object.id) ? String(object.id) : "" };
970
+ },
971
+
972
+ toJSON(message: ComponentDisposedBody): unknown {
973
+ const obj: any = {};
974
+ message.id !== undefined && (obj.id = message.id);
975
+ return obj;
976
+ },
977
+
978
+ fromPartial<I extends Exact<DeepPartial<ComponentDisposedBody>, I>>(object: I): ComponentDisposedBody {
979
+ const message = createBaseComponentDisposedBody();
980
+ message.id = object.id ?? "";
981
+ return message;
982
+ },
983
+ };
984
+
985
+ function createBaseComponentUpdatedBody(): ComponentUpdatedBody {
986
+ return { id: "", json: "" };
987
+ }
988
+
989
+ export const ComponentUpdatedBody = {
990
+ encode(message: ComponentUpdatedBody, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
991
+ if (message.id !== "") {
992
+ writer.uint32(10).string(message.id);
993
+ }
994
+ if (message.json !== "") {
995
+ writer.uint32(18).string(message.json);
996
+ }
997
+ return writer;
998
+ },
999
+
1000
+ decode(input: _m0.Reader | Uint8Array, length?: number): ComponentUpdatedBody {
1001
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1002
+ let end = length === undefined ? reader.len : reader.pos + length;
1003
+ const message = createBaseComponentUpdatedBody();
1004
+ while (reader.pos < end) {
1005
+ const tag = reader.uint32();
1006
+ switch (tag >>> 3) {
1007
+ case 1:
1008
+ message.id = reader.string();
1009
+ break;
1010
+ case 2:
1011
+ message.json = reader.string();
1012
+ break;
1013
+ default:
1014
+ reader.skipType(tag & 7);
1015
+ break;
1016
+ }
1017
+ }
1018
+ return message;
1019
+ },
1020
+
1021
+ fromJSON(object: any): ComponentUpdatedBody {
1022
+ return { id: isSet(object.id) ? String(object.id) : "", json: isSet(object.json) ? String(object.json) : "" };
1023
+ },
1024
+
1025
+ toJSON(message: ComponentUpdatedBody): unknown {
1026
+ const obj: any = {};
1027
+ message.id !== undefined && (obj.id = message.id);
1028
+ message.json !== undefined && (obj.json = message.json);
1029
+ return obj;
1030
+ },
1031
+
1032
+ fromPartial<I extends Exact<DeepPartial<ComponentUpdatedBody>, I>>(object: I): ComponentUpdatedBody {
1033
+ const message = createBaseComponentUpdatedBody();
1034
+ message.id = object.id ?? "";
1035
+ message.json = object.json ?? "";
1036
+ return message;
1037
+ },
1038
+ };
1039
+
1040
+ function createBaseInitMessagesFinishedBody(): InitMessagesFinishedBody {
1041
+ return {};
1042
+ }
1043
+
1044
+ export const InitMessagesFinishedBody = {
1045
+ encode(_: InitMessagesFinishedBody, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1046
+ return writer;
1047
+ },
1048
+
1049
+ decode(input: _m0.Reader | Uint8Array, length?: number): InitMessagesFinishedBody {
1050
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1051
+ let end = length === undefined ? reader.len : reader.pos + length;
1052
+ const message = createBaseInitMessagesFinishedBody();
1053
+ while (reader.pos < end) {
1054
+ const tag = reader.uint32();
1055
+ switch (tag >>> 3) {
1056
+ default:
1057
+ reader.skipType(tag & 7);
1058
+ break;
1059
+ }
1060
+ }
1061
+ return message;
1062
+ },
1063
+
1064
+ fromJSON(_: any): InitMessagesFinishedBody {
1065
+ return {};
1066
+ },
1067
+
1068
+ toJSON(_: InitMessagesFinishedBody): unknown {
1069
+ const obj: any = {};
1070
+ return obj;
1071
+ },
1072
+
1073
+ fromPartial<I extends Exact<DeepPartial<InitMessagesFinishedBody>, I>>(_: I): InitMessagesFinishedBody {
1074
+ const message = createBaseInitMessagesFinishedBody();
1075
+ return message;
1076
+ },
1077
+ };
1078
+
1079
+ function createBasePayload(): Payload {
1080
+ return {
1081
+ openExternalUrl: undefined,
1082
+ openNftDialog: undefined,
1083
+ createEntity: undefined,
1084
+ removeEntity: undefined,
1085
+ updateEntityComponent: undefined,
1086
+ attachEntityComponent: undefined,
1087
+ componentRemoved: undefined,
1088
+ setEntityParent: undefined,
1089
+ query: undefined,
1090
+ componentCreated: undefined,
1091
+ componentDisposed: undefined,
1092
+ componentUpdated: undefined,
1093
+ initMessagesFinished: undefined,
1094
+ };
1095
+ }
1096
+
1097
+ export const Payload = {
1098
+ encode(message: Payload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1099
+ if (message.openExternalUrl !== undefined) {
1100
+ OpenExternalUrlBody.encode(message.openExternalUrl, writer.uint32(10).fork()).ldelim();
1101
+ }
1102
+ if (message.openNftDialog !== undefined) {
1103
+ OpenNFTDialogBody.encode(message.openNftDialog, writer.uint32(18).fork()).ldelim();
1104
+ }
1105
+ if (message.createEntity !== undefined) {
1106
+ CreateEntityBody.encode(message.createEntity, writer.uint32(26).fork()).ldelim();
1107
+ }
1108
+ if (message.removeEntity !== undefined) {
1109
+ RemoveEntityBody.encode(message.removeEntity, writer.uint32(34).fork()).ldelim();
1110
+ }
1111
+ if (message.updateEntityComponent !== undefined) {
1112
+ UpdateEntityComponentBody.encode(message.updateEntityComponent, writer.uint32(42).fork()).ldelim();
1113
+ }
1114
+ if (message.attachEntityComponent !== undefined) {
1115
+ AttachEntityComponentBody.encode(message.attachEntityComponent, writer.uint32(50).fork()).ldelim();
1116
+ }
1117
+ if (message.componentRemoved !== undefined) {
1118
+ ComponentRemovedBody.encode(message.componentRemoved, writer.uint32(58).fork()).ldelim();
1119
+ }
1120
+ if (message.setEntityParent !== undefined) {
1121
+ SetEntityParentBody.encode(message.setEntityParent, writer.uint32(66).fork()).ldelim();
1122
+ }
1123
+ if (message.query !== undefined) {
1124
+ QueryBody.encode(message.query, writer.uint32(74).fork()).ldelim();
1125
+ }
1126
+ if (message.componentCreated !== undefined) {
1127
+ ComponentCreatedBody.encode(message.componentCreated, writer.uint32(82).fork()).ldelim();
1128
+ }
1129
+ if (message.componentDisposed !== undefined) {
1130
+ ComponentDisposedBody.encode(message.componentDisposed, writer.uint32(90).fork()).ldelim();
1131
+ }
1132
+ if (message.componentUpdated !== undefined) {
1133
+ ComponentUpdatedBody.encode(message.componentUpdated, writer.uint32(98).fork()).ldelim();
1134
+ }
1135
+ if (message.initMessagesFinished !== undefined) {
1136
+ InitMessagesFinishedBody.encode(message.initMessagesFinished, writer.uint32(106).fork()).ldelim();
1137
+ }
1138
+ return writer;
1139
+ },
1140
+
1141
+ decode(input: _m0.Reader | Uint8Array, length?: number): Payload {
1142
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1143
+ let end = length === undefined ? reader.len : reader.pos + length;
1144
+ const message = createBasePayload();
1145
+ while (reader.pos < end) {
1146
+ const tag = reader.uint32();
1147
+ switch (tag >>> 3) {
1148
+ case 1:
1149
+ message.openExternalUrl = OpenExternalUrlBody.decode(reader, reader.uint32());
1150
+ break;
1151
+ case 2:
1152
+ message.openNftDialog = OpenNFTDialogBody.decode(reader, reader.uint32());
1153
+ break;
1154
+ case 3:
1155
+ message.createEntity = CreateEntityBody.decode(reader, reader.uint32());
1156
+ break;
1157
+ case 4:
1158
+ message.removeEntity = RemoveEntityBody.decode(reader, reader.uint32());
1159
+ break;
1160
+ case 5:
1161
+ message.updateEntityComponent = UpdateEntityComponentBody.decode(reader, reader.uint32());
1162
+ break;
1163
+ case 6:
1164
+ message.attachEntityComponent = AttachEntityComponentBody.decode(reader, reader.uint32());
1165
+ break;
1166
+ case 7:
1167
+ message.componentRemoved = ComponentRemovedBody.decode(reader, reader.uint32());
1168
+ break;
1169
+ case 8:
1170
+ message.setEntityParent = SetEntityParentBody.decode(reader, reader.uint32());
1171
+ break;
1172
+ case 9:
1173
+ message.query = QueryBody.decode(reader, reader.uint32());
1174
+ break;
1175
+ case 10:
1176
+ message.componentCreated = ComponentCreatedBody.decode(reader, reader.uint32());
1177
+ break;
1178
+ case 11:
1179
+ message.componentDisposed = ComponentDisposedBody.decode(reader, reader.uint32());
1180
+ break;
1181
+ case 12:
1182
+ message.componentUpdated = ComponentUpdatedBody.decode(reader, reader.uint32());
1183
+ break;
1184
+ case 13:
1185
+ message.initMessagesFinished = InitMessagesFinishedBody.decode(reader, reader.uint32());
1186
+ break;
1187
+ default:
1188
+ reader.skipType(tag & 7);
1189
+ break;
1190
+ }
1191
+ }
1192
+ return message;
1193
+ },
1194
+
1195
+ fromJSON(object: any): Payload {
1196
+ return {
1197
+ openExternalUrl: isSet(object.openExternalUrl) ? OpenExternalUrlBody.fromJSON(object.openExternalUrl) : undefined,
1198
+ openNftDialog: isSet(object.openNftDialog) ? OpenNFTDialogBody.fromJSON(object.openNftDialog) : undefined,
1199
+ createEntity: isSet(object.createEntity) ? CreateEntityBody.fromJSON(object.createEntity) : undefined,
1200
+ removeEntity: isSet(object.removeEntity) ? RemoveEntityBody.fromJSON(object.removeEntity) : undefined,
1201
+ updateEntityComponent: isSet(object.updateEntityComponent)
1202
+ ? UpdateEntityComponentBody.fromJSON(object.updateEntityComponent)
1203
+ : undefined,
1204
+ attachEntityComponent: isSet(object.attachEntityComponent)
1205
+ ? AttachEntityComponentBody.fromJSON(object.attachEntityComponent)
1206
+ : undefined,
1207
+ componentRemoved: isSet(object.componentRemoved)
1208
+ ? ComponentRemovedBody.fromJSON(object.componentRemoved)
1209
+ : undefined,
1210
+ setEntityParent: isSet(object.setEntityParent) ? SetEntityParentBody.fromJSON(object.setEntityParent) : undefined,
1211
+ query: isSet(object.query) ? QueryBody.fromJSON(object.query) : undefined,
1212
+ componentCreated: isSet(object.componentCreated)
1213
+ ? ComponentCreatedBody.fromJSON(object.componentCreated)
1214
+ : undefined,
1215
+ componentDisposed: isSet(object.componentDisposed)
1216
+ ? ComponentDisposedBody.fromJSON(object.componentDisposed)
1217
+ : undefined,
1218
+ componentUpdated: isSet(object.componentUpdated)
1219
+ ? ComponentUpdatedBody.fromJSON(object.componentUpdated)
1220
+ : undefined,
1221
+ initMessagesFinished: isSet(object.initMessagesFinished)
1222
+ ? InitMessagesFinishedBody.fromJSON(object.initMessagesFinished)
1223
+ : undefined,
1224
+ };
1225
+ },
1226
+
1227
+ toJSON(message: Payload): unknown {
1228
+ const obj: any = {};
1229
+ message.openExternalUrl !== undefined &&
1230
+ (obj.openExternalUrl = message.openExternalUrl ? OpenExternalUrlBody.toJSON(message.openExternalUrl) : undefined);
1231
+ message.openNftDialog !== undefined &&
1232
+ (obj.openNftDialog = message.openNftDialog ? OpenNFTDialogBody.toJSON(message.openNftDialog) : undefined);
1233
+ message.createEntity !== undefined &&
1234
+ (obj.createEntity = message.createEntity ? CreateEntityBody.toJSON(message.createEntity) : undefined);
1235
+ message.removeEntity !== undefined &&
1236
+ (obj.removeEntity = message.removeEntity ? RemoveEntityBody.toJSON(message.removeEntity) : undefined);
1237
+ message.updateEntityComponent !== undefined && (obj.updateEntityComponent = message.updateEntityComponent
1238
+ ? UpdateEntityComponentBody.toJSON(message.updateEntityComponent)
1239
+ : undefined);
1240
+ message.attachEntityComponent !== undefined && (obj.attachEntityComponent = message.attachEntityComponent
1241
+ ? AttachEntityComponentBody.toJSON(message.attachEntityComponent)
1242
+ : undefined);
1243
+ message.componentRemoved !== undefined && (obj.componentRemoved = message.componentRemoved
1244
+ ? ComponentRemovedBody.toJSON(message.componentRemoved)
1245
+ : undefined);
1246
+ message.setEntityParent !== undefined &&
1247
+ (obj.setEntityParent = message.setEntityParent ? SetEntityParentBody.toJSON(message.setEntityParent) : undefined);
1248
+ message.query !== undefined && (obj.query = message.query ? QueryBody.toJSON(message.query) : undefined);
1249
+ message.componentCreated !== undefined && (obj.componentCreated = message.componentCreated
1250
+ ? ComponentCreatedBody.toJSON(message.componentCreated)
1251
+ : undefined);
1252
+ message.componentDisposed !== undefined && (obj.componentDisposed = message.componentDisposed
1253
+ ? ComponentDisposedBody.toJSON(message.componentDisposed)
1254
+ : undefined);
1255
+ message.componentUpdated !== undefined && (obj.componentUpdated = message.componentUpdated
1256
+ ? ComponentUpdatedBody.toJSON(message.componentUpdated)
1257
+ : undefined);
1258
+ message.initMessagesFinished !== undefined && (obj.initMessagesFinished = message.initMessagesFinished
1259
+ ? InitMessagesFinishedBody.toJSON(message.initMessagesFinished)
1260
+ : undefined);
1261
+ return obj;
1262
+ },
1263
+
1264
+ fromPartial<I extends Exact<DeepPartial<Payload>, I>>(object: I): Payload {
1265
+ const message = createBasePayload();
1266
+ message.openExternalUrl = (object.openExternalUrl !== undefined && object.openExternalUrl !== null)
1267
+ ? OpenExternalUrlBody.fromPartial(object.openExternalUrl)
1268
+ : undefined;
1269
+ message.openNftDialog = (object.openNftDialog !== undefined && object.openNftDialog !== null)
1270
+ ? OpenNFTDialogBody.fromPartial(object.openNftDialog)
1271
+ : undefined;
1272
+ message.createEntity = (object.createEntity !== undefined && object.createEntity !== null)
1273
+ ? CreateEntityBody.fromPartial(object.createEntity)
1274
+ : undefined;
1275
+ message.removeEntity = (object.removeEntity !== undefined && object.removeEntity !== null)
1276
+ ? RemoveEntityBody.fromPartial(object.removeEntity)
1277
+ : undefined;
1278
+ message.updateEntityComponent =
1279
+ (object.updateEntityComponent !== undefined && object.updateEntityComponent !== null)
1280
+ ? UpdateEntityComponentBody.fromPartial(object.updateEntityComponent)
1281
+ : undefined;
1282
+ message.attachEntityComponent =
1283
+ (object.attachEntityComponent !== undefined && object.attachEntityComponent !== null)
1284
+ ? AttachEntityComponentBody.fromPartial(object.attachEntityComponent)
1285
+ : undefined;
1286
+ message.componentRemoved = (object.componentRemoved !== undefined && object.componentRemoved !== null)
1287
+ ? ComponentRemovedBody.fromPartial(object.componentRemoved)
1288
+ : undefined;
1289
+ message.setEntityParent = (object.setEntityParent !== undefined && object.setEntityParent !== null)
1290
+ ? SetEntityParentBody.fromPartial(object.setEntityParent)
1291
+ : undefined;
1292
+ message.query = (object.query !== undefined && object.query !== null)
1293
+ ? QueryBody.fromPartial(object.query)
1294
+ : undefined;
1295
+ message.componentCreated = (object.componentCreated !== undefined && object.componentCreated !== null)
1296
+ ? ComponentCreatedBody.fromPartial(object.componentCreated)
1297
+ : undefined;
1298
+ message.componentDisposed = (object.componentDisposed !== undefined && object.componentDisposed !== null)
1299
+ ? ComponentDisposedBody.fromPartial(object.componentDisposed)
1300
+ : undefined;
1301
+ message.componentUpdated = (object.componentUpdated !== undefined && object.componentUpdated !== null)
1302
+ ? ComponentUpdatedBody.fromPartial(object.componentUpdated)
1303
+ : undefined;
1304
+ message.initMessagesFinished = (object.initMessagesFinished !== undefined && object.initMessagesFinished !== null)
1305
+ ? InitMessagesFinishedBody.fromPartial(object.initMessagesFinished)
1306
+ : undefined;
1307
+ return message;
1308
+ },
1309
+ };
1310
+
1311
+ function createBaseEntityAction(): EntityAction {
1312
+ return { type: 0, tag: undefined, payload: undefined };
1313
+ }
1314
+
1315
+ export const EntityAction = {
1316
+ encode(message: EntityAction, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1317
+ if (message.type !== 0) {
1318
+ writer.uint32(8).int32(message.type);
1319
+ }
1320
+ if (message.tag !== undefined) {
1321
+ writer.uint32(18).string(message.tag);
1322
+ }
1323
+ if (message.payload !== undefined) {
1324
+ Payload.encode(message.payload, writer.uint32(26).fork()).ldelim();
1325
+ }
1326
+ return writer;
1327
+ },
1328
+
1329
+ decode(input: _m0.Reader | Uint8Array, length?: number): EntityAction {
1330
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1331
+ let end = length === undefined ? reader.len : reader.pos + length;
1332
+ const message = createBaseEntityAction();
1333
+ while (reader.pos < end) {
1334
+ const tag = reader.uint32();
1335
+ switch (tag >>> 3) {
1336
+ case 1:
1337
+ message.type = reader.int32() as any;
1338
+ break;
1339
+ case 2:
1340
+ message.tag = reader.string();
1341
+ break;
1342
+ case 3:
1343
+ message.payload = Payload.decode(reader, reader.uint32());
1344
+ break;
1345
+ default:
1346
+ reader.skipType(tag & 7);
1347
+ break;
1348
+ }
1349
+ }
1350
+ return message;
1351
+ },
1352
+
1353
+ fromJSON(object: any): EntityAction {
1354
+ return {
1355
+ type: isSet(object.type) ? eATypeFromJSON(object.type) : 0,
1356
+ tag: isSet(object.tag) ? String(object.tag) : undefined,
1357
+ payload: isSet(object.payload) ? Payload.fromJSON(object.payload) : undefined,
1358
+ };
1359
+ },
1360
+
1361
+ toJSON(message: EntityAction): unknown {
1362
+ const obj: any = {};
1363
+ message.type !== undefined && (obj.type = eATypeToJSON(message.type));
1364
+ message.tag !== undefined && (obj.tag = message.tag);
1365
+ message.payload !== undefined && (obj.payload = message.payload ? Payload.toJSON(message.payload) : undefined);
1366
+ return obj;
1367
+ },
1368
+
1369
+ fromPartial<I extends Exact<DeepPartial<EntityAction>, I>>(object: I): EntityAction {
1370
+ const message = createBaseEntityAction();
1371
+ message.type = object.type ?? 0;
1372
+ message.tag = object.tag ?? undefined;
1373
+ message.payload = (object.payload !== undefined && object.payload !== null)
1374
+ ? Payload.fromPartial(object.payload)
1375
+ : undefined;
1376
+ return message;
1377
+ },
1378
+ };
1379
+
1380
+ function createBaseManyEntityAction(): ManyEntityAction {
1381
+ return { actions: [] };
1382
+ }
1383
+
1384
+ export const ManyEntityAction = {
1385
+ encode(message: ManyEntityAction, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1386
+ for (const v of message.actions) {
1387
+ EntityAction.encode(v!, writer.uint32(10).fork()).ldelim();
1388
+ }
1389
+ return writer;
1390
+ },
1391
+
1392
+ decode(input: _m0.Reader | Uint8Array, length?: number): ManyEntityAction {
1393
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1394
+ let end = length === undefined ? reader.len : reader.pos + length;
1395
+ const message = createBaseManyEntityAction();
1396
+ while (reader.pos < end) {
1397
+ const tag = reader.uint32();
1398
+ switch (tag >>> 3) {
1399
+ case 1:
1400
+ message.actions.push(EntityAction.decode(reader, reader.uint32()));
1401
+ break;
1402
+ default:
1403
+ reader.skipType(tag & 7);
1404
+ break;
1405
+ }
1406
+ }
1407
+ return message;
1408
+ },
1409
+
1410
+ fromJSON(object: any): ManyEntityAction {
1411
+ return { actions: Array.isArray(object?.actions) ? object.actions.map((e: any) => EntityAction.fromJSON(e)) : [] };
1412
+ },
1413
+
1414
+ toJSON(message: ManyEntityAction): unknown {
1415
+ const obj: any = {};
1416
+ if (message.actions) {
1417
+ obj.actions = message.actions.map((e) => e ? EntityAction.toJSON(e) : undefined);
1418
+ } else {
1419
+ obj.actions = [];
1420
+ }
1421
+ return obj;
1422
+ },
1423
+
1424
+ fromPartial<I extends Exact<DeepPartial<ManyEntityAction>, I>>(object: I): ManyEntityAction {
1425
+ const message = createBaseManyEntityAction();
1426
+ message.actions = object.actions?.map((e) => EntityAction.fromPartial(e)) || [];
1427
+ return message;
1428
+ },
1429
+ };
1430
+
1431
+ function createBaseSendBatchResponse(): SendBatchResponse {
1432
+ return { events: [] };
1433
+ }
1434
+
1435
+ export const SendBatchResponse = {
1436
+ encode(message: SendBatchResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1437
+ for (const v of message.events) {
1438
+ EventData.encode(v!, writer.uint32(10).fork()).ldelim();
1439
+ }
1440
+ return writer;
1441
+ },
1442
+
1443
+ decode(input: _m0.Reader | Uint8Array, length?: number): SendBatchResponse {
1444
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1445
+ let end = length === undefined ? reader.len : reader.pos + length;
1446
+ const message = createBaseSendBatchResponse();
1447
+ while (reader.pos < end) {
1448
+ const tag = reader.uint32();
1449
+ switch (tag >>> 3) {
1450
+ case 1:
1451
+ message.events.push(EventData.decode(reader, reader.uint32()));
1452
+ break;
1453
+ default:
1454
+ reader.skipType(tag & 7);
1455
+ break;
1456
+ }
1457
+ }
1458
+ return message;
1459
+ },
1460
+
1461
+ fromJSON(object: any): SendBatchResponse {
1462
+ return { events: Array.isArray(object?.events) ? object.events.map((e: any) => EventData.fromJSON(e)) : [] };
1463
+ },
1464
+
1465
+ toJSON(message: SendBatchResponse): unknown {
1466
+ const obj: any = {};
1467
+ if (message.events) {
1468
+ obj.events = message.events.map((e) => e ? EventData.toJSON(e) : undefined);
1469
+ } else {
1470
+ obj.events = [];
1471
+ }
1472
+ return obj;
1473
+ },
1474
+
1475
+ fromPartial<I extends Exact<DeepPartial<SendBatchResponse>, I>>(object: I): SendBatchResponse {
1476
+ const message = createBaseSendBatchResponse();
1477
+ message.events = object.events?.map((e) => EventData.fromPartial(e)) || [];
1478
+ return message;
1479
+ },
1480
+ };
1481
+
1482
+ function createBaseUnsubscribeRequest(): UnsubscribeRequest {
1483
+ return { eventId: "" };
1484
+ }
1485
+
1486
+ export const UnsubscribeRequest = {
1487
+ encode(message: UnsubscribeRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1488
+ if (message.eventId !== "") {
1489
+ writer.uint32(10).string(message.eventId);
1490
+ }
1491
+ return writer;
1492
+ },
1493
+
1494
+ decode(input: _m0.Reader | Uint8Array, length?: number): UnsubscribeRequest {
1495
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1496
+ let end = length === undefined ? reader.len : reader.pos + length;
1497
+ const message = createBaseUnsubscribeRequest();
1498
+ while (reader.pos < end) {
1499
+ const tag = reader.uint32();
1500
+ switch (tag >>> 3) {
1501
+ case 1:
1502
+ message.eventId = reader.string();
1503
+ break;
1504
+ default:
1505
+ reader.skipType(tag & 7);
1506
+ break;
1507
+ }
1508
+ }
1509
+ return message;
1510
+ },
1511
+
1512
+ fromJSON(object: any): UnsubscribeRequest {
1513
+ return { eventId: isSet(object.eventId) ? String(object.eventId) : "" };
1514
+ },
1515
+
1516
+ toJSON(message: UnsubscribeRequest): unknown {
1517
+ const obj: any = {};
1518
+ message.eventId !== undefined && (obj.eventId = message.eventId);
1519
+ return obj;
1520
+ },
1521
+
1522
+ fromPartial<I extends Exact<DeepPartial<UnsubscribeRequest>, I>>(object: I): UnsubscribeRequest {
1523
+ const message = createBaseUnsubscribeRequest();
1524
+ message.eventId = object.eventId ?? "";
1525
+ return message;
1526
+ },
1527
+ };
1528
+
1529
+ function createBaseSubscribeRequest(): SubscribeRequest {
1530
+ return { eventId: "" };
1531
+ }
1532
+
1533
+ export const SubscribeRequest = {
1534
+ encode(message: SubscribeRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1535
+ if (message.eventId !== "") {
1536
+ writer.uint32(10).string(message.eventId);
1537
+ }
1538
+ return writer;
1539
+ },
1540
+
1541
+ decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeRequest {
1542
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1543
+ let end = length === undefined ? reader.len : reader.pos + length;
1544
+ const message = createBaseSubscribeRequest();
1545
+ while (reader.pos < end) {
1546
+ const tag = reader.uint32();
1547
+ switch (tag >>> 3) {
1548
+ case 1:
1549
+ message.eventId = reader.string();
1550
+ break;
1551
+ default:
1552
+ reader.skipType(tag & 7);
1553
+ break;
1554
+ }
1555
+ }
1556
+ return message;
1557
+ },
1558
+
1559
+ fromJSON(object: any): SubscribeRequest {
1560
+ return { eventId: isSet(object.eventId) ? String(object.eventId) : "" };
1561
+ },
1562
+
1563
+ toJSON(message: SubscribeRequest): unknown {
1564
+ const obj: any = {};
1565
+ message.eventId !== undefined && (obj.eventId = message.eventId);
1566
+ return obj;
1567
+ },
1568
+
1569
+ fromPartial<I extends Exact<DeepPartial<SubscribeRequest>, I>>(object: I): SubscribeRequest {
1570
+ const message = createBaseSubscribeRequest();
1571
+ message.eventId = object.eventId ?? "";
1572
+ return message;
1573
+ },
1574
+ };
1575
+
1576
+ function createBaseSubscribeResponse(): SubscribeResponse {
1577
+ return {};
1578
+ }
1579
+
1580
+ export const SubscribeResponse = {
1581
+ encode(_: SubscribeResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1582
+ return writer;
1583
+ },
1584
+
1585
+ decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeResponse {
1586
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1587
+ let end = length === undefined ? reader.len : reader.pos + length;
1588
+ const message = createBaseSubscribeResponse();
1589
+ while (reader.pos < end) {
1590
+ const tag = reader.uint32();
1591
+ switch (tag >>> 3) {
1592
+ default:
1593
+ reader.skipType(tag & 7);
1594
+ break;
1595
+ }
1596
+ }
1597
+ return message;
1598
+ },
1599
+
1600
+ fromJSON(_: any): SubscribeResponse {
1601
+ return {};
1602
+ },
1603
+
1604
+ toJSON(_: SubscribeResponse): unknown {
1605
+ const obj: any = {};
1606
+ return obj;
1607
+ },
1608
+
1609
+ fromPartial<I extends Exact<DeepPartial<SubscribeResponse>, I>>(_: I): SubscribeResponse {
1610
+ const message = createBaseSubscribeResponse();
1611
+ return message;
1612
+ },
1613
+ };
1614
+
1615
+ function createBaseUnsubscribeResponse(): UnsubscribeResponse {
1616
+ return {};
1617
+ }
1618
+
1619
+ export const UnsubscribeResponse = {
1620
+ encode(_: UnsubscribeResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1621
+ return writer;
1622
+ },
1623
+
1624
+ decode(input: _m0.Reader | Uint8Array, length?: number): UnsubscribeResponse {
1625
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1626
+ let end = length === undefined ? reader.len : reader.pos + length;
1627
+ const message = createBaseUnsubscribeResponse();
1628
+ while (reader.pos < end) {
1629
+ const tag = reader.uint32();
1630
+ switch (tag >>> 3) {
1631
+ default:
1632
+ reader.skipType(tag & 7);
1633
+ break;
1634
+ }
1635
+ }
1636
+ return message;
1637
+ },
1638
+
1639
+ fromJSON(_: any): UnsubscribeResponse {
1640
+ return {};
1641
+ },
1642
+
1643
+ toJSON(_: UnsubscribeResponse): unknown {
1644
+ const obj: any = {};
1645
+ return obj;
1646
+ },
1647
+
1648
+ fromPartial<I extends Exact<DeepPartial<UnsubscribeResponse>, I>>(_: I): UnsubscribeResponse {
1649
+ const message = createBaseUnsubscribeResponse();
1650
+ return message;
1651
+ },
1652
+ };
1653
+
1654
+ function createBaseGenericPayload(): GenericPayload {
1655
+ return { eventId: "", eventData: "" };
1656
+ }
1657
+
1658
+ export const GenericPayload = {
1659
+ encode(message: GenericPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1660
+ if (message.eventId !== "") {
1661
+ writer.uint32(26).string(message.eventId);
1662
+ }
1663
+ if (message.eventData !== "") {
1664
+ writer.uint32(34).string(message.eventData);
1665
+ }
1666
+ return writer;
1667
+ },
1668
+
1669
+ decode(input: _m0.Reader | Uint8Array, length?: number): GenericPayload {
1670
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1671
+ let end = length === undefined ? reader.len : reader.pos + length;
1672
+ const message = createBaseGenericPayload();
1673
+ while (reader.pos < end) {
1674
+ const tag = reader.uint32();
1675
+ switch (tag >>> 3) {
1676
+ case 3:
1677
+ message.eventId = reader.string();
1678
+ break;
1679
+ case 4:
1680
+ message.eventData = reader.string();
1681
+ break;
1682
+ default:
1683
+ reader.skipType(tag & 7);
1684
+ break;
1685
+ }
1686
+ }
1687
+ return message;
1688
+ },
1689
+
1690
+ fromJSON(object: any): GenericPayload {
1691
+ return {
1692
+ eventId: isSet(object.eventId) ? String(object.eventId) : "",
1693
+ eventData: isSet(object.eventData) ? String(object.eventData) : "",
1694
+ };
1695
+ },
1696
+
1697
+ toJSON(message: GenericPayload): unknown {
1698
+ const obj: any = {};
1699
+ message.eventId !== undefined && (obj.eventId = message.eventId);
1700
+ message.eventData !== undefined && (obj.eventData = message.eventData);
1701
+ return obj;
1702
+ },
1703
+
1704
+ fromPartial<I extends Exact<DeepPartial<GenericPayload>, I>>(object: I): GenericPayload {
1705
+ const message = createBaseGenericPayload();
1706
+ message.eventId = object.eventId ?? "";
1707
+ message.eventData = object.eventData ?? "";
1708
+ return message;
1709
+ },
1710
+ };
1711
+
1712
+ function createBaseReadOnlyVector3(): ReadOnlyVector3 {
1713
+ return { x: 0, y: 0, z: 0 };
1714
+ }
1715
+
1716
+ export const ReadOnlyVector3 = {
1717
+ encode(message: ReadOnlyVector3, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1718
+ if (message.x !== 0) {
1719
+ writer.uint32(13).float(message.x);
1720
+ }
1721
+ if (message.y !== 0) {
1722
+ writer.uint32(21).float(message.y);
1723
+ }
1724
+ if (message.z !== 0) {
1725
+ writer.uint32(29).float(message.z);
1726
+ }
1727
+ return writer;
1728
+ },
1729
+
1730
+ decode(input: _m0.Reader | Uint8Array, length?: number): ReadOnlyVector3 {
1731
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1732
+ let end = length === undefined ? reader.len : reader.pos + length;
1733
+ const message = createBaseReadOnlyVector3();
1734
+ while (reader.pos < end) {
1735
+ const tag = reader.uint32();
1736
+ switch (tag >>> 3) {
1737
+ case 1:
1738
+ message.x = reader.float();
1739
+ break;
1740
+ case 2:
1741
+ message.y = reader.float();
1742
+ break;
1743
+ case 3:
1744
+ message.z = reader.float();
1745
+ break;
1746
+ default:
1747
+ reader.skipType(tag & 7);
1748
+ break;
1749
+ }
1750
+ }
1751
+ return message;
1752
+ },
1753
+
1754
+ fromJSON(object: any): ReadOnlyVector3 {
1755
+ return {
1756
+ x: isSet(object.x) ? Number(object.x) : 0,
1757
+ y: isSet(object.y) ? Number(object.y) : 0,
1758
+ z: isSet(object.z) ? Number(object.z) : 0,
1759
+ };
1760
+ },
1761
+
1762
+ toJSON(message: ReadOnlyVector3): unknown {
1763
+ const obj: any = {};
1764
+ message.x !== undefined && (obj.x = message.x);
1765
+ message.y !== undefined && (obj.y = message.y);
1766
+ message.z !== undefined && (obj.z = message.z);
1767
+ return obj;
1768
+ },
1769
+
1770
+ fromPartial<I extends Exact<DeepPartial<ReadOnlyVector3>, I>>(object: I): ReadOnlyVector3 {
1771
+ const message = createBaseReadOnlyVector3();
1772
+ message.x = object.x ?? 0;
1773
+ message.y = object.y ?? 0;
1774
+ message.z = object.z ?? 0;
1775
+ return message;
1776
+ },
1777
+ };
1778
+
1779
+ function createBaseReadOnlyQuaternion(): ReadOnlyQuaternion {
1780
+ return { x: 0, y: 0, z: 0, w: 0 };
1781
+ }
1782
+
1783
+ export const ReadOnlyQuaternion = {
1784
+ encode(message: ReadOnlyQuaternion, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1785
+ if (message.x !== 0) {
1786
+ writer.uint32(13).float(message.x);
1787
+ }
1788
+ if (message.y !== 0) {
1789
+ writer.uint32(21).float(message.y);
1790
+ }
1791
+ if (message.z !== 0) {
1792
+ writer.uint32(29).float(message.z);
1793
+ }
1794
+ if (message.w !== 0) {
1795
+ writer.uint32(37).float(message.w);
1796
+ }
1797
+ return writer;
1798
+ },
1799
+
1800
+ decode(input: _m0.Reader | Uint8Array, length?: number): ReadOnlyQuaternion {
1801
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1802
+ let end = length === undefined ? reader.len : reader.pos + length;
1803
+ const message = createBaseReadOnlyQuaternion();
1804
+ while (reader.pos < end) {
1805
+ const tag = reader.uint32();
1806
+ switch (tag >>> 3) {
1807
+ case 1:
1808
+ message.x = reader.float();
1809
+ break;
1810
+ case 2:
1811
+ message.y = reader.float();
1812
+ break;
1813
+ case 3:
1814
+ message.z = reader.float();
1815
+ break;
1816
+ case 4:
1817
+ message.w = reader.float();
1818
+ break;
1819
+ default:
1820
+ reader.skipType(tag & 7);
1821
+ break;
1822
+ }
1823
+ }
1824
+ return message;
1825
+ },
1826
+
1827
+ fromJSON(object: any): ReadOnlyQuaternion {
1828
+ return {
1829
+ x: isSet(object.x) ? Number(object.x) : 0,
1830
+ y: isSet(object.y) ? Number(object.y) : 0,
1831
+ z: isSet(object.z) ? Number(object.z) : 0,
1832
+ w: isSet(object.w) ? Number(object.w) : 0,
1833
+ };
1834
+ },
1835
+
1836
+ toJSON(message: ReadOnlyQuaternion): unknown {
1837
+ const obj: any = {};
1838
+ message.x !== undefined && (obj.x = message.x);
1839
+ message.y !== undefined && (obj.y = message.y);
1840
+ message.z !== undefined && (obj.z = message.z);
1841
+ message.w !== undefined && (obj.w = message.w);
1842
+ return obj;
1843
+ },
1844
+
1845
+ fromPartial<I extends Exact<DeepPartial<ReadOnlyQuaternion>, I>>(object: I): ReadOnlyQuaternion {
1846
+ const message = createBaseReadOnlyQuaternion();
1847
+ message.x = object.x ?? 0;
1848
+ message.y = object.y ?? 0;
1849
+ message.z = object.z ?? 0;
1850
+ message.w = object.w ?? 0;
1851
+ return message;
1852
+ },
1853
+ };
1854
+
1855
+ function createBasePositionChangedPayload(): PositionChangedPayload {
1856
+ return { position: undefined, cameraPosition: undefined, playerHeight: 0 };
1857
+ }
1858
+
1859
+ export const PositionChangedPayload = {
1860
+ encode(message: PositionChangedPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1861
+ if (message.position !== undefined) {
1862
+ ReadOnlyVector3.encode(message.position, writer.uint32(10).fork()).ldelim();
1863
+ }
1864
+ if (message.cameraPosition !== undefined) {
1865
+ ReadOnlyVector3.encode(message.cameraPosition, writer.uint32(18).fork()).ldelim();
1866
+ }
1867
+ if (message.playerHeight !== 0) {
1868
+ writer.uint32(29).float(message.playerHeight);
1869
+ }
1870
+ return writer;
1871
+ },
1872
+
1873
+ decode(input: _m0.Reader | Uint8Array, length?: number): PositionChangedPayload {
1874
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1875
+ let end = length === undefined ? reader.len : reader.pos + length;
1876
+ const message = createBasePositionChangedPayload();
1877
+ while (reader.pos < end) {
1878
+ const tag = reader.uint32();
1879
+ switch (tag >>> 3) {
1880
+ case 1:
1881
+ message.position = ReadOnlyVector3.decode(reader, reader.uint32());
1882
+ break;
1883
+ case 2:
1884
+ message.cameraPosition = ReadOnlyVector3.decode(reader, reader.uint32());
1885
+ break;
1886
+ case 3:
1887
+ message.playerHeight = reader.float();
1888
+ break;
1889
+ default:
1890
+ reader.skipType(tag & 7);
1891
+ break;
1892
+ }
1893
+ }
1894
+ return message;
1895
+ },
1896
+
1897
+ fromJSON(object: any): PositionChangedPayload {
1898
+ return {
1899
+ position: isSet(object.position) ? ReadOnlyVector3.fromJSON(object.position) : undefined,
1900
+ cameraPosition: isSet(object.cameraPosition) ? ReadOnlyVector3.fromJSON(object.cameraPosition) : undefined,
1901
+ playerHeight: isSet(object.playerHeight) ? Number(object.playerHeight) : 0,
1902
+ };
1903
+ },
1904
+
1905
+ toJSON(message: PositionChangedPayload): unknown {
1906
+ const obj: any = {};
1907
+ message.position !== undefined &&
1908
+ (obj.position = message.position ? ReadOnlyVector3.toJSON(message.position) : undefined);
1909
+ message.cameraPosition !== undefined &&
1910
+ (obj.cameraPosition = message.cameraPosition ? ReadOnlyVector3.toJSON(message.cameraPosition) : undefined);
1911
+ message.playerHeight !== undefined && (obj.playerHeight = message.playerHeight);
1912
+ return obj;
1913
+ },
1914
+
1915
+ fromPartial<I extends Exact<DeepPartial<PositionChangedPayload>, I>>(object: I): PositionChangedPayload {
1916
+ const message = createBasePositionChangedPayload();
1917
+ message.position = (object.position !== undefined && object.position !== null)
1918
+ ? ReadOnlyVector3.fromPartial(object.position)
1919
+ : undefined;
1920
+ message.cameraPosition = (object.cameraPosition !== undefined && object.cameraPosition !== null)
1921
+ ? ReadOnlyVector3.fromPartial(object.cameraPosition)
1922
+ : undefined;
1923
+ message.playerHeight = object.playerHeight ?? 0;
1924
+ return message;
1925
+ },
1926
+ };
1927
+
1928
+ function createBaseRotationChangedPayload(): RotationChangedPayload {
1929
+ return { rotation: undefined, quaternion: undefined };
1930
+ }
1931
+
1932
+ export const RotationChangedPayload = {
1933
+ encode(message: RotationChangedPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1934
+ if (message.rotation !== undefined) {
1935
+ ReadOnlyVector3.encode(message.rotation, writer.uint32(10).fork()).ldelim();
1936
+ }
1937
+ if (message.quaternion !== undefined) {
1938
+ ReadOnlyQuaternion.encode(message.quaternion, writer.uint32(18).fork()).ldelim();
1939
+ }
1940
+ return writer;
1941
+ },
1942
+
1943
+ decode(input: _m0.Reader | Uint8Array, length?: number): RotationChangedPayload {
1944
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1945
+ let end = length === undefined ? reader.len : reader.pos + length;
1946
+ const message = createBaseRotationChangedPayload();
1947
+ while (reader.pos < end) {
1948
+ const tag = reader.uint32();
1949
+ switch (tag >>> 3) {
1950
+ case 1:
1951
+ message.rotation = ReadOnlyVector3.decode(reader, reader.uint32());
1952
+ break;
1953
+ case 2:
1954
+ message.quaternion = ReadOnlyQuaternion.decode(reader, reader.uint32());
1955
+ break;
1956
+ default:
1957
+ reader.skipType(tag & 7);
1958
+ break;
1959
+ }
1960
+ }
1961
+ return message;
1962
+ },
1963
+
1964
+ fromJSON(object: any): RotationChangedPayload {
1965
+ return {
1966
+ rotation: isSet(object.rotation) ? ReadOnlyVector3.fromJSON(object.rotation) : undefined,
1967
+ quaternion: isSet(object.quaternion) ? ReadOnlyQuaternion.fromJSON(object.quaternion) : undefined,
1968
+ };
1969
+ },
1970
+
1971
+ toJSON(message: RotationChangedPayload): unknown {
1972
+ const obj: any = {};
1973
+ message.rotation !== undefined &&
1974
+ (obj.rotation = message.rotation ? ReadOnlyVector3.toJSON(message.rotation) : undefined);
1975
+ message.quaternion !== undefined &&
1976
+ (obj.quaternion = message.quaternion ? ReadOnlyQuaternion.toJSON(message.quaternion) : undefined);
1977
+ return obj;
1978
+ },
1979
+
1980
+ fromPartial<I extends Exact<DeepPartial<RotationChangedPayload>, I>>(object: I): RotationChangedPayload {
1981
+ const message = createBaseRotationChangedPayload();
1982
+ message.rotation = (object.rotation !== undefined && object.rotation !== null)
1983
+ ? ReadOnlyVector3.fromPartial(object.rotation)
1984
+ : undefined;
1985
+ message.quaternion = (object.quaternion !== undefined && object.quaternion !== null)
1986
+ ? ReadOnlyQuaternion.fromPartial(object.quaternion)
1987
+ : undefined;
1988
+ return message;
1989
+ },
1990
+ };
1991
+
1992
+ function createBaseEventData(): EventData {
1993
+ return { type: 0, generic: undefined, positionChanged: undefined, rotationChanged: undefined };
1994
+ }
1995
+
1996
+ export const EventData = {
1997
+ encode(message: EventData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1998
+ if (message.type !== 0) {
1999
+ writer.uint32(8).int32(message.type);
2000
+ }
2001
+ if (message.generic !== undefined) {
2002
+ GenericPayload.encode(message.generic, writer.uint32(18).fork()).ldelim();
2003
+ }
2004
+ if (message.positionChanged !== undefined) {
2005
+ PositionChangedPayload.encode(message.positionChanged, writer.uint32(26).fork()).ldelim();
2006
+ }
2007
+ if (message.rotationChanged !== undefined) {
2008
+ RotationChangedPayload.encode(message.rotationChanged, writer.uint32(34).fork()).ldelim();
2009
+ }
2010
+ return writer;
2011
+ },
2012
+
2013
+ decode(input: _m0.Reader | Uint8Array, length?: number): EventData {
2014
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
2015
+ let end = length === undefined ? reader.len : reader.pos + length;
2016
+ const message = createBaseEventData();
2017
+ while (reader.pos < end) {
2018
+ const tag = reader.uint32();
2019
+ switch (tag >>> 3) {
2020
+ case 1:
2021
+ message.type = reader.int32() as any;
2022
+ break;
2023
+ case 2:
2024
+ message.generic = GenericPayload.decode(reader, reader.uint32());
2025
+ break;
2026
+ case 3:
2027
+ message.positionChanged = PositionChangedPayload.decode(reader, reader.uint32());
2028
+ break;
2029
+ case 4:
2030
+ message.rotationChanged = RotationChangedPayload.decode(reader, reader.uint32());
2031
+ break;
2032
+ default:
2033
+ reader.skipType(tag & 7);
2034
+ break;
2035
+ }
2036
+ }
2037
+ return message;
2038
+ },
2039
+
2040
+ fromJSON(object: any): EventData {
2041
+ return {
2042
+ type: isSet(object.type) ? eventDataTypeFromJSON(object.type) : 0,
2043
+ generic: isSet(object.generic) ? GenericPayload.fromJSON(object.generic) : undefined,
2044
+ positionChanged: isSet(object.positionChanged)
2045
+ ? PositionChangedPayload.fromJSON(object.positionChanged)
2046
+ : undefined,
2047
+ rotationChanged: isSet(object.rotationChanged)
2048
+ ? RotationChangedPayload.fromJSON(object.rotationChanged)
2049
+ : undefined,
2050
+ };
2051
+ },
2052
+
2053
+ toJSON(message: EventData): unknown {
2054
+ const obj: any = {};
2055
+ message.type !== undefined && (obj.type = eventDataTypeToJSON(message.type));
2056
+ message.generic !== undefined &&
2057
+ (obj.generic = message.generic ? GenericPayload.toJSON(message.generic) : undefined);
2058
+ message.positionChanged !== undefined && (obj.positionChanged = message.positionChanged
2059
+ ? PositionChangedPayload.toJSON(message.positionChanged)
2060
+ : undefined);
2061
+ message.rotationChanged !== undefined && (obj.rotationChanged = message.rotationChanged
2062
+ ? RotationChangedPayload.toJSON(message.rotationChanged)
2063
+ : undefined);
2064
+ return obj;
2065
+ },
2066
+
2067
+ fromPartial<I extends Exact<DeepPartial<EventData>, I>>(object: I): EventData {
2068
+ const message = createBaseEventData();
2069
+ message.type = object.type ?? 0;
2070
+ message.generic = (object.generic !== undefined && object.generic !== null)
2071
+ ? GenericPayload.fromPartial(object.generic)
2072
+ : undefined;
2073
+ message.positionChanged = (object.positionChanged !== undefined && object.positionChanged !== null)
2074
+ ? PositionChangedPayload.fromPartial(object.positionChanged)
2075
+ : undefined;
2076
+ message.rotationChanged = (object.rotationChanged !== undefined && object.rotationChanged !== null)
2077
+ ? RotationChangedPayload.fromPartial(object.rotationChanged)
2078
+ : undefined;
2079
+ return message;
2080
+ },
2081
+ };
2082
+
2083
+ export type EngineAPIServiceDefinition = typeof EngineAPIServiceDefinition;
2084
+ export const EngineAPIServiceDefinition = {
2085
+ name: "EngineAPIService",
2086
+ fullName: "EngineAPIService",
2087
+ methods: {
2088
+ sendBatch: {
2089
+ name: "SendBatch",
2090
+ requestType: ManyEntityAction,
2091
+ requestStream: false,
2092
+ responseType: SendBatchResponse,
2093
+ responseStream: false,
2094
+ options: {},
2095
+ },
2096
+ subscribe: {
2097
+ name: "Subscribe",
2098
+ requestType: SubscribeRequest,
2099
+ requestStream: false,
2100
+ responseType: SubscribeResponse,
2101
+ responseStream: false,
2102
+ options: {},
2103
+ },
2104
+ unsubscribe: {
2105
+ name: "Unsubscribe",
2106
+ requestType: UnsubscribeRequest,
2107
+ requestStream: false,
2108
+ responseType: UnsubscribeResponse,
2109
+ responseStream: false,
2110
+ options: {},
2111
+ },
2112
+ },
2113
+ } as const;
2114
+
2115
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
2116
+
2117
+ export type DeepPartial<T> = T extends Builtin ? T
2118
+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
2119
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
2120
+ : Partial<T>;
2121
+
2122
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
2123
+ export type Exact<P, I extends P> = P extends Builtin ? P
2124
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
2125
+
2126
+ function isSet(value: any): boolean {
2127
+ return value !== null && value !== undefined;
2128
+ }