@dcl/protocol 1.0.0-24662786301.commit-0f034b7 → 1.0.0-25007945013.commit-ba53eb0

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 (124) hide show
  1. package/out-js/decentraland/common/texture.gen.d.ts +18 -0
  2. package/out-js/decentraland/common/texture.gen.js +104 -4
  3. package/out-js/decentraland/common/texture.gen.js.map +1 -1
  4. package/out-js/decentraland/kernel/apis/comms_api.gen.d.ts +0 -101
  5. package/out-js/decentraland/kernel/apis/comms_api.gen.js +1 -428
  6. package/out-js/decentraland/kernel/apis/comms_api.gen.js.map +1 -1
  7. package/out-js/decentraland/kernel/apis/restricted_actions.gen.d.ts +109 -0
  8. package/out-js/decentraland/kernel/apis/restricted_actions.gen.js +383 -1
  9. package/out-js/decentraland/kernel/apis/restricted_actions.gen.js.map +1 -1
  10. package/out-js/decentraland/kernel/comms/rfc4/comms.gen.d.ts +0 -52
  11. package/out-js/decentraland/kernel/comms/rfc4/comms.gen.js +5 -339
  12. package/out-js/decentraland/kernel/comms/rfc4/comms.gen.js.map +1 -1
  13. package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.d.ts +2 -0
  14. package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.js +19 -2
  15. package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.js.map +1 -1
  16. package/out-js/decentraland/sdk/components/avatar_locomotion_settings.gen.d.ts +45 -0
  17. package/out-js/decentraland/sdk/components/avatar_locomotion_settings.gen.js +138 -0
  18. package/out-js/decentraland/sdk/components/avatar_locomotion_settings.gen.js.map +1 -0
  19. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.d.ts +41 -0
  20. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js +241 -3
  21. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js.map +1 -1
  22. package/out-js/decentraland/sdk/components/avatar_movement.gen.d.ts +36 -0
  23. package/out-js/decentraland/sdk/components/avatar_movement.gen.js +113 -0
  24. package/out-js/decentraland/sdk/components/avatar_movement.gen.js.map +1 -0
  25. package/out-js/decentraland/sdk/components/avatar_movement_info.gen.d.ts +48 -0
  26. package/out-js/decentraland/sdk/components/avatar_movement_info.gen.js +207 -0
  27. package/out-js/decentraland/sdk/components/avatar_movement_info.gen.js.map +1 -0
  28. package/out-js/decentraland/sdk/components/avatar_shape.gen.d.ts +2 -0
  29. package/out-js/decentraland/sdk/components/avatar_shape.gen.js +19 -1
  30. package/out-js/decentraland/sdk/components/avatar_shape.gen.js.map +1 -1
  31. package/out-js/decentraland/sdk/components/camera_mode_area.gen.d.ts +35 -1
  32. package/out-js/decentraland/sdk/components/camera_mode_area.gen.js +172 -3
  33. package/out-js/decentraland/sdk/components/camera_mode_area.gen.js.map +1 -1
  34. package/out-js/decentraland/sdk/components/common/input_action.gen.d.ts +4 -0
  35. package/out-js/decentraland/sdk/components/common/input_action.gen.js +24 -0
  36. package/out-js/decentraland/sdk/components/common/input_action.gen.js.map +1 -1
  37. package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.d.ts +19 -0
  38. package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.js +90 -3
  39. package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.js.map +1 -1
  40. package/out-js/decentraland/sdk/components/gltf_node.gen.d.ts +66 -0
  41. package/out-js/decentraland/sdk/components/gltf_node.gen.js +69 -0
  42. package/out-js/decentraland/sdk/components/gltf_node.gen.js.map +1 -0
  43. package/out-js/decentraland/sdk/components/gltf_node_state.gen.d.ts +43 -0
  44. package/out-js/decentraland/sdk/components/gltf_node_state.gen.js +122 -0
  45. package/out-js/decentraland/sdk/components/gltf_node_state.gen.js.map +1 -0
  46. package/out-js/decentraland/sdk/components/input_modifier.gen.d.ts +52 -0
  47. package/out-js/decentraland/sdk/components/input_modifier.gen.js +233 -0
  48. package/out-js/decentraland/sdk/components/input_modifier.gen.js.map +1 -0
  49. package/out-js/decentraland/sdk/components/material.gen.d.ts +20 -0
  50. package/out-js/decentraland/sdk/components/material.gen.js +86 -2
  51. package/out-js/decentraland/sdk/components/material.gen.js.map +1 -1
  52. package/out-js/decentraland/sdk/components/mesh_collider.gen.d.ts +18 -0
  53. package/out-js/decentraland/sdk/components/mesh_collider.gen.js +90 -4
  54. package/out-js/decentraland/sdk/components/mesh_collider.gen.js.map +1 -1
  55. package/out-js/decentraland/sdk/components/mesh_renderer.gen.d.ts +19 -3
  56. package/out-js/decentraland/sdk/components/mesh_renderer.gen.js +90 -4
  57. package/out-js/decentraland/sdk/components/mesh_renderer.gen.js.map +1 -1
  58. package/out-js/decentraland/sdk/components/raycast.gen.d.ts +13 -0
  59. package/out-js/decentraland/sdk/components/raycast.gen.js +64 -2
  60. package/out-js/decentraland/sdk/components/raycast.gen.js.map +1 -1
  61. package/out-js/decentraland/sdk/components/ui_input.gen.d.ts +2 -0
  62. package/out-js/decentraland/sdk/components/ui_input.gen.js +14 -1
  63. package/out-js/decentraland/sdk/components/ui_input.gen.js.map +1 -1
  64. package/out-js/decentraland/sdk/components/ui_text.gen.d.ts +4 -0
  65. package/out-js/decentraland/sdk/components/ui_text.gen.js +30 -1
  66. package/out-js/decentraland/sdk/components/ui_text.gen.js.map +1 -1
  67. package/out-js/decentraland/sdk/components/ui_transform.gen.d.ts +33 -0
  68. package/out-js/decentraland/sdk/components/ui_transform.gen.js +176 -3
  69. package/out-js/decentraland/sdk/components/ui_transform.gen.js.map +1 -1
  70. package/out-ts/decentraland/common/texture.gen.ts +119 -4
  71. package/out-ts/decentraland/kernel/apis/comms_api.gen.ts +0 -466
  72. package/out-ts/decentraland/kernel/apis/restricted_actions.gen.ts +410 -0
  73. package/out-ts/decentraland/kernel/comms/rfc4/comms.gen.ts +0 -376
  74. package/out-ts/decentraland/sdk/components/avatar_equipped_data.gen.ts +20 -1
  75. package/out-ts/decentraland/sdk/components/avatar_locomotion_settings.gen.ts +183 -0
  76. package/out-ts/decentraland/sdk/components/avatar_modifier_area.gen.ts +292 -1
  77. package/out-ts/decentraland/sdk/components/avatar_movement.gen.ts +136 -0
  78. package/out-ts/decentraland/sdk/components/avatar_movement_info.gen.ts +249 -0
  79. package/out-ts/decentraland/sdk/components/avatar_shape.gen.ts +23 -1
  80. package/out-ts/decentraland/sdk/components/camera_mode_area.gen.ts +218 -2
  81. package/out-ts/decentraland/sdk/components/common/input_action.gen.ts +24 -0
  82. package/out-ts/decentraland/sdk/components/gltf_container_loading_state.gen.ts +108 -2
  83. package/out-ts/decentraland/sdk/components/gltf_node.gen.ts +116 -0
  84. package/out-ts/decentraland/sdk/components/gltf_node_state.gen.ts +139 -0
  85. package/out-ts/decentraland/sdk/components/input_modifier.gen.ts +265 -0
  86. package/out-ts/decentraland/sdk/components/material.gen.ts +102 -1
  87. package/out-ts/decentraland/sdk/components/mesh_collider.gen.ts +99 -0
  88. package/out-ts/decentraland/sdk/components/mesh_renderer.gen.ts +100 -3
  89. package/out-ts/decentraland/sdk/components/raycast.gen.ts +73 -1
  90. package/out-ts/decentraland/sdk/components/ui_input.gen.ts +19 -1
  91. package/out-ts/decentraland/sdk/components/ui_text.gen.ts +40 -1
  92. package/out-ts/decentraland/sdk/components/ui_transform.gen.ts +193 -0
  93. package/package.json +6 -3
  94. package/proto/decentraland/common/texture.proto +8 -1
  95. package/proto/decentraland/kernel/apis/comms_api.proto +0 -29
  96. package/proto/decentraland/kernel/apis/restricted_actions.proto +39 -1
  97. package/proto/decentraland/kernel/comms/rfc4/comms.proto +0 -25
  98. package/proto/decentraland/sdk/components/avatar_equipped_data.proto +2 -1
  99. package/proto/decentraland/sdk/components/avatar_locomotion_settings.proto +18 -0
  100. package/proto/decentraland/sdk/components/avatar_modifier_area.proto +21 -0
  101. package/proto/decentraland/sdk/components/avatar_movement.proto +46 -0
  102. package/proto/decentraland/sdk/components/avatar_movement_info.proto +22 -0
  103. package/proto/decentraland/sdk/components/avatar_shape.proto +1 -0
  104. package/proto/decentraland/sdk/components/camera_layer.proto +30 -0
  105. package/proto/decentraland/sdk/components/camera_layers.proto +11 -0
  106. package/proto/decentraland/sdk/components/camera_mode_area.proto +22 -3
  107. package/proto/decentraland/sdk/components/common/input_action.proto +4 -0
  108. package/proto/decentraland/sdk/components/global_light.proto +22 -0
  109. package/proto/decentraland/sdk/components/gltf_container_loading_state.proto +13 -0
  110. package/proto/decentraland/sdk/components/gltf_node.proto +42 -0
  111. package/proto/decentraland/sdk/components/gltf_node_state.proto +20 -0
  112. package/proto/decentraland/sdk/components/material.proto +13 -1
  113. package/proto/decentraland/sdk/components/mesh_collider.proto +7 -0
  114. package/proto/decentraland/sdk/components/mesh_renderer.proto +8 -3
  115. package/proto/decentraland/sdk/components/particle_system.proto +1 -5
  116. package/proto/decentraland/sdk/components/primary_pointer_info.proto +5 -0
  117. package/proto/decentraland/sdk/components/raycast.proto +13 -0
  118. package/proto/decentraland/sdk/components/texture_camera.proto +46 -0
  119. package/proto/decentraland/sdk/components/ui_canvas.proto +16 -0
  120. package/proto/decentraland/sdk/components/ui_input.proto +1 -0
  121. package/proto/decentraland/sdk/components/ui_scroll_result.proto +12 -0
  122. package/proto/decentraland/sdk/components/ui_text.proto +3 -0
  123. package/proto/decentraland/sdk/components/ui_transform.proto +20 -0
  124. package/public/sdk-components.proto +4 -0
