@dcl/protocol 1.0.0-4959770633.commit-e249449 → 1.0.0-4982452399.commit-2113622
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -3
- package/out-js/decentraland/social/friendships/friendships.gen.d.ts +33 -168
- package/out-js/decentraland/social/friendships/friendships.gen.js +139 -1030
- package/out-js/decentraland/social/friendships/friendships.gen.js.map +1 -1
- package/out-ts/decentraland/social/friendships/friendships.gen.ts +150 -1146
- package/package.json +2 -2
- package/proto/decentraland/social/friendships/friendships.proto +21 -64
package/README.md
CHANGED
|
@@ -20,21 +20,39 @@ protoc \
|
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
# Style Guidelines
|
|
23
|
+
|
|
23
24
|
1. All .proto files are snake_case.proto.
|
|
24
25
|
2. For pascal or camel case usage, please make a deterministic one from the snake case. Example: nft_shape will transform to NftShape.
|
|
25
26
|
3. See https://docs.buf.build/best-practices/style-guide. The most of other styles are taken from there, the Buf configuration is in proto/buf.yml.
|
|
26
27
|
4. Use public/ folder only for .proto with protocol exposing, that is only for files with `import public`. This folder is not processed by the linter.
|
|
27
28
|
|
|
28
29
|
# Dev with Decentraland Repositories
|
|
30
|
+
|
|
29
31
|
Many repositories depend on this protocol definition and that sometimes implies some merge order. We don't have to worry much about compatibility because the checks are running with each PR, if you break something, the CI will warn you. But, in some cases, it's desirable to merge the implementation in a specific order to avoid unexpected behavior in the corner cases (multiple repositories are waiting for the build at the same time).
|
|
30
32
|
|
|
33
|
+
> **Important Note: Avoid Merging Protocol PR Without Completed Unity Implementation**
|
|
34
|
+
>
|
|
35
|
+
> Please don't merge a protocol PR into the main branch unless the corresponding implementation in Unity has been completed. This is important to avoid any potential issues or build failures in Unity.
|
|
36
|
+
>
|
|
37
|
+
> The ideal order for introducing breaking changes in the protocol is as follows:
|
|
38
|
+
>
|
|
39
|
+
> 1. Create a PR in the Protocol repository.
|
|
40
|
+
> 2. Use the npm test link from the CI of the protocol PR in the protocol-dependent application for development.
|
|
41
|
+
> 3. Once both the protocol PR and the protocol-dependent application (e.g. unity-renderer) PR are ready for merging, synchronize their merging as follows:
|
|
42
|
+
> 1. Merge the protocol PR.
|
|
43
|
+
> 2. Modify protocol-dependent application PR to use the `@dcl/protocol@next` package to stop using the PR npm test link.
|
|
44
|
+
> 3. Merge the protocol-dependent application PR.
|
|
45
|
+
|
|
31
46
|
Some dev-cases are described here:
|
|
32
|
-
|
|
47
|
+
|
|
48
|
+
## SDK: New component or component modification
|
|
49
|
+
|
|
33
50
|
Repositories: [unity-renderer](https://github.com/decentraland/unity-renderer/) and [js-sdk-toolchain](https://github.com/decentraland/js-sdk-toolchain/)
|
|
34
51
|
|
|
35
52
|
At the protocol level both operations shouldn't be a problem, but `js-sdk-toolchain` CI will fail if the component is not tested. This can happen if the PR **`A`** from the protocol is merged, and you update your PR **`B`** from `js-sdk-toolchain` with the changes before the PR **`A`** from `js-sdk-toolchain` is merged.
|
|
36
53
|
|
|
37
54
|
Some guidelines and testing before merge:
|
|
55
|
+
|
|
38
56
|
- The protocol package is uploaded to S3 while developing in a PR. This can be used in the target repositories
|
|
39
57
|
- Testing in the playground: Playground allows us to test by adding query parameters: `https://playground.decentraland.org/?&renderer-branch=**feat/my-new-component**&sdk-branch=**feat/new-component-approach**`
|
|
40
58
|
- Testing locally: you can write an example scene and install the package `@dcl/sdk` uploaded to S3 commented in the PR comments.
|
|
@@ -42,16 +60,20 @@ Some guidelines and testing before merge:
|
|
|
42
60
|
- Start merging when the three PRs are already to merge: first merge the Protocol one, then update the other two with the version @next and merge them at the same time.
|
|
43
61
|
|
|
44
62
|
## SDK: New APIs or APIs modifications
|
|
45
|
-
|
|
63
|
+
|
|
64
|
+
Repositories: [kernel](https://github.com/decentraland/kernel/), [js-sdk-toolchain](https://github.com/decentraland/js-sdk-toolchain/) and [scene-runtime](https://github.com/decentraland/scene-runtime/)
|
|
46
65
|
In this case, there is no problem with when each PR is merged. It's recommendable to merge first the rpc server-side (in this case, Kernel), second the `scene-runtime` (and this would require a second update from `kernel`) and last the `js-sdk-toolchain`.
|
|
47
66
|
|
|
48
67
|
## Renderer protocol (RPC)
|
|
68
|
+
|
|
49
69
|
Repositories: [kernel](https://github.com/decentraland/kernel/) and [unity-renderer](https://github.com/decentraland/unity-renderer/)
|
|
50
70
|
|
|
51
71
|
TODO
|
|
52
72
|
|
|
53
73
|
## BFF
|
|
74
|
+
|
|
54
75
|
TODO
|
|
55
76
|
|
|
56
|
-
## Comms
|
|
77
|
+
## Comms
|
|
78
|
+
|
|
57
79
|
TODO
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import _m0 from "protobufjs/minimal";
|
|
2
2
|
export declare const protobufPackage = "decentraland.social.friendships";
|
|
3
|
+
export declare enum ServiceErrors {
|
|
4
|
+
/** UNKNOWN - proto3 requires that first value in enum have numeric value of 0 */
|
|
5
|
+
UNKNOWN = 0,
|
|
6
|
+
BAD_REQUEST = 400,
|
|
7
|
+
UNAUTHORIZED = 401,
|
|
8
|
+
FORBIDDEN = 403,
|
|
9
|
+
NOT_FOUND = 404,
|
|
10
|
+
TOO_MANY_REQUESTS = 429,
|
|
11
|
+
INTERNAL_SERVER_ERROR = 500,
|
|
12
|
+
UNRECOGNIZED = -1
|
|
13
|
+
}
|
|
14
|
+
export declare function serviceErrorsFromJSON(object: any): ServiceErrors;
|
|
15
|
+
export declare function serviceErrorsToJSON(object: ServiceErrors): string;
|
|
3
16
|
/** This message is a response that is sent from the server to the client */
|
|
4
17
|
export interface FriendshipEventResponse {
|
|
5
18
|
body?: {
|
|
@@ -19,9 +32,6 @@ export interface FriendshipEventResponse {
|
|
|
19
32
|
cancel: CancelResponse;
|
|
20
33
|
};
|
|
21
34
|
}
|
|
22
|
-
export interface FriendshipEventResponses {
|
|
23
|
-
responses: FriendshipEventResponse[];
|
|
24
|
-
}
|
|
25
35
|
export interface FriendshipEventPayload {
|
|
26
36
|
body?: {
|
|
27
37
|
$case: "request";
|
|
@@ -95,99 +105,15 @@ export interface UpdateFriendshipPayload {
|
|
|
95
105
|
/** For internal use only, subject to change. */
|
|
96
106
|
authToken?: Payload | undefined;
|
|
97
107
|
}
|
|
98
|
-
export interface Payload {
|
|
99
|
-
/** For internal use only, subject to change. */
|
|
100
|
-
synapseToken?: string | undefined;
|
|
101
|
-
}
|
|
102
|
-
export interface BadRequestError {
|
|
103
|
-
message: string;
|
|
104
|
-
}
|
|
105
|
-
export interface UnauthorizedError {
|
|
106
|
-
message: string;
|
|
107
|
-
}
|
|
108
|
-
export interface ForbiddenError {
|
|
109
|
-
message: string;
|
|
110
|
-
}
|
|
111
|
-
export interface TooManyRequestsError {
|
|
112
|
-
message: string;
|
|
113
|
-
}
|
|
114
|
-
export interface InternalServerError {
|
|
115
|
-
message: string;
|
|
116
|
-
}
|
|
117
|
-
export interface UsersResponse {
|
|
118
|
-
response?: {
|
|
119
|
-
$case: "users";
|
|
120
|
-
users: Users;
|
|
121
|
-
} | {
|
|
122
|
-
$case: "internalServerError";
|
|
123
|
-
internalServerError: InternalServerError;
|
|
124
|
-
} | {
|
|
125
|
-
$case: "unauthorizedError";
|
|
126
|
-
unauthorizedError: UnauthorizedError;
|
|
127
|
-
} | {
|
|
128
|
-
$case: "forbiddenError";
|
|
129
|
-
forbiddenError: ForbiddenError;
|
|
130
|
-
} | {
|
|
131
|
-
$case: "tooManyRequestsError";
|
|
132
|
-
tooManyRequestsError: TooManyRequestsError;
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
export interface RequestEventsResponse {
|
|
136
|
-
response?: {
|
|
137
|
-
$case: "events";
|
|
138
|
-
events: RequestEvents;
|
|
139
|
-
} | {
|
|
140
|
-
$case: "internalServerError";
|
|
141
|
-
internalServerError: InternalServerError;
|
|
142
|
-
} | {
|
|
143
|
-
$case: "unauthorizedError";
|
|
144
|
-
unauthorizedError: UnauthorizedError;
|
|
145
|
-
} | {
|
|
146
|
-
$case: "forbiddenError";
|
|
147
|
-
forbiddenError: ForbiddenError;
|
|
148
|
-
} | {
|
|
149
|
-
$case: "tooManyRequestsError";
|
|
150
|
-
tooManyRequestsError: TooManyRequestsError;
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
108
|
export interface UpdateFriendshipResponse {
|
|
154
|
-
|
|
155
|
-
$case: "event";
|
|
156
|
-
event: FriendshipEventResponse;
|
|
157
|
-
} | {
|
|
158
|
-
$case: "internalServerError";
|
|
159
|
-
internalServerError: InternalServerError;
|
|
160
|
-
} | {
|
|
161
|
-
$case: "unauthorizedError";
|
|
162
|
-
unauthorizedError: UnauthorizedError;
|
|
163
|
-
} | {
|
|
164
|
-
$case: "forbiddenError";
|
|
165
|
-
forbiddenError: ForbiddenError;
|
|
166
|
-
} | {
|
|
167
|
-
$case: "tooManyRequestsError";
|
|
168
|
-
tooManyRequestsError: TooManyRequestsError;
|
|
169
|
-
} | {
|
|
170
|
-
$case: "badRequestError";
|
|
171
|
-
badRequestError: BadRequestError;
|
|
172
|
-
};
|
|
109
|
+
event: FriendshipEventResponse | undefined;
|
|
173
110
|
}
|
|
174
111
|
export interface SubscribeFriendshipEventsUpdatesResponse {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
internalServerError: InternalServerError;
|
|
181
|
-
} | {
|
|
182
|
-
$case: "unauthorizedError";
|
|
183
|
-
unauthorizedError: UnauthorizedError;
|
|
184
|
-
} | {
|
|
185
|
-
$case: "forbiddenError";
|
|
186
|
-
forbiddenError: ForbiddenError;
|
|
187
|
-
} | {
|
|
188
|
-
$case: "tooManyRequestsError";
|
|
189
|
-
tooManyRequestsError: TooManyRequestsError;
|
|
190
|
-
};
|
|
112
|
+
events: FriendshipEventResponse[];
|
|
113
|
+
}
|
|
114
|
+
export interface Payload {
|
|
115
|
+
/** For internal use only, subject to change. */
|
|
116
|
+
synapseToken?: string | undefined;
|
|
191
117
|
}
|
|
192
118
|
export declare namespace FriendshipEventResponse {
|
|
193
119
|
function encode(message: FriendshipEventResponse, writer?: _m0.Writer): _m0.Writer;
|
|
@@ -197,14 +123,6 @@ export declare namespace FriendshipEventResponse {
|
|
|
197
123
|
function create<I extends Exact<DeepPartial<FriendshipEventResponse>, I>>(base?: I): FriendshipEventResponse;
|
|
198
124
|
function fromPartial<I extends Exact<DeepPartial<FriendshipEventResponse>, I>>(object: I): FriendshipEventResponse;
|
|
199
125
|
}
|
|
200
|
-
export declare namespace FriendshipEventResponses {
|
|
201
|
-
function encode(message: FriendshipEventResponses, writer?: _m0.Writer): _m0.Writer;
|
|
202
|
-
function decode(input: _m0.Reader | Uint8Array, length?: number): FriendshipEventResponses;
|
|
203
|
-
function fromJSON(object: any): FriendshipEventResponses;
|
|
204
|
-
function toJSON(message: FriendshipEventResponses): unknown;
|
|
205
|
-
function create<I extends Exact<DeepPartial<FriendshipEventResponses>, I>>(base?: I): FriendshipEventResponses;
|
|
206
|
-
function fromPartial<I extends Exact<DeepPartial<FriendshipEventResponses>, I>>(object: I): FriendshipEventResponses;
|
|
207
|
-
}
|
|
208
126
|
export declare namespace FriendshipEventPayload {
|
|
209
127
|
function encode(message: FriendshipEventPayload, writer?: _m0.Writer): _m0.Writer;
|
|
210
128
|
function decode(input: _m0.Reader | Uint8Array, length?: number): FriendshipEventPayload;
|
|
@@ -333,70 +251,6 @@ export declare namespace UpdateFriendshipPayload {
|
|
|
333
251
|
function create<I extends Exact<DeepPartial<UpdateFriendshipPayload>, I>>(base?: I): UpdateFriendshipPayload;
|
|
334
252
|
function fromPartial<I extends Exact<DeepPartial<UpdateFriendshipPayload>, I>>(object: I): UpdateFriendshipPayload;
|
|
335
253
|
}
|
|
336
|
-
export declare namespace Payload {
|
|
337
|
-
function encode(message: Payload, writer?: _m0.Writer): _m0.Writer;
|
|
338
|
-
function decode(input: _m0.Reader | Uint8Array, length?: number): Payload;
|
|
339
|
-
function fromJSON(object: any): Payload;
|
|
340
|
-
function toJSON(message: Payload): unknown;
|
|
341
|
-
function create<I extends Exact<DeepPartial<Payload>, I>>(base?: I): Payload;
|
|
342
|
-
function fromPartial<I extends Exact<DeepPartial<Payload>, I>>(object: I): Payload;
|
|
343
|
-
}
|
|
344
|
-
export declare namespace BadRequestError {
|
|
345
|
-
function encode(message: BadRequestError, writer?: _m0.Writer): _m0.Writer;
|
|
346
|
-
function decode(input: _m0.Reader | Uint8Array, length?: number): BadRequestError;
|
|
347
|
-
function fromJSON(object: any): BadRequestError;
|
|
348
|
-
function toJSON(message: BadRequestError): unknown;
|
|
349
|
-
function create<I extends Exact<DeepPartial<BadRequestError>, I>>(base?: I): BadRequestError;
|
|
350
|
-
function fromPartial<I extends Exact<DeepPartial<BadRequestError>, I>>(object: I): BadRequestError;
|
|
351
|
-
}
|
|
352
|
-
export declare namespace UnauthorizedError {
|
|
353
|
-
function encode(message: UnauthorizedError, writer?: _m0.Writer): _m0.Writer;
|
|
354
|
-
function decode(input: _m0.Reader | Uint8Array, length?: number): UnauthorizedError;
|
|
355
|
-
function fromJSON(object: any): UnauthorizedError;
|
|
356
|
-
function toJSON(message: UnauthorizedError): unknown;
|
|
357
|
-
function create<I extends Exact<DeepPartial<UnauthorizedError>, I>>(base?: I): UnauthorizedError;
|
|
358
|
-
function fromPartial<I extends Exact<DeepPartial<UnauthorizedError>, I>>(object: I): UnauthorizedError;
|
|
359
|
-
}
|
|
360
|
-
export declare namespace ForbiddenError {
|
|
361
|
-
function encode(message: ForbiddenError, writer?: _m0.Writer): _m0.Writer;
|
|
362
|
-
function decode(input: _m0.Reader | Uint8Array, length?: number): ForbiddenError;
|
|
363
|
-
function fromJSON(object: any): ForbiddenError;
|
|
364
|
-
function toJSON(message: ForbiddenError): unknown;
|
|
365
|
-
function create<I extends Exact<DeepPartial<ForbiddenError>, I>>(base?: I): ForbiddenError;
|
|
366
|
-
function fromPartial<I extends Exact<DeepPartial<ForbiddenError>, I>>(object: I): ForbiddenError;
|
|
367
|
-
}
|
|
368
|
-
export declare namespace TooManyRequestsError {
|
|
369
|
-
function encode(message: TooManyRequestsError, writer?: _m0.Writer): _m0.Writer;
|
|
370
|
-
function decode(input: _m0.Reader | Uint8Array, length?: number): TooManyRequestsError;
|
|
371
|
-
function fromJSON(object: any): TooManyRequestsError;
|
|
372
|
-
function toJSON(message: TooManyRequestsError): unknown;
|
|
373
|
-
function create<I extends Exact<DeepPartial<TooManyRequestsError>, I>>(base?: I): TooManyRequestsError;
|
|
374
|
-
function fromPartial<I extends Exact<DeepPartial<TooManyRequestsError>, I>>(object: I): TooManyRequestsError;
|
|
375
|
-
}
|
|
376
|
-
export declare namespace InternalServerError {
|
|
377
|
-
function encode(message: InternalServerError, writer?: _m0.Writer): _m0.Writer;
|
|
378
|
-
function decode(input: _m0.Reader | Uint8Array, length?: number): InternalServerError;
|
|
379
|
-
function fromJSON(object: any): InternalServerError;
|
|
380
|
-
function toJSON(message: InternalServerError): unknown;
|
|
381
|
-
function create<I extends Exact<DeepPartial<InternalServerError>, I>>(base?: I): InternalServerError;
|
|
382
|
-
function fromPartial<I extends Exact<DeepPartial<InternalServerError>, I>>(object: I): InternalServerError;
|
|
383
|
-
}
|
|
384
|
-
export declare namespace UsersResponse {
|
|
385
|
-
function encode(message: UsersResponse, writer?: _m0.Writer): _m0.Writer;
|
|
386
|
-
function decode(input: _m0.Reader | Uint8Array, length?: number): UsersResponse;
|
|
387
|
-
function fromJSON(object: any): UsersResponse;
|
|
388
|
-
function toJSON(message: UsersResponse): unknown;
|
|
389
|
-
function create<I extends Exact<DeepPartial<UsersResponse>, I>>(base?: I): UsersResponse;
|
|
390
|
-
function fromPartial<I extends Exact<DeepPartial<UsersResponse>, I>>(object: I): UsersResponse;
|
|
391
|
-
}
|
|
392
|
-
export declare namespace RequestEventsResponse {
|
|
393
|
-
function encode(message: RequestEventsResponse, writer?: _m0.Writer): _m0.Writer;
|
|
394
|
-
function decode(input: _m0.Reader | Uint8Array, length?: number): RequestEventsResponse;
|
|
395
|
-
function fromJSON(object: any): RequestEventsResponse;
|
|
396
|
-
function toJSON(message: RequestEventsResponse): unknown;
|
|
397
|
-
function create<I extends Exact<DeepPartial<RequestEventsResponse>, I>>(base?: I): RequestEventsResponse;
|
|
398
|
-
function fromPartial<I extends Exact<DeepPartial<RequestEventsResponse>, I>>(object: I): RequestEventsResponse;
|
|
399
|
-
}
|
|
400
254
|
export declare namespace UpdateFriendshipResponse {
|
|
401
255
|
function encode(message: UpdateFriendshipResponse, writer?: _m0.Writer): _m0.Writer;
|
|
402
256
|
function decode(input: _m0.Reader | Uint8Array, length?: number): UpdateFriendshipResponse;
|
|
@@ -413,6 +267,14 @@ export declare namespace SubscribeFriendshipEventsUpdatesResponse {
|
|
|
413
267
|
function create<I extends Exact<DeepPartial<SubscribeFriendshipEventsUpdatesResponse>, I>>(base?: I): SubscribeFriendshipEventsUpdatesResponse;
|
|
414
268
|
function fromPartial<I extends Exact<DeepPartial<SubscribeFriendshipEventsUpdatesResponse>, I>>(object: I): SubscribeFriendshipEventsUpdatesResponse;
|
|
415
269
|
}
|
|
270
|
+
export declare namespace Payload {
|
|
271
|
+
function encode(message: Payload, writer?: _m0.Writer): _m0.Writer;
|
|
272
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): Payload;
|
|
273
|
+
function fromJSON(object: any): Payload;
|
|
274
|
+
function toJSON(message: Payload): unknown;
|
|
275
|
+
function create<I extends Exact<DeepPartial<Payload>, I>>(base?: I): Payload;
|
|
276
|
+
function fromPartial<I extends Exact<DeepPartial<Payload>, I>>(object: I): Payload;
|
|
277
|
+
}
|
|
416
278
|
export type FriendshipsServiceDefinition = typeof FriendshipsServiceDefinition;
|
|
417
279
|
export declare const FriendshipsServiceDefinition: {
|
|
418
280
|
readonly name: "FriendshipsService";
|
|
@@ -423,7 +285,7 @@ export declare const FriendshipsServiceDefinition: {
|
|
|
423
285
|
readonly name: "GetFriends";
|
|
424
286
|
readonly requestType: typeof Payload;
|
|
425
287
|
readonly requestStream: false;
|
|
426
|
-
readonly responseType: typeof
|
|
288
|
+
readonly responseType: typeof Users;
|
|
427
289
|
readonly responseStream: true;
|
|
428
290
|
readonly options: {};
|
|
429
291
|
};
|
|
@@ -432,7 +294,7 @@ export declare const FriendshipsServiceDefinition: {
|
|
|
432
294
|
readonly name: "GetRequestEvents";
|
|
433
295
|
readonly requestType: typeof Payload;
|
|
434
296
|
readonly requestStream: false;
|
|
435
|
-
readonly responseType: typeof
|
|
297
|
+
readonly responseType: typeof RequestEvents;
|
|
436
298
|
readonly responseStream: false;
|
|
437
299
|
readonly options: {};
|
|
438
300
|
};
|
|
@@ -445,7 +307,10 @@ export declare const FriendshipsServiceDefinition: {
|
|
|
445
307
|
readonly responseStream: false;
|
|
446
308
|
readonly options: {};
|
|
447
309
|
};
|
|
448
|
-
/**
|
|
310
|
+
/**
|
|
311
|
+
* Subscribe to updates of friendship status: REQUEST, ACCEPT, REJECT, CANCEL,
|
|
312
|
+
* DELETE
|
|
313
|
+
*/
|
|
449
314
|
readonly subscribeFriendshipEventsUpdates: {
|
|
450
315
|
readonly name: "SubscribeFriendshipEventsUpdates";
|
|
451
316
|
readonly requestType: typeof Payload;
|