@otonoma/paranet-client 2.11.0-rc.18

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.
Files changed (75) hide show
  1. package/README.md +2 -0
  2. package/dist/client.d.ts +168 -0
  3. package/dist/client.d.ts.map +1 -0
  4. package/dist/client.js +497 -0
  5. package/dist/graphql.d.ts +8 -0
  6. package/dist/graphql.d.ts.map +1 -0
  7. package/dist/graphql.js +113 -0
  8. package/dist/index.d.ts +12 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +11 -0
  11. package/dist/pncp.d.ts +129 -0
  12. package/dist/pncp.d.ts.map +1 -0
  13. package/dist/pncp.js +100 -0
  14. package/dist/proto/broker.grpc.client.d.ts +154 -0
  15. package/dist/proto/broker.grpc.client.d.ts.map +1 -0
  16. package/dist/proto/broker.grpc.client.js +102 -0
  17. package/dist/proto/broker.grpc.d.ts +6 -0
  18. package/dist/proto/broker.grpc.d.ts.map +1 -0
  19. package/dist/proto/broker.grpc.js +32 -0
  20. package/dist/proto/broker_api.d.ts +324 -0
  21. package/dist/proto/broker_api.d.ts.map +1 -0
  22. package/dist/proto/broker_api.js +566 -0
  23. package/dist/proto/google/protobuf/descriptor.d.ts +2492 -0
  24. package/dist/proto/google/protobuf/descriptor.d.ts.map +1 -0
  25. package/dist/proto/google/protobuf/descriptor.js +3250 -0
  26. package/dist/proto/google/protobuf/timestamp.d.ts +157 -0
  27. package/dist/proto/google/protobuf/timestamp.d.ts.map +1 -0
  28. package/dist/proto/google/protobuf/timestamp.js +132 -0
  29. package/dist/proto/grpc/health/v1/health.client.d.ts +79 -0
  30. package/dist/proto/grpc/health/v1/health.client.d.ts.map +1 -0
  31. package/dist/proto/grpc/health/v1/health.client.js +46 -0
  32. package/dist/proto/grpc/health/v1/health.d.ts +74 -0
  33. package/dist/proto/grpc/health/v1/health.d.ts.map +1 -0
  34. package/dist/proto/grpc/health/v1/health.js +152 -0
  35. package/dist/proto/identifiers.d.ts +82 -0
  36. package/dist/proto/identifiers.d.ts.map +1 -0
  37. package/dist/proto/identifiers.js +132 -0
  38. package/dist/proto/mediums.d.ts +71 -0
  39. package/dist/proto/mediums.d.ts.map +1 -0
  40. package/dist/proto/mediums.js +120 -0
  41. package/dist/proto/observation.d.ts +287 -0
  42. package/dist/proto/observation.d.ts.map +1 -0
  43. package/dist/proto/observation.js +443 -0
  44. package/dist/proto/otonoma/common/value.d.ts +127 -0
  45. package/dist/proto/otonoma/common/value.d.ts.map +1 -0
  46. package/dist/proto/otonoma/common/value.js +248 -0
  47. package/dist/proto/pncp.d.ts +607 -0
  48. package/dist/proto/pncp.d.ts.map +1 -0
  49. package/dist/proto/pncp.js +936 -0
  50. package/dist/schema/paranet.d.ts +245 -0
  51. package/dist/schema/paranet.d.ts.map +1 -0
  52. package/dist/schema/paranet.js +7 -0
  53. package/dist/util.d.ts +5 -0
  54. package/dist/util.d.ts.map +1 -0
  55. package/dist/util.js +120 -0
  56. package/package.json +39 -0
  57. package/src/client.ts +677 -0
  58. package/src/graphql.ts +103 -0
  59. package/src/index.ts +14 -0
  60. package/src/pncp.ts +236 -0
  61. package/src/proto/broker.grpc.client.ts +193 -0
  62. package/src/proto/broker.grpc.ts +32 -0
  63. package/src/proto/broker_api.ts +778 -0
  64. package/src/proto/google/protobuf/descriptor.ts +4860 -0
  65. package/src/proto/google/protobuf/timestamp.ts +288 -0
  66. package/src/proto/grpc/health/v1/health.client.ts +106 -0
  67. package/src/proto/grpc/health/v1/health.ts +174 -0
  68. package/src/proto/identifiers.ts +176 -0
  69. package/src/proto/mediums.ts +168 -0
  70. package/src/proto/observation.ts +636 -0
  71. package/src/proto/otonoma/common/value.ts +334 -0
  72. package/src/proto/pncp.ts +1333 -0
  73. package/src/schema/paranet.ts +257 -0
  74. package/src/util.ts +129 -0
  75. package/tsconfig.json +27 -0
