@dcl/protocol 1.0.0-13831858134.commit-4a5d023 → 1.0.0-13897190826.commit-195803d

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 (87) hide show
  1. package/out-js/decentraland/common/texture.gen.d.ts +0 -18
  2. package/out-js/decentraland/common/texture.gen.js +4 -104
  3. package/out-js/decentraland/common/texture.gen.js.map +1 -1
  4. package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.d.ts +0 -2
  5. package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.js +2 -19
  6. package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.js.map +1 -1
  7. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.d.ts +0 -41
  8. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js +3 -241
  9. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js.map +1 -1
  10. package/out-js/decentraland/sdk/components/avatar_shape.gen.d.ts +0 -2
  11. package/out-js/decentraland/sdk/components/avatar_shape.gen.js +1 -19
  12. package/out-js/decentraland/sdk/components/avatar_shape.gen.js.map +1 -1
  13. package/out-js/decentraland/sdk/components/camera_mode_area.gen.d.ts +1 -35
  14. package/out-js/decentraland/sdk/components/camera_mode_area.gen.js +3 -172
  15. package/out-js/decentraland/sdk/components/camera_mode_area.gen.js.map +1 -1
  16. package/out-js/decentraland/sdk/components/common/input_action.gen.d.ts +0 -3
  17. package/out-js/decentraland/sdk/components/common/input_action.gen.js +0 -18
  18. package/out-js/decentraland/sdk/components/common/input_action.gen.js.map +1 -1
  19. package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.d.ts +0 -19
  20. package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.js +3 -90
  21. package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.js.map +1 -1
  22. package/out-js/decentraland/sdk/components/material.gen.d.ts +0 -20
  23. package/out-js/decentraland/sdk/components/material.gen.js +2 -86
  24. package/out-js/decentraland/sdk/components/material.gen.js.map +1 -1
  25. package/out-js/decentraland/sdk/components/mesh_collider.gen.d.ts +0 -18
  26. package/out-js/decentraland/sdk/components/mesh_collider.gen.js +4 -90
  27. package/out-js/decentraland/sdk/components/mesh_collider.gen.js.map +1 -1
  28. package/out-js/decentraland/sdk/components/mesh_renderer.gen.d.ts +3 -19
  29. package/out-js/decentraland/sdk/components/mesh_renderer.gen.js +4 -90
  30. package/out-js/decentraland/sdk/components/mesh_renderer.gen.js.map +1 -1
  31. package/out-js/decentraland/sdk/components/ui_text.gen.d.ts +0 -4
  32. package/out-js/decentraland/sdk/components/ui_text.gen.js +1 -30
  33. package/out-js/decentraland/sdk/components/ui_text.gen.js.map +1 -1
  34. package/out-js/decentraland/sdk/components/ui_transform.gen.d.ts +0 -37
  35. package/out-js/decentraland/sdk/components/ui_transform.gen.js +2 -201
  36. package/out-js/decentraland/sdk/components/ui_transform.gen.js.map +1 -1
  37. package/out-js/decentraland/social_service/v2/social_service_v2.gen.d.ts +306 -22
  38. package/out-js/decentraland/social_service/v2/social_service_v2.gen.js +1601 -124
  39. package/out-js/decentraland/social_service/v2/social_service_v2.gen.js.map +1 -1
  40. package/out-ts/decentraland/common/texture.gen.ts +4 -119
  41. package/out-ts/decentraland/sdk/components/avatar_equipped_data.gen.ts +1 -20
  42. package/out-ts/decentraland/sdk/components/avatar_modifier_area.gen.ts +1 -292
  43. package/out-ts/decentraland/sdk/components/avatar_shape.gen.ts +0 -20
  44. package/out-ts/decentraland/sdk/components/camera_mode_area.gen.ts +2 -218
  45. package/out-ts/decentraland/sdk/components/common/input_action.gen.ts +0 -18
  46. package/out-ts/decentraland/sdk/components/gltf_container_loading_state.gen.ts +2 -108
  47. package/out-ts/decentraland/sdk/components/material.gen.ts +1 -102
  48. package/out-ts/decentraland/sdk/components/mesh_collider.gen.ts +0 -99
  49. package/out-ts/decentraland/sdk/components/mesh_renderer.gen.ts +3 -100
  50. package/out-ts/decentraland/sdk/components/ui_text.gen.ts +1 -40
  51. package/out-ts/decentraland/sdk/components/ui_transform.gen.ts +1 -230
  52. package/out-ts/decentraland/social_service/v2/social_service_v2.gen.ts +2590 -946
  53. package/package.json +3 -6
  54. package/proto/decentraland/common/texture.proto +1 -8
  55. package/proto/decentraland/sdk/components/avatar_equipped_data.proto +1 -2
  56. package/proto/decentraland/sdk/components/avatar_modifier_area.proto +0 -21
  57. package/proto/decentraland/sdk/components/avatar_shape.proto +0 -1
  58. package/proto/decentraland/sdk/components/camera_mode_area.proto +3 -22
  59. package/proto/decentraland/sdk/components/common/input_action.proto +0 -3
  60. package/proto/decentraland/sdk/components/gltf_container_loading_state.proto +0 -13
  61. package/proto/decentraland/sdk/components/light_source.proto +35 -0
  62. package/proto/decentraland/sdk/components/material.proto +1 -13
  63. package/proto/decentraland/sdk/components/mesh_collider.proto +1 -8
  64. package/proto/decentraland/sdk/components/mesh_renderer.proto +3 -8
  65. package/proto/decentraland/sdk/components/ui_text.proto +0 -3
  66. package/proto/decentraland/sdk/components/ui_transform.proto +0 -23
  67. package/proto/decentraland/social_service/v2/social_service_v2.proto +119 -9
  68. package/public/sdk-components.proto +0 -2
  69. package/out-js/decentraland/sdk/components/gltf_node.gen.d.ts +0 -66
  70. package/out-js/decentraland/sdk/components/gltf_node.gen.js +0 -69
  71. package/out-js/decentraland/sdk/components/gltf_node.gen.js.map +0 -1
  72. package/out-js/decentraland/sdk/components/gltf_node_state.gen.d.ts +0 -43
  73. package/out-js/decentraland/sdk/components/gltf_node_state.gen.js +0 -122
  74. package/out-js/decentraland/sdk/components/gltf_node_state.gen.js.map +0 -1
  75. package/out-ts/decentraland/sdk/components/gltf_node.gen.ts +0 -116
  76. package/out-ts/decentraland/sdk/components/gltf_node_state.gen.ts +0 -139
  77. package/proto/decentraland/sdk/components/camera_layer.proto +0 -30
  78. package/proto/decentraland/sdk/components/camera_layers.proto +0 -11
  79. package/proto/decentraland/sdk/components/global_light.proto +0 -22
  80. package/proto/decentraland/sdk/components/gltf_node.proto +0 -42
  81. package/proto/decentraland/sdk/components/gltf_node_state.proto +0 -20
  82. package/proto/decentraland/sdk/components/light.proto +0 -42
  83. package/proto/decentraland/sdk/components/primary_pointer_info.proto +0 -25
  84. package/proto/decentraland/sdk/components/spotlight.proto +0 -21
  85. package/proto/decentraland/sdk/components/texture_camera.proto +0 -41
  86. package/proto/decentraland/sdk/components/ui_canvas.proto +0 -16
  87. package/proto/decentraland/sdk/components/ui_scroll_result.proto +0 -12
