@dcl/protocol 1.0.0-13143749736.commit-5fbeb3c → 1.0.0-13373633961.commit-e07ccb6

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.
@@ -17,6 +17,7 @@ export declare enum FriendshipStatus {
17
17
  REJECTED = 4,
18
18
  DELETED = 5,
19
19
  BLOCKED = 6,
20
+ NONE = 7,
20
21
  UNRECOGNIZED = -1
21
22
  }
22
23
  export declare function friendshipStatusFromJSON(object: any): FriendshipStatus;
@@ -30,21 +31,27 @@ export interface InternalServerError {
30
31
  export interface User {
31
32
  address: string;
32
33
  }
34
+ export interface FriendProfile {
35
+ address: string;
36
+ name: string;
37
+ hasClaimedName: boolean;
38
+ profilePictureUrl: string;
39
+ }
33
40
  export interface Pagination {
34
41
  limit: number;
35
42
  offset: number;
36
43
  }
37
44
  export interface FriendshipRequestResponse {
38
- user: User | undefined;
45
+ friend: FriendProfile | undefined;
39
46
  createdAt: number;
40
47
  message?: string | undefined;
48
+ id: string;
41
49
  }
42
50
  export interface FriendshipRequests {
43
51
  requests: FriendshipRequestResponse[];
44
52
  }
45
53
  export interface GetFriendsPayload {
46
54
  pagination?: Pagination | undefined;
47
- status?: ConnectivityStatus | undefined;
48
55
  }
49
56
  export interface GetFriendshipRequestsPayload {
50
57
  pagination?: Pagination | undefined;
@@ -91,8 +98,8 @@ export interface PaginatedResponse {
91
98
  total: number;
92
99
  page: number;
93
100
  }
94
- export interface PaginatedUsersResponse {
95
- users: User[];
101
+ export interface PaginatedFriendsProfilesResponse {
102
+ friends: FriendProfile[];
96
103
  paginationData: PaginatedResponse | undefined;
97
104
  }
98
105
  export interface PaginatedFriendshipRequestsResponse {
@@ -120,11 +127,13 @@ export interface UpsertFriendshipResponse {
120
127
  export interface UpsertFriendshipResponse_Accepted {
121
128
  id: string;
122
129
  createdAt: number;
130
+ friend: FriendProfile | undefined;
131
+ message?: string | undefined;
123
132
  }
124
133
  export interface FriendshipUpdate {
125
134
  update?: {
126
135
  $case: "request";
127
- request: FriendshipRequestResponse;
136
+ request: FriendshipUpdate_RequestResponse;
128
137
  } | {
129
138
  $case: "accept";
130
139
  accept: FriendshipUpdate_AcceptResponse;
@@ -139,6 +148,12 @@ export interface FriendshipUpdate {
139
148
  cancel: FriendshipUpdate_CancelResponse;
140
149
  } | undefined;
141
150
  }
151
+ export interface FriendshipUpdate_RequestResponse {
152
+ friend: FriendProfile | undefined;
153
+ createdAt: number;
154
+ message?: string | undefined;
155
+ id: string;
156
+ }
142
157
  export interface FriendshipUpdate_AcceptResponse {
143
158
  user: User | undefined;
144
159
  }
@@ -151,6 +166,10 @@ export interface FriendshipUpdate_DeleteResponse {
151
166
  export interface FriendshipUpdate_CancelResponse {
152
167
  user: User | undefined;
153
168
  }
169
+ export interface FriendConnectivityUpdate {
170
+ friend: FriendProfile | undefined;
171
+ status: ConnectivityStatus;
172
+ }
154
173
  export interface GetFriendshipStatusPayload {
155
174
  user: User | undefined;
156
175
  }
@@ -191,6 +210,14 @@ export declare namespace User {
191
210
  function create<I extends Exact<DeepPartial<User>, I>>(base?: I): User;
192
211
  function fromPartial<I extends Exact<DeepPartial<User>, I>>(object: I): User;
193
212
  }
213
+ export declare namespace FriendProfile {
214
+ function encode(message: FriendProfile, writer?: _m0.Writer): _m0.Writer;
215
+ function decode(input: _m0.Reader | Uint8Array, length?: number): FriendProfile;
216
+ function fromJSON(object: any): FriendProfile;
217
+ function toJSON(message: FriendProfile): unknown;
218
+ function create<I extends Exact<DeepPartial<FriendProfile>, I>>(base?: I): FriendProfile;
219
+ function fromPartial<I extends Exact<DeepPartial<FriendProfile>, I>>(object: I): FriendProfile;
220
+ }
194
221
  export declare namespace Pagination {
195
222
  function encode(message: Pagination, writer?: _m0.Writer): _m0.Writer;
196
223
  function decode(input: _m0.Reader | Uint8Array, length?: number): Pagination;
@@ -295,13 +322,13 @@ export declare namespace PaginatedResponse {
295
322
  function create<I extends Exact<DeepPartial<PaginatedResponse>, I>>(base?: I): PaginatedResponse;
296
323
  function fromPartial<I extends Exact<DeepPartial<PaginatedResponse>, I>>(object: I): PaginatedResponse;
297
324
  }
298
- export declare namespace PaginatedUsersResponse {
299
- function encode(message: PaginatedUsersResponse, writer?: _m0.Writer): _m0.Writer;
300
- function decode(input: _m0.Reader | Uint8Array, length?: number): PaginatedUsersResponse;
301
- function fromJSON(object: any): PaginatedUsersResponse;
302
- function toJSON(message: PaginatedUsersResponse): unknown;
303
- function create<I extends Exact<DeepPartial<PaginatedUsersResponse>, I>>(base?: I): PaginatedUsersResponse;
304
- function fromPartial<I extends Exact<DeepPartial<PaginatedUsersResponse>, I>>(object: I): PaginatedUsersResponse;
325
+ export declare namespace PaginatedFriendsProfilesResponse {
326
+ function encode(message: PaginatedFriendsProfilesResponse, writer?: _m0.Writer): _m0.Writer;
327
+ function decode(input: _m0.Reader | Uint8Array, length?: number): PaginatedFriendsProfilesResponse;
328
+ function fromJSON(object: any): PaginatedFriendsProfilesResponse;
329
+ function toJSON(message: PaginatedFriendsProfilesResponse): unknown;
330
+ function create<I extends Exact<DeepPartial<PaginatedFriendsProfilesResponse>, I>>(base?: I): PaginatedFriendsProfilesResponse;
331
+ function fromPartial<I extends Exact<DeepPartial<PaginatedFriendsProfilesResponse>, I>>(object: I): PaginatedFriendsProfilesResponse;
305
332
  }
306
333
  export declare namespace PaginatedFriendshipRequestsResponse {
307
334
  function encode(message: PaginatedFriendshipRequestsResponse, writer?: _m0.Writer): _m0.Writer;
@@ -335,6 +362,14 @@ export declare namespace FriendshipUpdate {
335
362
  function create<I extends Exact<DeepPartial<FriendshipUpdate>, I>>(base?: I): FriendshipUpdate;
336
363
  function fromPartial<I extends Exact<DeepPartial<FriendshipUpdate>, I>>(object: I): FriendshipUpdate;
337
364
  }
365
+ export declare namespace FriendshipUpdate_RequestResponse {
366
+ function encode(message: FriendshipUpdate_RequestResponse, writer?: _m0.Writer): _m0.Writer;
367
+ function decode(input: _m0.Reader | Uint8Array, length?: number): FriendshipUpdate_RequestResponse;
368
+ function fromJSON(object: any): FriendshipUpdate_RequestResponse;
369
+ function toJSON(message: FriendshipUpdate_RequestResponse): unknown;
370
+ function create<I extends Exact<DeepPartial<FriendshipUpdate_RequestResponse>, I>>(base?: I): FriendshipUpdate_RequestResponse;
371
+ function fromPartial<I extends Exact<DeepPartial<FriendshipUpdate_RequestResponse>, I>>(object: I): FriendshipUpdate_RequestResponse;
372
+ }
338
373
  export declare namespace FriendshipUpdate_AcceptResponse {
339
374
  function encode(message: FriendshipUpdate_AcceptResponse, writer?: _m0.Writer): _m0.Writer;
340
375
  function decode(input: _m0.Reader | Uint8Array, length?: number): FriendshipUpdate_AcceptResponse;
@@ -367,6 +402,14 @@ export declare namespace FriendshipUpdate_CancelResponse {
367
402
  function create<I extends Exact<DeepPartial<FriendshipUpdate_CancelResponse>, I>>(base?: I): FriendshipUpdate_CancelResponse;
368
403
  function fromPartial<I extends Exact<DeepPartial<FriendshipUpdate_CancelResponse>, I>>(object: I): FriendshipUpdate_CancelResponse;
369
404
  }
405
+ export declare namespace FriendConnectivityUpdate {
406
+ function encode(message: FriendConnectivityUpdate, writer?: _m0.Writer): _m0.Writer;
407
+ function decode(input: _m0.Reader | Uint8Array, length?: number): FriendConnectivityUpdate;
408
+ function fromJSON(object: any): FriendConnectivityUpdate;
409
+ function toJSON(message: FriendConnectivityUpdate): unknown;
410
+ function create<I extends Exact<DeepPartial<FriendConnectivityUpdate>, I>>(base?: I): FriendConnectivityUpdate;
411
+ function fromPartial<I extends Exact<DeepPartial<FriendConnectivityUpdate>, I>>(object: I): FriendConnectivityUpdate;
412
+ }
370
413
  export declare namespace GetFriendshipStatusPayload {
371
414
  function encode(message: GetFriendshipStatusPayload, writer?: _m0.Writer): _m0.Writer;
372
415
  function decode(input: _m0.Reader | Uint8Array, length?: number): GetFriendshipStatusPayload;
@@ -401,7 +444,7 @@ export declare const SocialServiceDefinition: {
401
444
  readonly name: "GetFriends";
402
445
  readonly requestType: typeof GetFriendsPayload;
403
446
  readonly requestStream: false;
404
- readonly responseType: typeof PaginatedUsersResponse;
447
+ readonly responseType: typeof PaginatedFriendsProfilesResponse;
405
448
  readonly responseStream: false;
406
449
  readonly options: {};
407
450
  };
@@ -410,7 +453,7 @@ export declare const SocialServiceDefinition: {
410
453
  readonly name: "GetMutualFriends";
411
454
  readonly requestType: typeof GetMutualFriendsPayload;
412
455
  readonly requestStream: false;
413
- readonly responseType: typeof PaginatedUsersResponse;
456
+ readonly responseType: typeof PaginatedFriendsProfilesResponse;
414
457
  readonly responseStream: false;
415
458
  readonly options: {};
416
459
  };
@@ -450,6 +493,7 @@ export declare const SocialServiceDefinition: {
450
493
  readonly responseStream: true;
451
494
  readonly options: {};
452
495
  };
496
+ /** Get the friendship status between the authenticated user and the one in the parameter */
453
497
  readonly getFriendshipStatus: {
454
498
  readonly name: "GetFriendshipStatus";
455
499
  readonly requestType: typeof GetFriendshipStatusPayload;
@@ -458,6 +502,15 @@ export declare const SocialServiceDefinition: {
458
502
  readonly responseStream: false;
459
503
  readonly options: {};
460
504
  };
505
+ /** Subscribe to connectivity updates of friends: ONLINE, OFFLINE, AWAY */
506
+ readonly subscribeToFriendConnectivityUpdates: {
507
+ readonly name: "SubscribeToFriendConnectivityUpdates";
508
+ readonly requestType: typeof Empty;
509
+ readonly requestStream: false;
510
+ readonly responseType: typeof FriendConnectivityUpdate;
511
+ readonly responseStream: true;
512
+ readonly options: {};
513
+ };
461
514
  };
462
515
  };
463
516
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;