@se-uulm/snowballr-grpc-client 0.0.0-stage → 0.2.0

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/dist/base.ts ADDED
@@ -0,0 +1,362 @@
1
+ // @generated by protobuf-ts 2.11.1 with parameter generate_dependencies
2
+ // @generated from protobuf file "base.proto" (package "snowballr", syntax proto3)
3
+ // tslint:disable
4
+ //
5
+ /// Base types required for various RPCs.
6
+ //
7
+ import { WireType } from "@protobuf-ts/runtime";
8
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
9
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
10
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
11
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
12
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
13
+ import type { PartialMessage } from "@protobuf-ts/runtime";
14
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
15
+ import { MessageType } from "@protobuf-ts/runtime";
16
+ /**
17
+ * Just an empty object. Use when there's no parameter or return value.
18
+ *
19
+ * @generated from protobuf message snowballr.Nothing
20
+ */
21
+ export interface Nothing {
22
+ }
23
+ /**
24
+ * An arbitrary ID. Use for RPCs related to single entities.
25
+ *
26
+ * @generated from protobuf message snowballr.Id
27
+ */
28
+ export interface Id {
29
+ /**
30
+ * @generated from protobuf field: string id = 1
31
+ */
32
+ id: string;
33
+ }
34
+ /**
35
+ * An email as defined by RFC 5322.
36
+ *
37
+ * @generated from protobuf message snowballr.Email
38
+ */
39
+ export interface Email {
40
+ /**
41
+ * @generated from protobuf field: string email = 1
42
+ */
43
+ email: string;
44
+ }
45
+ /**
46
+ * A boolean value.
47
+ *
48
+ * @generated from protobuf message snowballr.BoolValue
49
+ */
50
+ export interface BoolValue {
51
+ /**
52
+ * @generated from protobuf field: bool value = 1
53
+ */
54
+ value: boolean;
55
+ }
56
+ /**
57
+ * Binary data.
58
+ *
59
+ * @generated from protobuf message snowballr.Blob
60
+ */
61
+ export interface Blob {
62
+ /**
63
+ * @generated from protobuf field: bytes data = 1
64
+ */
65
+ data: Uint8Array;
66
+ }
67
+ /**
68
+ * A link with a label and a URL.
69
+ *
70
+ * @generated from protobuf message snowballr.Link
71
+ */
72
+ export interface Link {
73
+ /**
74
+ * @generated from protobuf field: string label = 1
75
+ */
76
+ label: string;
77
+ /**
78
+ * @generated from protobuf field: string url = 2
79
+ */
80
+ url: string;
81
+ }
82
+ // @generated message type with reflection information, may provide speed optimized methods
83
+ class Nothing$Type extends MessageType<Nothing> {
84
+ constructor() {
85
+ super("snowballr.Nothing", []);
86
+ }
87
+ create(value?: PartialMessage<Nothing>): Nothing {
88
+ const message = globalThis.Object.create((this.messagePrototype!));
89
+ if (value !== undefined)
90
+ reflectionMergePartial<Nothing>(this, message, value);
91
+ return message;
92
+ }
93
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Nothing): Nothing {
94
+ let message = target ?? this.create(), end = reader.pos + length;
95
+ while (reader.pos < end) {
96
+ let [fieldNo, wireType] = reader.tag();
97
+ switch (fieldNo) {
98
+ default:
99
+ let u = options.readUnknownField;
100
+ if (u === "throw")
101
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
102
+ let d = reader.skip(wireType);
103
+ if (u !== false)
104
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
105
+ }
106
+ }
107
+ return message;
108
+ }
109
+ internalBinaryWrite(message: Nothing, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
110
+ let u = options.writeUnknownFields;
111
+ if (u !== false)
112
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
113
+ return writer;
114
+ }
115
+ }
116
+ /**
117
+ * @generated MessageType for protobuf message snowballr.Nothing
118
+ */
119
+ export const Nothing = new Nothing$Type();
120
+ // @generated message type with reflection information, may provide speed optimized methods
121
+ class Id$Type extends MessageType<Id> {
122
+ constructor() {
123
+ super("snowballr.Id", [
124
+ { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
125
+ ]);
126
+ }
127
+ create(value?: PartialMessage<Id>): Id {
128
+ const message = globalThis.Object.create((this.messagePrototype!));
129
+ message.id = "";
130
+ if (value !== undefined)
131
+ reflectionMergePartial<Id>(this, message, value);
132
+ return message;
133
+ }
134
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Id): Id {
135
+ let message = target ?? this.create(), end = reader.pos + length;
136
+ while (reader.pos < end) {
137
+ let [fieldNo, wireType] = reader.tag();
138
+ switch (fieldNo) {
139
+ case /* string id */ 1:
140
+ message.id = reader.string();
141
+ break;
142
+ default:
143
+ let u = options.readUnknownField;
144
+ if (u === "throw")
145
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
146
+ let d = reader.skip(wireType);
147
+ if (u !== false)
148
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
149
+ }
150
+ }
151
+ return message;
152
+ }
153
+ internalBinaryWrite(message: Id, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
154
+ /* string id = 1; */
155
+ if (message.id !== "")
156
+ writer.tag(1, WireType.LengthDelimited).string(message.id);
157
+ let u = options.writeUnknownFields;
158
+ if (u !== false)
159
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
160
+ return writer;
161
+ }
162
+ }
163
+ /**
164
+ * @generated MessageType for protobuf message snowballr.Id
165
+ */
166
+ export const Id = new Id$Type();
167
+ // @generated message type with reflection information, may provide speed optimized methods
168
+ class Email$Type extends MessageType<Email> {
169
+ constructor() {
170
+ super("snowballr.Email", [
171
+ { no: 1, name: "email", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
172
+ ]);
173
+ }
174
+ create(value?: PartialMessage<Email>): Email {
175
+ const message = globalThis.Object.create((this.messagePrototype!));
176
+ message.email = "";
177
+ if (value !== undefined)
178
+ reflectionMergePartial<Email>(this, message, value);
179
+ return message;
180
+ }
181
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Email): Email {
182
+ let message = target ?? this.create(), end = reader.pos + length;
183
+ while (reader.pos < end) {
184
+ let [fieldNo, wireType] = reader.tag();
185
+ switch (fieldNo) {
186
+ case /* string email */ 1:
187
+ message.email = reader.string();
188
+ break;
189
+ default:
190
+ let u = options.readUnknownField;
191
+ if (u === "throw")
192
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
193
+ let d = reader.skip(wireType);
194
+ if (u !== false)
195
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
196
+ }
197
+ }
198
+ return message;
199
+ }
200
+ internalBinaryWrite(message: Email, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
201
+ /* string email = 1; */
202
+ if (message.email !== "")
203
+ writer.tag(1, WireType.LengthDelimited).string(message.email);
204
+ let u = options.writeUnknownFields;
205
+ if (u !== false)
206
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
207
+ return writer;
208
+ }
209
+ }
210
+ /**
211
+ * @generated MessageType for protobuf message snowballr.Email
212
+ */
213
+ export const Email = new Email$Type();
214
+ // @generated message type with reflection information, may provide speed optimized methods
215
+ class BoolValue$Type extends MessageType<BoolValue> {
216
+ constructor() {
217
+ super("snowballr.BoolValue", [
218
+ { no: 1, name: "value", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
219
+ ]);
220
+ }
221
+ create(value?: PartialMessage<BoolValue>): BoolValue {
222
+ const message = globalThis.Object.create((this.messagePrototype!));
223
+ message.value = false;
224
+ if (value !== undefined)
225
+ reflectionMergePartial<BoolValue>(this, message, value);
226
+ return message;
227
+ }
228
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: BoolValue): BoolValue {
229
+ let message = target ?? this.create(), end = reader.pos + length;
230
+ while (reader.pos < end) {
231
+ let [fieldNo, wireType] = reader.tag();
232
+ switch (fieldNo) {
233
+ case /* bool value */ 1:
234
+ message.value = reader.bool();
235
+ break;
236
+ default:
237
+ let u = options.readUnknownField;
238
+ if (u === "throw")
239
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
240
+ let d = reader.skip(wireType);
241
+ if (u !== false)
242
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
243
+ }
244
+ }
245
+ return message;
246
+ }
247
+ internalBinaryWrite(message: BoolValue, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
248
+ /* bool value = 1; */
249
+ if (message.value !== false)
250
+ writer.tag(1, WireType.Varint).bool(message.value);
251
+ let u = options.writeUnknownFields;
252
+ if (u !== false)
253
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
254
+ return writer;
255
+ }
256
+ }
257
+ /**
258
+ * @generated MessageType for protobuf message snowballr.BoolValue
259
+ */
260
+ export const BoolValue = new BoolValue$Type();
261
+ // @generated message type with reflection information, may provide speed optimized methods
262
+ class Blob$Type extends MessageType<Blob> {
263
+ constructor() {
264
+ super("snowballr.Blob", [
265
+ { no: 1, name: "data", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
266
+ ]);
267
+ }
268
+ create(value?: PartialMessage<Blob>): Blob {
269
+ const message = globalThis.Object.create((this.messagePrototype!));
270
+ message.data = new Uint8Array(0);
271
+ if (value !== undefined)
272
+ reflectionMergePartial<Blob>(this, message, value);
273
+ return message;
274
+ }
275
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Blob): Blob {
276
+ let message = target ?? this.create(), end = reader.pos + length;
277
+ while (reader.pos < end) {
278
+ let [fieldNo, wireType] = reader.tag();
279
+ switch (fieldNo) {
280
+ case /* bytes data */ 1:
281
+ message.data = reader.bytes();
282
+ break;
283
+ default:
284
+ let u = options.readUnknownField;
285
+ if (u === "throw")
286
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
287
+ let d = reader.skip(wireType);
288
+ if (u !== false)
289
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
290
+ }
291
+ }
292
+ return message;
293
+ }
294
+ internalBinaryWrite(message: Blob, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
295
+ /* bytes data = 1; */
296
+ if (message.data.length)
297
+ writer.tag(1, WireType.LengthDelimited).bytes(message.data);
298
+ let u = options.writeUnknownFields;
299
+ if (u !== false)
300
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
301
+ return writer;
302
+ }
303
+ }
304
+ /**
305
+ * @generated MessageType for protobuf message snowballr.Blob
306
+ */
307
+ export const Blob = new Blob$Type();
308
+ // @generated message type with reflection information, may provide speed optimized methods
309
+ class Link$Type extends MessageType<Link> {
310
+ constructor() {
311
+ super("snowballr.Link", [
312
+ { no: 1, name: "label", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
313
+ { no: 2, name: "url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
314
+ ]);
315
+ }
316
+ create(value?: PartialMessage<Link>): Link {
317
+ const message = globalThis.Object.create((this.messagePrototype!));
318
+ message.label = "";
319
+ message.url = "";
320
+ if (value !== undefined)
321
+ reflectionMergePartial<Link>(this, message, value);
322
+ return message;
323
+ }
324
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Link): Link {
325
+ let message = target ?? this.create(), end = reader.pos + length;
326
+ while (reader.pos < end) {
327
+ let [fieldNo, wireType] = reader.tag();
328
+ switch (fieldNo) {
329
+ case /* string label */ 1:
330
+ message.label = reader.string();
331
+ break;
332
+ case /* string url */ 2:
333
+ message.url = reader.string();
334
+ break;
335
+ default:
336
+ let u = options.readUnknownField;
337
+ if (u === "throw")
338
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
339
+ let d = reader.skip(wireType);
340
+ if (u !== false)
341
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
342
+ }
343
+ }
344
+ return message;
345
+ }
346
+ internalBinaryWrite(message: Link, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
347
+ /* string label = 1; */
348
+ if (message.label !== "")
349
+ writer.tag(1, WireType.LengthDelimited).string(message.label);
350
+ /* string url = 2; */
351
+ if (message.url !== "")
352
+ writer.tag(2, WireType.LengthDelimited).string(message.url);
353
+ let u = options.writeUnknownFields;
354
+ if (u !== false)
355
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
356
+ return writer;
357
+ }
358
+ }
359
+ /**
360
+ * @generated MessageType for protobuf message snowballr.Link
361
+ */
362
+ export const Link = new Link$Type();