package/package.json CHANGED
@@ -1,11 +1,8 @@
1
1
  {
2
2
  "name": "@dcl/protocol",
3
- "version": "1.0.0-13831858134.commit-4a5d023",
3
+ "version": "1.0.0-13897190826.commit-195803d",
4
4
  "description": "",
5
- "repository": {
6
- "type": "git",
7
- "url": "git+https://github.com/decentraland/protocol.git"
8
- },
5
+ "repository": "decentraland/protocol.git",
9
6
  "homepage": "https://github.com/decentraland/protocol#readme",
10
7
  "bugs": "https://github.com/decentraland/protocol/issues",
11
8
  "keywords": [],
@@ -32,5 +29,5 @@
32
29
  "out-js",
33
30
  "public"
34
31
  ],
35
- "commit": "4a5d0231360b13dd6c8a52ee0f844795fe01f0da"
32
+ "commit": "195803dba45ac137ea43ffefc313118fdf669a0f"
36
33
  }
@@ -36,17 +36,10 @@ message VideoTexture {
36
36
  optional TextureFilterMode filter_mode = 3; // default = FilterMode.Bilinear
37
37
  }
38
38
 
39
- message UiCanvasTexture {
40
- uint32 ui_canvas_entity = 1;
41
- optional TextureWrapMode wrap_mode = 2; // default = TextureWrapMode.Clamp
42
- optional TextureFilterMode filter_mode = 3; // default = FilterMode.Bilinear
43
- }
44
-
45
39
  message TextureUnion {
46
40
  oneof tex {
47
41
  Texture texture = 1; // default = null
48
42
  AvatarTexture avatar_texture = 2; // default = null
49
43
  VideoTexture video_texture = 3; // default = null
50
- UiCanvasTexture ui_texture = 4;
51
44
  }
52
- }
45
+ }
@@ -10,5 +10,4 @@ option (common.ecs_component_id) = 1091;
10
10
  message PBAvatarEquippedData {
11
11
  repeated string wearable_urns = 1;
12
12
  repeated string emote_urns = 2;
13
- repeated string force_render = 3; // slots that will render even if hidden
14
- }
13
+ }
@@ -23,8 +23,6 @@ message PBAvatarModifierArea {
23
23
  decentraland.common.Vector3 area = 1; // the 3D size of the region
24
24
  repeated string exclude_ids = 2; // user IDs that can enter and remain unaffected
25
25
  repeated AvatarModifierType modifiers = 3; // list of modifiers to apply
26
- optional AvatarMovementSettings movement_settings = 4;
27
- optional bool use_collider_range = 5; // if true, the player will be considered inside the area when they are within 0.3m of the area. default true
28
26
  }
