@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.
- package/README.md +2 -0
- package/dist/client.d.ts +168 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +497 -0
- package/dist/graphql.d.ts +8 -0
- package/dist/graphql.d.ts.map +1 -0
- package/dist/graphql.js +113 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/pncp.d.ts +129 -0
- package/dist/pncp.d.ts.map +1 -0
- package/dist/pncp.js +100 -0
- package/dist/proto/broker.grpc.client.d.ts +154 -0
- package/dist/proto/broker.grpc.client.d.ts.map +1 -0
- package/dist/proto/broker.grpc.client.js +102 -0
- package/dist/proto/broker.grpc.d.ts +6 -0
- package/dist/proto/broker.grpc.d.ts.map +1 -0
- package/dist/proto/broker.grpc.js +32 -0
- package/dist/proto/broker_api.d.ts +324 -0
- package/dist/proto/broker_api.d.ts.map +1 -0
- package/dist/proto/broker_api.js +566 -0
- package/dist/proto/google/protobuf/descriptor.d.ts +2492 -0
- package/dist/proto/google/protobuf/descriptor.d.ts.map +1 -0
- package/dist/proto/google/protobuf/descriptor.js +3250 -0
- package/dist/proto/google/protobuf/timestamp.d.ts +157 -0
- package/dist/proto/google/protobuf/timestamp.d.ts.map +1 -0
- package/dist/proto/google/protobuf/timestamp.js +132 -0
- package/dist/proto/grpc/health/v1/health.client.d.ts +79 -0
- package/dist/proto/grpc/health/v1/health.client.d.ts.map +1 -0
- package/dist/proto/grpc/health/v1/health.client.js +46 -0
- package/dist/proto/grpc/health/v1/health.d.ts +74 -0
- package/dist/proto/grpc/health/v1/health.d.ts.map +1 -0
- package/dist/proto/grpc/health/v1/health.js +152 -0
- package/dist/proto/identifiers.d.ts +82 -0
- package/dist/proto/identifiers.d.ts.map +1 -0
- package/dist/proto/identifiers.js +132 -0
- package/dist/proto/mediums.d.ts +71 -0
- package/dist/proto/mediums.d.ts.map +1 -0
- package/dist/proto/mediums.js +120 -0
- package/dist/proto/observation.d.ts +287 -0
- package/dist/proto/observation.d.ts.map +1 -0
- package/dist/proto/observation.js +443 -0
- package/dist/proto/otonoma/common/value.d.ts +127 -0
- package/dist/proto/otonoma/common/value.d.ts.map +1 -0
- package/dist/proto/otonoma/common/value.js +248 -0
- package/dist/proto/pncp.d.ts +607 -0
- package/dist/proto/pncp.d.ts.map +1 -0
- package/dist/proto/pncp.js +936 -0
- package/dist/schema/paranet.d.ts +245 -0
- package/dist/schema/paranet.d.ts.map +1 -0
- package/dist/schema/paranet.js +7 -0
- package/dist/util.d.ts +5 -0
- package/dist/util.d.ts.map +1 -0
- package/dist/util.js +120 -0
- package/package.json +39 -0
- package/src/client.ts +677 -0
- package/src/graphql.ts +103 -0
- package/src/index.ts +14 -0
- package/src/pncp.ts +236 -0
- package/src/proto/broker.grpc.client.ts +193 -0
- package/src/proto/broker.grpc.ts +32 -0
- package/src/proto/broker_api.ts +778 -0
- package/src/proto/google/protobuf/descriptor.ts +4860 -0
- package/src/proto/google/protobuf/timestamp.ts +288 -0
- package/src/proto/grpc/health/v1/health.client.ts +106 -0
- package/src/proto/grpc/health/v1/health.ts +174 -0
- package/src/proto/identifiers.ts +176 -0
- package/src/proto/mediums.ts +168 -0
- package/src/proto/observation.ts +636 -0
- package/src/proto/otonoma/common/value.ts +334 -0
- package/src/proto/pncp.ts +1333 -0
- package/src/schema/paranet.ts +257 -0
- package/src/util.ts +129 -0
- package/tsconfig.json +27 -0
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
2
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
3
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
4
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
5
|
+
import { ConversationId } from "./identifiers";
|
|
6
|
+
import { PncpCallback } from "./pncp";
|
|
7
|
+
import { PncpMessageKind } from "./pncp";
|
|
8
|
+
import { Value } from "./otonoma/common/value";
|
|
9
|
+
import { EntityId } from "./identifiers";
|
|
10
|
+
/**
|
|
11
|
+
* @generated from protobuf enum pncp.v1.ObservationMessageType
|
|
12
|
+
*/
|
|
13
|
+
export var ObservationMessageType;
|
|
14
|
+
(function (ObservationMessageType) {
|
|
15
|
+
/**
|
|
16
|
+
* @generated from protobuf enum value: OBS_MESSAGE_TYPE_SKILL = 0;
|
|
17
|
+
*/
|
|
18
|
+
ObservationMessageType[ObservationMessageType["OBS_MESSAGE_TYPE_SKILL"] = 0] = "OBS_MESSAGE_TYPE_SKILL";
|
|
19
|
+
/**
|
|
20
|
+
* @generated from protobuf enum value: OBS_MESSAGE_TYPE_PNCP = 1;
|
|
21
|
+
*/
|
|
22
|
+
ObservationMessageType[ObservationMessageType["OBS_MESSAGE_TYPE_PNCP"] = 1] = "OBS_MESSAGE_TYPE_PNCP";
|
|
23
|
+
})(ObservationMessageType || (ObservationMessageType = {}));
|
|
24
|
+
/**
|
|
25
|
+
* @generated from protobuf enum pncp.v1.ObservationStartPoint
|
|
26
|
+
*/
|
|
27
|
+
export var ObservationStartPoint;
|
|
28
|
+
(function (ObservationStartPoint) {
|
|
29
|
+
/**
|
|
30
|
+
* The default choice, begin at the current head of the stream.
|
|
31
|
+
*
|
|
32
|
+
* @generated from protobuf enum value: OBS_START_HEAD = 0;
|
|
33
|
+
*/
|
|
34
|
+
ObservationStartPoint[ObservationStartPoint["OBS_START_HEAD"] = 0] = "OBS_START_HEAD";
|
|
35
|
+
/**
|
|
36
|
+
* Begin at the last sequence point, determined by the corresponding field.
|
|
37
|
+
*
|
|
38
|
+
* @generated from protobuf enum value: OBS_START_SEQ = 1;
|
|
39
|
+
*/
|
|
40
|
+
ObservationStartPoint[ObservationStartPoint["OBS_START_SEQ"] = 1] = "OBS_START_SEQ";
|
|
41
|
+
/**
|
|
42
|
+
* Start from the beginning of the stream.
|
|
43
|
+
*
|
|
44
|
+
* @generated from protobuf enum value: OBS_START_BEGINNING = 2;
|
|
45
|
+
*/
|
|
46
|
+
ObservationStartPoint[ObservationStartPoint["OBS_START_BEGINNING"] = 2] = "OBS_START_BEGINNING";
|
|
47
|
+
/**
|
|
48
|
+
* Start from the offset provided, determined by the corresponding field.
|
|
49
|
+
*
|
|
50
|
+
* @generated from protobuf enum value: OBS_START_OFFSET = 3;
|
|
51
|
+
*/
|
|
52
|
+
ObservationStartPoint[ObservationStartPoint["OBS_START_OFFSET"] = 3] = "OBS_START_OFFSET";
|
|
53
|
+
})(ObservationStartPoint || (ObservationStartPoint = {}));
|
|
54
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
55
|
+
class ObservationRequest$Type extends MessageType {
|
|
56
|
+
constructor() {
|
|
57
|
+
super("pncp.v1.ObservationRequest", [
|
|
58
|
+
{ no: 1, name: "body", kind: "message", T: () => ObservationInit },
|
|
59
|
+
{ no: 2, name: "skill_observance", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
60
|
+
{ no: 3, name: "author", kind: "message", T: () => EntityId },
|
|
61
|
+
{ no: 4, name: "start_point", kind: "enum", T: () => ["pncp.v1.ObservationStartPoint", ObservationStartPoint] },
|
|
62
|
+
{ no: 5, name: "seq_id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
63
|
+
{ no: 6, name: "callback", kind: "message", T: () => Value },
|
|
64
|
+
{ no: 7, name: "untracked", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
65
|
+
{ no: 8, name: "seq_offset", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }
|
|
66
|
+
]);
|
|
67
|
+
}
|
|
68
|
+
create(value) {
|
|
69
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
70
|
+
message.startPoint = 0;
|
|
71
|
+
message.untracked = false;
|
|
72
|
+
if (value !== undefined)
|
|
73
|
+
reflectionMergePartial(this, message, value);
|
|
74
|
+
return message;
|
|
75
|
+
}
|
|
76
|
+
internalBinaryRead(reader, length, options, target) {
|
|
77
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
78
|
+
while (reader.pos < end) {
|
|
79
|
+
let [fieldNo, wireType] = reader.tag();
|
|
80
|
+
switch (fieldNo) {
|
|
81
|
+
case /* pncp.v1.ObservationInit body */ 1:
|
|
82
|
+
message.body = ObservationInit.internalBinaryRead(reader, reader.uint32(), options, message.body);
|
|
83
|
+
break;
|
|
84
|
+
case /* optional string skill_observance */ 2:
|
|
85
|
+
message.skillObservance = reader.string();
|
|
86
|
+
break;
|
|
87
|
+
case /* pncp.v1.EntityId author */ 3:
|
|
88
|
+
message.author = EntityId.internalBinaryRead(reader, reader.uint32(), options, message.author);
|
|
89
|
+
break;
|
|
90
|
+
case /* pncp.v1.ObservationStartPoint start_point */ 4:
|
|
91
|
+
message.startPoint = reader.int32();
|
|
92
|
+
break;
|
|
93
|
+
case /* optional string seq_id */ 5:
|
|
94
|
+
message.seqId = reader.string();
|
|
95
|
+
break;
|
|
96
|
+
case /* optional otonoma.common.Value callback */ 6:
|
|
97
|
+
message.callback = Value.internalBinaryRead(reader, reader.uint32(), options, message.callback);
|
|
98
|
+
break;
|
|
99
|
+
case /* bool untracked */ 7:
|
|
100
|
+
message.untracked = reader.bool();
|
|
101
|
+
break;
|
|
102
|
+
case /* optional uint64 seq_offset */ 8:
|
|
103
|
+
message.seqOffset = reader.uint64().toBigInt();
|
|
104
|
+
break;
|
|
105
|
+
default:
|
|
106
|
+
let u = options.readUnknownField;
|
|
107
|
+
if (u === "throw")
|
|
108
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
109
|
+
let d = reader.skip(wireType);
|
|
110
|
+
if (u !== false)
|
|
111
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return message;
|
|
115
|
+
}
|
|
116
|
+
internalBinaryWrite(message, writer, options) {
|
|
117
|
+
/* pncp.v1.ObservationInit body = 1; */
|
|
118
|
+
if (message.body)
|
|
119
|
+
ObservationInit.internalBinaryWrite(message.body, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
120
|
+
/* optional string skill_observance = 2; */
|
|
121
|
+
if (message.skillObservance !== undefined)
|
|
122
|
+
writer.tag(2, WireType.LengthDelimited).string(message.skillObservance);
|
|
123
|
+
/* pncp.v1.EntityId author = 3; */
|
|
124
|
+
if (message.author)
|
|
125
|
+
EntityId.internalBinaryWrite(message.author, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
126
|
+
/* pncp.v1.ObservationStartPoint start_point = 4; */
|
|
127
|
+
if (message.startPoint !== 0)
|
|
128
|
+
writer.tag(4, WireType.Varint).int32(message.startPoint);
|
|
129
|
+
/* optional string seq_id = 5; */
|
|
130
|
+
if (message.seqId !== undefined)
|
|
131
|
+
writer.tag(5, WireType.LengthDelimited).string(message.seqId);
|
|
132
|
+
/* optional otonoma.common.Value callback = 6; */
|
|
133
|
+
if (message.callback)
|
|
134
|
+
Value.internalBinaryWrite(message.callback, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
135
|
+
/* bool untracked = 7; */
|
|
136
|
+
if (message.untracked !== false)
|
|
137
|
+
writer.tag(7, WireType.Varint).bool(message.untracked);
|
|
138
|
+
/* optional uint64 seq_offset = 8; */
|
|
139
|
+
if (message.seqOffset !== undefined)
|
|
140
|
+
writer.tag(8, WireType.Varint).uint64(message.seqOffset);
|
|
141
|
+
let u = options.writeUnknownFields;
|
|
142
|
+
if (u !== false)
|
|
143
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
144
|
+
return writer;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* @generated MessageType for protobuf message pncp.v1.ObservationRequest
|
|
149
|
+
*/
|
|
150
|
+
export const ObservationRequest = new ObservationRequest$Type();
|
|
151
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
152
|
+
class ObservationInit$Type extends MessageType {
|
|
153
|
+
constructor() {
|
|
154
|
+
super("pncp.v1.ObservationInit", [
|
|
155
|
+
{ no: 1, name: "subject", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
156
|
+
{ no: 2, name: "action", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
157
|
+
{ no: 3, name: "requester", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
158
|
+
{ no: 4, name: "fulfiller", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
159
|
+
{ no: 5, name: "filters", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => ObservationMessageFilter },
|
|
160
|
+
{ no: 6, name: "conversation_id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
|
|
161
|
+
]);
|
|
162
|
+
}
|
|
163
|
+
create(value) {
|
|
164
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
165
|
+
message.filters = [];
|
|
166
|
+
if (value !== undefined)
|
|
167
|
+
reflectionMergePartial(this, message, value);
|
|
168
|
+
return message;
|
|
169
|
+
}
|
|
170
|
+
internalBinaryRead(reader, length, options, target) {
|
|
171
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
172
|
+
while (reader.pos < end) {
|
|
173
|
+
let [fieldNo, wireType] = reader.tag();
|
|
174
|
+
switch (fieldNo) {
|
|
175
|
+
case /* optional string subject */ 1:
|
|
176
|
+
message.subject = reader.string();
|
|
177
|
+
break;
|
|
178
|
+
case /* optional string action */ 2:
|
|
179
|
+
message.action = reader.string();
|
|
180
|
+
break;
|
|
181
|
+
case /* optional string requester */ 3:
|
|
182
|
+
message.requester = reader.string();
|
|
183
|
+
break;
|
|
184
|
+
case /* optional string fulfiller */ 4:
|
|
185
|
+
message.fulfiller = reader.string();
|
|
186
|
+
break;
|
|
187
|
+
case /* repeated pncp.v1.ObservationMessageFilter filters */ 5:
|
|
188
|
+
message.filters.push(ObservationMessageFilter.internalBinaryRead(reader, reader.uint32(), options));
|
|
189
|
+
break;
|
|
190
|
+
case /* optional string conversation_id */ 6:
|
|
191
|
+
message.conversationId = reader.string();
|
|
192
|
+
break;
|
|
193
|
+
default:
|
|
194
|
+
let u = options.readUnknownField;
|
|
195
|
+
if (u === "throw")
|
|
196
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
197
|
+
let d = reader.skip(wireType);
|
|
198
|
+
if (u !== false)
|
|
199
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
return message;
|
|
203
|
+
}
|
|
204
|
+
internalBinaryWrite(message, writer, options) {
|
|
205
|
+
/* optional string subject = 1; */
|
|
206
|
+
if (message.subject !== undefined)
|
|
207
|
+
writer.tag(1, WireType.LengthDelimited).string(message.subject);
|
|
208
|
+
/* optional string action = 2; */
|
|
209
|
+
if (message.action !== undefined)
|
|
210
|
+
writer.tag(2, WireType.LengthDelimited).string(message.action);
|
|
211
|
+
/* optional string requester = 3; */
|
|
212
|
+
if (message.requester !== undefined)
|
|
213
|
+
writer.tag(3, WireType.LengthDelimited).string(message.requester);
|
|
214
|
+
/* optional string fulfiller = 4; */
|
|
215
|
+
if (message.fulfiller !== undefined)
|
|
216
|
+
writer.tag(4, WireType.LengthDelimited).string(message.fulfiller);
|
|
217
|
+
/* repeated pncp.v1.ObservationMessageFilter filters = 5; */
|
|
218
|
+
for (let i = 0; i < message.filters.length; i++)
|
|
219
|
+
ObservationMessageFilter.internalBinaryWrite(message.filters[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
220
|
+
/* optional string conversation_id = 6; */
|
|
221
|
+
if (message.conversationId !== undefined)
|
|
222
|
+
writer.tag(6, WireType.LengthDelimited).string(message.conversationId);
|
|
223
|
+
let u = options.writeUnknownFields;
|
|
224
|
+
if (u !== false)
|
|
225
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
226
|
+
return writer;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* @generated MessageType for protobuf message pncp.v1.ObservationInit
|
|
231
|
+
*/
|
|
232
|
+
export const ObservationInit = new ObservationInit$Type();
|
|
233
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
234
|
+
class ObservationMessageFilter$Type extends MessageType {
|
|
235
|
+
constructor() {
|
|
236
|
+
super("pncp.v1.ObservationMessageFilter", [
|
|
237
|
+
{ no: 1, name: "kind", kind: "enum", T: () => ["pncp.v1.ObservationMessageType", ObservationMessageType] },
|
|
238
|
+
{ no: 2, name: "pncp", kind: "enum", opt: true, T: () => ["pncp.v1.PncpMessageKind", PncpMessageKind] }
|
|
239
|
+
]);
|
|
240
|
+
}
|
|
241
|
+
create(value) {
|
|
242
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
243
|
+
message.kind = 0;
|
|
244
|
+
if (value !== undefined)
|
|
245
|
+
reflectionMergePartial(this, message, value);
|
|
246
|
+
return message;
|
|
247
|
+
}
|
|
248
|
+
internalBinaryRead(reader, length, options, target) {
|
|
249
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
250
|
+
while (reader.pos < end) {
|
|
251
|
+
let [fieldNo, wireType] = reader.tag();
|
|
252
|
+
switch (fieldNo) {
|
|
253
|
+
case /* pncp.v1.ObservationMessageType kind */ 1:
|
|
254
|
+
message.kind = reader.int32();
|
|
255
|
+
break;
|
|
256
|
+
case /* optional pncp.v1.PncpMessageKind pncp */ 2:
|
|
257
|
+
message.pncp = reader.int32();
|
|
258
|
+
break;
|
|
259
|
+
default:
|
|
260
|
+
let u = options.readUnknownField;
|
|
261
|
+
if (u === "throw")
|
|
262
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
263
|
+
let d = reader.skip(wireType);
|
|
264
|
+
if (u !== false)
|
|
265
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
return message;
|
|
269
|
+
}
|
|
270
|
+
internalBinaryWrite(message, writer, options) {
|
|
271
|
+
/* pncp.v1.ObservationMessageType kind = 1; */
|
|
272
|
+
if (message.kind !== 0)
|
|
273
|
+
writer.tag(1, WireType.Varint).int32(message.kind);
|
|
274
|
+
/* optional pncp.v1.PncpMessageKind pncp = 2; */
|
|
275
|
+
if (message.pncp !== undefined)
|
|
276
|
+
writer.tag(2, WireType.Varint).int32(message.pncp);
|
|
277
|
+
let u = options.writeUnknownFields;
|
|
278
|
+
if (u !== false)
|
|
279
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
280
|
+
return writer;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* @generated MessageType for protobuf message pncp.v1.ObservationMessageFilter
|
|
285
|
+
*/
|
|
286
|
+
export const ObservationMessageFilter = new ObservationMessageFilter$Type();
|
|
287
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
288
|
+
class ObservationCallback$Type extends MessageType {
|
|
289
|
+
constructor() {
|
|
290
|
+
super("pncp.v1.ObservationCallback", [
|
|
291
|
+
{ no: 1, name: "subject", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
292
|
+
{ no: 2, name: "action", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
293
|
+
{ no: 3, name: "requester", kind: "message", T: () => EntityId },
|
|
294
|
+
{ no: 4, name: "fulfiller", kind: "message", T: () => EntityId },
|
|
295
|
+
{ no: 5, name: "message", kind: "message", T: () => PncpCallback },
|
|
296
|
+
{ no: 6, name: "id", kind: "message", T: () => ConversationId },
|
|
297
|
+
{ no: 7, name: "author", kind: "message", T: () => EntityId },
|
|
298
|
+
{ no: 8, name: "callback", kind: "message", T: () => Value },
|
|
299
|
+
{ no: 9, name: "prev_mid", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
300
|
+
{ no: 10, name: "skill_id", kind: "message", T: () => EntityId }
|
|
301
|
+
]);
|
|
302
|
+
}
|
|
303
|
+
create(value) {
|
|
304
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
305
|
+
message.subject = "";
|
|
306
|
+
message.action = "";
|
|
307
|
+
if (value !== undefined)
|
|
308
|
+
reflectionMergePartial(this, message, value);
|
|
309
|
+
return message;
|
|
310
|
+
}
|
|
311
|
+
internalBinaryRead(reader, length, options, target) {
|
|
312
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
313
|
+
while (reader.pos < end) {
|
|
314
|
+
let [fieldNo, wireType] = reader.tag();
|
|
315
|
+
switch (fieldNo) {
|
|
316
|
+
case /* string subject */ 1:
|
|
317
|
+
message.subject = reader.string();
|
|
318
|
+
break;
|
|
319
|
+
case /* string action */ 2:
|
|
320
|
+
message.action = reader.string();
|
|
321
|
+
break;
|
|
322
|
+
case /* pncp.v1.EntityId requester */ 3:
|
|
323
|
+
message.requester = EntityId.internalBinaryRead(reader, reader.uint32(), options, message.requester);
|
|
324
|
+
break;
|
|
325
|
+
case /* optional pncp.v1.EntityId fulfiller */ 4:
|
|
326
|
+
message.fulfiller = EntityId.internalBinaryRead(reader, reader.uint32(), options, message.fulfiller);
|
|
327
|
+
break;
|
|
328
|
+
case /* pncp.v1.PncpCallback message */ 5:
|
|
329
|
+
message.message = PncpCallback.internalBinaryRead(reader, reader.uint32(), options, message.message);
|
|
330
|
+
break;
|
|
331
|
+
case /* pncp.v1.ConversationId id */ 6:
|
|
332
|
+
message.id = ConversationId.internalBinaryRead(reader, reader.uint32(), options, message.id);
|
|
333
|
+
break;
|
|
334
|
+
case /* pncp.v1.EntityId author */ 7:
|
|
335
|
+
message.author = EntityId.internalBinaryRead(reader, reader.uint32(), options, message.author);
|
|
336
|
+
break;
|
|
337
|
+
case /* optional otonoma.common.Value callback */ 8:
|
|
338
|
+
message.callback = Value.internalBinaryRead(reader, reader.uint32(), options, message.callback);
|
|
339
|
+
break;
|
|
340
|
+
case /* optional string prev_mid */ 9:
|
|
341
|
+
message.prevMid = reader.string();
|
|
342
|
+
break;
|
|
343
|
+
case /* pncp.v1.EntityId skill_id */ 10:
|
|
344
|
+
message.skillId = EntityId.internalBinaryRead(reader, reader.uint32(), options, message.skillId);
|
|
345
|
+
break;
|
|
346
|
+
default:
|
|
347
|
+
let u = options.readUnknownField;
|
|
348
|
+
if (u === "throw")
|
|
349
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
350
|
+
let d = reader.skip(wireType);
|
|
351
|
+
if (u !== false)
|
|
352
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
return message;
|
|
356
|
+
}
|
|
357
|
+
internalBinaryWrite(message, writer, options) {
|
|
358
|
+
/* string subject = 1; */
|
|
359
|
+
if (message.subject !== "")
|
|
360
|
+
writer.tag(1, WireType.LengthDelimited).string(message.subject);
|
|
361
|
+
/* string action = 2; */
|
|
362
|
+
if (message.action !== "")
|
|
363
|
+
writer.tag(2, WireType.LengthDelimited).string(message.action);
|
|
364
|
+
/* pncp.v1.EntityId requester = 3; */
|
|
365
|
+
if (message.requester)
|
|
366
|
+
EntityId.internalBinaryWrite(message.requester, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
367
|
+
/* optional pncp.v1.EntityId fulfiller = 4; */
|
|
368
|
+
if (message.fulfiller)
|
|
369
|
+
EntityId.internalBinaryWrite(message.fulfiller, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
370
|
+
/* pncp.v1.PncpCallback message = 5; */
|
|
371
|
+
if (message.message)
|
|
372
|
+
PncpCallback.internalBinaryWrite(message.message, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
373
|
+
/* pncp.v1.ConversationId id = 6; */
|
|
374
|
+
if (message.id)
|
|
375
|
+
ConversationId.internalBinaryWrite(message.id, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
376
|
+
/* pncp.v1.EntityId author = 7; */
|
|
377
|
+
if (message.author)
|
|
378
|
+
EntityId.internalBinaryWrite(message.author, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
379
|
+
/* optional otonoma.common.Value callback = 8; */
|
|
380
|
+
if (message.callback)
|
|
381
|
+
Value.internalBinaryWrite(message.callback, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
|
|
382
|
+
/* optional string prev_mid = 9; */
|
|
383
|
+
if (message.prevMid !== undefined)
|
|
384
|
+
writer.tag(9, WireType.LengthDelimited).string(message.prevMid);
|
|
385
|
+
/* pncp.v1.EntityId skill_id = 10; */
|
|
386
|
+
if (message.skillId)
|
|
387
|
+
EntityId.internalBinaryWrite(message.skillId, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
388
|
+
let u = options.writeUnknownFields;
|
|
389
|
+
if (u !== false)
|
|
390
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
391
|
+
return writer;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* @generated MessageType for protobuf message pncp.v1.ObservationCallback
|
|
396
|
+
*/
|
|
397
|
+
export const ObservationCallback = new ObservationCallback$Type();
|
|
398
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
399
|
+
class ObservationMessageWrapper$Type extends MessageType {
|
|
400
|
+
constructor() {
|
|
401
|
+
super("pncp.v1.ObservationMessageWrapper", [
|
|
402
|
+
{ no: 1, name: "body", kind: "message", T: () => ObservationCallback }
|
|
403
|
+
]);
|
|
404
|
+
}
|
|
405
|
+
create(value) {
|
|
406
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
407
|
+
if (value !== undefined)
|
|
408
|
+
reflectionMergePartial(this, message, value);
|
|
409
|
+
return message;
|
|
410
|
+
}
|
|
411
|
+
internalBinaryRead(reader, length, options, target) {
|
|
412
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
413
|
+
while (reader.pos < end) {
|
|
414
|
+
let [fieldNo, wireType] = reader.tag();
|
|
415
|
+
switch (fieldNo) {
|
|
416
|
+
case /* pncp.v1.ObservationCallback body */ 1:
|
|
417
|
+
message.body = ObservationCallback.internalBinaryRead(reader, reader.uint32(), options, message.body);
|
|
418
|
+
break;
|
|
419
|
+
default:
|
|
420
|
+
let u = options.readUnknownField;
|
|
421
|
+
if (u === "throw")
|
|
422
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
423
|
+
let d = reader.skip(wireType);
|
|
424
|
+
if (u !== false)
|
|
425
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
return message;
|
|
429
|
+
}
|
|
430
|
+
internalBinaryWrite(message, writer, options) {
|
|
431
|
+
/* pncp.v1.ObservationCallback body = 1; */
|
|
432
|
+
if (message.body)
|
|
433
|
+
ObservationCallback.internalBinaryWrite(message.body, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
434
|
+
let u = options.writeUnknownFields;
|
|
435
|
+
if (u !== false)
|
|
436
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
437
|
+
return writer;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* @generated MessageType for protobuf message pncp.v1.ObservationMessageWrapper
|
|
442
|
+
*/
|
|
443
|
+
export const ObservationMessageWrapper = new ObservationMessageWrapper$Type();
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
2
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
3
|
+
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
4
|
+
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
5
|
+
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
6
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
7
|
+
/**
|
|
8
|
+
* @generated from protobuf message otonoma.common.Value
|
|
9
|
+
*/
|
|
10
|
+
export interface Value {
|
|
11
|
+
/**
|
|
12
|
+
* @generated from protobuf oneof: kind
|
|
13
|
+
*/
|
|
14
|
+
kind: {
|
|
15
|
+
oneofKind: "nullValue";
|
|
16
|
+
/**
|
|
17
|
+
* @generated from protobuf field: otonoma.common.NullValue null_value = 1;
|
|
18
|
+
*/
|
|
19
|
+
nullValue: NullValue;
|
|
20
|
+
} | {
|
|
21
|
+
oneofKind: "numberValue";
|
|
22
|
+
/**
|
|
23
|
+
* @generated from protobuf field: double number_value = 2;
|
|
24
|
+
*/
|
|
25
|
+
numberValue: number;
|
|
26
|
+
} | {
|
|
27
|
+
oneofKind: "negIntValue";
|
|
28
|
+
/**
|
|
29
|
+
* @generated from protobuf field: int64 neg_int_value = 3;
|
|
30
|
+
*/
|
|
31
|
+
negIntValue: bigint;
|
|
32
|
+
} | {
|
|
33
|
+
oneofKind: "posIntValue";
|
|
34
|
+
/**
|
|
35
|
+
* @generated from protobuf field: uint64 pos_int_value = 4;
|
|
36
|
+
*/
|
|
37
|
+
posIntValue: bigint;
|
|
38
|
+
} | {
|
|
39
|
+
oneofKind: "stringValue";
|
|
40
|
+
/**
|
|
41
|
+
* @generated from protobuf field: string string_value = 5;
|
|
42
|
+
*/
|
|
43
|
+
stringValue: string;
|
|
44
|
+
} | {
|
|
45
|
+
oneofKind: "boolValue";
|
|
46
|
+
/**
|
|
47
|
+
* @generated from protobuf field: bool bool_value = 6;
|
|
48
|
+
*/
|
|
49
|
+
boolValue: boolean;
|
|
50
|
+
} | {
|
|
51
|
+
oneofKind: "structValue";
|
|
52
|
+
/**
|
|
53
|
+
* @generated from protobuf field: otonoma.common.Struct struct_value = 7;
|
|
54
|
+
*/
|
|
55
|
+
structValue: Struct;
|
|
56
|
+
} | {
|
|
57
|
+
oneofKind: "listValue";
|
|
58
|
+
/**
|
|
59
|
+
* @generated from protobuf field: otonoma.common.ListValue list_value = 8;
|
|
60
|
+
*/
|
|
61
|
+
listValue: ListValue;
|
|
62
|
+
} | {
|
|
63
|
+
oneofKind: undefined;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* @generated from protobuf message otonoma.common.Struct
|
|
68
|
+
*/
|
|
69
|
+
export interface Struct {
|
|
70
|
+
/**
|
|
71
|
+
* @generated from protobuf field: map<string, otonoma.common.Value> fields = 1;
|
|
72
|
+
*/
|
|
73
|
+
fields: {
|
|
74
|
+
[key: string]: Value;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* @generated from protobuf message otonoma.common.ListValue
|
|
79
|
+
*/
|
|
80
|
+
export interface ListValue {
|
|
81
|
+
/**
|
|
82
|
+
* @generated from protobuf field: repeated otonoma.common.Value values = 1;
|
|
83
|
+
*/
|
|
84
|
+
values: Value[];
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* @generated from protobuf enum otonoma.common.NullValue
|
|
88
|
+
*/
|
|
89
|
+
export declare enum NullValue {
|
|
90
|
+
/**
|
|
91
|
+
* @generated from protobuf enum value: NULL_VALUE = 0;
|
|
92
|
+
*/
|
|
93
|
+
NULL_VALUE = 0
|
|
94
|
+
}
|
|
95
|
+
declare class Value$Type extends MessageType<Value> {
|
|
96
|
+
constructor();
|
|
97
|
+
create(value?: PartialMessage<Value>): Value;
|
|
98
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Value): Value;
|
|
99
|
+
internalBinaryWrite(message: Value, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* @generated MessageType for protobuf message otonoma.common.Value
|
|
103
|
+
*/
|
|
104
|
+
export declare const Value: Value$Type;
|
|
105
|
+
declare class Struct$Type extends MessageType<Struct> {
|
|
106
|
+
constructor();
|
|
107
|
+
create(value?: PartialMessage<Struct>): Struct;
|
|
108
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Struct): Struct;
|
|
109
|
+
private binaryReadMap1;
|
|
110
|
+
internalBinaryWrite(message: Struct, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* @generated MessageType for protobuf message otonoma.common.Struct
|
|
114
|
+
*/
|
|
115
|
+
export declare const Struct: Struct$Type;
|
|
116
|
+
declare class ListValue$Type extends MessageType<ListValue> {
|
|
117
|
+
constructor();
|
|
118
|
+
create(value?: PartialMessage<ListValue>): ListValue;
|
|
119
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListValue): ListValue;
|
|
120
|
+
internalBinaryWrite(message: ListValue, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* @generated MessageType for protobuf message otonoma.common.ListValue
|
|
124
|
+
*/
|
|
125
|
+
export declare const ListValue: ListValue$Type;
|
|
126
|
+
export {};
|
|
127
|
+
//# sourceMappingURL=value.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"value.d.ts","sourceRoot":"","sources":["../../../../src/proto/otonoma/common/value.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,cAAc,EAAE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