@@ -120,11 +120,23 @@ export interface VideoTexture {
120
120
  filterMode?: TextureFilterMode | undefined;
121
121
  }
122
122
 
123
+ export interface UiCanvasTexture {
124
+ uiCanvasEntity: number;
125
+ /** default = TextureWrapMode.Clamp */
126
+ wrapMode?:
127
+ | TextureWrapMode
128
+ | undefined;
129
+ /** default = FilterMode.Bilinear */
130
+ filterMode?: TextureFilterMode | undefined;
131
+ }
132
+
123
133
  export interface TextureUnion {
124
- tex?: { $case: "texture"; texture: Texture } | { $case: "avatarTexture"; avatarTexture: AvatarTexture } | {
125
- $case: "videoTexture";
126
- videoTexture: VideoTexture;
127
- } | undefined;
134
+ tex?:
135
+ | { $case: "texture"; texture: Texture }
136
+ | { $case: "avatarTexture"; avatarTexture: AvatarTexture }
137
+ | { $case: "videoTexture"; videoTexture: VideoTexture }
138
+ | { $case: "uiTexture"; uiTexture: UiCanvasTexture }
139
+ | undefined;
128
140
  }
129
141
 
130
142
  function createBaseTexture(): Texture {
@@ -415,6 +427,92 @@ export namespace VideoTexture {
415
427
  }
416
428
  }