29
27
 
30
28
  // AvatarModifierType is an effect that should be applied to avatars inside the region.
@@ -32,22 +30,3 @@ enum AvatarModifierType {
32
30
  AMT_HIDE_AVATARS = 0; // avatars are invisible
33
31
  AMT_DISABLE_PASSPORTS = 1; // selecting (e.g. clicking) an avatar will not bring up their profile.
34
32
  }
35
-
36
- message AvatarMovementSettings {
37
- optional AvatarControlType control_mode = 1;
38
- // if not explicitly set, the following properties default to user's preference settings
39
- optional float run_speed = 2; // speed the player moves at, in m/s
40
- optional float friction = 3; // how fast the player gets up to speed or comes to rest. higher = more responsive
41
- optional float gravity = 4; // how fast the player accelerates vertically when not on a solid surface, in m/s. should normally be negative
42
- optional float jump_height = 5; // how high the player can jump, in meters. should normally be positive. gravity must have the same sign for jumping to be possible
43
- optional float max_fall_speed = 6; // max fall speed in m/s. should normally be negative
44
- optional float turn_speed = 7; // speed the player turns in tank mode, in radians/s
45
- optional float walk_speed = 8; // speed the player walks at, in m/s
46
- optional bool allow_weighted_movement = 9; // whether to allow player to move at a slower speed (e.g. with a walk-key or when using a gamepad/joystick). defaults to true
47
- }
48
-
49
- enum AvatarControlType {
50
- CCT_NONE = 0; // avatar cannot move
51
- CCT_RELATIVE = 1; // avatar moves relative to the camera origin
52
- CCT_TANK = 2; // avatar moves like a tank: left/right rotate the player, forward/backward advance/retreat the player
53
- }
@@ -38,6 +38,5 @@ message PBAvatarShape {
38
38
  // Shoes : "urn:decentraland:off-chain:base-avatars:bun_shoes"]
39
39
  repeated string wearables = 10;
40
40
  repeated string emotes = 11; // available emotes (default empty)
41
- repeated string force_render = 12; // slots that will render even if hidden
42
41
  }
43
42
 
@@ -9,7 +9,7 @@ import "decentraland/sdk/components/common/id.proto";
9
9
  option (common.ecs_component_id) = 1071;
10
10
 
11
11
  // The CameraModeArea component can be attached to an Entity to define a region of space where
12
- // the player's camera mode (1st-person, 3rd-person or cinematic) is overridden.
12
+ // the player's camera mode (1st-person or 3rd-person) is overridden.
13
13
  //
14
14
  // The Entity's Transform position determines the center-point of the region, while its size is
15
15
  // given as a vector in the `area` property below. The Transform rotation is applied, but the scale
@@ -19,26 +19,7 @@ option (common.ecs_component_id) = 1071;
19
19
  //
20
20
  // Note that, while commonly used to delineate a 2D area in a scene (hence the name), the region
21
21
  // is actually a 3D volume.
22
- //
23
- // When mode is set to CtCinematic, the cinematic_settings field must also be provided.
24
22
  message PBCameraModeArea {
25
- decentraland.common.Vector3 area = 1; // the 3D size of the region
26
- common.CameraType mode = 2; // the camera mode to enforce
27
- optional CinematicSettings cinematic_settings = 3;
28
- optional bool use_collider_range = 4; // if true, the player will be considered inside the area when they are within 0.3m of the area. default true
29
- }
30
-
31
- message CinematicSettings {
32
- uint32 camera_entity = 1; // Entity that defines the cinematic camera transform.
33
- // Position -> camera's position
34
- // Rotation -> camera's direction
35
- // scale.z -> zoom level
36
- // scale.x and scale.y -> unused
37
- optional bool allow_manual_rotation = 2; // whether the user can move the camera's rotation. default false
38
- optional float yaw_range = 3; // how far the camera can rotate around the y-axis / look left/right, in radians. default unrestricted
39
- optional float pitch_range = 4; // how far the camera can rotate around the x-axis / look up-down, in radians. default unrestricted
40
- // note: cameras can never look up/down further than Vec3::Y
41
- optional float roll_range = 5; // how far the camera can rotate around the z-axis / tilt, in radians. default unrestricted
42
- optional float zoom_min = 6; // minimum zoom level. must be greater than 0. defaults to the input zoom level
43
- optional float zoom_max = 7; // maximum zoom level. must be greater than 0. defaults to the input zoom level
23
+ decentraland.common.Vector3 area = 1; // the 3D size of the region
24
+ common.CameraType mode = 2; // the camera mode to enforce
44
25
  }
