@dcl/protocol 1.0.0-6200210039.commit-75f18e8 → 1.0.0-6313239013.commit-438d6b3

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 (36) hide show
  1. package/README.md +1 -11
  2. package/package.json +2 -2
  3. package/out-js/bff-services.gen.d.ts +0 -1
  4. package/out-js/bff-services.gen.js +0 -6
  5. package/out-js/bff-services.gen.js.map +0 -1
  6. package/out-js/decentraland/bff/authentication_service.gen.d.ts +0 -115
  7. package/out-js/decentraland/bff/authentication_service.gen.js +0 -386
  8. package/out-js/decentraland/bff/authentication_service.gen.js.map +0 -1
  9. package/out-js/decentraland/bff/comms_director_service.gen.d.ts +0 -89
  10. package/out-js/decentraland/bff/comms_director_service.gen.js +0 -250
  11. package/out-js/decentraland/bff/comms_director_service.gen.js.map +0 -1
  12. package/out-js/decentraland/bff/comms_service.gen.d.ts +0 -106
  13. package/out-js/decentraland/bff/comms_service.gen.js +0 -189
  14. package/out-js/decentraland/bff/comms_service.gen.js.map +0 -1
  15. package/out-js/decentraland/bff/http_endpoints.gen.d.ts +0 -168
  16. package/out-js/decentraland/bff/http_endpoints.gen.js +0 -949
  17. package/out-js/decentraland/bff/http_endpoints.gen.js.map +0 -1
  18. package/out-js/decentraland/bff/topics_service.gen.d.ts +0 -110
  19. package/out-js/decentraland/bff/topics_service.gen.js +0 -421
  20. package/out-js/decentraland/bff/topics_service.gen.js.map +0 -1
  21. package/out-js/google/protobuf/empty.gen.d.ts +0 -38
  22. package/out-js/google/protobuf/empty.gen.js +0 -54
  23. package/out-js/google/protobuf/empty.gen.js.map +0 -1
  24. package/out-ts/bff-services.gen.ts +0 -3
  25. package/out-ts/decentraland/bff/authentication_service.gen.ts +0 -421
  26. package/out-ts/decentraland/bff/comms_director_service.gen.ts +0 -273
  27. package/out-ts/decentraland/bff/comms_service.gen.ts +0 -212
  28. package/out-ts/decentraland/bff/http_endpoints.gen.ts +0 -1100
  29. package/out-ts/decentraland/bff/topics_service.gen.ts +0 -478
  30. package/out-ts/google/protobuf/empty.gen.ts +0 -72
  31. package/proto/decentraland/bff/authentication_service.proto +0 -39
  32. package/proto/decentraland/bff/comms_director_service.proto +0 -33
  33. package/proto/decentraland/bff/comms_service.proto +0 -25
  34. package/proto/decentraland/bff/http_endpoints.proto +0 -81
  35. package/proto/decentraland/bff/topics_service.proto +0 -34
  36. package/public/bff-services.proto +0 -16