417
429
 
430
+ function createBaseUiCanvasTexture(): UiCanvasTexture {
431
+ return { uiCanvasEntity: 0, wrapMode: undefined, filterMode: undefined };
432
+ }
433
+
434
+ export namespace UiCanvasTexture {
435
+ export function encode(message: UiCanvasTexture, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
436
+ if (message.uiCanvasEntity !== 0) {
437
+ writer.uint32(8).uint32(message.uiCanvasEntity);
438
+ }
439
+ if (message.wrapMode !== undefined) {
440
+ writer.uint32(16).int32(message.wrapMode);
441
+ }
442
+ if (message.filterMode !== undefined) {
443
+ writer.uint32(24).int32(message.filterMode);
444
+ }
445
+ return writer;
446
+ }
447
+
448
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): UiCanvasTexture {
449
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
450
+ let end = length === undefined ? reader.len : reader.pos + length;
451
+ const message = createBaseUiCanvasTexture();
452
+ while (reader.pos < end) {
453
+ const tag = reader.uint32();
454
+ switch (tag >>> 3) {
455
+ case 1:
456
+ if (tag !== 8) {
457
+ break;
458
+ }
459
+
460
+ message.uiCanvasEntity = reader.uint32();
461
+ continue;
462
+ case 2:
463
+ if (tag !== 16) {
464
+ break;
465
+ }
466
+
467
+ message.wrapMode = reader.int32() as any;
468
+ continue;
469
+ case 3:
470
+ if (tag !== 24) {
471
+ break;
472
+ }
473
+
474
+ message.filterMode = reader.int32() as any;
475
+ continue;
476
+ }
477
+ if ((tag & 7) === 4 || tag === 0) {
478
+ break;
479
+ }
480
+ reader.skipType(tag & 7);
481
+ }
482
+ return message;
483
+ }
484
+
485
+ export function fromJSON(object: any): UiCanvasTexture {
486
+ return {
487
+ uiCanvasEntity: isSet(object.uiCanvasEntity) ? Number(object.uiCanvasEntity) : 0,
488
+ wrapMode: isSet(object.wrapMode) ? textureWrapModeFromJSON(object.wrapMode) : undefined,
489
+ filterMode: isSet(object.filterMode) ? textureFilterModeFromJSON(object.filterMode) : undefined,
490
+ };
491
+ }
492
+
493
+ export function toJSON(message: UiCanvasTexture): unknown {
494
+ const obj: any = {};
495
+ message.uiCanvasEntity !== undefined && (obj.uiCanvasEntity = Math.round(message.uiCanvasEntity));
496
+ message.wrapMode !== undefined &&
497
+ (obj.wrapMode = message.wrapMode !== undefined ? textureWrapModeToJSON(message.wrapMode) : undefined);
498
+ message.filterMode !== undefined &&
499
+ (obj.filterMode = message.filterMode !== undefined ? textureFilterModeToJSON(message.filterMode) : undefined);
500
+ return obj;
501
+ }
502
+
503
+ export function create<I extends Exact<DeepPartial<UiCanvasTexture>, I>>(base?: I): UiCanvasTexture {
504
+ return UiCanvasTexture.fromPartial(base ?? {});
505
+ }
506
+
507
+ export function fromPartial<I extends Exact<DeepPartial<UiCanvasTexture>, I>>(object: I): UiCanvasTexture {
508
+ const message = createBaseUiCanvasTexture();
509
+ message.uiCanvasEntity = object.uiCanvasEntity ?? 0;
510
+ message.wrapMode = object.wrapMode ?? undefined;
511
+ message.filterMode = object.filterMode ?? undefined;
512
+ return message;
513
+ }
514
+ }
515
+
418
516
  function createBaseTextureUnion(): TextureUnion {
419
517
  return { tex: undefined };
420
518
  }