@@ -25,7 +25,4 @@ enum PointerEventType {
25
25
  PET_DOWN = 1;
26
26
  PET_HOVER_ENTER = 2;
27
27
  PET_HOVER_LEAVE = 3;
28
- PET_DRAG_LOCKED = 4;
29
- PET_DRAG = 5;
30
- PET_DRAG_END = 6;
31
28
  }
@@ -10,17 +10,4 @@ import "decentraland/sdk/components/common/loading_state.proto";
10
10
  // the current state of the GltfContainer of an entity.
11
11
  message PBGltfContainerLoadingState {
12
12
  common.LoadingState current_state = 1;
13
- repeated string node_paths = 2; // all node paths in the gltf, which can be used with a GltfNode to inspect and modify the gltf contents
14
- repeated string mesh_names = 3; // all meshes in the gltf. unnamed meshes will be auto-assigned a name of the form `MeshX` or `MeshX/PrimitiveY`
15
- // where X is the mesh index and Y is the primitive index (and there is more than 1 primitive). note this may
16
- // conflict with manually named meshes - to avoid any issues make sure all your meshes are explicitly named.
17
- repeated string material_names = 4; // all materials in the gltf. unnamed materials will be auto-assigned a name of the form `MaterialX` where
18
- // X is the material index. note this may conflict with manually named materials - to avoid any issues make
19
- // sure all your materials are explicitly named.
20
- repeated string skin_names = 5; // all mesh skins in the gltf. unnamed skins will be auto-assigned a name of the form `SkinX` where
21
- // X is the skin index. note this may conflict with manually named skins - to avoid any issues make sure all
22
- // your skins are explicitly named.
23
- repeated string animation_names = 6; // all animations in the gltf. unnamed animations will be auto-assigned a name of the form `AnimationX` where
24
- // X is the animation index. note this may conflict with manually named anims - to avoid any issues make sure all
25
- // your animations are explicitly named.
26
13
  }
@@ -0,0 +1,35 @@
1
+ syntax = "proto3";
2
+ package decentraland.sdk.components;
3
+ import "decentraland/sdk/components/common/id.proto";
4
+ import "decentraland/common/colors.proto";
5
+ import "decentraland/common/texture.proto";
6
+ option (common.ecs_component_id) = 1079;
7
+
8
+ message PBLightSource {
9
+ optional bool active = 4; // default = true, whether the lightSource is active or not.
10
+ optional decentraland.common.Color3 color = 1; // default = Color.white, the tint of the light, in RGB format where each component is a floating point value with a range from 0 to 1.
11
+ optional float brightness = 2; // default = 250, ranges from 1 (dim) to 100,000 (very bright), expressed in Lumens for Point and Spot.
12
+ optional float range = 3; // default = 10, how far the light travels, expressed in meters.
13
+
14
+ oneof type {
15
+ Point point = 6;
16
+ Spot spot = 7;
17
+ }
18
+
19
+ message Point {
20
+ optional ShadowType shadow = 5; // default = ShadowType.ST_NONE The type of shadow the light source supports.
21
+ }
22
+
23
+ message Spot {
24
+ optional float inner_angle = 1; // default = 21.8. Inner angle can't be higher than outer angle, otherwise will default to same value. Min value is 0. Max value is 179.
25
+ optional float outer_angle = 2; // default = 30. Outer angle can't be lower than inner angle, otherwise will inner angle will be set to same value. Max value is 179.
26
+ optional ShadowType shadow = 5; // default = ShadowType.ST_NONE The type of shadow the light source supports.
27
+ optional decentraland.common.TextureUnion shadow_mask_texture = 8; // Texture mask through which shadows are cast to simulate caustics, soft shadows, and light shapes such as light entering from a window.
28
+ }
29
+
30
+ enum ShadowType {
31
+ ST_NONE = 0; // No shadows are cast from this LightSource.
32
+ ST_SOFT = 1; // More realistic type of shadow that reduces block artifacts, noise or pixelation, but requires more processing.
33
+ ST_HARD = 2; // Less realistic type of shadow but more performant, uses hard edges.
34
+ }
35
+ }
@@ -54,16 +54,4 @@ message PBMaterial {
54
54
  UnlitMaterial unlit = 1;
55
55
  PbrMaterial pbr = 2;
56
56
  }
