@replit/protocol 0.4.20 → 0.4.22
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 +54 -0
- package/dist/api/client.d.ts +202 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +394 -0
- package/dist/api/features/features.d.ts +112 -0
- package/dist/api/features/features.d.ts.map +1 -0
- package/dist/api/features/features.js +199 -0
- package/dist/api/lore/lore.d.ts +543 -0
- package/dist/api/lore/lore.d.ts.map +1 -0
- package/dist/api/lore/lore.js +982 -0
- package/dist/api/lore/service.client.d.ts +283 -0
- package/dist/api/lore/service.client.d.ts.map +1 -0
- package/dist/api/lore/service.client.js +172 -0
- package/dist/api/lore/service.d.ts +1100 -0
- package/dist/api/lore/service.d.ts.map +1 -0
- package/dist/api/lore/service.js +2279 -0
- package/dist/api/powerup.d.ts +147 -0
- package/dist/api/powerup.d.ts.map +1 -0
- package/dist/api/powerup.js +286 -0
- package/dist/api/repl/repl.d.ts +552 -0
- package/dist/api/repl/repl.d.ts.map +1 -0
- package/dist/api/repl/repl.js +787 -0
- package/dist/api/signing.d.ts +618 -0
- package/dist/api/signing.d.ts.map +1 -0
- package/dist/api/signing.js +785 -0
- package/dist/api/token/token.d.ts +335 -0
- package/dist/api/token/token.d.ts.map +1 -0
- package/dist/api/token/token.js +463 -0
- package/dist/api/types.d.ts +8629 -0
- package/dist/api/types.d.ts.map +1 -0
- package/dist/api/types.js +17225 -0
- package/dist/google/protobuf/empty.d.ts +31 -0
- package/dist/google/protobuf/empty.d.ts.map +1 -0
- package/dist/google/protobuf/empty.js +41 -0
- package/dist/google/protobuf/field_mask.d.ts +239 -0
- package/dist/google/protobuf/field_mask.d.ts.map +1 -0
- package/dist/google/protobuf/field_mask.js +83 -0
- package/dist/google/protobuf/struct.d.ts +186 -0
- package/dist/google/protobuf/struct.d.ts.map +1 -0
- package/dist/google/protobuf/struct.js +337 -0
- package/dist/google/protobuf/timestamp.d.ts +156 -0
- package/dist/google/protobuf/timestamp.d.ts.map +1 -0
- package/dist/google/protobuf/timestamp.js +132 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/package.json +3 -0
- package/iotester/index.d.ts +6 -6
- package/iotester/index.js +25 -12
- package/main/index.d.ts +6 -6
- package/main/index.js +25 -12
- package/package.json +43 -4
- package/gen.sh +0 -51
- package/jsdoc.js +0 -171
- package/pnpm-workspace.yaml +0 -6
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
2
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
3
|
+
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
4
|
+
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
5
|
+
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
6
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
7
|
+
import { Timestamp } from "../google/protobuf/timestamp.js";
|
|
8
|
+
/**
|
|
9
|
+
* PrivateReplsPowerup stores metadata about the Private Repls powerup
|
|
10
|
+
*
|
|
11
|
+
* @generated from protobuf message replit.goval.api.PrivateReplsPowerup
|
|
12
|
+
*/
|
|
13
|
+
export interface PrivateReplsPowerup {
|
|
14
|
+
/**
|
|
15
|
+
* @generated from protobuf field: bool enabled = 1
|
|
16
|
+
*/
|
|
17
|
+
enabled: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* GhostwriterPowerup stores metadata about the Ghostwriter powerup
|
|
21
|
+
*
|
|
22
|
+
* @generated from protobuf message replit.goval.api.GhostwriterPowerup
|
|
23
|
+
*/
|
|
24
|
+
export interface GhostwriterPowerup {
|
|
25
|
+
/**
|
|
26
|
+
* @generated from protobuf field: bool enabled = 1
|
|
27
|
+
*/
|
|
28
|
+
enabled: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* ConnectivityPowerup stores metadata about the Connectivity/SSH powerup
|
|
32
|
+
*
|
|
33
|
+
* @generated from protobuf message replit.goval.api.ConnectivityPowerup
|
|
34
|
+
*/
|
|
35
|
+
export interface ConnectivityPowerup {
|
|
36
|
+
/**
|
|
37
|
+
* @generated from protobuf field: bool enabled = 1
|
|
38
|
+
*/
|
|
39
|
+
enabled: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* PowerUp stores metadata about power-ups.
|
|
43
|
+
*
|
|
44
|
+
* @generated from protobuf message replit.goval.api.PowerUp
|
|
45
|
+
*/
|
|
46
|
+
export interface PowerUp {
|
|
47
|
+
/**
|
|
48
|
+
* Expiry time for the powerup
|
|
49
|
+
*
|
|
50
|
+
* @generated from protobuf field: google.protobuf.Timestamp expires_at = 1
|
|
51
|
+
*/
|
|
52
|
+
expiresAt?: Timestamp;
|
|
53
|
+
/**
|
|
54
|
+
* @generated from protobuf oneof: powerup
|
|
55
|
+
*/
|
|
56
|
+
powerup: {
|
|
57
|
+
oneofKind: "private";
|
|
58
|
+
/**
|
|
59
|
+
* @generated from protobuf field: replit.goval.api.PrivateReplsPowerup private = 10
|
|
60
|
+
*/
|
|
61
|
+
private: PrivateReplsPowerup;
|
|
62
|
+
} | {
|
|
63
|
+
oneofKind: "ghostwriter";
|
|
64
|
+
/**
|
|
65
|
+
* @generated from protobuf field: replit.goval.api.GhostwriterPowerup ghostwriter = 11
|
|
66
|
+
*/
|
|
67
|
+
ghostwriter: GhostwriterPowerup;
|
|
68
|
+
} | {
|
|
69
|
+
oneofKind: "connectivity";
|
|
70
|
+
/**
|
|
71
|
+
* @generated from protobuf field: replit.goval.api.ConnectivityPowerup connectivity = 12
|
|
72
|
+
*/
|
|
73
|
+
connectivity: ConnectivityPowerup;
|
|
74
|
+
} | {
|
|
75
|
+
oneofKind: undefined;
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* UserPowerUps holds power-up metadata for a user.
|
|
80
|
+
*
|
|
81
|
+
* @generated from protobuf message replit.goval.api.UserPowerUps
|
|
82
|
+
*/
|
|
83
|
+
export interface UserPowerUps {
|
|
84
|
+
/**
|
|
85
|
+
* @generated from protobuf field: uint32 user_id = 1
|
|
86
|
+
*/
|
|
87
|
+
userId: number;
|
|
88
|
+
/**
|
|
89
|
+
* @generated from protobuf field: string username = 2
|
|
90
|
+
*/
|
|
91
|
+
username: string;
|
|
92
|
+
/**
|
|
93
|
+
* @generated from protobuf field: repeated replit.goval.api.PowerUp powerups = 3
|
|
94
|
+
*/
|
|
95
|
+
powerups: PowerUp[];
|
|
96
|
+
}
|
|
97
|
+
declare class PrivateReplsPowerup$Type extends MessageType<PrivateReplsPowerup> {
|
|
98
|
+
constructor();
|
|
99
|
+
create(value?: PartialMessage<PrivateReplsPowerup>): PrivateReplsPowerup;
|
|
100
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PrivateReplsPowerup): PrivateReplsPowerup;
|
|
101
|
+
internalBinaryWrite(message: PrivateReplsPowerup, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* @generated MessageType for protobuf message replit.goval.api.PrivateReplsPowerup
|
|
105
|
+
*/
|
|
106
|
+
export declare const PrivateReplsPowerup: PrivateReplsPowerup$Type;
|
|
107
|
+
declare class GhostwriterPowerup$Type extends MessageType<GhostwriterPowerup> {
|
|
108
|
+
constructor();
|
|
109
|
+
create(value?: PartialMessage<GhostwriterPowerup>): GhostwriterPowerup;
|
|
110
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GhostwriterPowerup): GhostwriterPowerup;
|
|
111
|
+
internalBinaryWrite(message: GhostwriterPowerup, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* @generated MessageType for protobuf message replit.goval.api.GhostwriterPowerup
|
|
115
|
+
*/
|
|
116
|
+
export declare const GhostwriterPowerup: GhostwriterPowerup$Type;
|
|
117
|
+
declare class ConnectivityPowerup$Type extends MessageType<ConnectivityPowerup> {
|
|
118
|
+
constructor();
|
|
119
|
+
create(value?: PartialMessage<ConnectivityPowerup>): ConnectivityPowerup;
|
|
120
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ConnectivityPowerup): ConnectivityPowerup;
|
|
121
|
+
internalBinaryWrite(message: ConnectivityPowerup, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* @generated MessageType for protobuf message replit.goval.api.ConnectivityPowerup
|
|
125
|
+
*/
|
|
126
|
+
export declare const ConnectivityPowerup: ConnectivityPowerup$Type;
|
|
127
|
+
declare class PowerUp$Type extends MessageType<PowerUp> {
|
|
128
|
+
constructor();
|
|
129
|
+
create(value?: PartialMessage<PowerUp>): PowerUp;
|
|
130
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PowerUp): PowerUp;
|
|
131
|
+
internalBinaryWrite(message: PowerUp, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* @generated MessageType for protobuf message replit.goval.api.PowerUp
|
|
135
|
+
*/
|
|
136
|
+
export declare const PowerUp: PowerUp$Type;
|
|
137
|
+
declare class UserPowerUps$Type extends MessageType<UserPowerUps> {
|
|
138
|
+
constructor();
|
|
139
|
+
create(value?: PartialMessage<UserPowerUps>): UserPowerUps;
|
|
140
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserPowerUps): UserPowerUps;
|
|
141
|
+
internalBinaryWrite(message: UserPowerUps, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* @generated MessageType for protobuf message replit.goval.api.UserPowerUps
|
|
145
|
+
*/
|
|
146
|
+
export declare const UserPowerUps: UserPowerUps$Type;
|
|
147
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"powerup.d.ts","sourceRoot":"","sources":["powerup.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAChC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CACpB;AACD;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAC/B;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CACpB;AACD;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAChC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CACpB;AACD;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,OAAO,EAAE;QACL,SAAS,EAAE,SAAS,CAAC;QACrB;;WAEG;QACH,OAAO,EAAE,mBAAmB,CAAC;KAChC,GAAG;QACA,SAAS,EAAE,aAAa,CAAC;QACzB;;WAEG;QACH,WAAW,EAAE,kBAAkB,CAAC;KACnC,GAAG;QACA,SAAS,EAAE,cAAc,CAAC;QAC1B;;WAEG;QACH,YAAY,EAAE,mBAAmB,CAAC;KACrC,GAAG;QACA,SAAS,EAAE,SAAS,CAAC;KAC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ePartial } from "@protobuf-ts/runtime";
|
|
4
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
5
|
+
import { Timestamp } from "../google/protobuf/timestamp.js";
|
|
6
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
7
|
+
class PrivateReplsPowerup$Type extends MessageType {
|
|
8
|
+
constructor() {
|
|
9
|
+
super("replit.goval.api.PrivateReplsPowerup", [
|
|
10
|
+
{ no: 1, name: "enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
11
|
+
]);
|
|
12
|
+
}
|
|
13
|
+
create(value) {
|
|
14
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
15
|
+
message.enabled = false;
|
|
16
|
+
if (value !== undefined)
|
|
17
|
+
reflectionMergePartial(this, message, value);
|
|
18
|
+
return message;
|
|
19
|
+
}
|
|
20
|
+
internalBinaryRead(reader, length, options, target) {
|
|
21
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
22
|
+
while (reader.pos < end) {
|
|
23
|
+
let [fieldNo, wireType] = reader.tag();
|
|
24
|
+
switch (fieldNo) {
|
|
25
|
+
case /* bool enabled */ 1:
|
|
26
|
+
message.enabled = reader.bool();
|
|
27
|
+
break;
|
|
28
|
+
default:
|
|
29
|
+
let u = options.readUnknownField;
|
|
30
|
+
if (u === "throw")
|
|
31
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
32
|
+
let d = reader.skip(wireType);
|
|
33
|
+
if (u !== false)
|
|
34
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return message;
|
|
38
|
+
}
|
|
39
|
+
internalBinaryWrite(message, writer, options) {
|
|
40
|
+
/* bool enabled = 1; */
|
|
41
|
+
if (message.enabled !== false)
|
|
42
|
+
writer.tag(1, WireType.Varint).bool(message.enabled);
|
|
43
|
+
let u = options.writeUnknownFields;
|
|
44
|
+
if (u !== false)
|
|
45
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
46
|
+
return writer;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @generated MessageType for protobuf message replit.goval.api.PrivateReplsPowerup
|
|
51
|
+
*/
|
|
52
|
+
export const PrivateReplsPowerup = new PrivateReplsPowerup$Type();
|
|
53
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
54
|
+
class GhostwriterPowerup$Type extends MessageType {
|
|
55
|
+
constructor() {
|
|
56
|
+
super("replit.goval.api.GhostwriterPowerup", [
|
|
57
|
+
{ no: 1, name: "enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
58
|
+
]);
|
|
59
|
+
}
|
|
60
|
+
create(value) {
|
|
61
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
62
|
+
message.enabled = false;
|
|
63
|
+
if (value !== undefined)
|
|
64
|
+
reflectionMergePartial(this, message, value);
|
|
65
|
+
return message;
|
|
66
|
+
}
|
|
67
|
+
internalBinaryRead(reader, length, options, target) {
|
|
68
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
69
|
+
while (reader.pos < end) {
|
|
70
|
+
let [fieldNo, wireType] = reader.tag();
|
|
71
|
+
switch (fieldNo) {
|
|
72
|
+
case /* bool enabled */ 1:
|
|
73
|
+
message.enabled = reader.bool();
|
|
74
|
+
break;
|
|
75
|
+
default:
|
|
76
|
+
let u = options.readUnknownField;
|
|
77
|
+
if (u === "throw")
|
|
78
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
79
|
+
let d = reader.skip(wireType);
|
|
80
|
+
if (u !== false)
|
|
81
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return message;
|
|
85
|
+
}
|
|
86
|
+
internalBinaryWrite(message, writer, options) {
|
|
87
|
+
/* bool enabled = 1; */
|
|
88
|
+
if (message.enabled !== false)
|
|
89
|
+
writer.tag(1, WireType.Varint).bool(message.enabled);
|
|
90
|
+
let u = options.writeUnknownFields;
|
|
91
|
+
if (u !== false)
|
|
92
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
93
|
+
return writer;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* @generated MessageType for protobuf message replit.goval.api.GhostwriterPowerup
|
|
98
|
+
*/
|
|
99
|
+
export const GhostwriterPowerup = new GhostwriterPowerup$Type();
|
|
100
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
101
|
+
class ConnectivityPowerup$Type extends MessageType {
|
|
102
|
+
constructor() {
|
|
103
|
+
super("replit.goval.api.ConnectivityPowerup", [
|
|
104
|
+
{ no: 1, name: "enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
105
|
+
]);
|
|
106
|
+
}
|
|
107
|
+
create(value) {
|
|
108
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
109
|
+
message.enabled = false;
|
|
110
|
+
if (value !== undefined)
|
|
111
|
+
reflectionMergePartial(this, message, value);
|
|
112
|
+
return message;
|
|
113
|
+
}
|
|
114
|
+
internalBinaryRead(reader, length, options, target) {
|
|
115
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
116
|
+
while (reader.pos < end) {
|
|
117
|
+
let [fieldNo, wireType] = reader.tag();
|
|
118
|
+
switch (fieldNo) {
|
|
119
|
+
case /* bool enabled */ 1:
|
|
120
|
+
message.enabled = reader.bool();
|
|
121
|
+
break;
|
|
122
|
+
default:
|
|
123
|
+
let u = options.readUnknownField;
|
|
124
|
+
if (u === "throw")
|
|
125
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
126
|
+
let d = reader.skip(wireType);
|
|
127
|
+
if (u !== false)
|
|
128
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return message;
|
|
132
|
+
}
|
|
133
|
+
internalBinaryWrite(message, writer, options) {
|
|
134
|
+
/* bool enabled = 1; */
|
|
135
|
+
if (message.enabled !== false)
|
|
136
|
+
writer.tag(1, WireType.Varint).bool(message.enabled);
|
|
137
|
+
let u = options.writeUnknownFields;
|
|
138
|
+
if (u !== false)
|
|
139
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
140
|
+
return writer;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* @generated MessageType for protobuf message replit.goval.api.ConnectivityPowerup
|
|
145
|
+
*/
|
|
146
|
+
export const ConnectivityPowerup = new ConnectivityPowerup$Type();
|
|
147
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
148
|
+
class PowerUp$Type extends MessageType {
|
|
149
|
+
constructor() {
|
|
150
|
+
super("replit.goval.api.PowerUp", [
|
|
151
|
+
{ no: 1, name: "expires_at", kind: "message", T: () => Timestamp },
|
|
152
|
+
{ no: 10, name: "private", kind: "message", oneof: "powerup", T: () => PrivateReplsPowerup },
|
|
153
|
+
{ no: 11, name: "ghostwriter", kind: "message", oneof: "powerup", T: () => GhostwriterPowerup },
|
|
154
|
+
{ no: 12, name: "connectivity", kind: "message", oneof: "powerup", T: () => ConnectivityPowerup }
|
|
155
|
+
]);
|
|
156
|
+
}
|
|
157
|
+
create(value) {
|
|
158
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
159
|
+
message.powerup = { oneofKind: undefined };
|
|
160
|
+
if (value !== undefined)
|
|
161
|
+
reflectionMergePartial(this, message, value);
|
|
162
|
+
return message;
|
|
163
|
+
}
|
|
164
|
+
internalBinaryRead(reader, length, options, target) {
|
|
165
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
166
|
+
while (reader.pos < end) {
|
|
167
|
+
let [fieldNo, wireType] = reader.tag();
|
|
168
|
+
switch (fieldNo) {
|
|
169
|
+
case /* google.protobuf.Timestamp expires_at */ 1:
|
|
170
|
+
message.expiresAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expiresAt);
|
|
171
|
+
break;
|
|
172
|
+
case /* replit.goval.api.PrivateReplsPowerup private */ 10:
|
|
173
|
+
message.powerup = {
|
|
174
|
+
oneofKind: "private",
|
|
175
|
+
private: PrivateReplsPowerup.internalBinaryRead(reader, reader.uint32(), options, message.powerup.private)
|
|
176
|
+
};
|
|
177
|
+
break;
|
|
178
|
+
case /* replit.goval.api.GhostwriterPowerup ghostwriter */ 11:
|
|
179
|
+
message.powerup = {
|
|
180
|
+
oneofKind: "ghostwriter",
|
|
181
|
+
ghostwriter: GhostwriterPowerup.internalBinaryRead(reader, reader.uint32(), options, message.powerup.ghostwriter)
|
|
182
|
+
};
|
|
183
|
+
break;
|
|
184
|
+
case /* replit.goval.api.ConnectivityPowerup connectivity */ 12:
|
|
185
|
+
message.powerup = {
|
|
186
|
+
oneofKind: "connectivity",
|
|
187
|
+
connectivity: ConnectivityPowerup.internalBinaryRead(reader, reader.uint32(), options, message.powerup.connectivity)
|
|
188
|
+
};
|
|
189
|
+
break;
|
|
190
|
+
default:
|
|
191
|
+
let u = options.readUnknownField;
|
|
192
|
+
if (u === "throw")
|
|
193
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
194
|
+
let d = reader.skip(wireType);
|
|
195
|
+
if (u !== false)
|
|
196
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
return message;
|
|
200
|
+
}
|
|
201
|
+
internalBinaryWrite(message, writer, options) {
|
|
202
|
+
/* google.protobuf.Timestamp expires_at = 1; */
|
|
203
|
+
if (message.expiresAt)
|
|
204
|
+
Timestamp.internalBinaryWrite(message.expiresAt, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
205
|
+
/* replit.goval.api.PrivateReplsPowerup private = 10; */
|
|
206
|
+
if (message.powerup.oneofKind === "private")
|
|
207
|
+
PrivateReplsPowerup.internalBinaryWrite(message.powerup.private, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
208
|
+
/* replit.goval.api.GhostwriterPowerup ghostwriter = 11; */
|
|
209
|
+
if (message.powerup.oneofKind === "ghostwriter")
|
|
210
|
+
GhostwriterPowerup.internalBinaryWrite(message.powerup.ghostwriter, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
|
|
211
|
+
/* replit.goval.api.ConnectivityPowerup connectivity = 12; */
|
|
212
|
+
if (message.powerup.oneofKind === "connectivity")
|
|
213
|
+
ConnectivityPowerup.internalBinaryWrite(message.powerup.connectivity, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
|
|
214
|
+
let u = options.writeUnknownFields;
|
|
215
|
+
if (u !== false)
|
|
216
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
217
|
+
return writer;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* @generated MessageType for protobuf message replit.goval.api.PowerUp
|
|
222
|
+
*/
|
|
223
|
+
export const PowerUp = new PowerUp$Type();
|
|
224
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
225
|
+
class UserPowerUps$Type extends MessageType {
|
|
226
|
+
constructor() {
|
|
227
|
+
super("replit.goval.api.UserPowerUps", [
|
|
228
|
+
{ no: 1, name: "user_id", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
|
|
229
|
+
{ no: 2, name: "username", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
230
|
+
{ no: 3, name: "powerups", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => PowerUp }
|
|
231
|
+
]);
|
|
232
|
+
}
|
|
233
|
+
create(value) {
|
|
234
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
235
|
+
message.userId = 0;
|
|
236
|
+
message.username = "";
|
|
237
|
+
message.powerups = [];
|
|
238
|
+
if (value !== undefined)
|
|
239
|
+
reflectionMergePartial(this, message, value);
|
|
240
|
+
return message;
|
|
241
|
+
}
|
|
242
|
+
internalBinaryRead(reader, length, options, target) {
|
|
243
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
244
|
+
while (reader.pos < end) {
|
|
245
|
+
let [fieldNo, wireType] = reader.tag();
|
|
246
|
+
switch (fieldNo) {
|
|
247
|
+
case /* uint32 user_id */ 1:
|
|
248
|
+
message.userId = reader.uint32();
|
|
249
|
+
break;
|
|
250
|
+
case /* string username */ 2:
|
|
251
|
+
message.username = reader.string();
|
|
252
|
+
break;
|
|
253
|
+
case /* repeated replit.goval.api.PowerUp powerups */ 3:
|
|
254
|
+
message.powerups.push(PowerUp.internalBinaryRead(reader, reader.uint32(), options));
|
|
255
|
+
break;
|
|
256
|
+
default:
|
|
257
|
+
let u = options.readUnknownField;
|
|
258
|
+
if (u === "throw")
|
|
259
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
260
|
+
let d = reader.skip(wireType);
|
|
261
|
+
if (u !== false)
|
|
262
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
return message;
|
|
266
|
+
}
|
|
267
|
+
internalBinaryWrite(message, writer, options) {
|
|
268
|
+
/* uint32 user_id = 1; */
|
|
269
|
+
if (message.userId !== 0)
|
|
270
|
+
writer.tag(1, WireType.Varint).uint32(message.userId);
|
|
271
|
+
/* string username = 2; */
|
|
272
|
+
if (message.username !== "")
|
|
273
|
+
writer.tag(2, WireType.LengthDelimited).string(message.username);
|
|
274
|
+
/* repeated replit.goval.api.PowerUp powerups = 3; */
|
|
275
|
+
for (let i = 0; i < message.powerups.length; i++)
|
|
276
|
+
PowerUp.internalBinaryWrite(message.powerups[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
277
|
+
let u = options.writeUnknownFields;
|
|
278
|
+
if (u !== false)
|
|
279
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
280
|
+
return writer;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* @generated MessageType for protobuf message replit.goval.api.UserPowerUps
|
|
285
|
+
*/
|
|
286
|
+
export const UserPowerUps = new UserPowerUps$Type();
|