@technova-tech/olive-proto-lib 1.8.4 → 1.8.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.
@@ -0,0 +1,357 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.google = void 0;
27
+ const pb_1 = __importStar(require("google-protobuf"));
28
+ var google;
29
+ (function (google) {
30
+ var protobuf;
31
+ (function (protobuf) {
32
+ let NullValue;
33
+ (function (NullValue) {
34
+ NullValue[NullValue["NULL_VALUE"] = 0] = "NULL_VALUE";
35
+ })(NullValue = protobuf.NullValue || (protobuf.NullValue = {}));
36
+ class Struct extends pb_1.Message {
37
+ #one_of_decls = [];
38
+ constructor(data) {
39
+ super();
40
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
41
+ if (!Array.isArray(data) && typeof data == "object") {
42
+ if ("fields" in data && data.fields != undefined) {
43
+ this.fields = data.fields;
44
+ }
45
+ }
46
+ if (!this.fields)
47
+ this.fields = new Map();
48
+ }
49
+ get fields() {
50
+ return pb_1.Message.getField(this, 1);
51
+ }
52
+ set fields(value) {
53
+ pb_1.Message.setField(this, 1, value);
54
+ }
55
+ static fromObject(data) {
56
+ const message = new Struct({});
57
+ if (typeof data.fields == "object") {
58
+ message.fields = new Map(Object.entries(data.fields).map(([key, value]) => [key, Value.fromObject(value)]));
59
+ }
60
+ return message;
61
+ }
62
+ toObject() {
63
+ const data = {};
64
+ if (this.fields != null) {
65
+ data.fields = (Object.fromEntries)((Array.from)(this.fields).map(([key, value]) => [key, value.toObject()]));
66
+ }
67
+ return data;
68
+ }
69
+ serialize(w) {
70
+ const writer = w || new pb_1.BinaryWriter();
71
+ for (const [key, value] of this.fields) {
72
+ writer.writeMessage(1, this.fields, () => {
73
+ writer.writeString(1, key);
74
+ writer.writeMessage(2, value, () => value.serialize(writer));
75
+ });
76
+ }
77
+ if (!w)
78
+ return writer.getResultBuffer();
79
+ }
80
+ static deserialize(bytes) {
81
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Struct();
82
+ while (reader.nextField()) {
83
+ if (reader.isEndGroup())
84
+ break;
85
+ switch (reader.getFieldNumber()) {
86
+ case 1:
87
+ reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.fields, reader, reader.readString, () => {
88
+ let value;
89
+ reader.readMessage(message, () => value = Value.deserialize(reader));
90
+ return value;
91
+ }));
92
+ break;
93
+ default: reader.skipField();
94
+ }
95
+ }
96
+ return message;
97
+ }
98
+ serializeBinary() {
99
+ return this.serialize();
100
+ }
101
+ static deserializeBinary(bytes) {
102
+ return Struct.deserialize(bytes);
103
+ }
104
+ }
105
+ protobuf.Struct = Struct;
106
+ class Value extends pb_1.Message {
107
+ #one_of_decls = [[1, 2, 3, 4, 5, 6]];
108
+ constructor(data) {
109
+ super();
110
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
111
+ if (!Array.isArray(data) && typeof data == "object") {
112
+ if ("nullValue" in data && data.nullValue != undefined) {
113
+ this.nullValue = data.nullValue;
114
+ }
115
+ if ("numberValue" in data && data.numberValue != undefined) {
116
+ this.numberValue = data.numberValue;
117
+ }
118
+ if ("stringValue" in data && data.stringValue != undefined) {
119
+ this.stringValue = data.stringValue;
120
+ }
121
+ if ("boolValue" in data && data.boolValue != undefined) {
122
+ this.boolValue = data.boolValue;
123
+ }
124
+ if ("structValue" in data && data.structValue != undefined) {
125
+ this.structValue = data.structValue;
126
+ }
127
+ if ("listValue" in data && data.listValue != undefined) {
128
+ this.listValue = data.listValue;
129
+ }
130
+ }
131
+ }
132
+ get nullValue() {
133
+ return pb_1.Message.getFieldWithDefault(this, 1, NullValue.NULL_VALUE);
134
+ }
135
+ set nullValue(value) {
136
+ pb_1.Message.setOneofField(this, 1, this.#one_of_decls[0], value);
137
+ }
138
+ get hasNullValue() {
139
+ return pb_1.Message.getField(this, 1) != null;
140
+ }
141
+ get numberValue() {
142
+ return pb_1.Message.getFieldWithDefault(this, 2, 0);
143
+ }
144
+ set numberValue(value) {
145
+ pb_1.Message.setOneofField(this, 2, this.#one_of_decls[0], value);
146
+ }
147
+ get hasNumberValue() {
148
+ return pb_1.Message.getField(this, 2) != null;
149
+ }
150
+ get stringValue() {
151
+ return pb_1.Message.getFieldWithDefault(this, 3, "");
152
+ }
153
+ set stringValue(value) {
154
+ pb_1.Message.setOneofField(this, 3, this.#one_of_decls[0], value);
155
+ }
156
+ get hasStringValue() {
157
+ return pb_1.Message.getField(this, 3) != null;
158
+ }
159
+ get boolValue() {
160
+ return pb_1.Message.getFieldWithDefault(this, 4, false);
161
+ }
162
+ set boolValue(value) {
163
+ pb_1.Message.setOneofField(this, 4, this.#one_of_decls[0], value);
164
+ }
165
+ get hasBoolValue() {
166
+ return pb_1.Message.getField(this, 4) != null;
167
+ }
168
+ get structValue() {
169
+ return pb_1.Message.getWrapperField(this, Struct, 5);
170
+ }
171
+ set structValue(value) {
172
+ pb_1.Message.setOneofWrapperField(this, 5, this.#one_of_decls[0], value);
173
+ }
174
+ get hasStructValue() {
175
+ return pb_1.Message.getField(this, 5) != null;
176
+ }
177
+ get listValue() {
178
+ return pb_1.Message.getWrapperField(this, ListValue, 6);
179
+ }
180
+ set listValue(value) {
181
+ pb_1.Message.setOneofWrapperField(this, 6, this.#one_of_decls[0], value);
182
+ }
183
+ get hasListValue() {
184
+ return pb_1.Message.getField(this, 6) != null;
185
+ }
186
+ get kind() {
187
+ const cases = {
188
+ 0: "none",
189
+ 1: "nullValue",
190
+ 2: "numberValue",
191
+ 3: "stringValue",
192
+ 4: "boolValue",
193
+ 5: "structValue",
194
+ 6: "listValue"
195
+ };
196
+ return cases[pb_1.Message.computeOneofCase(this, [1, 2, 3, 4, 5, 6])];
197
+ }
198
+ static fromObject(data) {
199
+ const message = new Value({});
200
+ if (data.nullValue != null) {
201
+ message.nullValue = data.nullValue;
202
+ }
203
+ if (data.numberValue != null) {
204
+ message.numberValue = data.numberValue;
205
+ }
206
+ if (data.stringValue != null) {
207
+ message.stringValue = data.stringValue;
208
+ }
209
+ if (data.boolValue != null) {
210
+ message.boolValue = data.boolValue;
211
+ }
212
+ if (data.structValue != null) {
213
+ message.structValue = Struct.fromObject(data.structValue);
214
+ }
215
+ if (data.listValue != null) {
216
+ message.listValue = ListValue.fromObject(data.listValue);
217
+ }
218
+ return message;
219
+ }
220
+ toObject() {
221
+ const data = {};
222
+ if (this.nullValue != null) {
223
+ data.nullValue = this.nullValue;
224
+ }
225
+ if (this.numberValue != null) {
226
+ data.numberValue = this.numberValue;
227
+ }
228
+ if (this.stringValue != null) {
229
+ data.stringValue = this.stringValue;
230
+ }
231
+ if (this.boolValue != null) {
232
+ data.boolValue = this.boolValue;
233
+ }
234
+ if (this.structValue != null) {
235
+ data.structValue = this.structValue.toObject();
236
+ }
237
+ if (this.listValue != null) {
238
+ data.listValue = this.listValue.toObject();
239
+ }
240
+ return data;
241
+ }
242
+ serialize(w) {
243
+ const writer = w || new pb_1.BinaryWriter();
244
+ if (this.hasNullValue)
245
+ writer.writeEnum(1, this.nullValue);
246
+ if (this.hasNumberValue)
247
+ writer.writeDouble(2, this.numberValue);
248
+ if (this.hasStringValue)
249
+ writer.writeString(3, this.stringValue);
250
+ if (this.hasBoolValue)
251
+ writer.writeBool(4, this.boolValue);
252
+ if (this.hasStructValue)
253
+ writer.writeMessage(5, this.structValue, () => this.structValue.serialize(writer));
254
+ if (this.hasListValue)
255
+ writer.writeMessage(6, this.listValue, () => this.listValue.serialize(writer));
256
+ if (!w)
257
+ return writer.getResultBuffer();
258
+ }
259
+ static deserialize(bytes) {
260
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Value();
261
+ while (reader.nextField()) {
262
+ if (reader.isEndGroup())
263
+ break;
264
+ switch (reader.getFieldNumber()) {
265
+ case 1:
266
+ message.nullValue = reader.readEnum();
267
+ break;
268
+ case 2:
269
+ message.numberValue = reader.readDouble();
270
+ break;
271
+ case 3:
272
+ message.stringValue = reader.readString();
273
+ break;
274
+ case 4:
275
+ message.boolValue = reader.readBool();
276
+ break;
277
+ case 5:
278
+ reader.readMessage(message.structValue, () => message.structValue = Struct.deserialize(reader));
279
+ break;
280
+ case 6:
281
+ reader.readMessage(message.listValue, () => message.listValue = ListValue.deserialize(reader));
282
+ break;
283
+ default: reader.skipField();
284
+ }
285
+ }
286
+ return message;
287
+ }
288
+ serializeBinary() {
289
+ return this.serialize();
290
+ }
291
+ static deserializeBinary(bytes) {
292
+ return Value.deserialize(bytes);
293
+ }
294
+ }
295
+ protobuf.Value = Value;
296
+ class ListValue extends pb_1.Message {
297
+ #one_of_decls = [];
298
+ constructor(data) {
299
+ super();
300
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls);
301
+ if (!Array.isArray(data) && typeof data == "object") {
302
+ if ("values" in data && data.values != undefined) {
303
+ this.values = data.values;
304
+ }
305
+ }
306
+ }
307
+ get values() {
308
+ return pb_1.Message.getRepeatedWrapperField(this, Value, 1);
309
+ }
310
+ set values(value) {
311
+ pb_1.Message.setRepeatedWrapperField(this, 1, value);
312
+ }
313
+ static fromObject(data) {
314
+ const message = new ListValue({});
315
+ if (data.values != null) {
316
+ message.values = data.values.map(item => Value.fromObject(item));
317
+ }
318
+ return message;
319
+ }
320
+ toObject() {
321
+ const data = {};
322
+ if (this.values != null) {
323
+ data.values = this.values.map((item) => item.toObject());
324
+ }
325
+ return data;
326
+ }
327
+ serialize(w) {
328
+ const writer = w || new pb_1.BinaryWriter();
329
+ if (this.values.length)
330
+ writer.writeRepeatedMessage(1, this.values, (item) => item.serialize(writer));
331
+ if (!w)
332
+ return writer.getResultBuffer();
333
+ }
334
+ static deserialize(bytes) {
335
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ListValue();
336
+ while (reader.nextField()) {
337
+ if (reader.isEndGroup())
338
+ break;
339
+ switch (reader.getFieldNumber()) {
340
+ case 1:
341
+ reader.readMessage(message.values, () => pb_1.Message.addToRepeatedWrapperField(message, 1, Value.deserialize(reader), Value));
342
+ break;
343
+ default: reader.skipField();
344
+ }
345
+ }
346
+ return message;
347
+ }
348
+ serializeBinary() {
349
+ return this.serialize();
350
+ }
351
+ static deserializeBinary(bytes) {
352
+ return ListValue.deserialize(bytes);
353
+ }
354
+ }
355
+ protobuf.ListValue = ListValue;
356
+ })(protobuf = google.protobuf || (google.protobuf = {}));
357
+ })(google || (exports.google = google = {}));
package/package.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "module": "index",
7
7
  "types": "types",
8
8
  "scripts": {
9
- "build": "rm -rf src && mkdir src && protoc --plugin=protoc-gen-ts=$PWD/node_modules/.bin/protoc-gen-ts --ts_out=src --ts_opt=unary_rpc_promise=true --ts_opt=target=node --ts_opt=json_names -I=proto proto/**/*.proto",
10
- "build:next": "rm -rf src && mkdir src && protoc-25.3.0 --plugin=protoc-gen-ts=$PWD/node_modules/.bin/protoc-gen-ts --ts_out=src --ts_opt=unary_rpc_promise=true --ts_opt=target=node --ts_opt=json_names -I=proto proto/**/*.proto",
9
+ "build": "rm -rf src && mkdir src && protoc --plugin=protoc-gen-ts=$PWD/node_modules/.bin/protoc-gen-ts --ts_out=src --ts_opt=unary_rpc_promise=true --ts_opt=target=node --ts_opt=json_names -I=proto -I=node_modules/google-protobuf proto/**/*.proto",
10
+ "build:next": "rm -rf src && mkdir src && protoc-25.3.0 --plugin=protoc-gen-ts=$PWD/node_modules/.bin/protoc-gen-ts --ts_out=src --ts_opt=unary_rpc_promise=true --ts_opt=target=node --ts_opt=json_names -I=proto -I=node_modules/google-protobuf proto/**/*.proto",
11
11
  "compile": "tsc -p tsconfig.json"
12
12
  },
13
13
  "license": "MIT",
14
- "version": "1.8.4",
14
+ "version": "1.8.6",
15
15
  "devDependencies": {
16
16
  "@types/google-protobuf": "^3.15.12",
17
17
  "protoc-gen-ts": "^0.8.7",
@@ -10399,6 +10399,9 @@ var com;
10399
10399
  if ("notes" in data && data.notes != undefined) {
10400
10400
  this.notes = data.notes;
10401
10401
  }
10402
+ if ("processorTid" in data && data.processorTid != undefined) {
10403
+ this.processorTid = data.processorTid;
10404
+ }
10402
10405
  }
10403
10406
  if (!this.deviceConfiguration)
10404
10407
  this.deviceConfiguration = new Map();
@@ -10445,6 +10448,12 @@ var com;
10445
10448
  set notes(value) {
10446
10449
  pb_1.Message.setField(this, 7, value);
10447
10450
  }
10451
+ get processorTid() {
10452
+ return pb_1.Message.getFieldWithDefault(this, 8, "");
10453
+ }
10454
+ set processorTid(value) {
10455
+ pb_1.Message.setField(this, 8, value);
10456
+ }
10448
10457
  static fromObject(data) {
10449
10458
  const message = new TerminalBulkData({});
10450
10459
  if (data.serialNumber != null) {
@@ -10468,6 +10477,9 @@ var com;
10468
10477
  if (data.notes != null) {
10469
10478
  message.notes = data.notes;
10470
10479
  }
10480
+ if (data.processorTid != null) {
10481
+ message.processorTid = data.processorTid;
10482
+ }
10471
10483
  return message;
10472
10484
  }
10473
10485
  toObject() {
@@ -10493,6 +10505,9 @@ var com;
10493
10505
  if (this.notes != null) {
10494
10506
  data.notes = this.notes;
10495
10507
  }
10508
+ if (this.processorTid != null) {
10509
+ data.processorTid = this.processorTid;
10510
+ }
10496
10511
  return data;
10497
10512
  }
10498
10513
  serialize(w) {
@@ -10515,6 +10530,8 @@ var com;
10515
10530
  }
10516
10531
  if (this.notes.length)
10517
10532
  writer.writeString(7, this.notes);
10533
+ if (this.processorTid.length)
10534
+ writer.writeString(8, this.processorTid);
10518
10535
  if (!w)
10519
10536
  return writer.getResultBuffer();
10520
10537
  }
@@ -10545,6 +10562,9 @@ var com;
10545
10562
  case 7:
10546
10563
  message.notes = reader.readString();
10547
10564
  break;
10565
+ case 8:
10566
+ message.processorTid = reader.readString();
10567
+ break;
10548
10568
  default: reader.skipField();
10549
10569
  }
10550
10570
  }