@dcl/protocol 1.0.0-3678623066.commit-a335c0a → 1.0.0-3732507470.commit-55d3d8c

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.
@@ -347,7 +347,7 @@ export const TopicsServiceDefinition = {
347
347
  declare var self: any | undefined;
348
348
  declare var window: any | undefined;
349
349
  declare var global: any | undefined;
350
- var globalThis: any = (() => {
350
+ var tsProtoGlobalThis: any = (() => {
351
351
  if (typeof globalThis !== "undefined") {
352
352
  return globalThis;
353
353
  }
@@ -364,10 +364,10 @@ var globalThis: any = (() => {
364
364
  })();
365
365
 
366
366
  function bytesFromBase64(b64: string): Uint8Array {
367
- if (globalThis.Buffer) {
368
- return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
367
+ if (tsProtoGlobalThis.Buffer) {
368
+ return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
369
369
  } else {
370
- const bin = globalThis.atob(b64);
370
+ const bin = tsProtoGlobalThis.atob(b64);
371
371
  const arr = new Uint8Array(bin.length);
372
372
  for (let i = 0; i < bin.length; ++i) {
373
373
  arr[i] = bin.charCodeAt(i);
@@ -377,14 +377,14 @@ function bytesFromBase64(b64: string): Uint8Array {
377
377
  }
378
378
 
379
379
  function base64FromBytes(arr: Uint8Array): string {
380
- if (globalThis.Buffer) {
381
- return globalThis.Buffer.from(arr).toString("base64");
380
+ if (tsProtoGlobalThis.Buffer) {
381
+ return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
382
382
  } else {
383
383
  const bin: string[] = [];
384
384
  arr.forEach((byte) => {
385
385
  bin.push(String.fromCharCode(byte));
386
386
  });
387
- return globalThis.btoa(bin.join(""));
387
+ return tsProtoGlobalThis.btoa(bin.join(""));
388
388
  }
389
389
  }
390
390
 
@@ -0,0 +1,122 @@
1
+ /* eslint-disable */
2
+ import _m0 from "protobufjs/minimal";
3
+ import { ContentMapping } from "./content_mapping.gen";
4
+
5
+ export const protobufPackage = "decentraland.common";
6
+
7
+ export interface Entity {
8
+ id: string;
9
+ pointers: string[];
10
+ metadata: string;
11
+ timestamp: number;
12
+ content: ContentMapping[];
13
+ }
14
+
15
+ function createBaseEntity(): Entity {
16
+ return { id: "", pointers: [], metadata: "", timestamp: 0, content: [] };
17
+ }
18
+
19
+ export const Entity = {
20
+ encode(message: Entity, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
21
+ if (message.id !== "") {
22
+ writer.uint32(10).string(message.id);
23
+ }
24
+ for (const v of message.pointers) {
25
+ writer.uint32(18).string(v!);
26
+ }
27
+ if (message.metadata !== "") {
28
+ writer.uint32(26).string(message.metadata);
29
+ }
30
+ if (message.timestamp !== 0) {
31
+ writer.uint32(32).uint32(message.timestamp);
32
+ }
33
+ for (const v of message.content) {
34
+ ContentMapping.encode(v!, writer.uint32(42).fork()).ldelim();
35
+ }
36
+ return writer;
37
+ },
38
+
39
+ decode(input: _m0.Reader | Uint8Array, length?: number): Entity {
40
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
41
+ let end = length === undefined ? reader.len : reader.pos + length;
42
+ const message = createBaseEntity();
43
+ while (reader.pos < end) {
44
+ const tag = reader.uint32();
45
+ switch (tag >>> 3) {
46
+ case 1:
47
+ message.id = reader.string();
48
+ break;
49
+ case 2:
50
+ message.pointers.push(reader.string());
51
+ break;
52
+ case 3:
53
+ message.metadata = reader.string();
54
+ break;
55
+ case 4:
56
+ message.timestamp = reader.uint32();
57
+ break;
58
+ case 5:
59
+ message.content.push(ContentMapping.decode(reader, reader.uint32()));
60
+ break;
61
+ default:
62
+ reader.skipType(tag & 7);
63
+ break;
64
+ }
65
+ }
66
+ return message;
67
+ },
68
+
69
+ fromJSON(object: any): Entity {
70
+ return {
71
+ id: isSet(object.id) ? String(object.id) : "",
72
+ pointers: Array.isArray(object?.pointers) ? object.pointers.map((e: any) => String(e)) : [],
73
+ metadata: isSet(object.metadata) ? String(object.metadata) : "",
74
+ timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0,
75
+ content: Array.isArray(object?.content) ? object.content.map((e: any) => ContentMapping.fromJSON(e)) : [],
76
+ };
77
+ },
78
+
79
+ toJSON(message: Entity): unknown {
80
+ const obj: any = {};
81
+ message.id !== undefined && (obj.id = message.id);
82
+ if (message.pointers) {
83
+ obj.pointers = message.pointers.map((e) => e);
84
+ } else {
85
+ obj.pointers = [];
86
+ }
87
+ message.metadata !== undefined && (obj.metadata = message.metadata);
88
+ message.timestamp !== undefined && (obj.timestamp = Math.round(message.timestamp));
89
+ if (message.content) {
90
+ obj.content = message.content.map((e) => e ? ContentMapping.toJSON(e) : undefined);
91
+ } else {
92
+ obj.content = [];
93
+ }
94
+ return obj;
95
+ },
96
+
97
+ fromPartial<I extends Exact<DeepPartial<Entity>, I>>(object: I): Entity {
98
+ const message = createBaseEntity();
99
+ message.id = object.id ?? "";
100
+ message.pointers = object.pointers?.map((e) => e) || [];
101
+ message.metadata = object.metadata ?? "";
102
+ message.timestamp = object.timestamp ?? 0;
103
+ message.content = object.content?.map((e) => ContentMapping.fromPartial(e)) || [];
104
+ return message;
105
+ },
106
+ };
107
+
108
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
109
+
110
+ export type DeepPartial<T> = T extends Builtin ? T
111
+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
112
+ : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
113
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
114
+ : Partial<T>;
115
+
116
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
117
+ export type Exact<P, I extends P> = P extends Builtin ? P
118
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
119
+
120
+ function isSet(value: any): boolean {
121
+ return value !== null && value !== undefined;
122
+ }
@@ -2469,7 +2469,7 @@ export const EngineApiServiceDefinition = {
2469
2469
  declare var self: any | undefined;
2470
2470
  declare var window: any | undefined;
2471
2471
  declare var global: any | undefined;
2472
- var globalThis: any = (() => {
2472
+ var tsProtoGlobalThis: any = (() => {
2473
2473
  if (typeof globalThis !== "undefined") {
2474
2474
  return globalThis;
2475
2475
  }
@@ -2486,10 +2486,10 @@ var globalThis: any = (() => {
2486
2486
  })();
2487
2487
 
2488
2488
  function bytesFromBase64(b64: string): Uint8Array {
2489
- if (globalThis.Buffer) {
2490
- return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
2489
+ if (tsProtoGlobalThis.Buffer) {
2490
+ return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
2491
2491
  } else {
2492
- const bin = globalThis.atob(b64);
2492
+ const bin = tsProtoGlobalThis.atob(b64);
2493
2493
  const arr = new Uint8Array(bin.length);
2494
2494
  for (let i = 0; i < bin.length; ++i) {
2495
2495
  arr[i] = bin.charCodeAt(i);
@@ -2499,14 +2499,14 @@ function bytesFromBase64(b64: string): Uint8Array {
2499
2499
  }
2500
2500
 
2501
2501
  function base64FromBytes(arr: Uint8Array): string {
2502
- if (globalThis.Buffer) {
2503
- return globalThis.Buffer.from(arr).toString("base64");
2502
+ if (tsProtoGlobalThis.Buffer) {
2503
+ return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
2504
2504
  } else {
2505
2505
  const bin: string[] = [];
2506
2506
  arr.forEach((byte) => {
2507
2507
  bin.push(String.fromCharCode(byte));
2508
2508
  });
2509
- return globalThis.btoa(bin.join(""));
2509
+ return tsProtoGlobalThis.btoa(bin.join(""));
2510
2510
  }
2511
2511
  }
2512
2512
 
@@ -716,7 +716,7 @@ export const Voice = {
716
716
  declare var self: any | undefined;
717
717
  declare var window: any | undefined;
718
718
  declare var global: any | undefined;
719
- var globalThis: any = (() => {
719
+ var tsProtoGlobalThis: any = (() => {
720
720
  if (typeof globalThis !== "undefined") {
721
721
  return globalThis;
722
722
  }
@@ -733,10 +733,10 @@ var globalThis: any = (() => {
733
733
  })();
734
734
 
735
735
  function bytesFromBase64(b64: string): Uint8Array {
736
- if (globalThis.Buffer) {
737
- return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
736
+ if (tsProtoGlobalThis.Buffer) {
737
+ return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
738
738
  } else {
739
- const bin = globalThis.atob(b64);
739
+ const bin = tsProtoGlobalThis.atob(b64);
740
740
  const arr = new Uint8Array(bin.length);
741
741
  for (let i = 0; i < bin.length; ++i) {
742
742
  arr[i] = bin.charCodeAt(i);
@@ -746,14 +746,14 @@ function bytesFromBase64(b64: string): Uint8Array {
746
746
  }
747
747
 
748
748
  function base64FromBytes(arr: Uint8Array): string {
749
- if (globalThis.Buffer) {
750
- return globalThis.Buffer.from(arr).toString("base64");
749
+ if (tsProtoGlobalThis.Buffer) {
750
+ return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
751
751
  } else {
752
752
  const bin: string[] = [];
753
753
  arr.forEach((byte) => {
754
754
  bin.push(String.fromCharCode(byte));
755
755
  });
756
- return globalThis.btoa(bin.join(""));
756
+ return tsProtoGlobalThis.btoa(bin.join(""));
757
757
  }
758
758
  }
759
759
 
@@ -814,7 +814,7 @@ export const WsPacket = {
814
814
  declare var self: any | undefined;
815
815
  declare var window: any | undefined;
816
816
  declare var global: any | undefined;
817
- var globalThis: any = (() => {
817
+ var tsProtoGlobalThis: any = (() => {
818
818
  if (typeof globalThis !== "undefined") {
819
819
  return globalThis;
820
820
  }
@@ -831,10 +831,10 @@ var globalThis: any = (() => {
831
831
  })();
832
832
 
833
833
  function bytesFromBase64(b64: string): Uint8Array {
834
- if (globalThis.Buffer) {
835
- return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
834
+ if (tsProtoGlobalThis.Buffer) {
835
+ return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
836
836
  } else {
837
- const bin = globalThis.atob(b64);
837
+ const bin = tsProtoGlobalThis.atob(b64);
838
838
  const arr = new Uint8Array(bin.length);
839
839
  for (let i = 0; i < bin.length; ++i) {
840
840
  arr[i] = bin.charCodeAt(i);
@@ -844,14 +844,14 @@ function bytesFromBase64(b64: string): Uint8Array {
844
844
  }
845
845
 
846
846
  function base64FromBytes(arr: Uint8Array): string {
847
- if (globalThis.Buffer) {
848
- return globalThis.Buffer.from(arr).toString("base64");
847
+ if (tsProtoGlobalThis.Buffer) {
848
+ return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
849
849
  } else {
850
850
  const bin: string[] = [];
851
851
  arr.forEach((byte) => {
852
852
  bin.push(String.fromCharCode(byte));
853
853
  });
854
- return globalThis.btoa(bin.join(""));
854
+ return tsProtoGlobalThis.btoa(bin.join(""));
855
855
  }
856
856
  }
857
857
 
@@ -0,0 +1,202 @@
1
+ /* eslint-disable */
2
+ import Long from "long";
3
+ import _m0 from "protobufjs/minimal";
4
+
5
+ export const protobufPackage = "decentraland.renderer.common";
6
+
7
+ export enum FriendshipErrorCode {
8
+ FEC_TOO_MANY_REQUESTS_SENT = 0,
9
+ FEC_NOT_ENOUGH_TIME_PASSED = 1,
10
+ FEC_BLOCKED_USER = 2,
11
+ FEC_NON_EXISTING_USER = 3,
12
+ FEC_INVALID_REQUEST = 4,
13
+ FEC_UNKNOWN = 5,
14
+ UNRECOGNIZED = -1,
15
+ }
16
+
17
+ export function friendshipErrorCodeFromJSON(object: any): FriendshipErrorCode {
18
+ switch (object) {
19
+ case 0:
20
+ case "FEC_TOO_MANY_REQUESTS_SENT":
21
+ return FriendshipErrorCode.FEC_TOO_MANY_REQUESTS_SENT;
22
+ case 1:
23
+ case "FEC_NOT_ENOUGH_TIME_PASSED":
24
+ return FriendshipErrorCode.FEC_NOT_ENOUGH_TIME_PASSED;
25
+ case 2:
26
+ case "FEC_BLOCKED_USER":
27
+ return FriendshipErrorCode.FEC_BLOCKED_USER;
28
+ case 3:
29
+ case "FEC_NON_EXISTING_USER":
30
+ return FriendshipErrorCode.FEC_NON_EXISTING_USER;
31
+ case 4:
32
+ case "FEC_INVALID_REQUEST":
33
+ return FriendshipErrorCode.FEC_INVALID_REQUEST;
34
+ case 5:
35
+ case "FEC_UNKNOWN":
36
+ return FriendshipErrorCode.FEC_UNKNOWN;
37
+ case -1:
38
+ case "UNRECOGNIZED":
39
+ default:
40
+ return FriendshipErrorCode.UNRECOGNIZED;
41
+ }
42
+ }
43
+
44
+ export function friendshipErrorCodeToJSON(object: FriendshipErrorCode): string {
45
+ switch (object) {
46
+ case FriendshipErrorCode.FEC_TOO_MANY_REQUESTS_SENT:
47
+ return "FEC_TOO_MANY_REQUESTS_SENT";
48
+ case FriendshipErrorCode.FEC_NOT_ENOUGH_TIME_PASSED:
49
+ return "FEC_NOT_ENOUGH_TIME_PASSED";
50
+ case FriendshipErrorCode.FEC_BLOCKED_USER:
51
+ return "FEC_BLOCKED_USER";
52
+ case FriendshipErrorCode.FEC_NON_EXISTING_USER:
53
+ return "FEC_NON_EXISTING_USER";
54
+ case FriendshipErrorCode.FEC_INVALID_REQUEST:
55
+ return "FEC_INVALID_REQUEST";
56
+ case FriendshipErrorCode.FEC_UNKNOWN:
57
+ return "FEC_UNKNOWN";
58
+ case FriendshipErrorCode.UNRECOGNIZED:
59
+ default:
60
+ return "UNRECOGNIZED";
61
+ }
62
+ }
63
+
64
+ export interface FriendRequestInfo {
65
+ friendRequestId: string;
66
+ timestamp: number;
67
+ from: string;
68
+ to: string;
69
+ messageBody?: string | undefined;
70
+ }
71
+
72
+ function createBaseFriendRequestInfo(): FriendRequestInfo {
73
+ return { friendRequestId: "", timestamp: 0, from: "", to: "", messageBody: undefined };
74
+ }
75
+
76
+ export const FriendRequestInfo = {
77
+ encode(message: FriendRequestInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
78
+ if (message.friendRequestId !== "") {
79
+ writer.uint32(10).string(message.friendRequestId);
80
+ }
81
+ if (message.timestamp !== 0) {
82
+ writer.uint32(16).uint64(message.timestamp);
83
+ }
84
+ if (message.from !== "") {
85
+ writer.uint32(26).string(message.from);
86
+ }
87
+ if (message.to !== "") {
88
+ writer.uint32(34).string(message.to);
89
+ }
90
+ if (message.messageBody !== undefined) {
91
+ writer.uint32(42).string(message.messageBody);
92
+ }
93
+ return writer;
94
+ },
95
+
96
+ decode(input: _m0.Reader | Uint8Array, length?: number): FriendRequestInfo {
97
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
98
+ let end = length === undefined ? reader.len : reader.pos + length;
99
+ const message = createBaseFriendRequestInfo();
100
+ while (reader.pos < end) {
101
+ const tag = reader.uint32();
102
+ switch (tag >>> 3) {
103
+ case 1:
104
+ message.friendRequestId = reader.string();
105
+ break;
106
+ case 2:
107
+ message.timestamp = longToNumber(reader.uint64() as Long);
108
+ break;
109
+ case 3:
110
+ message.from = reader.string();
111
+ break;
112
+ case 4:
113
+ message.to = reader.string();
114
+ break;
115
+ case 5:
116
+ message.messageBody = reader.string();
117
+ break;
118
+ default:
119
+ reader.skipType(tag & 7);
120
+ break;
121
+ }
122
+ }
123
+ return message;
124
+ },
125
+
126
+ fromJSON(object: any): FriendRequestInfo {
127
+ return {
128
+ friendRequestId: isSet(object.friendRequestId) ? String(object.friendRequestId) : "",
129
+ timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0,
130
+ from: isSet(object.from) ? String(object.from) : "",
131
+ to: isSet(object.to) ? String(object.to) : "",
132
+ messageBody: isSet(object.messageBody) ? String(object.messageBody) : undefined,
133
+ };
134
+ },
135
+
136
+ toJSON(message: FriendRequestInfo): unknown {
137
+ const obj: any = {};
138
+ message.friendRequestId !== undefined && (obj.friendRequestId = message.friendRequestId);
139
+ message.timestamp !== undefined && (obj.timestamp = Math.round(message.timestamp));
140
+ message.from !== undefined && (obj.from = message.from);
141
+ message.to !== undefined && (obj.to = message.to);
142
+ message.messageBody !== undefined && (obj.messageBody = message.messageBody);
143
+ return obj;
144
+ },
145
+
146
+ fromPartial<I extends Exact<DeepPartial<FriendRequestInfo>, I>>(object: I): FriendRequestInfo {
147
+ const message = createBaseFriendRequestInfo();
148
+ message.friendRequestId = object.friendRequestId ?? "";
149
+ message.timestamp = object.timestamp ?? 0;
150
+ message.from = object.from ?? "";
151
+ message.to = object.to ?? "";
152
+ message.messageBody = object.messageBody ?? undefined;
153
+ return message;
154
+ },
155
+ };
156
+
157
+ declare var self: any | undefined;
158
+ declare var window: any | undefined;
159
+ declare var global: any | undefined;
160
+ var tsProtoGlobalThis: any = (() => {
161
+ if (typeof globalThis !== "undefined") {
162
+ return globalThis;
163
+ }
164
+ if (typeof self !== "undefined") {
165
+ return self;
166
+ }
167
+ if (typeof window !== "undefined") {
168
+ return window;
169
+ }
170
+ if (typeof global !== "undefined") {
171
+ return global;
172
+ }
173
+ throw "Unable to locate global object";
174
+ })();
175
+
176
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
177
+
178
+ export type DeepPartial<T> = T extends Builtin ? T
179
+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
180
+ : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
181
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
182
+ : Partial<T>;
183
+
184
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
185
+ export type Exact<P, I extends P> = P extends Builtin ? P
186
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
187
+
188
+ function longToNumber(long: Long): number {
189
+ if (long.gt(Number.MAX_SAFE_INTEGER)) {
190
+ throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
191
+ }
192
+ return long.toNumber();
193
+ }
194
+
195
+ if (_m0.util.Long !== Long) {
196
+ _m0.util.Long = Long as any;
197
+ _m0.configure();
198
+ }
199
+
200
+ function isSet(value: any): boolean {
201
+ return value !== null && value !== undefined;
202
+ }
@@ -8624,7 +8624,7 @@ export const PBOpenNFTDialog = {
8624
8624
  declare var self: any | undefined;
8625
8625
  declare var window: any | undefined;
8626
8626
  declare var global: any | undefined;
8627
- var globalThis: any = (() => {
8627
+ var tsProtoGlobalThis: any = (() => {
8628
8628
  if (typeof globalThis !== "undefined") {
8629
8629
  return globalThis;
8630
8630
  }
@@ -8654,7 +8654,7 @@ export type Exact<P, I extends P> = P extends Builtin ? P
8654
8654
 
8655
8655
  function longToNumber(long: Long): number {
8656
8656
  if (long.gt(Number.MAX_SAFE_INTEGER)) {
8657
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
8657
+ throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
8658
8658
  }
8659
8659
  return long.toNumber();
8660
8660
  }
@@ -913,7 +913,7 @@ export const AnalyticsKernelServiceDefinition = {
913
913
  declare var self: any | undefined;
914
914
  declare var window: any | undefined;
915
915
  declare var global: any | undefined;
916
- var globalThis: any = (() => {
916
+ var tsProtoGlobalThis: any = (() => {
917
917
  if (typeof globalThis !== "undefined") {
918
918
  return globalThis;
919
919
  }
@@ -943,7 +943,7 @@ export type Exact<P, I extends P> = P extends Builtin ? P
943
943
 
944
944
  function longToNumber(long: Long): number {
945
945
  if (long.gt(Number.MAX_SAFE_INTEGER)) {
946
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
946
+ throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
947
947
  }
948
948
  return long.toNumber();
949
949
  }