@@ -431,6 +529,9 @@ export namespace TextureUnion {
431
529
  case "videoTexture":
432
530
  VideoTexture.encode(message.tex.videoTexture, writer.uint32(26).fork()).ldelim();
433
531
  break;
532
+ case "uiTexture":
533
+ UiCanvasTexture.encode(message.tex.uiTexture, writer.uint32(34).fork()).ldelim();
534
+ break;
434
535
  }
435
536
  return writer;
436
537
  }
@@ -463,6 +564,13 @@ export namespace TextureUnion {
463
564
 
464
565
  message.tex = { $case: "videoTexture", videoTexture: VideoTexture.decode(reader, reader.uint32()) };
465
566
  continue;
567
+ case 4:
568
+ if (tag !== 34) {
569
+ break;
570
+ }
571
+
572
+ message.tex = { $case: "uiTexture", uiTexture: UiCanvasTexture.decode(reader, reader.uint32()) };
573
+ continue;
466
574
  }
467
575
  if ((tag & 7) === 4 || tag === 0) {
468
576
  break;
@@ -480,6 +588,8 @@ export namespace TextureUnion {
480
588
  ? { $case: "avatarTexture", avatarTexture: AvatarTexture.fromJSON(object.avatarTexture) }
481
589
  : isSet(object.videoTexture)
482
590
  ? { $case: "videoTexture", videoTexture: VideoTexture.fromJSON(object.videoTexture) }
591
+ : isSet(object.uiTexture)
592
+ ? { $case: "uiTexture", uiTexture: UiCanvasTexture.fromJSON(object.uiTexture) }
483
593
  : undefined,
484
594
  };
485
595
  }