@@ -1,273 +0,0 @@
1
- /* eslint-disable */
2
- import _m0 from "protobufjs/minimal";
3
- import { Empty } from "../../google/protobuf/empty.gen";
4
- import { Position } from "../common/vectors.gen";
5
-
6
- export const protobufPackage = "decentraland.bff";
7
-
8
- export interface WorldCommand {
9
- command?: { $case: "setCommsAdapter"; setCommsAdapter: SetCommsAdapter } | undefined;
10
- }
11
-
12
- export interface SetCommsAdapter {
13
- connectionString: string;
14
- }
15
-
16
- export interface Heartbeat {
17
- position: Position | undefined;
18
- desiredRoom?: string | undefined;
19
- }
20
-
21
- function createBaseWorldCommand(): WorldCommand {
22
- return { command: undefined };
23
- }
24
-
25
- export namespace WorldCommand {
26
- export function encode(message: WorldCommand, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
27
- switch (message.command?.$case) {
28
- case "setCommsAdapter":
29
- SetCommsAdapter.encode(message.command.setCommsAdapter, writer.uint32(10).fork()).ldelim();
30
- break;
31
- }
32
- return writer;
33
- }
34
-
35
- export function decode(input: _m0.Reader | Uint8Array, length?: number): WorldCommand {
36
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
37
- let end = length === undefined ? reader.len : reader.pos + length;
38
- const message = createBaseWorldCommand();
39
- while (reader.pos < end) {
40
- const tag = reader.uint32();
41
- switch (tag >>> 3) {
42
- case 1:
43
- if (tag !== 10) {
44
- break;
45
- }
46
-
47
- message.command = {
48
- $case: "setCommsAdapter",
49
- setCommsAdapter: SetCommsAdapter.decode(reader, reader.uint32()),
50
- };
51
- continue;
52
- }
53
- if ((tag & 7) === 4 || tag === 0) {
54
- break;
55
- }
56
- reader.skipType(tag & 7);
57
- }
58
- return message;
59
- }
60
-
61
- export function fromJSON(object: any): WorldCommand {
62
- return {
63
- command: isSet(object.setCommsAdapter)
64
- ? { $case: "setCommsAdapter", setCommsAdapter: SetCommsAdapter.fromJSON(object.setCommsAdapter) }
65
- : undefined,
66
- };
67
- }
68
-
69
- export function toJSON(message: WorldCommand): unknown {
70
- const obj: any = {};
71
- message.command?.$case === "setCommsAdapter" &&
72
- (obj.setCommsAdapter = message.command?.setCommsAdapter
73
- ? SetCommsAdapter.toJSON(message.command?.setCommsAdapter)
74
- : undefined);
75
- return obj;
76
- }
77
-
78
- export function create<I extends Exact<DeepPartial<WorldCommand>, I>>(base?: I): WorldCommand {
79
- return WorldCommand.fromPartial(base ?? {});
80
- }
81
-
82
- export function fromPartial<I extends Exact<DeepPartial<WorldCommand>, I>>(object: I): WorldCommand {
83
- const message = createBaseWorldCommand();
84
- if (
85
- object.command?.$case === "setCommsAdapter" &&
86
- object.command?.setCommsAdapter !== undefined &&
87
- object.command?.setCommsAdapter !== null
88
- ) {
89
- message.command = {
90
- $case: "setCommsAdapter",
91
- setCommsAdapter: SetCommsAdapter.fromPartial(object.command.setCommsAdapter),
92
- };
93
- }
94
- return message;
95
- }
96
- }
97
-
98
- function createBaseSetCommsAdapter(): SetCommsAdapter {
99
- return { connectionString: "" };
100
- }
101
-
102
- export namespace SetCommsAdapter {
103
- export function encode(message: SetCommsAdapter, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
104
- if (message.connectionString !== "") {
105
- writer.uint32(10).string(message.connectionString);
106
- }
107
- return writer;
108
- }
109
-
110
- export function decode(input: _m0.Reader | Uint8Array, length?: number): SetCommsAdapter {
111
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
112
- let end = length === undefined ? reader.len : reader.pos + length;
113
- const message = createBaseSetCommsAdapter();
114
- while (reader.pos < end) {
115
- const tag = reader.uint32();
116
- switch (tag >>> 3) {
117
- case 1:
118
- if (tag !== 10) {
119
- break;
120
- }
121
-
122
- message.connectionString = reader.string();
123
- continue;
124
- }
125
- if ((tag & 7) === 4 || tag === 0) {
126
- break;
127
- }
128
- reader.skipType(tag & 7);
129
- }
130
- return message;
131
- }
132
-
133
- export function fromJSON(object: any): SetCommsAdapter {
134
- return { connectionString: isSet(object.connectionString) ? String(object.connectionString) : "" };
135
- }
136
-
137
- export function toJSON(message: SetCommsAdapter): unknown {
138
- const obj: any = {};
139
- message.connectionString !== undefined && (obj.connectionString = message.connectionString);
140
- return obj;
141
- }
142
-
143
- export function create<I extends Exact<DeepPartial<SetCommsAdapter>, I>>(base?: I): SetCommsAdapter {
144
- return SetCommsAdapter.fromPartial(base ?? {});
145
- }
146
-
147
- export function fromPartial<I extends Exact<DeepPartial<SetCommsAdapter>, I>>(object: I): SetCommsAdapter {
148
- const message = createBaseSetCommsAdapter();
149
- message.connectionString = object.connectionString ?? "";
150
- return message;
151
- }
152
- }
153
-
154
- function createBaseHeartbeat(): Heartbeat {
155
- return { position: undefined, desiredRoom: undefined };
156
- }
157
-
158
- export namespace Heartbeat {
159
- export function encode(message: Heartbeat, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
160
- if (message.position !== undefined) {
161
- Position.encode(message.position, writer.uint32(10).fork()).ldelim();
162
- }
163
- if (message.desiredRoom !== undefined) {
164
- writer.uint32(18).string(message.desiredRoom);
165
- }
166
- return writer;
167
- }
168
-
169
- export function decode(input: _m0.Reader | Uint8Array, length?: number): Heartbeat {
170
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
171
- let end = length === undefined ? reader.len : reader.pos + length;
172
- const message = createBaseHeartbeat();
173
- while (reader.pos < end) {
174
- const tag = reader.uint32();
175
- switch (tag >>> 3) {
176
- case 1:
177
- if (tag !== 10) {
178
- break;
179
- }
180
-
181
- message.position = Position.decode(reader, reader.uint32());
182
- continue;
183
- case 2:
184
- if (tag !== 18) {
185
- break;
186
- }
187
-
188
- message.desiredRoom = reader.string();
189
- continue;
190
- }
191
- if ((tag & 7) === 4 || tag === 0) {
192
- break;
193
- }
194
- reader.skipType(tag & 7);
195
- }
196
- return message;
197
- }
198
-
199
- export function fromJSON(object: any): Heartbeat {
200
- return {
201
- position: isSet(object.position) ? Position.fromJSON(object.position) : undefined,
202
- desiredRoom: isSet(object.desiredRoom) ? String(object.desiredRoom) : undefined,
203
- };
204
- }
205
-
206
- export function toJSON(message: Heartbeat): unknown {
207
- const obj: any = {};
208
- message.position !== undefined && (obj.position = message.position ? Position.toJSON(message.position) : undefined);
209
- message.desiredRoom !== undefined && (obj.desiredRoom = message.desiredRoom);
210
- return obj;
211
- }
212
-
213
- export function create<I extends Exact<DeepPartial<Heartbeat>, I>>(base?: I): Heartbeat {
214
- return Heartbeat.fromPartial(base ?? {});
215
- }
216
-
217
- export function fromPartial<I extends Exact<DeepPartial<Heartbeat>, I>>(object: I): Heartbeat {
218
- const message = createBaseHeartbeat();
219
- message.position = (object.position !== undefined && object.position !== null)
220
- ? Position.fromPartial(object.position)
221
- : undefined;
222
- message.desiredRoom = object.desiredRoom ?? undefined;
223
- return message;
224
- }
225
- }
226
-
227
- export type CommsDirectorServiceDefinition = typeof CommsDirectorServiceDefinition;
228
- export const CommsDirectorServiceDefinition = {
229
- name: "CommsDirectorService",
230
- fullName: "decentraland.bff.CommsDirectorService",
231
- methods: {
232
- /**
233
- * every couple seconds AND at the beginning, the explorers must send a heartbeat
234
- * to make the comms director aware of their location
235
- */
236
- sendHeartbeat: {
237
- name: "SendHeartbeat",
238
- requestType: Heartbeat,
239
- requestStream: false,
240
- responseType: Empty,
241
- responseStream: false,
242
- options: {},
243
- },
244
- /**
245
- * before sending the first heartbeat, it is required that the explorers subscribe
246
- * to a list of comms commands
247
- */
248
- getCommsCommands: {
249
- name: "GetCommsCommands",
250
- requestType: Empty,
251
- requestStream: false,
252
- responseType: WorldCommand,
253
- responseStream: true,
254
- options: {},
255
- },
256
- },
257
- } as const;
258
-
259
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
260
-
261
- export type DeepPartial<T> = T extends Builtin ? T
262
- : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
263
- : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
264
- : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
265
- : Partial<T>;
266
-
267
- type KeysOfUnion<T> = T extends T ? keyof T : never;
268
- export type Exact<P, I extends P> = P extends Builtin ? P
269
- : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
270
-
271
- function isSet(value: any): boolean {
272
- return value !== null && value !== undefined;
273
- }
@@ -1,212 +0,0 @@
1
- /* eslint-disable */
2
- import _m0 from "protobufjs/minimal";
3
- import {
4
- PeerTopicSubscriptionResultElem,
5
- PublishToTopicRequest,
6
- PublishToTopicResult,
7
- SubscriptionRequest,
8
- SystemTopicSubscriptionResultElem,
9
- } from "./topics_service.gen";
10
-
11
- export const protobufPackage = "decentraland.bff";
12
-
13
- export interface Subscription {
14
- subscriptionId: number;
15
- }
16
-
17
- export interface UnsubscriptionResult {
18
- ok: boolean;
19
- }
20
-
21
- function createBaseSubscription(): Subscription {
22
- return { subscriptionId: 0 };
23
- }
24
-
25
- export namespace Subscription {
26
- export function encode(message: Subscription, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
27
- if (message.subscriptionId !== 0) {
28
- writer.uint32(8).uint32(message.subscriptionId);
29
- }
30
- return writer;
31
- }
32
-
33
- export function decode(input: _m0.Reader | Uint8Array, length?: number): Subscription {
34
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
35
- let end = length === undefined ? reader.len : reader.pos + length;
36
- const message = createBaseSubscription();
37
- while (reader.pos < end) {
38
- const tag = reader.uint32();
39
- switch (tag >>> 3) {
40
- case 1:
41
- if (tag !== 8) {
42
- break;
43
- }
44
-
45
- message.subscriptionId = reader.uint32();
46
- continue;
47
- }
48
- if ((tag & 7) === 4 || tag === 0) {
49
- break;
50
- }
51
- reader.skipType(tag & 7);
52
- }
53
- return message;
54
- }
55
-
56
- export function fromJSON(object: any): Subscription {
57
- return { subscriptionId: isSet(object.subscriptionId) ? Number(object.subscriptionId) : 0 };
58
- }
59
-
60
- export function toJSON(message: Subscription): unknown {
61
- const obj: any = {};
62
- message.subscriptionId !== undefined && (obj.subscriptionId = Math.round(message.subscriptionId));
63
- return obj;
64
- }
65
-
66
- export function create<I extends Exact<DeepPartial<Subscription>, I>>(base?: I): Subscription {
67
- return Subscription.fromPartial(base ?? {});
68
- }
69
-
70
- export function fromPartial<I extends Exact<DeepPartial<Subscription>, I>>(object: I): Subscription {
71
- const message = createBaseSubscription();
72
- message.subscriptionId = object.subscriptionId ?? 0;
73
- return message;
74
- }
75
- }
76
-
77
- function createBaseUnsubscriptionResult(): UnsubscriptionResult {
78
- return { ok: false };
79
- }
80
-
81
- export namespace UnsubscriptionResult {
82
- export function encode(message: UnsubscriptionResult, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
83
- if (message.ok === true) {
84
- writer.uint32(8).bool(message.ok);
85
- }
86
- return writer;
87
- }
88
-
89
- export function decode(input: _m0.Reader | Uint8Array, length?: number): UnsubscriptionResult {
90
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
91
- let end = length === undefined ? reader.len : reader.pos + length;
92
- const message = createBaseUnsubscriptionResult();
93
- while (reader.pos < end) {
94
- const tag = reader.uint32();
95
- switch (tag >>> 3) {
96
- case 1:
97
- if (tag !== 8) {
98
- break;
99
- }
100
-
101
- message.ok = reader.bool();
102
- continue;
103
- }
104
- if ((tag & 7) === 4 || tag === 0) {
105
- break;
106
- }
107
- reader.skipType(tag & 7);
108
- }
109
- return message;
110
- }
111
-
112
- export function fromJSON(object: any): UnsubscriptionResult {
113
- return { ok: isSet(object.ok) ? Boolean(object.ok) : false };
114
- }
115
-
116
- export function toJSON(message: UnsubscriptionResult): unknown {
117
- const obj: any = {};
118
- message.ok !== undefined && (obj.ok = message.ok);
119
- return obj;
120
- }
121
-
122
- export function create<I extends Exact<DeepPartial<UnsubscriptionResult>, I>>(base?: I): UnsubscriptionResult {
123
- return UnsubscriptionResult.fromPartial(base ?? {});
124
- }
125
-
126
- export function fromPartial<I extends Exact<DeepPartial<UnsubscriptionResult>, I>>(object: I): UnsubscriptionResult {
127
- const message = createBaseUnsubscriptionResult();
128
- message.ok = object.ok ?? false;
129
- return message;
130
- }
131
- }
132
-
133
- export type CommsServiceDefinition = typeof CommsServiceDefinition;
134
- export const CommsServiceDefinition = {
135
- name: "CommsService",
136
- fullName: "decentraland.bff.CommsService",
137
- methods: {
138
- subscribeToPeerMessages: {
139
- name: "SubscribeToPeerMessages",
140
- requestType: SubscriptionRequest,
141
- requestStream: false,
142
- responseType: Subscription,
143
- responseStream: false,
144
- options: {},
145
- },
146
- getPeerMessages: {
147
- name: "GetPeerMessages",
148
- requestType: Subscription,
149
- requestStream: false,
150
- responseType: PeerTopicSubscriptionResultElem,
151
- responseStream: true,
152
- options: {},
153
- },
154
- unsubscribeToPeerMessages: {
155
- name: "UnsubscribeToPeerMessages",
156
- requestType: Subscription,
157
- requestStream: false,
158
- responseType: UnsubscriptionResult,
159
- responseStream: false,
160
- options: {},
161
- },
162
- subscribeToSystemMessages: {
163
- name: "SubscribeToSystemMessages",
164
- requestType: SubscriptionRequest,
165
- requestStream: false,
166
- responseType: Subscription,
167
- responseStream: false,
168
- options: {},
169
- },
170
- getSystemMessages: {
171
- name: "GetSystemMessages",
172
- requestType: Subscription,
173
- requestStream: false,
174
- responseType: SystemTopicSubscriptionResultElem,
175
- responseStream: true,
176
- options: {},
177
- },
178
- unsubscribeToSystemMessages: {
179
- name: "UnsubscribeToSystemMessages",
180
- requestType: Subscription,
181
- requestStream: false,
182
- responseType: UnsubscriptionResult,
183
- responseStream: false,
184
- options: {},
185
- },
186
- /** send a peer message to a topic */
187
- publishToTopic: {
188
- name: "PublishToTopic",
189
- requestType: PublishToTopicRequest,
190
- requestStream: false,
191
- responseType: PublishToTopicResult,
192
- responseStream: false,
193
- options: {},
194
- },
195
- },
196
- } as const;
197
-
198
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
199
-
200
- export type DeepPartial<T> = T extends Builtin ? T
201
- : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
202
- : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
203
- : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
204
- : Partial<T>;
205
-
206
- type KeysOfUnion<T> = T extends T ? keyof T : never;
207
- export type Exact<P, I extends P> = P extends Builtin ? P
208
- : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
209
-
210
- function isSet(value: any): boolean {
211
- return value !== null && value !== undefined;
212
- }