@stanterprise/protobuf 0.0.5 → 0.0.6
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 +129 -1
- package/dist/index.d.ts +2 -407
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1315 -737
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1300 -727
- package/dist/index.mjs.map +1 -1
- package/dist/lib/google/protobuf/timestamp.d.ts +33 -0
- package/dist/lib/google/protobuf/timestamp.d.ts.map +1 -0
- package/dist/lib/index.d.ts +6 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/testsystem/v1/common/common.d.ts +57 -0
- package/dist/lib/testsystem/v1/common/common.d.ts.map +1 -0
- package/dist/lib/testsystem/v1/entities/entities.d.ts +108 -0
- package/dist/lib/testsystem/v1/entities/entities.d.ts.map +1 -0
- package/dist/lib/testsystem/v1/events/events.d.ts +154 -0
- package/dist/lib/testsystem/v1/events/events.d.ts.map +1 -0
- package/dist/lib/testsystem/v1/observer/observer.d.ts +92 -0
- package/dist/lib/testsystem/v1/observer/observer.d.ts.map +1 -0
- package/lib/google/protobuf/timestamp.ts +98 -0
- package/lib/index.ts +5 -0
- package/lib/testsystem/v1/common/common.ts +171 -0
- package/lib/testsystem/v1/entities/entities.ts +405 -0
- package/lib/testsystem/v1/events/events.ts +573 -0
- package/lib/testsystem/v1/observer/observer.ts +209 -0
- package/package.json +22 -11
- package/dist/index.d.mts +0 -407
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by the protoc-gen-ts. DO NOT EDIT!
|
|
3
|
+
* compiler version: 3.19.1
|
|
4
|
+
* source: testsystem/v1/entities/entities.proto
|
|
5
|
+
* git: https://github.com/thesayyn/protoc-gen-ts */
|
|
6
|
+
import * as pb_1 from "google-protobuf";
|
|
7
|
+
export namespace testsystem.v1.entities {
|
|
8
|
+
export class TestScript extends pb_1.Message {
|
|
9
|
+
#one_of_decls: number[][] = [[6]];
|
|
10
|
+
constructor(data?: any[] | ({
|
|
11
|
+
id?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
steps?: string[];
|
|
15
|
+
metadata?: Map<string, string>;
|
|
16
|
+
} & (({
|
|
17
|
+
is_active?: boolean;
|
|
18
|
+
})))) {
|
|
19
|
+
super();
|
|
20
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4], this.#one_of_decls);
|
|
21
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
22
|
+
if ("id" in data && data.id != undefined) {
|
|
23
|
+
this.id = data.id;
|
|
24
|
+
}
|
|
25
|
+
if ("name" in data && data.name != undefined) {
|
|
26
|
+
this.name = data.name;
|
|
27
|
+
}
|
|
28
|
+
if ("description" in data && data.description != undefined) {
|
|
29
|
+
this.description = data.description;
|
|
30
|
+
}
|
|
31
|
+
if ("steps" in data && data.steps != undefined) {
|
|
32
|
+
this.steps = data.steps;
|
|
33
|
+
}
|
|
34
|
+
if ("metadata" in data && data.metadata != undefined) {
|
|
35
|
+
this.metadata = data.metadata;
|
|
36
|
+
}
|
|
37
|
+
if ("is_active" in data && data.is_active != undefined) {
|
|
38
|
+
this.is_active = data.is_active;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if (!this.metadata)
|
|
42
|
+
this.metadata = new Map();
|
|
43
|
+
}
|
|
44
|
+
get id() {
|
|
45
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
46
|
+
}
|
|
47
|
+
set id(value: string) {
|
|
48
|
+
pb_1.Message.setField(this, 1, value);
|
|
49
|
+
}
|
|
50
|
+
get name() {
|
|
51
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
|
|
52
|
+
}
|
|
53
|
+
set name(value: string) {
|
|
54
|
+
pb_1.Message.setField(this, 2, value);
|
|
55
|
+
}
|
|
56
|
+
get description() {
|
|
57
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
|
|
58
|
+
}
|
|
59
|
+
set description(value: string) {
|
|
60
|
+
pb_1.Message.setField(this, 3, value);
|
|
61
|
+
}
|
|
62
|
+
get steps() {
|
|
63
|
+
return pb_1.Message.getFieldWithDefault(this, 4, []) as string[];
|
|
64
|
+
}
|
|
65
|
+
set steps(value: string[]) {
|
|
66
|
+
pb_1.Message.setField(this, 4, value);
|
|
67
|
+
}
|
|
68
|
+
get metadata() {
|
|
69
|
+
return pb_1.Message.getField(this, 5) as any as Map<string, string>;
|
|
70
|
+
}
|
|
71
|
+
set metadata(value: Map<string, string>) {
|
|
72
|
+
pb_1.Message.setField(this, 5, value as any);
|
|
73
|
+
}
|
|
74
|
+
get is_active() {
|
|
75
|
+
return pb_1.Message.getFieldWithDefault(this, 6, false) as boolean;
|
|
76
|
+
}
|
|
77
|
+
set is_active(value: boolean) {
|
|
78
|
+
pb_1.Message.setOneofField(this, 6, this.#one_of_decls[0], value);
|
|
79
|
+
}
|
|
80
|
+
get has_is_active() {
|
|
81
|
+
return pb_1.Message.getField(this, 6) != null;
|
|
82
|
+
}
|
|
83
|
+
get _is_active() {
|
|
84
|
+
const cases: {
|
|
85
|
+
[index: number]: "none" | "is_active";
|
|
86
|
+
} = {
|
|
87
|
+
0: "none",
|
|
88
|
+
6: "is_active"
|
|
89
|
+
};
|
|
90
|
+
return cases[pb_1.Message.computeOneofCase(this, [6])];
|
|
91
|
+
}
|
|
92
|
+
static fromObject(data: {
|
|
93
|
+
id?: string;
|
|
94
|
+
name?: string;
|
|
95
|
+
description?: string;
|
|
96
|
+
steps?: string[];
|
|
97
|
+
metadata?: {
|
|
98
|
+
[key: string]: string;
|
|
99
|
+
};
|
|
100
|
+
is_active?: boolean;
|
|
101
|
+
}): TestScript {
|
|
102
|
+
const message = new TestScript({});
|
|
103
|
+
if (data.id != null) {
|
|
104
|
+
message.id = data.id;
|
|
105
|
+
}
|
|
106
|
+
if (data.name != null) {
|
|
107
|
+
message.name = data.name;
|
|
108
|
+
}
|
|
109
|
+
if (data.description != null) {
|
|
110
|
+
message.description = data.description;
|
|
111
|
+
}
|
|
112
|
+
if (data.steps != null) {
|
|
113
|
+
message.steps = data.steps;
|
|
114
|
+
}
|
|
115
|
+
if (typeof data.metadata == "object") {
|
|
116
|
+
message.metadata = new Map(Object.entries(data.metadata));
|
|
117
|
+
}
|
|
118
|
+
if (data.is_active != null) {
|
|
119
|
+
message.is_active = data.is_active;
|
|
120
|
+
}
|
|
121
|
+
return message;
|
|
122
|
+
}
|
|
123
|
+
toObject() {
|
|
124
|
+
const data: {
|
|
125
|
+
id?: string;
|
|
126
|
+
name?: string;
|
|
127
|
+
description?: string;
|
|
128
|
+
steps?: string[];
|
|
129
|
+
metadata?: {
|
|
130
|
+
[key: string]: string;
|
|
131
|
+
};
|
|
132
|
+
is_active?: boolean;
|
|
133
|
+
} = {};
|
|
134
|
+
if (this.id != null) {
|
|
135
|
+
data.id = this.id;
|
|
136
|
+
}
|
|
137
|
+
if (this.name != null) {
|
|
138
|
+
data.name = this.name;
|
|
139
|
+
}
|
|
140
|
+
if (this.description != null) {
|
|
141
|
+
data.description = this.description;
|
|
142
|
+
}
|
|
143
|
+
if (this.steps != null) {
|
|
144
|
+
data.steps = this.steps;
|
|
145
|
+
}
|
|
146
|
+
if (this.metadata != null) {
|
|
147
|
+
data.metadata = (Object.fromEntries)(this.metadata);
|
|
148
|
+
}
|
|
149
|
+
if (this.is_active != null) {
|
|
150
|
+
data.is_active = this.is_active;
|
|
151
|
+
}
|
|
152
|
+
return data;
|
|
153
|
+
}
|
|
154
|
+
serialize(): Uint8Array;
|
|
155
|
+
serialize(w: pb_1.BinaryWriter): void;
|
|
156
|
+
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
|
157
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
158
|
+
if (this.id.length)
|
|
159
|
+
writer.writeString(1, this.id);
|
|
160
|
+
if (this.name.length)
|
|
161
|
+
writer.writeString(2, this.name);
|
|
162
|
+
if (this.description.length)
|
|
163
|
+
writer.writeString(3, this.description);
|
|
164
|
+
if (this.steps.length)
|
|
165
|
+
writer.writeRepeatedString(4, this.steps);
|
|
166
|
+
for (const [key, value] of this.metadata) {
|
|
167
|
+
writer.writeMessage(5, this.metadata, () => {
|
|
168
|
+
writer.writeString(1, key);
|
|
169
|
+
writer.writeString(2, value);
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
if (this.has_is_active)
|
|
173
|
+
writer.writeBool(6, this.is_active);
|
|
174
|
+
if (!w)
|
|
175
|
+
return writer.getResultBuffer();
|
|
176
|
+
}
|
|
177
|
+
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TestScript {
|
|
178
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TestScript();
|
|
179
|
+
while (reader.nextField()) {
|
|
180
|
+
if (reader.isEndGroup())
|
|
181
|
+
break;
|
|
182
|
+
switch (reader.getFieldNumber()) {
|
|
183
|
+
case 1:
|
|
184
|
+
message.id = reader.readString();
|
|
185
|
+
break;
|
|
186
|
+
case 2:
|
|
187
|
+
message.name = reader.readString();
|
|
188
|
+
break;
|
|
189
|
+
case 3:
|
|
190
|
+
message.description = reader.readString();
|
|
191
|
+
break;
|
|
192
|
+
case 4:
|
|
193
|
+
pb_1.Message.addToRepeatedField(message, 4, reader.readString());
|
|
194
|
+
break;
|
|
195
|
+
case 5:
|
|
196
|
+
reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.metadata as any, reader, reader.readString, reader.readString));
|
|
197
|
+
break;
|
|
198
|
+
case 6:
|
|
199
|
+
message.is_active = reader.readBool();
|
|
200
|
+
break;
|
|
201
|
+
default: reader.skipField();
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
return message;
|
|
205
|
+
}
|
|
206
|
+
serializeBinary(): Uint8Array {
|
|
207
|
+
return this.serialize();
|
|
208
|
+
}
|
|
209
|
+
static deserializeBinary(bytes: Uint8Array): TestScript {
|
|
210
|
+
return TestScript.deserialize(bytes);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
export class TestSuite extends pb_1.Message {
|
|
214
|
+
#one_of_decls: number[][] = [];
|
|
215
|
+
constructor(data?: any[] | {
|
|
216
|
+
id?: string;
|
|
217
|
+
name?: string;
|
|
218
|
+
scripts?: TestScript[];
|
|
219
|
+
description?: string;
|
|
220
|
+
metadata?: Map<string, string>;
|
|
221
|
+
sub_suites?: TestSuite[];
|
|
222
|
+
}) {
|
|
223
|
+
super();
|
|
224
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 6], this.#one_of_decls);
|
|
225
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
226
|
+
if ("id" in data && data.id != undefined) {
|
|
227
|
+
this.id = data.id;
|
|
228
|
+
}
|
|
229
|
+
if ("name" in data && data.name != undefined) {
|
|
230
|
+
this.name = data.name;
|
|
231
|
+
}
|
|
232
|
+
if ("scripts" in data && data.scripts != undefined) {
|
|
233
|
+
this.scripts = data.scripts;
|
|
234
|
+
}
|
|
235
|
+
if ("description" in data && data.description != undefined) {
|
|
236
|
+
this.description = data.description;
|
|
237
|
+
}
|
|
238
|
+
if ("metadata" in data && data.metadata != undefined) {
|
|
239
|
+
this.metadata = data.metadata;
|
|
240
|
+
}
|
|
241
|
+
if ("sub_suites" in data && data.sub_suites != undefined) {
|
|
242
|
+
this.sub_suites = data.sub_suites;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
if (!this.metadata)
|
|
246
|
+
this.metadata = new Map();
|
|
247
|
+
}
|
|
248
|
+
get id() {
|
|
249
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
250
|
+
}
|
|
251
|
+
set id(value: string) {
|
|
252
|
+
pb_1.Message.setField(this, 1, value);
|
|
253
|
+
}
|
|
254
|
+
get name() {
|
|
255
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
|
|
256
|
+
}
|
|
257
|
+
set name(value: string) {
|
|
258
|
+
pb_1.Message.setField(this, 2, value);
|
|
259
|
+
}
|
|
260
|
+
get scripts() {
|
|
261
|
+
return pb_1.Message.getRepeatedWrapperField(this, TestScript, 3) as TestScript[];
|
|
262
|
+
}
|
|
263
|
+
set scripts(value: TestScript[]) {
|
|
264
|
+
pb_1.Message.setRepeatedWrapperField(this, 3, value);
|
|
265
|
+
}
|
|
266
|
+
get description() {
|
|
267
|
+
return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
|
|
268
|
+
}
|
|
269
|
+
set description(value: string) {
|
|
270
|
+
pb_1.Message.setField(this, 4, value);
|
|
271
|
+
}
|
|
272
|
+
get metadata() {
|
|
273
|
+
return pb_1.Message.getField(this, 5) as any as Map<string, string>;
|
|
274
|
+
}
|
|
275
|
+
set metadata(value: Map<string, string>) {
|
|
276
|
+
pb_1.Message.setField(this, 5, value as any);
|
|
277
|
+
}
|
|
278
|
+
get sub_suites() {
|
|
279
|
+
return pb_1.Message.getRepeatedWrapperField(this, TestSuite, 6) as TestSuite[];
|
|
280
|
+
}
|
|
281
|
+
set sub_suites(value: TestSuite[]) {
|
|
282
|
+
pb_1.Message.setRepeatedWrapperField(this, 6, value);
|
|
283
|
+
}
|
|
284
|
+
static fromObject(data: {
|
|
285
|
+
id?: string;
|
|
286
|
+
name?: string;
|
|
287
|
+
scripts?: ReturnType<typeof TestScript.prototype.toObject>[];
|
|
288
|
+
description?: string;
|
|
289
|
+
metadata?: {
|
|
290
|
+
[key: string]: string;
|
|
291
|
+
};
|
|
292
|
+
sub_suites?: ReturnType<typeof TestSuite.prototype.toObject>[];
|
|
293
|
+
}): TestSuite {
|
|
294
|
+
const message = new TestSuite({});
|
|
295
|
+
if (data.id != null) {
|
|
296
|
+
message.id = data.id;
|
|
297
|
+
}
|
|
298
|
+
if (data.name != null) {
|
|
299
|
+
message.name = data.name;
|
|
300
|
+
}
|
|
301
|
+
if (data.scripts != null) {
|
|
302
|
+
message.scripts = data.scripts.map(item => TestScript.fromObject(item));
|
|
303
|
+
}
|
|
304
|
+
if (data.description != null) {
|
|
305
|
+
message.description = data.description;
|
|
306
|
+
}
|
|
307
|
+
if (typeof data.metadata == "object") {
|
|
308
|
+
message.metadata = new Map(Object.entries(data.metadata));
|
|
309
|
+
}
|
|
310
|
+
if (data.sub_suites != null) {
|
|
311
|
+
message.sub_suites = data.sub_suites.map(item => TestSuite.fromObject(item));
|
|
312
|
+
}
|
|
313
|
+
return message;
|
|
314
|
+
}
|
|
315
|
+
toObject() {
|
|
316
|
+
const data: {
|
|
317
|
+
id?: string;
|
|
318
|
+
name?: string;
|
|
319
|
+
scripts?: ReturnType<typeof TestScript.prototype.toObject>[];
|
|
320
|
+
description?: string;
|
|
321
|
+
metadata?: {
|
|
322
|
+
[key: string]: string;
|
|
323
|
+
};
|
|
324
|
+
sub_suites?: ReturnType<typeof TestSuite.prototype.toObject>[];
|
|
325
|
+
} = {};
|
|
326
|
+
if (this.id != null) {
|
|
327
|
+
data.id = this.id;
|
|
328
|
+
}
|
|
329
|
+
if (this.name != null) {
|
|
330
|
+
data.name = this.name;
|
|
331
|
+
}
|
|
332
|
+
if (this.scripts != null) {
|
|
333
|
+
data.scripts = this.scripts.map((item: TestScript) => item.toObject());
|
|
334
|
+
}
|
|
335
|
+
if (this.description != null) {
|
|
336
|
+
data.description = this.description;
|
|
337
|
+
}
|
|
338
|
+
if (this.metadata != null) {
|
|
339
|
+
data.metadata = (Object.fromEntries)(this.metadata);
|
|
340
|
+
}
|
|
341
|
+
if (this.sub_suites != null) {
|
|
342
|
+
data.sub_suites = this.sub_suites.map((item: TestSuite) => item.toObject());
|
|
343
|
+
}
|
|
344
|
+
return data;
|
|
345
|
+
}
|
|
346
|
+
serialize(): Uint8Array;
|
|
347
|
+
serialize(w: pb_1.BinaryWriter): void;
|
|
348
|
+
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
|
349
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
350
|
+
if (this.id.length)
|
|
351
|
+
writer.writeString(1, this.id);
|
|
352
|
+
if (this.name.length)
|
|
353
|
+
writer.writeString(2, this.name);
|
|
354
|
+
if (this.scripts.length)
|
|
355
|
+
writer.writeRepeatedMessage(3, this.scripts, (item: TestScript) => item.serialize(writer));
|
|
356
|
+
if (this.description.length)
|
|
357
|
+
writer.writeString(4, this.description);
|
|
358
|
+
for (const [key, value] of this.metadata) {
|
|
359
|
+
writer.writeMessage(5, this.metadata, () => {
|
|
360
|
+
writer.writeString(1, key);
|
|
361
|
+
writer.writeString(2, value);
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
if (this.sub_suites.length)
|
|
365
|
+
writer.writeRepeatedMessage(6, this.sub_suites, (item: TestSuite) => item.serialize(writer));
|
|
366
|
+
if (!w)
|
|
367
|
+
return writer.getResultBuffer();
|
|
368
|
+
}
|
|
369
|
+
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TestSuite {
|
|
370
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TestSuite();
|
|
371
|
+
while (reader.nextField()) {
|
|
372
|
+
if (reader.isEndGroup())
|
|
373
|
+
break;
|
|
374
|
+
switch (reader.getFieldNumber()) {
|
|
375
|
+
case 1:
|
|
376
|
+
message.id = reader.readString();
|
|
377
|
+
break;
|
|
378
|
+
case 2:
|
|
379
|
+
message.name = reader.readString();
|
|
380
|
+
break;
|
|
381
|
+
case 3:
|
|
382
|
+
reader.readMessage(message.scripts, () => pb_1.Message.addToRepeatedWrapperField(message, 3, TestScript.deserialize(reader), TestScript));
|
|
383
|
+
break;
|
|
384
|
+
case 4:
|
|
385
|
+
message.description = reader.readString();
|
|
386
|
+
break;
|
|
387
|
+
case 5:
|
|
388
|
+
reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.metadata as any, reader, reader.readString, reader.readString));
|
|
389
|
+
break;
|
|
390
|
+
case 6:
|
|
391
|
+
reader.readMessage(message.sub_suites, () => pb_1.Message.addToRepeatedWrapperField(message, 6, TestSuite.deserialize(reader), TestSuite));
|
|
392
|
+
break;
|
|
393
|
+
default: reader.skipField();
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
return message;
|
|
397
|
+
}
|
|
398
|
+
serializeBinary(): Uint8Array {
|
|
399
|
+
return this.serialize();
|
|
400
|
+
}
|
|
401
|
+
static deserializeBinary(bytes: Uint8Array): TestSuite {
|
|
402
|
+
return TestSuite.deserialize(bytes);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
}
|