@@ -492,6 +602,8 @@ export namespace TextureUnion {
492
602
  (obj.avatarTexture = message.tex?.avatarTexture ? AvatarTexture.toJSON(message.tex?.avatarTexture) : undefined);
493
603
  message.tex?.$case === "videoTexture" &&
494
604
  (obj.videoTexture = message.tex?.videoTexture ? VideoTexture.toJSON(message.tex?.videoTexture) : undefined);
605
+ message.tex?.$case === "uiTexture" &&
606
+ (obj.uiTexture = message.tex?.uiTexture ? UiCanvasTexture.toJSON(message.tex?.uiTexture) : undefined);
495
607
  return obj;
496
608
  }
497
609
 
@@ -518,6 +630,9 @@ export namespace TextureUnion {
518
630
  ) {
519
631
  message.tex = { $case: "videoTexture", videoTexture: VideoTexture.fromPartial(object.tex.videoTexture) };
520
632
  }
633
+ if (object.tex?.$case === "uiTexture" && object.tex?.uiTexture !== undefined && object.tex?.uiTexture !== null) {
634
+ message.tex = { $case: "uiTexture", uiTexture: UiCanvasTexture.fromPartial(object.tex.uiTexture) };
635
+ }
521
636
  return message;
522
637
  }
523
638
  }
@@ -55,34 +55,6 @@ export interface VideoTracksActiveStreamsData {
55
55
  sourceType: VideoTrackSourceType;
56
56
  }
57
57
 
58
- export interface SubscribeToTopicRequest {
59
- topic: string;
60
- }
61
-
62
- export interface SubscribeToTopicResponse {
63
- }
64
-
65
- export interface PublishDataRequest {
66
- topic: string;
67
- data: string;
68
- }
69
-
70
- export interface PublishDataResponse {
71
- }
72
-
73
- export interface ConsumeMessagesRequest {
74
- topic: string;
75
- }
76
-
77
- export interface ConsumeMessages {
78
- sender: string;
79
- data: string;
80
- }
81
-
82
- export interface ConsumeMessagesResponse {
83
- messages: ConsumeMessages[];
84
- }
85
-
86
58
  function createBaseVideoTracksActiveStreamsRequest(): VideoTracksActiveStreamsRequest {
87
59
  return {};
88
60
  }
@@ -290,420 +262,6 @@ export namespace VideoTracksActiveStreamsData {
290
262
  }
291
263
  }
292
264
 