@@ -0,0 +1,334 @@
1
+ // @generated by protobuf-ts 2.9.4
2
+ // @generated from protobuf file "otonoma/common/value.proto" (package "otonoma.common", syntax proto3)
3
+ // tslint:disable
4
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
5
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
6
+ import { WireType } from "@protobuf-ts/runtime";
7
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
8
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
9
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
10
+ import type { PartialMessage } from "@protobuf-ts/runtime";
11
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
12
+ import { MessageType } from "@protobuf-ts/runtime";
13
+ /**
14
+ * @generated from protobuf message otonoma.common.Value
15
+ */
16
+ export interface Value {
17
+ /**
18
+ * @generated from protobuf oneof: kind
19
+ */
20
+ kind: {
21
+ oneofKind: "nullValue";
22
+ /**
23
+ * @generated from protobuf field: otonoma.common.NullValue null_value = 1;
24
+ */
25
+ nullValue: NullValue;
26
+ } | {
27
+ oneofKind: "numberValue";
28
+ /**
29
+ * @generated from protobuf field: double number_value = 2;
30
+ */
31
+ numberValue: number;
32
+ } | {
33
+ oneofKind: "negIntValue";
34
+ /**
35
+ * @generated from protobuf field: int64 neg_int_value = 3;
36
+ */
37
+ negIntValue: bigint;
38
+ } | {
39
+ oneofKind: "posIntValue";
40
+ /**
41
+ * @generated from protobuf field: uint64 pos_int_value = 4;
42
+ */
43
+ posIntValue: bigint;
44
+ } | {
45
+ oneofKind: "stringValue";
46
+ /**
47
+ * @generated from protobuf field: string string_value = 5;
48
+ */
49
+ stringValue: string;
50
+ } | {
51
+ oneofKind: "boolValue";
52
+ /**
53
+ * @generated from protobuf field: bool bool_value = 6;
54
+ */
55
+ boolValue: boolean;
56
+ } | {
57
+ oneofKind: "structValue";
58
+ /**
59
+ * @generated from protobuf field: otonoma.common.Struct struct_value = 7;
60
+ */
61
+ structValue: Struct;
62
+ } | {
63
+ oneofKind: "listValue";
64
+ /**
65
+ * @generated from protobuf field: otonoma.common.ListValue list_value = 8;
66
+ */
67
+ listValue: ListValue;
68
+ } | {
69
+ oneofKind: undefined;
70
+ };
71
+ }
72
+ /**
73
+ * @generated from protobuf message otonoma.common.Struct
74
+ */
75
+ export interface Struct {
76
+ /**
77
+ * @generated from protobuf field: map<string, otonoma.common.Value> fields = 1;
78
+ */
79
+ fields: {
80
+ [key: string]: Value;
81
+ };
82
+ }
83
+ /**
84
+ * @generated from protobuf message otonoma.common.ListValue
85
+ */
86
+ export interface ListValue {
87
+ /**
88
+ * @generated from protobuf field: repeated otonoma.common.Value values = 1;
89
+ */
90
+ values: Value[];
91
+ }
92
+ /**
93
+ * @generated from protobuf enum otonoma.common.NullValue
94
+ */
95
+ export enum NullValue {
96
+ /**
97
+ * @generated from protobuf enum value: NULL_VALUE = 0;
98
+ */
99
+ NULL_VALUE = 0
100
+ }
101
+ // @generated message type with reflection information, may provide speed optimized methods
102
+ class Value$Type extends MessageType<Value> {
103
+ constructor() {
104
+ super("otonoma.common.Value", [
105
+ { no: 1, name: "null_value", kind: "enum", oneof: "kind", T: () => ["otonoma.common.NullValue", NullValue] },
106
+ { no: 2, name: "number_value", kind: "scalar", oneof: "kind", T: 1 /*ScalarType.DOUBLE*/ },
107
+ { no: 3, name: "neg_int_value", kind: "scalar", oneof: "kind", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
108
+ { no: 4, name: "pos_int_value", kind: "scalar", oneof: "kind", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
109
+ { no: 5, name: "string_value", kind: "scalar", oneof: "kind", T: 9 /*ScalarType.STRING*/ },
110
+ { no: 6, name: "bool_value", kind: "scalar", oneof: "kind", T: 8 /*ScalarType.BOOL*/ },
111
+ { no: 7, name: "struct_value", kind: "message", oneof: "kind", T: () => Struct },
112
+ { no: 8, name: "list_value", kind: "message", oneof: "kind", T: () => ListValue }
113
+ ]);
114
+ }
115
+ create(value?: PartialMessage<Value>): Value {
116
+ const message = globalThis.Object.create((this.messagePrototype!));
117
+ message.kind = { oneofKind: undefined };
118
+ if (value !== undefined)
119
+ reflectionMergePartial<Value>(this, message, value);
120
+ return message;
121
+ }
122
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Value): Value {
123
+ let message = target ?? this.create(), end = reader.pos + length;
124
+ while (reader.pos < end) {
125
+ let [fieldNo, wireType] = reader.tag();
126
+ switch (fieldNo) {
127
+ case /* otonoma.common.NullValue null_value */ 1:
128
+ message.kind = {
129
+ oneofKind: "nullValue",
130
+ nullValue: reader.int32()
131
+ };
132
+ break;
133
+ case /* double number_value */ 2:
134
+ message.kind = {
135
+ oneofKind: "numberValue",
136
+ numberValue: reader.double()
137
+ };
138
+ break;
139
+ case /* int64 neg_int_value */ 3:
140
+ message.kind = {
141
+ oneofKind: "negIntValue",
142
+ negIntValue: reader.int64().toBigInt()
143
+ };
144
+ break;
145
+ case /* uint64 pos_int_value */ 4:
146
+ message.kind = {
147
+ oneofKind: "posIntValue",
148
+ posIntValue: reader.uint64().toBigInt()
149
+ };
150
+ break;
151
+ case /* string string_value */ 5:
152
+ message.kind = {
153
+ oneofKind: "stringValue",
154
+ stringValue: reader.string()
155
+ };
156
+ break;
157
+ case /* bool bool_value */ 6:
158
+ message.kind = {
159
+ oneofKind: "boolValue",
160
+ boolValue: reader.bool()
161
+ };
162
+ break;
163
+ case /* otonoma.common.Struct struct_value */ 7:
164
+ message.kind = {
165
+ oneofKind: "structValue",
166
+ structValue: Struct.internalBinaryRead(reader, reader.uint32(), options, (message.kind as any).structValue)
167
+ };
168
+ break;
169
+ case /* otonoma.common.ListValue list_value */ 8:
170
+ message.kind = {
171
+ oneofKind: "listValue",
172
+ listValue: ListValue.internalBinaryRead(reader, reader.uint32(), options, (message.kind as any).listValue)
173
+ };
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: Value, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
187
+ /* otonoma.common.NullValue null_value = 1; */
188
+ if (message.kind.oneofKind === "nullValue")
189
+ writer.tag(1, WireType.Varint).int32(message.kind.nullValue);
190
+ /* double number_value = 2; */
191
+ if (message.kind.oneofKind === "numberValue")
192
+ writer.tag(2, WireType.Bit64).double(message.kind.numberValue);
193
+ /* int64 neg_int_value = 3; */
194
+ if (message.kind.oneofKind === "negIntValue")
195
+ writer.tag(3, WireType.Varint).int64(message.kind.negIntValue);
196
+ /* uint64 pos_int_value = 4; */
197
+ if (message.kind.oneofKind === "posIntValue")
198
+ writer.tag(4, WireType.Varint).uint64(message.kind.posIntValue);
199
+ /* string string_value = 5; */
200
+ if (message.kind.oneofKind === "stringValue")
201
+ writer.tag(5, WireType.LengthDelimited).string(message.kind.stringValue);
202
+ /* bool bool_value = 6; */
203
+ if (message.kind.oneofKind === "boolValue")
204
+ writer.tag(6, WireType.Varint).bool(message.kind.boolValue);
205
+ /* otonoma.common.Struct struct_value = 7; */
206
+ if (message.kind.oneofKind === "structValue")
207
+ Struct.internalBinaryWrite(message.kind.structValue, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
208
+ /* otonoma.common.ListValue list_value = 8; */
209
+ if (message.kind.oneofKind === "listValue")
210
+ ListValue.internalBinaryWrite(message.kind.listValue, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
211
+ let u = options.writeUnknownFields;
212
+ if (u !== false)
213
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
214
+ return writer;
215
+ }
216
+ }
217
+ /**
218
+ * @generated MessageType for protobuf message otonoma.common.Value
219
+ */
220
+ export const Value = new Value$Type();
221
+ // @generated message type with reflection information, may provide speed optimized methods
222
+ class Struct$Type extends MessageType<Struct> {
223
+ constructor() {
224
+ super("otonoma.common.Struct", [
225
+ { no: 1, name: "fields", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "message", T: () => Value } }
226
+ ]);
227
+ }
228
+ create(value?: PartialMessage<Struct>): Struct {
229
+ const message = globalThis.Object.create((this.messagePrototype!));
230
+ message.fields = {};
231
+ if (value !== undefined)
232
+ reflectionMergePartial<Struct>(this, message, value);
233
+ return message;
234
+ }
235
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Struct): Struct {
236
+ let message = target ?? this.create(), end = reader.pos + length;
237
+ while (reader.pos < end) {
238
+ let [fieldNo, wireType] = reader.tag();
239
+ switch (fieldNo) {
240
+ case /* map<string, otonoma.common.Value> fields */ 1:
241
+ this.binaryReadMap1(message.fields, reader, options);
242
+ break;
243
+ default:
244
+ let u = options.readUnknownField;
245
+ if (u === "throw")
246
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
247
+ let d = reader.skip(wireType);
248
+ if (u !== false)
249
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
250
+ }
251
+ }
252
+ return message;
253
+ }
254
+ private binaryReadMap1(map: Struct["fields"], reader: IBinaryReader, options: BinaryReadOptions): void {
255
+ let len = reader.uint32(), end = reader.pos + len, key: keyof Struct["fields"] | undefined, val: Struct["fields"][any] | undefined;
256
+ while (reader.pos < end) {
257
+ let [fieldNo, wireType] = reader.tag();
258
+ switch (fieldNo) {
259
+ case 1:
260
+ key = reader.string();
261
+ break;
262
+ case 2:
263
+ val = Value.internalBinaryRead(reader, reader.uint32(), options);
264
+ break;
265
+ default: throw new globalThis.Error("unknown map entry field for field otonoma.common.Struct.fields");
266
+ }
267
+ }
268
+ map[key ?? ""] = val ?? Value.create();
269
+ }
270
+ internalBinaryWrite(message: Struct, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
271
+ /* map<string, otonoma.common.Value> fields = 1; */
272
+ for (let k of globalThis.Object.keys(message.fields)) {
273
+ writer.tag(1, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k);
274
+ writer.tag(2, WireType.LengthDelimited).fork();
275
+ Value.internalBinaryWrite(message.fields[k], writer, options);
276
+ writer.join().join();
277
+ }
278
+ let u = options.writeUnknownFields;
279
+ if (u !== false)
280
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
281
+ return writer;
282
+ }
283
+ }
284
+ /**
285
+ * @generated MessageType for protobuf message otonoma.common.Struct
286
+ */
287
+ export const Struct = new Struct$Type();
288
+ // @generated message type with reflection information, may provide speed optimized methods
289
+ class ListValue$Type extends MessageType<ListValue> {
290
+ constructor() {
291
+ super("otonoma.common.ListValue", [
292
+ { no: 1, name: "values", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Value }
293
+ ]);
294
+ }
295
+ create(value?: PartialMessage<ListValue>): ListValue {
296
+ const message = globalThis.Object.create((this.messagePrototype!));
297
+ message.values = [];
298
+ if (value !== undefined)
299
+ reflectionMergePartial<ListValue>(this, message, value);
300
+ return message;
301
+ }
302
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListValue): ListValue {
303
+ let message = target ?? this.create(), end = reader.pos + length;
304
+ while (reader.pos < end) {
305
+ let [fieldNo, wireType] = reader.tag();
306
+ switch (fieldNo) {
307
+ case /* repeated otonoma.common.Value values */ 1:
308
+ message.values.push(Value.internalBinaryRead(reader, reader.uint32(), options));
309
+ break;
310
+ default:
311
+ let u = options.readUnknownField;
312
+ if (u === "throw")
313
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
314
+ let d = reader.skip(wireType);
315
+ if (u !== false)
316
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
317
+ }
318
+ }
319
+ return message;
320
+ }
321
+ internalBinaryWrite(message: ListValue, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
322
+ /* repeated otonoma.common.Value values = 1; */
323
+ for (let i = 0; i < message.values.length; i++)
324
+ Value.internalBinaryWrite(message.values[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
325
+ let u = options.writeUnknownFields;
326
+ if (u !== false)
327
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
328
+ return writer;
329
+ }
330
+ }
331
+ /**
332
+ * @generated MessageType for protobuf message otonoma.common.ListValue
333
+ */
334
+ export const ListValue = new ListValue$Type();