@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/CHANGELOG.md +58 -0
- package/LICENSE +674 -0
- package/README.md +6 -2
- package/dist/.gitkeep +0 -0
- package/dist/authentication.ts +525 -0
- package/dist/base.ts +362 -0
- package/dist/criterion.ts +390 -0
- package/dist/export.ts +213 -0
- package/dist/fetcher.ts +408 -0
- package/dist/google/protobuf/field_mask.ts +334 -0
- package/dist/google/protobuf/timestamp.ts +288 -0
- package/dist/main.client.ts +3197 -0
- package/dist/main.ts +140 -0
- package/dist/paper.ts +581 -0
- package/dist/project.ts +2110 -0
- package/dist/review.ts +349 -0
- package/dist/user.ts +316 -0
- package/dist/user_settings.ts +178 -0
- package/package.json +34 -5
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter generate_dependencies
|
|
2
|
+
// @generated from protobuf file "criterion.proto" (package "snowballr", syntax proto3)
|
|
3
|
+
// tslint:disable
|
|
4
|
+
//
|
|
5
|
+
/// Criterion related messages and enums of the SnowballR app.
|
|
6
|
+
//
|
|
7
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
8
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
9
|
+
import { WireType } 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
|
+
import { FieldMask } from "./google/protobuf/field_mask";
|
|
17
|
+
/**
|
|
18
|
+
* There are two types of criteria that must be differentiated: user- and
|
|
19
|
+
* project-criteria. A user-criterion has a user but no project attached to it
|
|
20
|
+
* and can be used for the creation of default criteria for a project in the
|
|
21
|
+
* user settings.
|
|
22
|
+
* A project-criterion on the other hand is associated with a project and
|
|
23
|
+
* provide the basis for justifying reviews.
|
|
24
|
+
*
|
|
25
|
+
* @generated from protobuf message snowballr.Criterion
|
|
26
|
+
*/
|
|
27
|
+
export interface Criterion {
|
|
28
|
+
/**
|
|
29
|
+
* @generated from protobuf field: string id = 1
|
|
30
|
+
*/
|
|
31
|
+
id: string;
|
|
32
|
+
/**
|
|
33
|
+
* @generated from protobuf field: string tag = 2
|
|
34
|
+
*/
|
|
35
|
+
tag: string;
|
|
36
|
+
/**
|
|
37
|
+
* @generated from protobuf field: string name = 3
|
|
38
|
+
*/
|
|
39
|
+
name: string;
|
|
40
|
+
/**
|
|
41
|
+
* @generated from protobuf field: string description = 4
|
|
42
|
+
*/
|
|
43
|
+
description: string;
|
|
44
|
+
/**
|
|
45
|
+
* @generated from protobuf field: snowballr.CriterionCategory category = 5
|
|
46
|
+
*/
|
|
47
|
+
category: CriterionCategory;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* List of criteria.
|
|
51
|
+
*
|
|
52
|
+
* @generated from protobuf message snowballr.Criterion.List
|
|
53
|
+
*/
|
|
54
|
+
export interface Criterion_List {
|
|
55
|
+
/**
|
|
56
|
+
* @generated from protobuf field: repeated snowballr.Criterion criteria = 1
|
|
57
|
+
*/
|
|
58
|
+
criteria: Criterion[];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Request to create a criterion.
|
|
62
|
+
*
|
|
63
|
+
* @generated from protobuf message snowballr.Criterion.Create
|
|
64
|
+
*/
|
|
65
|
+
export interface Criterion_Create {
|
|
66
|
+
/**
|
|
67
|
+
* @generated from protobuf field: string project_id = 1
|
|
68
|
+
*/
|
|
69
|
+
projectId: string;
|
|
70
|
+
/**
|
|
71
|
+
* @generated from protobuf field: string tag = 2
|
|
72
|
+
*/
|
|
73
|
+
tag: string;
|
|
74
|
+
/**
|
|
75
|
+
* @generated from protobuf field: string name = 3
|
|
76
|
+
*/
|
|
77
|
+
name: string;
|
|
78
|
+
/**
|
|
79
|
+
* @generated from protobuf field: string description = 4
|
|
80
|
+
*/
|
|
81
|
+
description: string;
|
|
82
|
+
/**
|
|
83
|
+
* @generated from protobuf field: snowballr.CriterionCategory category = 5
|
|
84
|
+
*/
|
|
85
|
+
category: CriterionCategory;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Request to update a criterion.
|
|
89
|
+
*
|
|
90
|
+
* @generated from protobuf message snowballr.Criterion.Update
|
|
91
|
+
*/
|
|
92
|
+
export interface Criterion_Update {
|
|
93
|
+
/**
|
|
94
|
+
* @generated from protobuf field: snowballr.Criterion criterion = 1
|
|
95
|
+
*/
|
|
96
|
+
criterion?: Criterion;
|
|
97
|
+
/**
|
|
98
|
+
* @generated from protobuf field: google.protobuf.FieldMask mask = 2
|
|
99
|
+
*/
|
|
100
|
+
mask?: FieldMask;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Category of a criterion, it can only be ever one of it.
|
|
104
|
+
*
|
|
105
|
+
* @generated from protobuf enum snowballr.CriterionCategory
|
|
106
|
+
*/
|
|
107
|
+
export enum CriterionCategory {
|
|
108
|
+
/**
|
|
109
|
+
* Unspecified criterion category.
|
|
110
|
+
*
|
|
111
|
+
* @generated from protobuf enum value: CRITERION_CATEGORY_UNSPECIFIED = 0;
|
|
112
|
+
*/
|
|
113
|
+
UNSPECIFIED = 0,
|
|
114
|
+
/**
|
|
115
|
+
* If this criterion is fulfilled, the paper should be accepted.
|
|
116
|
+
*
|
|
117
|
+
* @generated from protobuf enum value: CRITERION_CATEGORY_INCLUSION = 1;
|
|
118
|
+
*/
|
|
119
|
+
INCLUSION = 1,
|
|
120
|
+
/**
|
|
121
|
+
* If this criterion is fulfilled, the paper should be declined.
|
|
122
|
+
*
|
|
123
|
+
* @generated from protobuf enum value: CRITERION_CATEGORY_EXCLUSION = 2;
|
|
124
|
+
*/
|
|
125
|
+
EXCLUSION = 2,
|
|
126
|
+
/**
|
|
127
|
+
* If this criterion is fulfilled, the paper is definitely declined.
|
|
128
|
+
*
|
|
129
|
+
* @generated from protobuf enum value: CRITERION_CATEGORY_HARD_EXCLUSION = 3;
|
|
130
|
+
*/
|
|
131
|
+
HARD_EXCLUSION = 3
|
|
132
|
+
}
|
|
133
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
134
|
+
class Criterion$Type extends MessageType<Criterion> {
|
|
135
|
+
constructor() {
|
|
136
|
+
super("snowballr.Criterion", [
|
|
137
|
+
{ no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
138
|
+
{ no: 2, name: "tag", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
139
|
+
{ no: 3, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
140
|
+
{ no: 4, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
141
|
+
{ no: 5, name: "category", kind: "enum", T: () => ["snowballr.CriterionCategory", CriterionCategory, "CRITERION_CATEGORY_"] }
|
|
142
|
+
]);
|
|
143
|
+
}
|
|
144
|
+
create(value?: PartialMessage<Criterion>): Criterion {
|
|
145
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
146
|
+
message.id = "";
|
|
147
|
+
message.tag = "";
|
|
148
|
+
message.name = "";
|
|
149
|
+
message.description = "";
|
|
150
|
+
message.category = 0;
|
|
151
|
+
if (value !== undefined)
|
|
152
|
+
reflectionMergePartial<Criterion>(this, message, value);
|
|
153
|
+
return message;
|
|
154
|
+
}
|
|
155
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Criterion): Criterion {
|
|
156
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
157
|
+
while (reader.pos < end) {
|
|
158
|
+
let [fieldNo, wireType] = reader.tag();
|
|
159
|
+
switch (fieldNo) {
|
|
160
|
+
case /* string id */ 1:
|
|
161
|
+
message.id = reader.string();
|
|
162
|
+
break;
|
|
163
|
+
case /* string tag */ 2:
|
|
164
|
+
message.tag = reader.string();
|
|
165
|
+
break;
|
|
166
|
+
case /* string name */ 3:
|
|
167
|
+
message.name = reader.string();
|
|
168
|
+
break;
|
|
169
|
+
case /* string description */ 4:
|
|
170
|
+
message.description = reader.string();
|
|
171
|
+
break;
|
|
172
|
+
case /* snowballr.CriterionCategory category */ 5:
|
|
173
|
+
message.category = reader.int32();
|
|
174
|
+
break;
|
|
175
|
+
default:
|
|
176
|
+
let u = options.readUnknownField;
|
|
177
|
+
if (u === "throw")
|
|
178
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
179
|
+
let d = reader.skip(wireType);
|
|
180
|
+
if (u !== false)
|
|
181
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return message;
|
|
185
|
+
}
|
|
186
|
+
internalBinaryWrite(message: Criterion, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
187
|
+
/* string id = 1; */
|
|
188
|
+
if (message.id !== "")
|
|
189
|
+
writer.tag(1, WireType.LengthDelimited).string(message.id);
|
|
190
|
+
/* string tag = 2; */
|
|
191
|
+
if (message.tag !== "")
|
|
192
|
+
writer.tag(2, WireType.LengthDelimited).string(message.tag);
|
|
193
|
+
/* string name = 3; */
|
|
194
|
+
if (message.name !== "")
|
|
195
|
+
writer.tag(3, WireType.LengthDelimited).string(message.name);
|
|
196
|
+
/* string description = 4; */
|
|
197
|
+
if (message.description !== "")
|
|
198
|
+
writer.tag(4, WireType.LengthDelimited).string(message.description);
|
|
199
|
+
/* snowballr.CriterionCategory category = 5; */
|
|
200
|
+
if (message.category !== 0)
|
|
201
|
+
writer.tag(5, WireType.Varint).int32(message.category);
|
|
202
|
+
let u = options.writeUnknownFields;
|
|
203
|
+
if (u !== false)
|
|
204
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
205
|
+
return writer;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* @generated MessageType for protobuf message snowballr.Criterion
|
|
210
|
+
*/
|
|
211
|
+
export const Criterion = new Criterion$Type();
|
|
212
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
213
|
+
class Criterion_List$Type extends MessageType<Criterion_List> {
|
|
214
|
+
constructor() {
|
|
215
|
+
super("snowballr.Criterion.List", [
|
|
216
|
+
{ no: 1, name: "criteria", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Criterion }
|
|
217
|
+
]);
|
|
218
|
+
}
|
|
219
|
+
create(value?: PartialMessage<Criterion_List>): Criterion_List {
|
|
220
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
221
|
+
message.criteria = [];
|
|
222
|
+
if (value !== undefined)
|
|
223
|
+
reflectionMergePartial<Criterion_List>(this, message, value);
|
|
224
|
+
return message;
|
|
225
|
+
}
|
|
226
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Criterion_List): Criterion_List {
|
|
227
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
228
|
+
while (reader.pos < end) {
|
|
229
|
+
let [fieldNo, wireType] = reader.tag();
|
|
230
|
+
switch (fieldNo) {
|
|
231
|
+
case /* repeated snowballr.Criterion criteria */ 1:
|
|
232
|
+
message.criteria.push(Criterion.internalBinaryRead(reader, reader.uint32(), options));
|
|
233
|
+
break;
|
|
234
|
+
default:
|
|
235
|
+
let u = options.readUnknownField;
|
|
236
|
+
if (u === "throw")
|
|
237
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
238
|
+
let d = reader.skip(wireType);
|
|
239
|
+
if (u !== false)
|
|
240
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
return message;
|
|
244
|
+
}
|
|
245
|
+
internalBinaryWrite(message: Criterion_List, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
246
|
+
/* repeated snowballr.Criterion criteria = 1; */
|
|
247
|
+
for (let i = 0; i < message.criteria.length; i++)
|
|
248
|
+
Criterion.internalBinaryWrite(message.criteria[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
249
|
+
let u = options.writeUnknownFields;
|
|
250
|
+
if (u !== false)
|
|
251
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
252
|
+
return writer;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* @generated MessageType for protobuf message snowballr.Criterion.List
|
|
257
|
+
*/
|
|
258
|
+
export const Criterion_List = new Criterion_List$Type();
|
|
259
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
260
|
+
class Criterion_Create$Type extends MessageType<Criterion_Create> {
|
|
261
|
+
constructor() {
|
|
262
|
+
super("snowballr.Criterion.Create", [
|
|
263
|
+
{ no: 1, name: "project_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
264
|
+
{ no: 2, name: "tag", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
265
|
+
{ no: 3, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
266
|
+
{ no: 4, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
267
|
+
{ no: 5, name: "category", kind: "enum", T: () => ["snowballr.CriterionCategory", CriterionCategory, "CRITERION_CATEGORY_"] }
|
|
268
|
+
]);
|
|
269
|
+
}
|
|
270
|
+
create(value?: PartialMessage<Criterion_Create>): Criterion_Create {
|
|
271
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
272
|
+
message.projectId = "";
|
|
273
|
+
message.tag = "";
|
|
274
|
+
message.name = "";
|
|
275
|
+
message.description = "";
|
|
276
|
+
message.category = 0;
|
|
277
|
+
if (value !== undefined)
|
|
278
|
+
reflectionMergePartial<Criterion_Create>(this, message, value);
|
|
279
|
+
return message;
|
|
280
|
+
}
|
|
281
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Criterion_Create): Criterion_Create {
|
|
282
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
283
|
+
while (reader.pos < end) {
|
|
284
|
+
let [fieldNo, wireType] = reader.tag();
|
|
285
|
+
switch (fieldNo) {
|
|
286
|
+
case /* string project_id */ 1:
|
|
287
|
+
message.projectId = reader.string();
|
|
288
|
+
break;
|
|
289
|
+
case /* string tag */ 2:
|
|
290
|
+
message.tag = reader.string();
|
|
291
|
+
break;
|
|
292
|
+
case /* string name */ 3:
|
|
293
|
+
message.name = reader.string();
|
|
294
|
+
break;
|
|
295
|
+
case /* string description */ 4:
|
|
296
|
+
message.description = reader.string();
|
|
297
|
+
break;
|
|
298
|
+
case /* snowballr.CriterionCategory category */ 5:
|
|
299
|
+
message.category = reader.int32();
|
|
300
|
+
break;
|
|
301
|
+
default:
|
|
302
|
+
let u = options.readUnknownField;
|
|
303
|
+
if (u === "throw")
|
|
304
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
305
|
+
let d = reader.skip(wireType);
|
|
306
|
+
if (u !== false)
|
|
307
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
return message;
|
|
311
|
+
}
|
|
312
|
+
internalBinaryWrite(message: Criterion_Create, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
313
|
+
/* string project_id = 1; */
|
|
314
|
+
if (message.projectId !== "")
|
|
315
|
+
writer.tag(1, WireType.LengthDelimited).string(message.projectId);
|
|
316
|
+
/* string tag = 2; */
|
|
317
|
+
if (message.tag !== "")
|
|
318
|
+
writer.tag(2, WireType.LengthDelimited).string(message.tag);
|
|
319
|
+
/* string name = 3; */
|
|
320
|
+
if (message.name !== "")
|
|
321
|
+
writer.tag(3, WireType.LengthDelimited).string(message.name);
|
|
322
|
+
/* string description = 4; */
|
|
323
|
+
if (message.description !== "")
|
|
324
|
+
writer.tag(4, WireType.LengthDelimited).string(message.description);
|
|
325
|
+
/* snowballr.CriterionCategory category = 5; */
|
|
326
|
+
if (message.category !== 0)
|
|
327
|
+
writer.tag(5, WireType.Varint).int32(message.category);
|
|
328
|
+
let u = options.writeUnknownFields;
|
|
329
|
+
if (u !== false)
|
|
330
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
331
|
+
return writer;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* @generated MessageType for protobuf message snowballr.Criterion.Create
|
|
336
|
+
*/
|
|
337
|
+
export const Criterion_Create = new Criterion_Create$Type();
|
|
338
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
339
|
+
class Criterion_Update$Type extends MessageType<Criterion_Update> {
|
|
340
|
+
constructor() {
|
|
341
|
+
super("snowballr.Criterion.Update", [
|
|
342
|
+
{ no: 1, name: "criterion", kind: "message", T: () => Criterion },
|
|
343
|
+
{ no: 2, name: "mask", kind: "message", T: () => FieldMask }
|
|
344
|
+
]);
|
|
345
|
+
}
|
|
346
|
+
create(value?: PartialMessage<Criterion_Update>): Criterion_Update {
|
|
347
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
348
|
+
if (value !== undefined)
|
|
349
|
+
reflectionMergePartial<Criterion_Update>(this, message, value);
|
|
350
|
+
return message;
|
|
351
|
+
}
|
|
352
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Criterion_Update): Criterion_Update {
|
|
353
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
354
|
+
while (reader.pos < end) {
|
|
355
|
+
let [fieldNo, wireType] = reader.tag();
|
|
356
|
+
switch (fieldNo) {
|
|
357
|
+
case /* snowballr.Criterion criterion */ 1:
|
|
358
|
+
message.criterion = Criterion.internalBinaryRead(reader, reader.uint32(), options, message.criterion);
|
|
359
|
+
break;
|
|
360
|
+
case /* google.protobuf.FieldMask mask */ 2:
|
|
361
|
+
message.mask = FieldMask.internalBinaryRead(reader, reader.uint32(), options, message.mask);
|
|
362
|
+
break;
|
|
363
|
+
default:
|
|
364
|
+
let u = options.readUnknownField;
|
|
365
|
+
if (u === "throw")
|
|
366
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
367
|
+
let d = reader.skip(wireType);
|
|
368
|
+
if (u !== false)
|
|
369
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
return message;
|
|
373
|
+
}
|
|
374
|
+
internalBinaryWrite(message: Criterion_Update, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
375
|
+
/* snowballr.Criterion criterion = 1; */
|
|
376
|
+
if (message.criterion)
|
|
377
|
+
Criterion.internalBinaryWrite(message.criterion, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
378
|
+
/* google.protobuf.FieldMask mask = 2; */
|
|
379
|
+
if (message.mask)
|
|
380
|
+
FieldMask.internalBinaryWrite(message.mask, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
381
|
+
let u = options.writeUnknownFields;
|
|
382
|
+
if (u !== false)
|
|
383
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
384
|
+
return writer;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* @generated MessageType for protobuf message snowballr.Criterion.Update
|
|
389
|
+
*/
|
|
390
|
+
export const Criterion_Update = new Criterion_Update$Type();
|
package/dist/export.ts
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter generate_dependencies
|
|
2
|
+
// @generated from protobuf file "export.proto" (package "snowballr", syntax proto3)
|
|
3
|
+
// tslint:disable
|
|
4
|
+
//
|
|
5
|
+
/// Export related messages and enums of the SnowballR app.
|
|
6
|
+
//
|
|
7
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
8
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
9
|
+
import { WireType } 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
|
+
* Request to export a project.
|
|
18
|
+
*
|
|
19
|
+
* @generated from protobuf message snowballr.ExportRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface ExportRequest {
|
|
22
|
+
/**
|
|
23
|
+
* @generated from protobuf field: string id = 1
|
|
24
|
+
*/
|
|
25
|
+
id: string;
|
|
26
|
+
/**
|
|
27
|
+
* @generated from protobuf field: string format = 3
|
|
28
|
+
*/
|
|
29
|
+
format: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Response of the exported project.
|
|
33
|
+
*
|
|
34
|
+
* @generated from protobuf message snowballr.ExportResponse
|
|
35
|
+
*/
|
|
36
|
+
export interface ExportResponse {
|
|
37
|
+
/**
|
|
38
|
+
* @generated from protobuf field: bytes data = 1
|
|
39
|
+
*/
|
|
40
|
+
data: Uint8Array;
|
|
41
|
+
/**
|
|
42
|
+
* @generated from protobuf field: string file_name = 2
|
|
43
|
+
*/
|
|
44
|
+
fileName: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Response of available export formats.
|
|
48
|
+
*
|
|
49
|
+
* @generated from protobuf message snowballr.AvailableExportFormatsResponse
|
|
50
|
+
*/
|
|
51
|
+
export interface AvailableExportFormatsResponse {
|
|
52
|
+
/**
|
|
53
|
+
* @generated from protobuf field: repeated string formats = 1
|
|
54
|
+
*/
|
|
55
|
+
formats: string[];
|
|
56
|
+
}
|
|
57
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
58
|
+
class ExportRequest$Type extends MessageType<ExportRequest> {
|
|
59
|
+
constructor() {
|
|
60
|
+
super("snowballr.ExportRequest", [
|
|
61
|
+
{ no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
62
|
+
{ no: 3, name: "format", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
63
|
+
]);
|
|
64
|
+
}
|
|
65
|
+
create(value?: PartialMessage<ExportRequest>): ExportRequest {
|
|
66
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
67
|
+
message.id = "";
|
|
68
|
+
message.format = "";
|
|
69
|
+
if (value !== undefined)
|
|
70
|
+
reflectionMergePartial<ExportRequest>(this, message, value);
|
|
71
|
+
return message;
|
|
72
|
+
}
|
|
73
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExportRequest): ExportRequest {
|
|
74
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
75
|
+
while (reader.pos < end) {
|
|
76
|
+
let [fieldNo, wireType] = reader.tag();
|
|
77
|
+
switch (fieldNo) {
|
|
78
|
+
case /* string id */ 1:
|
|
79
|
+
message.id = reader.string();
|
|
80
|
+
break;
|
|
81
|
+
case /* string format */ 3:
|
|
82
|
+
message.format = reader.string();
|
|
83
|
+
break;
|
|
84
|
+
default:
|
|
85
|
+
let u = options.readUnknownField;
|
|
86
|
+
if (u === "throw")
|
|
87
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
88
|
+
let d = reader.skip(wireType);
|
|
89
|
+
if (u !== false)
|
|
90
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return message;
|
|
94
|
+
}
|
|
95
|
+
internalBinaryWrite(message: ExportRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
96
|
+
/* string id = 1; */
|
|
97
|
+
if (message.id !== "")
|
|
98
|
+
writer.tag(1, WireType.LengthDelimited).string(message.id);
|
|
99
|
+
/* string format = 3; */
|
|
100
|
+
if (message.format !== "")
|
|
101
|
+
writer.tag(3, WireType.LengthDelimited).string(message.format);
|
|
102
|
+
let u = options.writeUnknownFields;
|
|
103
|
+
if (u !== false)
|
|
104
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
105
|
+
return writer;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* @generated MessageType for protobuf message snowballr.ExportRequest
|
|
110
|
+
*/
|
|
111
|
+
export const ExportRequest = new ExportRequest$Type();
|
|
112
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
113
|
+
class ExportResponse$Type extends MessageType<ExportResponse> {
|
|
114
|
+
constructor() {
|
|
115
|
+
super("snowballr.ExportResponse", [
|
|
116
|
+
{ no: 1, name: "data", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
|
117
|
+
{ no: 2, name: "file_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
118
|
+
]);
|
|
119
|
+
}
|
|
120
|
+
create(value?: PartialMessage<ExportResponse>): ExportResponse {
|
|
121
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
122
|
+
message.data = new Uint8Array(0);
|
|
123
|
+
message.fileName = "";
|
|
124
|
+
if (value !== undefined)
|
|
125
|
+
reflectionMergePartial<ExportResponse>(this, message, value);
|
|
126
|
+
return message;
|
|
127
|
+
}
|
|
128
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExportResponse): ExportResponse {
|
|
129
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
130
|
+
while (reader.pos < end) {
|
|
131
|
+
let [fieldNo, wireType] = reader.tag();
|
|
132
|
+
switch (fieldNo) {
|
|
133
|
+
case /* bytes data */ 1:
|
|
134
|
+
message.data = reader.bytes();
|
|
135
|
+
break;
|
|
136
|
+
case /* string file_name */ 2:
|
|
137
|
+
message.fileName = reader.string();
|
|
138
|
+
break;
|
|
139
|
+
default:
|
|
140
|
+
let u = options.readUnknownField;
|
|
141
|
+
if (u === "throw")
|
|
142
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
143
|
+
let d = reader.skip(wireType);
|
|
144
|
+
if (u !== false)
|
|
145
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return message;
|
|
149
|
+
}
|
|
150
|
+
internalBinaryWrite(message: ExportResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
151
|
+
/* bytes data = 1; */
|
|
152
|
+
if (message.data.length)
|
|
153
|
+
writer.tag(1, WireType.LengthDelimited).bytes(message.data);
|
|
154
|
+
/* string file_name = 2; */
|
|
155
|
+
if (message.fileName !== "")
|
|
156
|
+
writer.tag(2, WireType.LengthDelimited).string(message.fileName);
|
|
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.ExportResponse
|
|
165
|
+
*/
|
|
166
|
+
export const ExportResponse = new ExportResponse$Type();
|
|
167
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
168
|
+
class AvailableExportFormatsResponse$Type extends MessageType<AvailableExportFormatsResponse> {
|
|
169
|
+
constructor() {
|
|
170
|
+
super("snowballr.AvailableExportFormatsResponse", [
|
|
171
|
+
{ no: 1, name: "formats", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
|
|
172
|
+
]);
|
|
173
|
+
}
|
|
174
|
+
create(value?: PartialMessage<AvailableExportFormatsResponse>): AvailableExportFormatsResponse {
|
|
175
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
176
|
+
message.formats = [];
|
|
177
|
+
if (value !== undefined)
|
|
178
|
+
reflectionMergePartial<AvailableExportFormatsResponse>(this, message, value);
|
|
179
|
+
return message;
|
|
180
|
+
}
|
|
181
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AvailableExportFormatsResponse): AvailableExportFormatsResponse {
|
|
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 /* repeated string formats */ 1:
|
|
187
|
+
message.formats.push(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: AvailableExportFormatsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
201
|
+
/* repeated string formats = 1; */
|
|
202
|
+
for (let i = 0; i < message.formats.length; i++)
|
|
203
|
+
writer.tag(1, WireType.LengthDelimited).string(message.formats[i]);
|
|
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.AvailableExportFormatsResponse
|
|
212
|
+
*/
|
|
213
|
+
export const AvailableExportFormatsResponse = new AvailableExportFormatsResponse$Type();
|