57
-
58
- message GltfMaterial {
59
- string gltf_src = 1;
60
- string name = 2;
61
- }
62
-
63
- // A gltf material that may provide additional features not supported by the PbMaterial fields.
64
- // If both gltf and material fields are provided, the gltf will be used only for extended features not
65
- // supported by the PbMaterial.
66
- // If this is provided and the `material` field is not provided, the renderer will update the material
67
- // field with data that reflects the gltf material once it is loaded.
68
- optional GltfMaterial gltf = 3;
69
- }
57
+ }
@@ -30,12 +30,6 @@ message PBMeshCollider {
30
30
  // SphereMesh is a sphere shape that contains the Entity.
31
31
  message SphereMesh {}
32
32
 
33
- // A collider constructed from a Gltf Mesh.
34
- message GltfMesh {
35
- string gltf_src = 1; // the GLTF file path as listed in the scene's manifest.
36
- string name = 2; // the name of the mesh asset
37
- }
38
-
39
33
  optional uint32 collision_mask = 1; // enabled ColliderLayers (default CL_POINTER | CL_PHYSICS)
40
34
 
41
35
  oneof mesh {
@@ -43,7 +37,6 @@ message PBMeshCollider {
43
37
  SphereMesh sphere = 3;
44
38
  CylinderMesh cylinder = 4;
45
39
  PlaneMesh plane = 5;
46
- GltfMesh gltf = 6;
47
40
  }
48
41
  }
49
42
 
@@ -66,4 +59,4 @@ enum ColliderLayer {
66
59
  CL_CUSTOM6 = 8192;
67
60
  CL_CUSTOM7 = 16384;
68
61
  CL_CUSTOM8 = 32768;
69
- }
62
+ }
@@ -5,11 +5,13 @@ import "decentraland/sdk/components/common/id.proto";
5
5
  option (common.ecs_component_id) = 1018;
6
6
 
7
7
  // The MeshRenderer component renders a basic geometric shape for an Entity. It can be a cube, a
8
- // plane, a sphere, a cylinder, or a Gltf mesh.
8
+ // plane, a sphere or a cylinder.
9
9
  //
10
10
  // The cube and plane variants can include a UV texture mapping, so specific areas of a material
11
11
  // texture are rendered on different faces of the shape. They are serialized as a sequence of 2D
12
12
  // `float` coordinates, one for each corner of each side of each face.