293
- function createBaseSubscribeToTopicRequest(): SubscribeToTopicRequest {
294
- return { topic: "" };
295
- }
296
-
297
- export namespace SubscribeToTopicRequest {
298
- export function encode(message: SubscribeToTopicRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
299
- if (message.topic !== "") {
300
- writer.uint32(10).string(message.topic);
301
- }
302
- return writer;
303
- }
304
-
305
- export function decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeToTopicRequest {
306
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
307
- let end = length === undefined ? reader.len : reader.pos + length;
308
- const message = createBaseSubscribeToTopicRequest();
309
- while (reader.pos < end) {
310
- const tag = reader.uint32();
311
- switch (tag >>> 3) {
312
- case 1:
313
- if (tag !== 10) {
314
- break;
315
- }
316
-
317
- message.topic = reader.string();
318
- continue;
319
- }
320
- if ((tag & 7) === 4 || tag === 0) {
321
- break;
322
- }
323
- reader.skipType(tag & 7);
324
- }
325
- return message;
326
- }
327
-
328
- export function fromJSON(object: any): SubscribeToTopicRequest {
329
- return { topic: isSet(object.topic) ? String(object.topic) : "" };
330
- }
331
-
332
- export function toJSON(message: SubscribeToTopicRequest): unknown {
333
- const obj: any = {};
334
- message.topic !== undefined && (obj.topic = message.topic);
335
- return obj;
336
- }
337
-
338
- export function create<I extends Exact<DeepPartial<SubscribeToTopicRequest>, I>>(base?: I): SubscribeToTopicRequest {
339
- return SubscribeToTopicRequest.fromPartial(base ?? {});
340
- }
341
-
342
- export function fromPartial<I extends Exact<DeepPartial<SubscribeToTopicRequest>, I>>(
343
- object: I,
344
- ): SubscribeToTopicRequest {
345
- const message = createBaseSubscribeToTopicRequest();
346
- message.topic = object.topic ?? "";
347
- return message;
348
- }
349
- }
350
-
351
- function createBaseSubscribeToTopicResponse(): SubscribeToTopicResponse {
352
- return {};
353
- }
354
-
355
- export namespace SubscribeToTopicResponse {
356
- export function encode(_: SubscribeToTopicResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
357
- return writer;
358
- }
359
-
360
- export function decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeToTopicResponse {
361
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
362
- let end = length === undefined ? reader.len : reader.pos + length;
363
- const message = createBaseSubscribeToTopicResponse();
364
- while (reader.pos < end) {
365
- const tag = reader.uint32();
366
- switch (tag >>> 3) {
367
- }
368
- if ((tag & 7) === 4 || tag === 0) {
369
- break;
370
- }
371
- reader.skipType(tag & 7);
372
- }
373
- return message;
374
- }
375
-
376
- export function fromJSON(_: any): SubscribeToTopicResponse {
377
- return {};
378
- }
379
-
380
- export function toJSON(_: SubscribeToTopicResponse): unknown {
381
- const obj: any = {};
382
- return obj;
383
- }
384
-
385
- export function create<I extends Exact<DeepPartial<SubscribeToTopicResponse>, I>>(
386
- base?: I,
387
- ): SubscribeToTopicResponse {
388
- return SubscribeToTopicResponse.fromPartial(base ?? {});
389
- }
390
-
391
- export function fromPartial<I extends Exact<DeepPartial<SubscribeToTopicResponse>, I>>(
392
- _: I,
393
- ): SubscribeToTopicResponse {
394
- const message = createBaseSubscribeToTopicResponse();
395
- return message;
396
- }
397
- }
398
-
399
- function createBasePublishDataRequest(): PublishDataRequest {
400
- return { topic: "", data: "" };
401
- }
402
-
403
- export namespace PublishDataRequest {
404
- export function encode(message: PublishDataRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
405
- if (message.topic !== "") {
406
- writer.uint32(10).string(message.topic);
407
- }
408
- if (message.data !== "") {
409
- writer.uint32(18).string(message.data);
410
- }
411
- return writer;
412
- }
413
-
414
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PublishDataRequest {
415
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
416
- let end = length === undefined ? reader.len : reader.pos + length;
417
- const message = createBasePublishDataRequest();
418
- while (reader.pos < end) {
419
- const tag = reader.uint32();
420
- switch (tag >>> 3) {
421
- case 1:
422
- if (tag !== 10) {
423
- break;
424
- }
425
-
426
- message.topic = reader.string();
427
- continue;
428
- case 2:
429
- if (tag !== 18) {
430
- break;
431
- }
432
-
433
- message.data = reader.string();
434
- continue;
435
- }
436
- if ((tag & 7) === 4 || tag === 0) {
437
- break;
438
- }
439
- reader.skipType(tag & 7);
440
- }
441
- return message;
442
- }
443
-
444
- export function fromJSON(object: any): PublishDataRequest {
445
- return {
446
- topic: isSet(object.topic) ? String(object.topic) : "",
447
- data: isSet(object.data) ? String(object.data) : "",
448
- };
449
- }
450
-
451
- export function toJSON(message: PublishDataRequest): unknown {
452
- const obj: any = {};
453
- message.topic !== undefined && (obj.topic = message.topic);
454
- message.data !== undefined && (obj.data = message.data);
455
- return obj;
456
- }
457
-
458
- export function create<I extends Exact<DeepPartial<PublishDataRequest>, I>>(base?: I): PublishDataRequest {
459
- return PublishDataRequest.fromPartial(base ?? {});
460
- }
461
-
462
- export function fromPartial<I extends Exact<DeepPartial<PublishDataRequest>, I>>(object: I): PublishDataRequest {
463
- const message = createBasePublishDataRequest();
464
- message.topic = object.topic ?? "";
465
- message.data = object.data ?? "";
466
- return message;
467
- }
468
- }
469
-
470
- function createBasePublishDataResponse(): PublishDataResponse {
471
- return {};
472
- }
473
-
474
- export namespace PublishDataResponse {
475
- export function encode(_: PublishDataResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
476
- return writer;
477
- }
478
-
479
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PublishDataResponse {
480
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
481
- let end = length === undefined ? reader.len : reader.pos + length;
482
- const message = createBasePublishDataResponse();
483
- while (reader.pos < end) {
484
- const tag = reader.uint32();
485
- switch (tag >>> 3) {
486
- }
487
- if ((tag & 7) === 4 || tag === 0) {
488
- break;
489
- }
490
- reader.skipType(tag & 7);
491
- }
492
- return message;
493
- }
494
-
495
- export function fromJSON(_: any): PublishDataResponse {
496
- return {};
497
- }
498
-
499
- export function toJSON(_: PublishDataResponse): unknown {
500
- const obj: any = {};
501
- return obj;
502
- }
503
-
504
- export function create<I extends Exact<DeepPartial<PublishDataResponse>, I>>(base?: I): PublishDataResponse {
505
- return PublishDataResponse.fromPartial(base ?? {});
506
- }
507
-
508
- export function fromPartial<I extends Exact<DeepPartial<PublishDataResponse>, I>>(_: I): PublishDataResponse {
509
- const message = createBasePublishDataResponse();
510
- return message;
511
- }
512
- }
513
-
514
- function createBaseConsumeMessagesRequest(): ConsumeMessagesRequest {
515
- return { topic: "" };
516
- }
517
-
518
- export namespace ConsumeMessagesRequest {
519
- export function encode(message: ConsumeMessagesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
520
- if (message.topic !== "") {
521
- writer.uint32(10).string(message.topic);
522
- }
523
- return writer;
524
- }
525
-
526
- export function decode(input: _m0.Reader | Uint8Array, length?: number): ConsumeMessagesRequest {
527
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
528
- let end = length === undefined ? reader.len : reader.pos + length;
529
- const message = createBaseConsumeMessagesRequest();
530
- while (reader.pos < end) {
531
- const tag = reader.uint32();
532
- switch (tag >>> 3) {
533
- case 1:
534
- if (tag !== 10) {
535
- break;
536
- }
537
-
538
- message.topic = reader.string();
539
- continue;
540
- }
541
- if ((tag & 7) === 4 || tag === 0) {
542
- break;
543
- }
544
- reader.skipType(tag & 7);
545
- }
546
- return message;
547
- }
548
-
549
- export function fromJSON(object: any): ConsumeMessagesRequest {
550
- return { topic: isSet(object.topic) ? String(object.topic) : "" };
551
- }
552
-
553
- export function toJSON(message: ConsumeMessagesRequest): unknown {
554
- const obj: any = {};
555
- message.topic !== undefined && (obj.topic = message.topic);
556
- return obj;
557
- }
558
-
559
- export function create<I extends Exact<DeepPartial<ConsumeMessagesRequest>, I>>(base?: I): ConsumeMessagesRequest {
560
- return ConsumeMessagesRequest.fromPartial(base ?? {});
561
- }
562
-
563
- export function fromPartial<I extends Exact<DeepPartial<ConsumeMessagesRequest>, I>>(
564
- object: I,
565
- ): ConsumeMessagesRequest {
566
- const message = createBaseConsumeMessagesRequest();
567
- message.topic = object.topic ?? "";
568
- return message;
569
- }
570
- }
571
-
572
- function createBaseConsumeMessages(): ConsumeMessages {
573
- return { sender: "", data: "" };
574
- }
575
-
576
- export namespace ConsumeMessages {
577
- export function encode(message: ConsumeMessages, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
578
- if (message.sender !== "") {
579
- writer.uint32(10).string(message.sender);
580
- }
581
- if (message.data !== "") {
582
- writer.uint32(18).string(message.data);
583
- }
584
- return writer;
585
- }
586
-
587
- export function decode(input: _m0.Reader | Uint8Array, length?: number): ConsumeMessages {
588
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
589
- let end = length === undefined ? reader.len : reader.pos + length;
590
- const message = createBaseConsumeMessages();
591
- while (reader.pos < end) {
592
- const tag = reader.uint32();
593
- switch (tag >>> 3) {
594
- case 1:
595
- if (tag !== 10) {
596
- break;
597
- }
598
-
599
- message.sender = reader.string();
600
- continue;
601
- case 2:
602
- if (tag !== 18) {
603
- break;
604
- }
605
-
606
- message.data = reader.string();
607
- continue;
608
- }
609
- if ((tag & 7) === 4 || tag === 0) {
610
- break;
611
- }
612
- reader.skipType(tag & 7);
613
- }
614
- return message;
615
- }
616
-
617
- export function fromJSON(object: any): ConsumeMessages {
618
- return {
619
- sender: isSet(object.sender) ? String(object.sender) : "",
620
- data: isSet(object.data) ? String(object.data) : "",
621
- };
622
- }
623
-
624
- export function toJSON(message: ConsumeMessages): unknown {
625
- const obj: any = {};
626
- message.sender !== undefined && (obj.sender = message.sender);
627
- message.data !== undefined && (obj.data = message.data);
628
- return obj;
629
- }
630
-
631
- export function create<I extends Exact<DeepPartial<ConsumeMessages>, I>>(base?: I): ConsumeMessages {
632
- return ConsumeMessages.fromPartial(base ?? {});
633
- }
634
-
635
- export function fromPartial<I extends Exact<DeepPartial<ConsumeMessages>, I>>(object: I): ConsumeMessages {
636
- const message = createBaseConsumeMessages();
637
- message.sender = object.sender ?? "";
638
- message.data = object.data ?? "";
639
- return message;
640
- }
641
- }
642
-
643
- function createBaseConsumeMessagesResponse(): ConsumeMessagesResponse {
644
- return { messages: [] };
645
- }
646
-
647
- export namespace ConsumeMessagesResponse {
648
- export function encode(message: ConsumeMessagesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
649
- for (const v of message.messages) {
650
- ConsumeMessages.encode(v!, writer.uint32(10).fork()).ldelim();
651
- }
652
- return writer;
653
- }
654
-
655
- export function decode(input: _m0.Reader | Uint8Array, length?: number): ConsumeMessagesResponse {
656
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
657
- let end = length === undefined ? reader.len : reader.pos + length;
658
- const message = createBaseConsumeMessagesResponse();
659
- while (reader.pos < end) {
660
- const tag = reader.uint32();
661
- switch (tag >>> 3) {
662
- case 1:
663
- if (tag !== 10) {
664
- break;
665
- }
666
-
667
- message.messages.push(ConsumeMessages.decode(reader, reader.uint32()));
668
- continue;
669
- }
670
- if ((tag & 7) === 4 || tag === 0) {
671
- break;
672
- }
673
- reader.skipType(tag & 7);
674
- }
675
- return message;
676
- }
677
-
678
- export function fromJSON(object: any): ConsumeMessagesResponse {
679
- return {
680
- messages: Array.isArray(object?.messages) ? object.messages.map((e: any) => ConsumeMessages.fromJSON(e)) : [],
681
- };
682
- }
683
-
684
- export function toJSON(message: ConsumeMessagesResponse): unknown {
685
- const obj: any = {};
686
- if (message.messages) {
687
- obj.messages = message.messages.map((e) => e ? ConsumeMessages.toJSON(e) : undefined);
688
- } else {
689
- obj.messages = [];
690
- }
691
- return obj;
692
- }
693
-
694
- export function create<I extends Exact<DeepPartial<ConsumeMessagesResponse>, I>>(base?: I): ConsumeMessagesResponse {
695
- return ConsumeMessagesResponse.fromPartial(base ?? {});
696
- }
697
-
698
- export function fromPartial<I extends Exact<DeepPartial<ConsumeMessagesResponse>, I>>(
699
- object: I,
700
- ): ConsumeMessagesResponse {
701
- const message = createBaseConsumeMessagesResponse();
702
- message.messages = object.messages?.map((e) => ConsumeMessages.fromPartial(e)) || [];
703
- return message;
704
- }
705
- }
706
-
707
265
  export type CommsApiServiceDefinition = typeof CommsApiServiceDefinition;
708
266
  export const CommsApiServiceDefinition = {
709
267
  name: "CommsApiService",
@@ -717,30 +275,6 @@ export const CommsApiServiceDefinition = {
717
275
  responseStream: false,
718
276
  options: {},
719
277
  },
720
- subscribeToTopic: {
721
- name: "SubscribeToTopic",
722
- requestType: SubscribeToTopicRequest,
723
- requestStream: false,
724
- responseType: SubscribeToTopicResponse,
725
- responseStream: false,
726
- options: {},
727
- },
728
- publishData: {
729
- name: "PublishData",
730
- requestType: PublishDataRequest,
731
- requestStream: false,
732
- responseType: PublishDataResponse,
733
- responseStream: false,
734
- options: {},
735
- },
736
- consumeMessages: {
737
- name: "ConsumeMessages",
738
- requestType: ConsumeMessagesRequest,
739
- requestStream: false,
740
- responseType: ConsumeMessagesResponse,
741
- responseStream: false,
742
- options: {},
743
- },
744
278
  },
745
279
  } as const;
746
280