13
+ //
14
+ // More complex shapes require the use of a `GltfContainer` component.
13
15
  message PBMeshRenderer {
14
16
 
15
17
  // BoxMesh renders a prism shape.
@@ -32,17 +34,10 @@ message PBMeshRenderer {
32
34
  message SphereMesh {
33
35
  }
34
36
 
35
- // A mesh from a Gltf.
36
- message GltfMesh {
37
- string gltf_src = 1; // the GLTF file path as listed in the scene's manifest.
38
- string name = 2; // the name of the mesh asset
39
- }
40
-
41
37
  oneof mesh {
42
38
  BoxMesh box = 1;
43
39
  SphereMesh sphere = 2;
44
40
  CylinderMesh cylinder = 3;
45
41
  PlaneMesh plane = 4;
46
- GltfMesh gltf = 5;
47
42
  }
48
43
  }
@@ -23,7 +23,4 @@ message PBUiText {
23
23
  optional common.Font font = 4; // font for the text (default: sans-serif)
24
24
  optional int32 font_size = 5; // size of the text (default: 10)
25
25
  optional TextWrap text_wrap = 6; // wrap text when the border is reached (default: TW_WRAP)
26
-
27
- optional float outline_width = 7; // width of the outline (default: 0)
28
- optional decentraland.common.Color4 outline_color = 8; // RGBA color of the outline (default: opaque black)
29
26
  }
@@ -3,7 +3,6 @@ syntax = "proto3";
3
3
  package decentraland.sdk.components;
4
4
 
5
5
  import "decentraland/sdk/components/common/id.proto";
6
- import "decentraland/common/vectors.proto";
7
6
 
8
7
  option (common.ecs_component_id) = 1050;
9
8
 
@@ -80,20 +79,6 @@ enum PointerFilterMode {
80
79
  PFM_BLOCK = 1;
81
80
  }
82
81
 
83
- enum ShowScrollBar {
84
- SSB_BOTH = 0;
85
- SSB_ONLY_VERTICAL = 1;
86
- SSB_ONLY_HORIZONTAL = 2;
87
- SSB_HIDDEN = 3;
88
- }
89
-
90
- message ScrollPositionValue {
91
- oneof value {
92
- decentraland.common.Vector2 position = 1;
93
- string reference = 2;
94
- }
95
- }
96
-
97
82
  message PBUiTransform {
98
83
  int32 parent = 1;
99
84
  int32 right_of = 2;
@@ -160,12 +145,4 @@ message PBUiTransform {
160
145
  float padding_bottom = 51;
161
146
 
162
147
  optional PointerFilterMode pointer_filter = 52; // default: PointerFilterMode.PFM_NONE
163
- optional float opacity = 53; // default: 1
164
-
165
- optional string element_id = 54; // default empty
166
-
167
- optional ScrollPositionValue scroll_position = 55; // default position=(0,0)
168
- optional ShowScrollBar scroll_visible = 56; // default ShowScrollBar.SSB_BOTH
169
-
170
- optional int32 z_index = 57; // default 0
171
148
  }
@@ -4,21 +4,47 @@ package decentraland.social_service.v2;
4
4
  import "google/protobuf/empty.proto";
5
5
 
6
6
  // Errors
7
- message InvalidFriendshipAction {}
8
- message InternalServerError {}
7
+ message InvalidFriendshipAction {
8
+ optional string message = 1;
9
+ }
10
+ message InternalServerError {
11
+ optional string message = 1;
12
+ }
13
+ message InvalidRequest {
14
+ optional string message = 1;
15
+ }
16
+ message ProfileNotFound {
17
+ optional string message = 1;
18
+ }
9
19
 
10
20
  // Types
11
21
  message User { string address = 1; }
12
22
 
23
+ message FriendProfile {
24
+ string address = 1;
25
+ string name = 2;
26
+ bool has_claimed_name = 3;
27
+ string profile_picture_url = 4;
28
+ }
29
+
30
+ message BlockedUserProfile {
31
+ string address = 1;
32
+ string name = 2;
33
+ bool has_claimed_name = 3;
34
+ string profile_picture_url = 4;
35
+ optional int64 blocked_at = 5;
36
+ }
37
+
13
38
  message Pagination {
14
39
  int32 limit = 1;
15
40
  int32 offset = 2;
16
41
  }
17
42
 
18
43
  message FriendshipRequestResponse {
19
- User user = 1;
44
+ FriendProfile friend = 1;
20
45
  int64 created_at = 2;
21
46
  optional string message = 3;
47
+ string id = 4;
22
48
  }
23
49
 
24
50
  message FriendshipRequests {
@@ -33,7 +59,6 @@ enum ConnectivityStatus {
33
59
 
34
60
  message GetFriendsPayload {
35
61
  optional Pagination pagination = 1;
36
- optional ConnectivityStatus status = 2;
37
62
  }
38
63
 
39
64
  message GetFriendshipRequestsPayload {
@@ -69,8 +94,8 @@ message PaginatedResponse {
69
94
  int32 page = 2;
70
95
  }
71
96
 
72
- message PaginatedUsersResponse {
73
- repeated User users = 1;
97
+ message PaginatedFriendsProfilesResponse {
98
+ repeated FriendProfile friends = 1;
74
99
  PaginatedResponse pagination_data = 2;
75
100
  }
76
101
 
@@ -86,6 +111,8 @@ message UpsertFriendshipResponse {
86
111
  message Accepted {
87
112
  string id = 1;
88
113
  int64 created_at = 2;
114
+ FriendProfile friend = 3;
115
+ optional string message = 4;
89
116
  }
90
117
  oneof response {
91
118
  Accepted accepted = 1;
@@ -95,20 +122,33 @@ message UpsertFriendshipResponse {
95
122
  }
96
123
 
97
124
  message FriendshipUpdate {
125
+ message RequestResponse {
126
+ FriendProfile friend = 1;
127
+ int64 created_at = 2;
128
+ optional string message = 3;
129
+ string id = 4;
130
+ }
98
131
  message AcceptResponse { User user = 1; }
99
132
  message RejectResponse { User user = 1; }
100
133
  message DeleteResponse { User user = 1; }
101
134
  message CancelResponse { User user = 1; }
135
+ message BlockResponse { User user = 1; }
102
136
 
103
137
  oneof update {
104
- FriendshipRequestResponse request = 1;
138
+ RequestResponse request = 1;
105
139
  AcceptResponse accept = 2;
106
140
  RejectResponse reject = 3;
107
141
  DeleteResponse delete = 4;
108
142
  CancelResponse cancel = 5;
143
+ BlockResponse block = 6;
109
144
  }
110
145
  }
111
146
 
147
+ message FriendConnectivityUpdate {
148
+ FriendProfile friend = 1;
149
+ ConnectivityStatus status = 2;
150
+ }
151
+
112
152
  message GetFriendshipStatusPayload {
113
153
  User user = 1;
114
154
  }
@@ -121,6 +161,8 @@ enum FriendshipStatus {
121
161
  REJECTED = 4;
122
162
  DELETED = 5;
123
163
  BLOCKED = 6;
164
+ NONE = 7;
165
+ BLOCKED_BY = 8;
124
166
  }
125
167
 
126
168
  message GetFriendshipStatusResponse {
@@ -134,12 +176,65 @@ message GetFriendshipStatusResponse {
134
176
  }
135
177
  }
136
178
 
179
+ message BlockUserPayload {
180
+ User user = 1;
181
+ }
182
+
183
+ message BlockUserResponse {
184
+ message Ok {
185
+ BlockedUserProfile profile = 1;
186
+ }
187
+
188
+ oneof response {
189
+ Ok ok = 1;
190
+ InternalServerError internal_server_error = 2;
191
+ InvalidRequest invalid_request = 3;
192
+ ProfileNotFound profile_not_found = 4;
193
+ }
194
+ }
195
+
196
+ message UnblockUserPayload {
197
+ User user = 1;
198
+ }
199
+
200
+ message UnblockUserResponse {
201
+ message Ok {
202
+ BlockedUserProfile profile = 1;
203
+ }
204
+
205
+ oneof response {
206
+ Ok ok = 1;
207
+ InternalServerError internal_server_error = 2;
208
+ InvalidRequest invalid_request = 3;
209
+ ProfileNotFound profile_not_found = 4;
210
+ }
211
+ }
212
+
213
+ message GetBlockedUsersPayload {
214
+ optional Pagination pagination = 1;
215
+ }
216
+
217
+ message GetBlockedUsersResponse {
218
+ repeated BlockedUserProfile profiles = 1;
219
+ PaginatedResponse pagination_data = 2;
220
+ }
221
+
222
+ message GetBlockingStatusResponse {
223
+ repeated string blocked_users = 1;
224
+ repeated string blocked_by_users = 2;
225
+ }
226
+
227
+ message BlockUpdate {
228
+ string address = 1;
229
+ bool is_blocked = 2;
230
+ }
231
+
137
232
  service SocialService {
138
233
  // Get the list of friends for the authenticated user
139
- rpc GetFriends(GetFriendsPayload) returns (PaginatedUsersResponse) {}
234
+ rpc GetFriends(GetFriendsPayload) returns (PaginatedFriendsProfilesResponse) {}
140
235
 
141
236
  // Get the list of mutual friends between the authenticated user and the one in the parameter
142
- rpc GetMutualFriends(GetMutualFriendsPayload) returns (PaginatedUsersResponse) {}
237
+ rpc GetMutualFriends(GetMutualFriendsPayload) returns (PaginatedFriendsProfilesResponse) {}
143
238
 
144
239
  // Get the pending friendship requests for the authenticated user
145
240
  rpc GetPendingFriendshipRequests(GetFriendshipRequestsPayload) returns (PaginatedFriendshipRequestsResponse) {}
@@ -155,5 +250,20 @@ service SocialService {
155
250
  rpc SubscribeToFriendshipUpdates(google.protobuf.Empty)
156
251
  returns (stream FriendshipUpdate) {}
157
252
 
253
+ // Get the friendship status between the authenticated user and the one in the parameter
158
254
  rpc GetFriendshipStatus(GetFriendshipStatusPayload) returns (GetFriendshipStatusResponse) {}
255
+
256
+ // Subscribe to connectivity updates of friends: ONLINE, OFFLINE, AWAY
257
+ rpc SubscribeToFriendConnectivityUpdates(google.protobuf.Empty)
258
+ returns (stream FriendConnectivityUpdate) {}
259
+
260
+ rpc BlockUser(BlockUserPayload) returns (BlockUserResponse) {}
261
+
262
+ rpc UnblockUser(UnblockUserPayload) returns (UnblockUserResponse) {}
263
+
264
+ rpc GetBlockedUsers(GetBlockedUsersPayload) returns (GetBlockedUsersResponse) {}
265
+
266
+ rpc GetBlockingStatus(google.protobuf.Empty) returns (GetBlockingStatusResponse) {}
267
+
268
+ rpc SubscribeToBlockUpdates(google.protobuf.Empty) returns (stream BlockUpdate) {}
159
269
  }
@@ -16,8 +16,6 @@ import public "decentraland/sdk/components/camera_mode.proto";
16
16
  import public "decentraland/sdk/components/engine_info.proto";
17
17
  import public "decentraland/sdk/components/gltf_container.proto";
18
18
  import public "decentraland/sdk/components/gltf_container_loading_state.proto";
19
- import public "decentraland/sdk/components/gltf_node.proto";
20
- import public "decentraland/sdk/components/gltf_node_state.proto";
21
19
  import public "decentraland/sdk/components/material.proto";
22
20
  import public "decentraland/sdk/components/mesh_collider.proto";
23
21
  import public "decentraland/sdk/components/mesh_renderer.proto";
@@ -1,66 +0,0 @@
1
- import _m0 from "protobufjs/minimal";
2
- export declare const protobufPackage = "decentraland.sdk.components";
3
- /**
4
- * a GltfNode links a scene entity with a node from within a gltf, allowing the scene to inspect it or modify it.
5
- * This component must be added to a direct child of an entity with a PBGltfContainer component, or
6
- * to a direct child of another entity with a GltfNode component, and the referenced gltf node must be a descendent of the gltf node
7
- * in the parent.
8
- * The name must match the path of one of the nodes within the Gltf. These are available on the GltfContainerLoadingState component.
9
- *
10
- * The renderer will attach a PBGltfNodeState to the entity describing the state. Once the state is `GNS_READY`,
11
- * - the `Transform` will be updated to match the position of the node within the gltf (relative to the gltf root, or the parent node),
12
- * - a `MeshRenderer` with a GltfMesh mesh type will be added (if the gltf node has a mesh).
13
- * - a `MeshCollider` with a GltfMesh mesh type will be added (if the gltf node has a collider).
14
- * - a `Material` component including a GltfMaterial reference will be added (if the gltf node has a material).
15
- *
16
- * After creation, if an animation moves the node, the `Transform` will be updated.
17
- *
18
- * From the scene, you can modify various components to alter the gltf node:
19
- * - modifying the `Transform` position/rotation/scale will move the node. The position is interpreted relative to the gltf root (or parent node),
20
- * regardless of any intermediate gltf node hierarchy.
21
- * If an animation is playing, the animation takes priority and the scene entity's position will be updated to match the animation.
22
- * - `Visibility` can be added to hide or show the node and it's children in the gltf hierarchy.
23
- * - `MeshRenderer` can be added/modified/removed to create/modify/remove a mesh on the node.
24
- * - `MeshCollider` can be added/modified/removed to create/modify/remove a collider on the node.
25
- * - `Material` can be added or modified to change the material properties. If the gltf node has a material, the original material will be
26
- * used as a base, and any gltf features (e.g. occlusion maps) from the gtlf spec that the renderer supports but that are not exposed in the
27
- * PBMaterial will be maintained.
28
- *
29
- * The scene can add additional entities as children to the gltf node, but structural modifications of the gltf are not possible:
30
- * - changing the scene hierarchy will not change the gltf node hierarchy. Moving the entity out of the gltf will sever the link and
31
- * change the state to `GNS_FAILED`.
32
- * - deleting the scene entity will not delete the gltf node.
33
- *
34
- * Removing the GltfNode will revert any changes to the original gltf. If the GltfNode component is removed and the mesh/collider/material
35
- * are not removed, this will result in a duplication of these components as the previously-linked entity will retain it's components and
36
- * the gltf node will also be displayed.
37
- */
38
- export interface PBGltfNode {
39
- /** the path of the target node in the Gltf. */
40
- path: string;
41
- }
42
- export declare namespace PBGltfNode {
43
- function encode(message: PBGltfNode, writer?: _m0.Writer): _m0.Writer;
44
- function decode(input: _m0.Reader | Uint8Array, length?: number): PBGltfNode;
45
- function fromJSON(object: any): PBGltfNode;
46
- function toJSON(message: PBGltfNode): unknown;
47
- function create<I extends Exact<DeepPartial<PBGltfNode>, I>>(base?: I): PBGltfNode;
48
- function fromPartial<I extends Exact<DeepPartial<PBGltfNode>, I>>(object: I): PBGltfNode;
49
- }
50
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
51
- export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {
52
- $case: string;
53
- } ? {
54
- [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]>;
55
- } & {
56
- $case: T["$case"];
57
- } : T extends {} ? {
58
- [K in keyof T]?: DeepPartial<T[K]>;
59
- } : Partial<T>;
60
- type KeysOfUnion<T> = T extends T ? keyof T : never;
61
- export type Exact<P, I extends P> = P extends Builtin ? P : P & {
62
- [K in keyof P]: Exact<P[K], I[K]>;
63
- } & {
64
- [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
65
- };
66
- export {};