@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,1333 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.9.4
|
|
2
|
+
// @generated from protobuf file "pncp.proto" (package "pncp.v1", 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
|
+
import { Timestamp } from "./google/protobuf/timestamp";
|
|
14
|
+
import { EntityId } from "./identifiers";
|
|
15
|
+
import { ConversationId } from "./identifiers";
|
|
16
|
+
import { Value } from "./otonoma/common/value";
|
|
17
|
+
/**
|
|
18
|
+
* A core packet comprised of either a request or a message. Some APIs make use of this wrapped type
|
|
19
|
+
* instead of providing specific APIs for either request or messages.
|
|
20
|
+
*
|
|
21
|
+
* @generated from protobuf message pncp.v1.PncpPacket
|
|
22
|
+
*/
|
|
23
|
+
export interface PncpPacket {
|
|
24
|
+
/**
|
|
25
|
+
* @generated from protobuf oneof: body
|
|
26
|
+
*/
|
|
27
|
+
body: {
|
|
28
|
+
oneofKind: "request";
|
|
29
|
+
/**
|
|
30
|
+
* @generated from protobuf field: pncp.v1.PncpRequest request = 1;
|
|
31
|
+
*/
|
|
32
|
+
request: PncpRequest;
|
|
33
|
+
} | {
|
|
34
|
+
oneofKind: "message";
|
|
35
|
+
/**
|
|
36
|
+
* @generated from protobuf field: pncp.v1.PncpMessage message = 2;
|
|
37
|
+
*/
|
|
38
|
+
message: PncpMessage;
|
|
39
|
+
} | {
|
|
40
|
+
oneofKind: undefined;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* A PNCP request begins a conversation between two actors.
|
|
45
|
+
*
|
|
46
|
+
* @generated from protobuf message pncp.v1.PncpRequest
|
|
47
|
+
*/
|
|
48
|
+
export interface PncpRequest {
|
|
49
|
+
/**
|
|
50
|
+
* The core body to the request.
|
|
51
|
+
*
|
|
52
|
+
* @generated from protobuf field: pncp.v1.PncpSkillMessage body = 1;
|
|
53
|
+
*/
|
|
54
|
+
body?: PncpSkillMessage;
|
|
55
|
+
/**
|
|
56
|
+
* Callback information provided on subsequent PNCP responses.
|
|
57
|
+
* This is mostly used to associate a request with a response on the actor side.
|
|
58
|
+
*
|
|
59
|
+
* @generated from protobuf field: optional otonoma.common.Value callback = 2;
|
|
60
|
+
*/
|
|
61
|
+
callback?: Value;
|
|
62
|
+
/**
|
|
63
|
+
* Parent conversation ID, if this request is a sub request. If this is a new request this field
|
|
64
|
+
* must be left blank.
|
|
65
|
+
*
|
|
66
|
+
* @generated from protobuf field: optional pncp.v1.ConversationId parent_id = 3;
|
|
67
|
+
*/
|
|
68
|
+
parentId?: ConversationId;
|
|
69
|
+
/**
|
|
70
|
+
* Identity of the base actor is determined through the provided authentication token on the request.
|
|
71
|
+
* However, paraflow actors are able to run multiple versions of an actor at once and they will be
|
|
72
|
+
* marshalled through the same connection and authentication. As such, we need the actor to provide
|
|
73
|
+
* the author information in such cases.
|
|
74
|
+
*
|
|
75
|
+
* @generated from protobuf field: optional pncp.v1.EntityId author = 4;
|
|
76
|
+
*/
|
|
77
|
+
author?: EntityId;
|
|
78
|
+
/**
|
|
79
|
+
* @generated from protobuf field: pncp.v1.SkillMatchStrategy match_strategy = 5;
|
|
80
|
+
*/
|
|
81
|
+
matchStrategy: SkillMatchStrategy;
|
|
82
|
+
/**
|
|
83
|
+
* version request spec for the (subject, action) pair. If not provided, the default (typically latest)
|
|
84
|
+
* is used instead.
|
|
85
|
+
*
|
|
86
|
+
* @generated from protobuf field: optional string version_req = 6;
|
|
87
|
+
*/
|
|
88
|
+
versionReq?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Optionally specify the exact actor that should match.
|
|
91
|
+
*
|
|
92
|
+
* @generated from protobuf field: optional string target_actor_id = 7;
|
|
93
|
+
*/
|
|
94
|
+
targetActorId?: string;
|
|
95
|
+
/**
|
|
96
|
+
* TODO: We might not need these fields anymore. We will see.
|
|
97
|
+
*
|
|
98
|
+
* @generated from protobuf field: optional otonoma.common.Value key = 8;
|
|
99
|
+
*/
|
|
100
|
+
key?: Value;
|
|
101
|
+
/**
|
|
102
|
+
* @generated from protobuf field: optional pncp.v1.PncpRequestMediumInfo medium_info = 9;
|
|
103
|
+
*/
|
|
104
|
+
mediumInfo?: PncpRequestMediumInfo;
|
|
105
|
+
/**
|
|
106
|
+
* If this is true, a match is required to be made upon the initial request. If it is false, the
|
|
107
|
+
* broker can store the message and conversation in an unmatched state and rematch it at a later
|
|
108
|
+
* time based on later actor availability.
|
|
109
|
+
* If the corresponding skill is a `Broadcast` skill, this field is not considered as they are
|
|
110
|
+
* not matched.
|
|
111
|
+
*
|
|
112
|
+
* @generated from protobuf field: bool must_match = 10;
|
|
113
|
+
*/
|
|
114
|
+
mustMatch: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Specifies whether this request should use the provided actor lock or not.
|
|
117
|
+
*
|
|
118
|
+
* @generated from protobuf field: bool use_lock = 11;
|
|
119
|
+
*/
|
|
120
|
+
useLock: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* If this is true, then the request can use open networking and search other open nodes on the
|
|
123
|
+
* network for a fulfiller if this node doesn't know of a fulfiller.
|
|
124
|
+
*
|
|
125
|
+
* @generated from protobuf field: bool allow_open_match = 12;
|
|
126
|
+
*/
|
|
127
|
+
allowOpenMatch: boolean;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* @generated from protobuf message pncp.v1.PncpRequestMediumInfo
|
|
131
|
+
*/
|
|
132
|
+
export interface PncpRequestMediumInfo {
|
|
133
|
+
/**
|
|
134
|
+
* ID of the medium that made the request.
|
|
135
|
+
*
|
|
136
|
+
* @generated from protobuf field: pncp.v1.EntityId id = 1;
|
|
137
|
+
*/
|
|
138
|
+
id?: EntityId;
|
|
139
|
+
/**
|
|
140
|
+
* Unique information identifying the user from the medium.
|
|
141
|
+
*
|
|
142
|
+
* @generated from protobuf field: optional otonoma.common.Value user_info = 2;
|
|
143
|
+
*/
|
|
144
|
+
userInfo?: Value;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Represents a skill request message. This message is the core "body" of a `PncpRequest`.
|
|
148
|
+
*
|
|
149
|
+
* @generated from protobuf message pncp.v1.PncpSkillMessage
|
|
150
|
+
*/
|
|
151
|
+
export interface PncpSkillMessage {
|
|
152
|
+
/**
|
|
153
|
+
* Subject of the request.
|
|
154
|
+
*
|
|
155
|
+
* @generated from protobuf field: string subject = 1;
|
|
156
|
+
*/
|
|
157
|
+
subject: string;
|
|
158
|
+
/**
|
|
159
|
+
* Action associated with the request.
|
|
160
|
+
*
|
|
161
|
+
* @generated from protobuf field: string action = 2;
|
|
162
|
+
*/
|
|
163
|
+
action: string;
|
|
164
|
+
/**
|
|
165
|
+
* The request data.
|
|
166
|
+
*
|
|
167
|
+
* @generated from protobuf field: otonoma.common.Value body = 5;
|
|
168
|
+
*/
|
|
169
|
+
body?: Value;
|
|
170
|
+
/**
|
|
171
|
+
* Taint data labels
|
|
172
|
+
*
|
|
173
|
+
* @generated from protobuf field: optional string taint = 6;
|
|
174
|
+
*/
|
|
175
|
+
taint?: string;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* A PNCP Message is a message internal to a conversation. Notably, this does not include requests, which
|
|
179
|
+
* begin a conversation automatically per their request.
|
|
180
|
+
*
|
|
181
|
+
* @generated from protobuf message pncp.v1.PncpMessage
|
|
182
|
+
*/
|
|
183
|
+
export interface PncpMessage {
|
|
184
|
+
/**
|
|
185
|
+
* The ID associated with this message.
|
|
186
|
+
*
|
|
187
|
+
* @generated from protobuf field: pncp.v1.ConversationId id = 1;
|
|
188
|
+
*/
|
|
189
|
+
id?: ConversationId;
|
|
190
|
+
/**
|
|
191
|
+
* The kind of message. Certain other fields are only optionally present depending on the value
|
|
192
|
+
* of this field.
|
|
193
|
+
*
|
|
194
|
+
* @generated from protobuf field: pncp.v1.PncpMessageKind kind = 10;
|
|
195
|
+
*/
|
|
196
|
+
kind: PncpMessageKind;
|
|
197
|
+
/**
|
|
198
|
+
* The core data of the message.
|
|
199
|
+
*
|
|
200
|
+
* @generated from protobuf field: otonoma.common.Value body = 11;
|
|
201
|
+
*/
|
|
202
|
+
body?: Value;
|
|
203
|
+
/**
|
|
204
|
+
* @generated from protobuf oneof: extra
|
|
205
|
+
*/
|
|
206
|
+
extra: {
|
|
207
|
+
oneofKind: "question";
|
|
208
|
+
/**
|
|
209
|
+
* @generated from protobuf field: pncp.v1.PncpQuestionEx question = 12;
|
|
210
|
+
*/
|
|
211
|
+
question: PncpQuestionEx;
|
|
212
|
+
} | {
|
|
213
|
+
oneofKind: "answer";
|
|
214
|
+
/**
|
|
215
|
+
* @generated from protobuf field: pncp.v1.PncpAnswerEx answer = 13;
|
|
216
|
+
*/
|
|
217
|
+
answer: PncpAnswerEx;
|
|
218
|
+
} | {
|
|
219
|
+
oneofKind: undefined;
|
|
220
|
+
};
|
|
221
|
+
/**
|
|
222
|
+
* Taint data labels
|
|
223
|
+
*
|
|
224
|
+
* @generated from protobuf field: optional string taint = 14;
|
|
225
|
+
*/
|
|
226
|
+
taint?: string;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* @generated from protobuf message pncp.v1.PncpQuestionEx
|
|
230
|
+
*/
|
|
231
|
+
export interface PncpQuestionEx {
|
|
232
|
+
/**
|
|
233
|
+
* ID of the question.
|
|
234
|
+
*
|
|
235
|
+
* @generated from protobuf field: string id = 1;
|
|
236
|
+
*/
|
|
237
|
+
id: string;
|
|
238
|
+
/**
|
|
239
|
+
* @generated from protobuf field: optional otonoma.common.Value callback = 2;
|
|
240
|
+
*/
|
|
241
|
+
callback?: Value;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* @generated from protobuf message pncp.v1.PncpAnswerEx
|
|
245
|
+
*/
|
|
246
|
+
export interface PncpAnswerEx {
|
|
247
|
+
/**
|
|
248
|
+
* Message ID of the question being replied to.
|
|
249
|
+
*
|
|
250
|
+
* @generated from protobuf field: string reply_to = 1;
|
|
251
|
+
*/
|
|
252
|
+
replyTo: string;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Response on the callback is a stream of these messages.
|
|
256
|
+
* The message format is a bit cumbersome as we are required to have one stream of messages.
|
|
257
|
+
*
|
|
258
|
+
* @generated from protobuf message pncp.v1.PncpCallback
|
|
259
|
+
*/
|
|
260
|
+
export interface PncpCallback {
|
|
261
|
+
/**
|
|
262
|
+
* @generated from protobuf oneof: body
|
|
263
|
+
*/
|
|
264
|
+
body: {
|
|
265
|
+
oneofKind: "skill";
|
|
266
|
+
/**
|
|
267
|
+
* @generated from protobuf field: pncp.v1.PncpRequestCallback skill = 1;
|
|
268
|
+
*/
|
|
269
|
+
skill: PncpRequestCallback;
|
|
270
|
+
} | {
|
|
271
|
+
oneofKind: "message";
|
|
272
|
+
/**
|
|
273
|
+
* @generated from protobuf field: pncp.v1.PncpMessageCallback message = 2;
|
|
274
|
+
*/
|
|
275
|
+
message: PncpMessageCallback;
|
|
276
|
+
} | {
|
|
277
|
+
oneofKind: undefined;
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* PncpRequestCallback is how skill requests are sent to actors for fulfillment.
|
|
282
|
+
*
|
|
283
|
+
* @generated from protobuf message pncp.v1.PncpRequestCallback
|
|
284
|
+
*/
|
|
285
|
+
export interface PncpRequestCallback {
|
|
286
|
+
/**
|
|
287
|
+
* @generated from protobuf field: pncp.v1.ConversationId id = 1;
|
|
288
|
+
*/
|
|
289
|
+
id?: ConversationId;
|
|
290
|
+
/**
|
|
291
|
+
* @generated from protobuf field: string message_id = 2;
|
|
292
|
+
*/
|
|
293
|
+
messageId: string;
|
|
294
|
+
/**
|
|
295
|
+
* The core PNCP request body.
|
|
296
|
+
*
|
|
297
|
+
* @generated from protobuf field: pncp.v1.PncpSkillMessage body = 3;
|
|
298
|
+
*/
|
|
299
|
+
body?: PncpSkillMessage;
|
|
300
|
+
/**
|
|
301
|
+
* Parent ID of the conversation that triggered this one, if one exists.
|
|
302
|
+
*
|
|
303
|
+
* @generated from protobuf field: optional pncp.v1.ConversationId parent_id = 4;
|
|
304
|
+
*/
|
|
305
|
+
parentId?: ConversationId;
|
|
306
|
+
/**
|
|
307
|
+
* Time the conversation was created.
|
|
308
|
+
*
|
|
309
|
+
* @generated from protobuf field: google.protobuf.Timestamp time_created = 5;
|
|
310
|
+
*/
|
|
311
|
+
timeCreated?: Timestamp;
|
|
312
|
+
/**
|
|
313
|
+
* Author of the request.
|
|
314
|
+
*
|
|
315
|
+
* @generated from protobuf field: pncp.v1.EntityId author_id = 6;
|
|
316
|
+
*/
|
|
317
|
+
authorId?: EntityId;
|
|
318
|
+
/**
|
|
319
|
+
* The actor ID of the receiving actor. This is the reflection of the PncpRequest author field.
|
|
320
|
+
* See notes on PncpRequest.author for why this is necessary.
|
|
321
|
+
*
|
|
322
|
+
* @generated from protobuf field: optional pncp.v1.EntityId target_actor_id = 7;
|
|
323
|
+
*/
|
|
324
|
+
targetActorId?: EntityId;
|
|
325
|
+
/**
|
|
326
|
+
* Parameter data. These fields are actor or skill specific metadata populated dynamically
|
|
327
|
+
* by the broker.
|
|
328
|
+
*
|
|
329
|
+
* @generated from protobuf field: pncp.v1.ParameterData parameters = 8;
|
|
330
|
+
*/
|
|
331
|
+
parameters?: ParameterData;
|
|
332
|
+
/**
|
|
333
|
+
* @generated from protobuf field: uint32 flags = 9;
|
|
334
|
+
*/
|
|
335
|
+
flags: number;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Context flags (default 0)
|
|
339
|
+
*
|
|
340
|
+
* @generated from protobuf enum pncp.v1.PncpRequestCallback.CallbackFlags
|
|
341
|
+
*/
|
|
342
|
+
export enum PncpRequestCallback_CallbackFlags {
|
|
343
|
+
/**
|
|
344
|
+
* @generated from protobuf enum value: FLAG_NONE = 0;
|
|
345
|
+
*/
|
|
346
|
+
FLAG_NONE = 0,
|
|
347
|
+
/**
|
|
348
|
+
* privileged actor request
|
|
349
|
+
*
|
|
350
|
+
* @generated from protobuf enum value: FLAG_PRIVILEGED = 1;
|
|
351
|
+
*/
|
|
352
|
+
FLAG_PRIVILEGED = 1
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* A message callback is a callback containing a message sent to an actor.
|
|
356
|
+
* This is how PncpMessages are routed to an actor.
|
|
357
|
+
*
|
|
358
|
+
* @generated from protobuf message pncp.v1.PncpMessageCallback
|
|
359
|
+
*/
|
|
360
|
+
export interface PncpMessageCallback {
|
|
361
|
+
/**
|
|
362
|
+
* @generated from protobuf field: pncp.v1.ConversationId id = 1;
|
|
363
|
+
*/
|
|
364
|
+
id?: ConversationId;
|
|
365
|
+
/**
|
|
366
|
+
* @generated from protobuf field: string message_id = 2;
|
|
367
|
+
*/
|
|
368
|
+
messageId: string;
|
|
369
|
+
/**
|
|
370
|
+
* @generated from protobuf field: google.protobuf.Timestamp time_created = 3;
|
|
371
|
+
*/
|
|
372
|
+
timeCreated?: Timestamp;
|
|
373
|
+
/**
|
|
374
|
+
* Returned key from initial request.
|
|
375
|
+
*
|
|
376
|
+
* @generated from protobuf field: optional otonoma.common.Value key = 4;
|
|
377
|
+
*/
|
|
378
|
+
key?: Value;
|
|
379
|
+
/**
|
|
380
|
+
* The core body of the message.
|
|
381
|
+
*
|
|
382
|
+
* @generated from protobuf field: pncp.v1.PncpMessage message = 5;
|
|
383
|
+
*/
|
|
384
|
+
message?: PncpMessage;
|
|
385
|
+
/**
|
|
386
|
+
* Certain message types (notably: Question) can provide params.
|
|
387
|
+
*
|
|
388
|
+
* @generated from protobuf field: optional otonoma.common.Value params = 6;
|
|
389
|
+
*/
|
|
390
|
+
params?: Value;
|
|
391
|
+
/**
|
|
392
|
+
* Callback provided on the initial message.
|
|
393
|
+
*
|
|
394
|
+
* @generated from protobuf field: optional otonoma.common.Value callback = 7;
|
|
395
|
+
*/
|
|
396
|
+
callback?: Value;
|
|
397
|
+
/**
|
|
398
|
+
* TODO: Do we need this?
|
|
399
|
+
*
|
|
400
|
+
* @generated from protobuf field: optional otonoma.common.Value medium = 8;
|
|
401
|
+
*/
|
|
402
|
+
medium?: Value;
|
|
403
|
+
/**
|
|
404
|
+
* @generated from protobuf field: pncp.v1.ConversationState conversation_state = 9;
|
|
405
|
+
*/
|
|
406
|
+
conversationState: ConversationState;
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* @generated from protobuf message pncp.v1.ParameterData
|
|
410
|
+
*/
|
|
411
|
+
export interface ParameterData {
|
|
412
|
+
/**
|
|
413
|
+
* @generated from protobuf field: optional otonoma.common.Value provider = 1;
|
|
414
|
+
*/
|
|
415
|
+
provider?: Value;
|
|
416
|
+
/**
|
|
417
|
+
* @generated from protobuf field: optional otonoma.common.Value skill = 2;
|
|
418
|
+
*/
|
|
419
|
+
skill?: Value;
|
|
420
|
+
/**
|
|
421
|
+
* @generated from protobuf field: optional otonoma.common.Value medium = 3;
|
|
422
|
+
*/
|
|
423
|
+
medium?: Value;
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* Match strategy. Defaults to `BEST`.
|
|
427
|
+
*
|
|
428
|
+
* @generated from protobuf enum pncp.v1.SkillMatchStrategy
|
|
429
|
+
*/
|
|
430
|
+
export enum SkillMatchStrategy {
|
|
431
|
+
/**
|
|
432
|
+
* @generated from protobuf enum value: BEST = 0;
|
|
433
|
+
*/
|
|
434
|
+
BEST = 0,
|
|
435
|
+
/**
|
|
436
|
+
* @generated from protobuf enum value: FIRST = 1;
|
|
437
|
+
*/
|
|
438
|
+
FIRST = 1,
|
|
439
|
+
/**
|
|
440
|
+
* @generated from protobuf enum value: STRICT = 2;
|
|
441
|
+
*/
|
|
442
|
+
STRICT = 2
|
|
443
|
+
}
|
|
444
|
+
// NOTE (JAB, 2024-07-08): Protobuf uses C++ scoping rules for enum variants, meaning the name of the enum
|
|
445
|
+
// does not sub-namespace them and two enums next to each other in the same module have the same scope.
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* @generated from protobuf enum pncp.v1.PncpMessageKind
|
|
449
|
+
*/
|
|
450
|
+
export enum PncpMessageKind {
|
|
451
|
+
/**
|
|
452
|
+
* @generated from protobuf enum value: PNCP_RESPONSE = 0;
|
|
453
|
+
*/
|
|
454
|
+
PNCP_RESPONSE = 0,
|
|
455
|
+
/**
|
|
456
|
+
* @generated from protobuf enum value: PNCP_STATUS = 1;
|
|
457
|
+
*/
|
|
458
|
+
PNCP_STATUS = 1,
|
|
459
|
+
/**
|
|
460
|
+
* @generated from protobuf enum value: PNCP_CANCEL = 2;
|
|
461
|
+
*/
|
|
462
|
+
PNCP_CANCEL = 2,
|
|
463
|
+
/**
|
|
464
|
+
* @generated from protobuf enum value: PNCP_ERROR = 3;
|
|
465
|
+
*/
|
|
466
|
+
PNCP_ERROR = 3,
|
|
467
|
+
/**
|
|
468
|
+
* @generated from protobuf enum value: PNCP_QUESTION = 4;
|
|
469
|
+
*/
|
|
470
|
+
PNCP_QUESTION = 4,
|
|
471
|
+
/**
|
|
472
|
+
* @generated from protobuf enum value: PNCP_ANSWER = 5;
|
|
473
|
+
*/
|
|
474
|
+
PNCP_ANSWER = 5
|
|
475
|
+
}
|
|
476
|
+
// These messages represent messages sent back to the actor from the broker.
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* @generated from protobuf enum pncp.v1.ConversationState
|
|
480
|
+
*/
|
|
481
|
+
export enum ConversationState {
|
|
482
|
+
/**
|
|
483
|
+
* @generated from protobuf enum value: STATE_IN_PROGRESS = 0;
|
|
484
|
+
*/
|
|
485
|
+
STATE_IN_PROGRESS = 0,
|
|
486
|
+
/**
|
|
487
|
+
* @generated from protobuf enum value: STATE_COMPLETED = 1;
|
|
488
|
+
*/
|
|
489
|
+
STATE_COMPLETED = 1,
|
|
490
|
+
/**
|
|
491
|
+
* @generated from protobuf enum value: STATE_ERRORED = 2;
|
|
492
|
+
*/
|
|
493
|
+
STATE_ERRORED = 2,
|
|
494
|
+
/**
|
|
495
|
+
* @generated from protobuf enum value: STATE_CANCELED = 3;
|
|
496
|
+
*/
|
|
497
|
+
STATE_CANCELED = 3,
|
|
498
|
+
/**
|
|
499
|
+
* @generated from protobuf enum value: STATE_UNMATCHED = 4;
|
|
500
|
+
*/
|
|
501
|
+
STATE_UNMATCHED = 4,
|
|
502
|
+
/**
|
|
503
|
+
* @generated from protobuf enum value: STATE_NETWORKING = 5;
|
|
504
|
+
*/
|
|
505
|
+
STATE_NETWORKING = 5
|
|
506
|
+
}
|
|
507
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
508
|
+
class PncpPacket$Type extends MessageType<PncpPacket> {
|
|
509
|
+
constructor() {
|
|
510
|
+
super("pncp.v1.PncpPacket", [
|
|
511
|
+
{ no: 1, name: "request", kind: "message", oneof: "body", T: () => PncpRequest },
|
|
512
|
+
{ no: 2, name: "message", kind: "message", oneof: "body", T: () => PncpMessage }
|
|
513
|
+
]);
|
|
514
|
+
}
|
|
515
|
+
create(value?: PartialMessage<PncpPacket>): PncpPacket {
|
|
516
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
517
|
+
message.body = { oneofKind: undefined };
|
|
518
|
+
if (value !== undefined)
|
|
519
|
+
reflectionMergePartial<PncpPacket>(this, message, value);
|
|
520
|
+
return message;
|
|
521
|
+
}
|
|
522
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PncpPacket): PncpPacket {
|
|
523
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
524
|
+
while (reader.pos < end) {
|
|
525
|
+
let [fieldNo, wireType] = reader.tag();
|
|
526
|
+
switch (fieldNo) {
|
|
527
|
+
case /* pncp.v1.PncpRequest request */ 1:
|
|
528
|
+
message.body = {
|
|
529
|
+
oneofKind: "request",
|
|
530
|
+
request: PncpRequest.internalBinaryRead(reader, reader.uint32(), options, (message.body as any).request)
|
|
531
|
+
};
|
|
532
|
+
break;
|
|
533
|
+
case /* pncp.v1.PncpMessage message */ 2:
|
|
534
|
+
message.body = {
|
|
535
|
+
oneofKind: "message",
|
|
536
|
+
message: PncpMessage.internalBinaryRead(reader, reader.uint32(), options, (message.body as any).message)
|
|
537
|
+
};
|
|
538
|
+
break;
|
|
539
|
+
default:
|
|
540
|
+
let u = options.readUnknownField;
|
|
541
|
+
if (u === "throw")
|
|
542
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
543
|
+
let d = reader.skip(wireType);
|
|
544
|
+
if (u !== false)
|
|
545
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
return message;
|
|
549
|
+
}
|
|
550
|
+
internalBinaryWrite(message: PncpPacket, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
551
|
+
/* pncp.v1.PncpRequest request = 1; */
|
|
552
|
+
if (message.body.oneofKind === "request")
|
|
553
|
+
PncpRequest.internalBinaryWrite(message.body.request, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
554
|
+
/* pncp.v1.PncpMessage message = 2; */
|
|
555
|
+
if (message.body.oneofKind === "message")
|
|
556
|
+
PncpMessage.internalBinaryWrite(message.body.message, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
557
|
+
let u = options.writeUnknownFields;
|
|
558
|
+
if (u !== false)
|
|
559
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
560
|
+
return writer;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
* @generated MessageType for protobuf message pncp.v1.PncpPacket
|
|
565
|
+
*/
|
|
566
|
+
export const PncpPacket = new PncpPacket$Type();
|
|
567
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
568
|
+
class PncpRequest$Type extends MessageType<PncpRequest> {
|
|
569
|
+
constructor() {
|
|
570
|
+
super("pncp.v1.PncpRequest", [
|
|
571
|
+
{ no: 1, name: "body", kind: "message", T: () => PncpSkillMessage },
|
|
572
|
+
{ no: 2, name: "callback", kind: "message", T: () => Value },
|
|
573
|
+
{ no: 3, name: "parent_id", kind: "message", T: () => ConversationId },
|
|
574
|
+
{ no: 4, name: "author", kind: "message", T: () => EntityId },
|
|
575
|
+
{ no: 5, name: "match_strategy", kind: "enum", T: () => ["pncp.v1.SkillMatchStrategy", SkillMatchStrategy] },
|
|
576
|
+
{ no: 6, name: "version_req", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
577
|
+
{ no: 7, name: "target_actor_id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
578
|
+
{ no: 8, name: "key", kind: "message", T: () => Value },
|
|
579
|
+
{ no: 9, name: "medium_info", kind: "message", T: () => PncpRequestMediumInfo },
|
|
580
|
+
{ no: 10, name: "must_match", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
581
|
+
{ no: 11, name: "use_lock", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
582
|
+
{ no: 12, name: "allow_open_match", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
583
|
+
]);
|
|
584
|
+
}
|
|
585
|
+
create(value?: PartialMessage<PncpRequest>): PncpRequest {
|
|
586
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
587
|
+
message.matchStrategy = 0;
|
|
588
|
+
message.mustMatch = false;
|
|
589
|
+
message.useLock = false;
|
|
590
|
+
message.allowOpenMatch = false;
|
|
591
|
+
if (value !== undefined)
|
|
592
|
+
reflectionMergePartial<PncpRequest>(this, message, value);
|
|
593
|
+
return message;
|
|
594
|
+
}
|
|
595
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PncpRequest): PncpRequest {
|
|
596
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
597
|
+
while (reader.pos < end) {
|
|
598
|
+
let [fieldNo, wireType] = reader.tag();
|
|
599
|
+
switch (fieldNo) {
|
|
600
|
+
case /* pncp.v1.PncpSkillMessage body */ 1:
|
|
601
|
+
message.body = PncpSkillMessage.internalBinaryRead(reader, reader.uint32(), options, message.body);
|
|
602
|
+
break;
|
|
603
|
+
case /* optional otonoma.common.Value callback */ 2:
|
|
604
|
+
message.callback = Value.internalBinaryRead(reader, reader.uint32(), options, message.callback);
|
|
605
|
+
break;
|
|
606
|
+
case /* optional pncp.v1.ConversationId parent_id */ 3:
|
|
607
|
+
message.parentId = ConversationId.internalBinaryRead(reader, reader.uint32(), options, message.parentId);
|
|
608
|
+
break;
|
|
609
|
+
case /* optional pncp.v1.EntityId author */ 4:
|
|
610
|
+
message.author = EntityId.internalBinaryRead(reader, reader.uint32(), options, message.author);
|
|
611
|
+
break;
|
|
612
|
+
case /* pncp.v1.SkillMatchStrategy match_strategy */ 5:
|
|
613
|
+
message.matchStrategy = reader.int32();
|
|
614
|
+
break;
|
|
615
|
+
case /* optional string version_req */ 6:
|
|
616
|
+
message.versionReq = reader.string();
|
|
617
|
+
break;
|
|
618
|
+
case /* optional string target_actor_id */ 7:
|
|
619
|
+
message.targetActorId = reader.string();
|
|
620
|
+
break;
|
|
621
|
+
case /* optional otonoma.common.Value key */ 8:
|
|
622
|
+
message.key = Value.internalBinaryRead(reader, reader.uint32(), options, message.key);
|
|
623
|
+
break;
|
|
624
|
+
case /* optional pncp.v1.PncpRequestMediumInfo medium_info */ 9:
|
|
625
|
+
message.mediumInfo = PncpRequestMediumInfo.internalBinaryRead(reader, reader.uint32(), options, message.mediumInfo);
|
|
626
|
+
break;
|
|
627
|
+
case /* bool must_match */ 10:
|
|
628
|
+
message.mustMatch = reader.bool();
|
|
629
|
+
break;
|
|
630
|
+
case /* bool use_lock */ 11:
|
|
631
|
+
message.useLock = reader.bool();
|
|
632
|
+
break;
|
|
633
|
+
case /* bool allow_open_match */ 12:
|
|
634
|
+
message.allowOpenMatch = reader.bool();
|
|
635
|
+
break;
|
|
636
|
+
default:
|
|
637
|
+
let u = options.readUnknownField;
|
|
638
|
+
if (u === "throw")
|
|
639
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
640
|
+
let d = reader.skip(wireType);
|
|
641
|
+
if (u !== false)
|
|
642
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
return message;
|
|
646
|
+
}
|
|
647
|
+
internalBinaryWrite(message: PncpRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
648
|
+
/* pncp.v1.PncpSkillMessage body = 1; */
|
|
649
|
+
if (message.body)
|
|
650
|
+
PncpSkillMessage.internalBinaryWrite(message.body, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
651
|
+
/* optional otonoma.common.Value callback = 2; */
|
|
652
|
+
if (message.callback)
|
|
653
|
+
Value.internalBinaryWrite(message.callback, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
654
|
+
/* optional pncp.v1.ConversationId parent_id = 3; */
|
|
655
|
+
if (message.parentId)
|
|
656
|
+
ConversationId.internalBinaryWrite(message.parentId, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
657
|
+
/* optional pncp.v1.EntityId author = 4; */
|
|
658
|
+
if (message.author)
|
|
659
|
+
EntityId.internalBinaryWrite(message.author, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
660
|
+
/* pncp.v1.SkillMatchStrategy match_strategy = 5; */
|
|
661
|
+
if (message.matchStrategy !== 0)
|
|
662
|
+
writer.tag(5, WireType.Varint).int32(message.matchStrategy);
|
|
663
|
+
/* optional string version_req = 6; */
|
|
664
|
+
if (message.versionReq !== undefined)
|
|
665
|
+
writer.tag(6, WireType.LengthDelimited).string(message.versionReq);
|
|
666
|
+
/* optional string target_actor_id = 7; */
|
|
667
|
+
if (message.targetActorId !== undefined)
|
|
668
|
+
writer.tag(7, WireType.LengthDelimited).string(message.targetActorId);
|
|
669
|
+
/* optional otonoma.common.Value key = 8; */
|
|
670
|
+
if (message.key)
|
|
671
|
+
Value.internalBinaryWrite(message.key, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
|
|
672
|
+
/* optional pncp.v1.PncpRequestMediumInfo medium_info = 9; */
|
|
673
|
+
if (message.mediumInfo)
|
|
674
|
+
PncpRequestMediumInfo.internalBinaryWrite(message.mediumInfo, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
|
|
675
|
+
/* bool must_match = 10; */
|
|
676
|
+
if (message.mustMatch !== false)
|
|
677
|
+
writer.tag(10, WireType.Varint).bool(message.mustMatch);
|
|
678
|
+
/* bool use_lock = 11; */
|
|
679
|
+
if (message.useLock !== false)
|
|
680
|
+
writer.tag(11, WireType.Varint).bool(message.useLock);
|
|
681
|
+
/* bool allow_open_match = 12; */
|
|
682
|
+
if (message.allowOpenMatch !== false)
|
|
683
|
+
writer.tag(12, WireType.Varint).bool(message.allowOpenMatch);
|
|
684
|
+
let u = options.writeUnknownFields;
|
|
685
|
+
if (u !== false)
|
|
686
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
687
|
+
return writer;
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
/**
|
|
691
|
+
* @generated MessageType for protobuf message pncp.v1.PncpRequest
|
|
692
|
+
*/
|
|
693
|
+
export const PncpRequest = new PncpRequest$Type();
|
|
694
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
695
|
+
class PncpRequestMediumInfo$Type extends MessageType<PncpRequestMediumInfo> {
|
|
696
|
+
constructor() {
|
|
697
|
+
super("pncp.v1.PncpRequestMediumInfo", [
|
|
698
|
+
{ no: 1, name: "id", kind: "message", T: () => EntityId },
|
|
699
|
+
{ no: 2, name: "user_info", kind: "message", T: () => Value }
|
|
700
|
+
]);
|
|
701
|
+
}
|
|
702
|
+
create(value?: PartialMessage<PncpRequestMediumInfo>): PncpRequestMediumInfo {
|
|
703
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
704
|
+
if (value !== undefined)
|
|
705
|
+
reflectionMergePartial<PncpRequestMediumInfo>(this, message, value);
|
|
706
|
+
return message;
|
|
707
|
+
}
|
|
708
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PncpRequestMediumInfo): PncpRequestMediumInfo {
|
|
709
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
710
|
+
while (reader.pos < end) {
|
|
711
|
+
let [fieldNo, wireType] = reader.tag();
|
|
712
|
+
switch (fieldNo) {
|
|
713
|
+
case /* pncp.v1.EntityId id */ 1:
|
|
714
|
+
message.id = EntityId.internalBinaryRead(reader, reader.uint32(), options, message.id);
|
|
715
|
+
break;
|
|
716
|
+
case /* optional otonoma.common.Value user_info */ 2:
|
|
717
|
+
message.userInfo = Value.internalBinaryRead(reader, reader.uint32(), options, message.userInfo);
|
|
718
|
+
break;
|
|
719
|
+
default:
|
|
720
|
+
let u = options.readUnknownField;
|
|
721
|
+
if (u === "throw")
|
|
722
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
723
|
+
let d = reader.skip(wireType);
|
|
724
|
+
if (u !== false)
|
|
725
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
return message;
|
|
729
|
+
}
|
|
730
|
+
internalBinaryWrite(message: PncpRequestMediumInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
731
|
+
/* pncp.v1.EntityId id = 1; */
|
|
732
|
+
if (message.id)
|
|
733
|
+
EntityId.internalBinaryWrite(message.id, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
734
|
+
/* optional otonoma.common.Value user_info = 2; */
|
|
735
|
+
if (message.userInfo)
|
|
736
|
+
Value.internalBinaryWrite(message.userInfo, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
737
|
+
let u = options.writeUnknownFields;
|
|
738
|
+
if (u !== false)
|
|
739
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
740
|
+
return writer;
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
/**
|
|
744
|
+
* @generated MessageType for protobuf message pncp.v1.PncpRequestMediumInfo
|
|
745
|
+
*/
|
|
746
|
+
export const PncpRequestMediumInfo = new PncpRequestMediumInfo$Type();
|
|
747
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
748
|
+
class PncpSkillMessage$Type extends MessageType<PncpSkillMessage> {
|
|
749
|
+
constructor() {
|
|
750
|
+
super("pncp.v1.PncpSkillMessage", [
|
|
751
|
+
{ no: 1, name: "subject", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
752
|
+
{ no: 2, name: "action", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
753
|
+
{ no: 5, name: "body", kind: "message", T: () => Value },
|
|
754
|
+
{ no: 6, name: "taint", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
|
|
755
|
+
]);
|
|
756
|
+
}
|
|
757
|
+
create(value?: PartialMessage<PncpSkillMessage>): PncpSkillMessage {
|
|
758
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
759
|
+
message.subject = "";
|
|
760
|
+
message.action = "";
|
|
761
|
+
if (value !== undefined)
|
|
762
|
+
reflectionMergePartial<PncpSkillMessage>(this, message, value);
|
|
763
|
+
return message;
|
|
764
|
+
}
|
|
765
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PncpSkillMessage): PncpSkillMessage {
|
|
766
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
767
|
+
while (reader.pos < end) {
|
|
768
|
+
let [fieldNo, wireType] = reader.tag();
|
|
769
|
+
switch (fieldNo) {
|
|
770
|
+
case /* string subject */ 1:
|
|
771
|
+
message.subject = reader.string();
|
|
772
|
+
break;
|
|
773
|
+
case /* string action */ 2:
|
|
774
|
+
message.action = reader.string();
|
|
775
|
+
break;
|
|
776
|
+
case /* otonoma.common.Value body */ 5:
|
|
777
|
+
message.body = Value.internalBinaryRead(reader, reader.uint32(), options, message.body);
|
|
778
|
+
break;
|
|
779
|
+
case /* optional string taint */ 6:
|
|
780
|
+
message.taint = reader.string();
|
|
781
|
+
break;
|
|
782
|
+
default:
|
|
783
|
+
let u = options.readUnknownField;
|
|
784
|
+
if (u === "throw")
|
|
785
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
786
|
+
let d = reader.skip(wireType);
|
|
787
|
+
if (u !== false)
|
|
788
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
return message;
|
|
792
|
+
}
|
|
793
|
+
internalBinaryWrite(message: PncpSkillMessage, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
794
|
+
/* string subject = 1; */
|
|
795
|
+
if (message.subject !== "")
|
|
796
|
+
writer.tag(1, WireType.LengthDelimited).string(message.subject);
|
|
797
|
+
/* string action = 2; */
|
|
798
|
+
if (message.action !== "")
|
|
799
|
+
writer.tag(2, WireType.LengthDelimited).string(message.action);
|
|
800
|
+
/* otonoma.common.Value body = 5; */
|
|
801
|
+
if (message.body)
|
|
802
|
+
Value.internalBinaryWrite(message.body, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
803
|
+
/* optional string taint = 6; */
|
|
804
|
+
if (message.taint !== undefined)
|
|
805
|
+
writer.tag(6, WireType.LengthDelimited).string(message.taint);
|
|
806
|
+
let u = options.writeUnknownFields;
|
|
807
|
+
if (u !== false)
|
|
808
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
809
|
+
return writer;
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* @generated MessageType for protobuf message pncp.v1.PncpSkillMessage
|
|
814
|
+
*/
|
|
815
|
+
export const PncpSkillMessage = new PncpSkillMessage$Type();
|
|
816
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
817
|
+
class PncpMessage$Type extends MessageType<PncpMessage> {
|
|
818
|
+
constructor() {
|
|
819
|
+
super("pncp.v1.PncpMessage", [
|
|
820
|
+
{ no: 1, name: "id", kind: "message", T: () => ConversationId },
|
|
821
|
+
{ no: 10, name: "kind", kind: "enum", T: () => ["pncp.v1.PncpMessageKind", PncpMessageKind] },
|
|
822
|
+
{ no: 11, name: "body", kind: "message", T: () => Value },
|
|
823
|
+
{ no: 12, name: "question", kind: "message", oneof: "extra", T: () => PncpQuestionEx },
|
|
824
|
+
{ no: 13, name: "answer", kind: "message", oneof: "extra", T: () => PncpAnswerEx },
|
|
825
|
+
{ no: 14, name: "taint", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
|
|
826
|
+
]);
|
|
827
|
+
}
|
|
828
|
+
create(value?: PartialMessage<PncpMessage>): PncpMessage {
|
|
829
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
830
|
+
message.kind = 0;
|
|
831
|
+
message.extra = { oneofKind: undefined };
|
|
832
|
+
if (value !== undefined)
|
|
833
|
+
reflectionMergePartial<PncpMessage>(this, message, value);
|
|
834
|
+
return message;
|
|
835
|
+
}
|
|
836
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PncpMessage): PncpMessage {
|
|
837
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
838
|
+
while (reader.pos < end) {
|
|
839
|
+
let [fieldNo, wireType] = reader.tag();
|
|
840
|
+
switch (fieldNo) {
|
|
841
|
+
case /* pncp.v1.ConversationId id */ 1:
|
|
842
|
+
message.id = ConversationId.internalBinaryRead(reader, reader.uint32(), options, message.id);
|
|
843
|
+
break;
|
|
844
|
+
case /* pncp.v1.PncpMessageKind kind */ 10:
|
|
845
|
+
message.kind = reader.int32();
|
|
846
|
+
break;
|
|
847
|
+
case /* otonoma.common.Value body */ 11:
|
|
848
|
+
message.body = Value.internalBinaryRead(reader, reader.uint32(), options, message.body);
|
|
849
|
+
break;
|
|
850
|
+
case /* pncp.v1.PncpQuestionEx question */ 12:
|
|
851
|
+
message.extra = {
|
|
852
|
+
oneofKind: "question",
|
|
853
|
+
question: PncpQuestionEx.internalBinaryRead(reader, reader.uint32(), options, (message.extra as any).question)
|
|
854
|
+
};
|
|
855
|
+
break;
|
|
856
|
+
case /* pncp.v1.PncpAnswerEx answer */ 13:
|
|
857
|
+
message.extra = {
|
|
858
|
+
oneofKind: "answer",
|
|
859
|
+
answer: PncpAnswerEx.internalBinaryRead(reader, reader.uint32(), options, (message.extra as any).answer)
|
|
860
|
+
};
|
|
861
|
+
break;
|
|
862
|
+
case /* optional string taint */ 14:
|
|
863
|
+
message.taint = reader.string();
|
|
864
|
+
break;
|
|
865
|
+
default:
|
|
866
|
+
let u = options.readUnknownField;
|
|
867
|
+
if (u === "throw")
|
|
868
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
869
|
+
let d = reader.skip(wireType);
|
|
870
|
+
if (u !== false)
|
|
871
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
return message;
|
|
875
|
+
}
|
|
876
|
+
internalBinaryWrite(message: PncpMessage, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
877
|
+
/* pncp.v1.ConversationId id = 1; */
|
|
878
|
+
if (message.id)
|
|
879
|
+
ConversationId.internalBinaryWrite(message.id, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
880
|
+
/* pncp.v1.PncpMessageKind kind = 10; */
|
|
881
|
+
if (message.kind !== 0)
|
|
882
|
+
writer.tag(10, WireType.Varint).int32(message.kind);
|
|
883
|
+
/* otonoma.common.Value body = 11; */
|
|
884
|
+
if (message.body)
|
|
885
|
+
Value.internalBinaryWrite(message.body, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
|
|
886
|
+
/* pncp.v1.PncpQuestionEx question = 12; */
|
|
887
|
+
if (message.extra.oneofKind === "question")
|
|
888
|
+
PncpQuestionEx.internalBinaryWrite(message.extra.question, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
|
|
889
|
+
/* pncp.v1.PncpAnswerEx answer = 13; */
|
|
890
|
+
if (message.extra.oneofKind === "answer")
|
|
891
|
+
PncpAnswerEx.internalBinaryWrite(message.extra.answer, writer.tag(13, WireType.LengthDelimited).fork(), options).join();
|
|
892
|
+
/* optional string taint = 14; */
|
|
893
|
+
if (message.taint !== undefined)
|
|
894
|
+
writer.tag(14, WireType.LengthDelimited).string(message.taint);
|
|
895
|
+
let u = options.writeUnknownFields;
|
|
896
|
+
if (u !== false)
|
|
897
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
898
|
+
return writer;
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
/**
|
|
902
|
+
* @generated MessageType for protobuf message pncp.v1.PncpMessage
|
|
903
|
+
*/
|
|
904
|
+
export const PncpMessage = new PncpMessage$Type();
|
|
905
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
906
|
+
class PncpQuestionEx$Type extends MessageType<PncpQuestionEx> {
|
|
907
|
+
constructor() {
|
|
908
|
+
super("pncp.v1.PncpQuestionEx", [
|
|
909
|
+
{ no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
910
|
+
{ no: 2, name: "callback", kind: "message", T: () => Value }
|
|
911
|
+
]);
|
|
912
|
+
}
|
|
913
|
+
create(value?: PartialMessage<PncpQuestionEx>): PncpQuestionEx {
|
|
914
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
915
|
+
message.id = "";
|
|
916
|
+
if (value !== undefined)
|
|
917
|
+
reflectionMergePartial<PncpQuestionEx>(this, message, value);
|
|
918
|
+
return message;
|
|
919
|
+
}
|
|
920
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PncpQuestionEx): PncpQuestionEx {
|
|
921
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
922
|
+
while (reader.pos < end) {
|
|
923
|
+
let [fieldNo, wireType] = reader.tag();
|
|
924
|
+
switch (fieldNo) {
|
|
925
|
+
case /* string id */ 1:
|
|
926
|
+
message.id = reader.string();
|
|
927
|
+
break;
|
|
928
|
+
case /* optional otonoma.common.Value callback */ 2:
|
|
929
|
+
message.callback = Value.internalBinaryRead(reader, reader.uint32(), options, message.callback);
|
|
930
|
+
break;
|
|
931
|
+
default:
|
|
932
|
+
let u = options.readUnknownField;
|
|
933
|
+
if (u === "throw")
|
|
934
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
935
|
+
let d = reader.skip(wireType);
|
|
936
|
+
if (u !== false)
|
|
937
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
return message;
|
|
941
|
+
}
|
|
942
|
+
internalBinaryWrite(message: PncpQuestionEx, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
943
|
+
/* string id = 1; */
|
|
944
|
+
if (message.id !== "")
|
|
945
|
+
writer.tag(1, WireType.LengthDelimited).string(message.id);
|
|
946
|
+
/* optional otonoma.common.Value callback = 2; */
|
|
947
|
+
if (message.callback)
|
|
948
|
+
Value.internalBinaryWrite(message.callback, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
949
|
+
let u = options.writeUnknownFields;
|
|
950
|
+
if (u !== false)
|
|
951
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
952
|
+
return writer;
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
/**
|
|
956
|
+
* @generated MessageType for protobuf message pncp.v1.PncpQuestionEx
|
|
957
|
+
*/
|
|
958
|
+
export const PncpQuestionEx = new PncpQuestionEx$Type();
|
|
959
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
960
|
+
class PncpAnswerEx$Type extends MessageType<PncpAnswerEx> {
|
|
961
|
+
constructor() {
|
|
962
|
+
super("pncp.v1.PncpAnswerEx", [
|
|
963
|
+
{ no: 1, name: "reply_to", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
964
|
+
]);
|
|
965
|
+
}
|
|
966
|
+
create(value?: PartialMessage<PncpAnswerEx>): PncpAnswerEx {
|
|
967
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
968
|
+
message.replyTo = "";
|
|
969
|
+
if (value !== undefined)
|
|
970
|
+
reflectionMergePartial<PncpAnswerEx>(this, message, value);
|
|
971
|
+
return message;
|
|
972
|
+
}
|
|
973
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PncpAnswerEx): PncpAnswerEx {
|
|
974
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
975
|
+
while (reader.pos < end) {
|
|
976
|
+
let [fieldNo, wireType] = reader.tag();
|
|
977
|
+
switch (fieldNo) {
|
|
978
|
+
case /* string reply_to */ 1:
|
|
979
|
+
message.replyTo = reader.string();
|
|
980
|
+
break;
|
|
981
|
+
default:
|
|
982
|
+
let u = options.readUnknownField;
|
|
983
|
+
if (u === "throw")
|
|
984
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
985
|
+
let d = reader.skip(wireType);
|
|
986
|
+
if (u !== false)
|
|
987
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
return message;
|
|
991
|
+
}
|
|
992
|
+
internalBinaryWrite(message: PncpAnswerEx, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
993
|
+
/* string reply_to = 1; */
|
|
994
|
+
if (message.replyTo !== "")
|
|
995
|
+
writer.tag(1, WireType.LengthDelimited).string(message.replyTo);
|
|
996
|
+
let u = options.writeUnknownFields;
|
|
997
|
+
if (u !== false)
|
|
998
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
999
|
+
return writer;
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
/**
|
|
1003
|
+
* @generated MessageType for protobuf message pncp.v1.PncpAnswerEx
|
|
1004
|
+
*/
|
|
1005
|
+
export const PncpAnswerEx = new PncpAnswerEx$Type();
|
|
1006
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1007
|
+
class PncpCallback$Type extends MessageType<PncpCallback> {
|
|
1008
|
+
constructor() {
|
|
1009
|
+
super("pncp.v1.PncpCallback", [
|
|
1010
|
+
{ no: 1, name: "skill", kind: "message", oneof: "body", T: () => PncpRequestCallback },
|
|
1011
|
+
{ no: 2, name: "message", kind: "message", oneof: "body", T: () => PncpMessageCallback }
|
|
1012
|
+
]);
|
|
1013
|
+
}
|
|
1014
|
+
create(value?: PartialMessage<PncpCallback>): PncpCallback {
|
|
1015
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1016
|
+
message.body = { oneofKind: undefined };
|
|
1017
|
+
if (value !== undefined)
|
|
1018
|
+
reflectionMergePartial<PncpCallback>(this, message, value);
|
|
1019
|
+
return message;
|
|
1020
|
+
}
|
|
1021
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PncpCallback): PncpCallback {
|
|
1022
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1023
|
+
while (reader.pos < end) {
|
|
1024
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1025
|
+
switch (fieldNo) {
|
|
1026
|
+
case /* pncp.v1.PncpRequestCallback skill */ 1:
|
|
1027
|
+
message.body = {
|
|
1028
|
+
oneofKind: "skill",
|
|
1029
|
+
skill: PncpRequestCallback.internalBinaryRead(reader, reader.uint32(), options, (message.body as any).skill)
|
|
1030
|
+
};
|
|
1031
|
+
break;
|
|
1032
|
+
case /* pncp.v1.PncpMessageCallback message */ 2:
|
|
1033
|
+
message.body = {
|
|
1034
|
+
oneofKind: "message",
|
|
1035
|
+
message: PncpMessageCallback.internalBinaryRead(reader, reader.uint32(), options, (message.body as any).message)
|
|
1036
|
+
};
|
|
1037
|
+
break;
|
|
1038
|
+
default:
|
|
1039
|
+
let u = options.readUnknownField;
|
|
1040
|
+
if (u === "throw")
|
|
1041
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1042
|
+
let d = reader.skip(wireType);
|
|
1043
|
+
if (u !== false)
|
|
1044
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
return message;
|
|
1048
|
+
}
|
|
1049
|
+
internalBinaryWrite(message: PncpCallback, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1050
|
+
/* pncp.v1.PncpRequestCallback skill = 1; */
|
|
1051
|
+
if (message.body.oneofKind === "skill")
|
|
1052
|
+
PncpRequestCallback.internalBinaryWrite(message.body.skill, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
1053
|
+
/* pncp.v1.PncpMessageCallback message = 2; */
|
|
1054
|
+
if (message.body.oneofKind === "message")
|
|
1055
|
+
PncpMessageCallback.internalBinaryWrite(message.body.message, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
1056
|
+
let u = options.writeUnknownFields;
|
|
1057
|
+
if (u !== false)
|
|
1058
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1059
|
+
return writer;
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
/**
|
|
1063
|
+
* @generated MessageType for protobuf message pncp.v1.PncpCallback
|
|
1064
|
+
*/
|
|
1065
|
+
export const PncpCallback = new PncpCallback$Type();
|
|
1066
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1067
|
+
class PncpRequestCallback$Type extends MessageType<PncpRequestCallback> {
|
|
1068
|
+
constructor() {
|
|
1069
|
+
super("pncp.v1.PncpRequestCallback", [
|
|
1070
|
+
{ no: 1, name: "id", kind: "message", T: () => ConversationId },
|
|
1071
|
+
{ no: 2, name: "message_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1072
|
+
{ no: 3, name: "body", kind: "message", T: () => PncpSkillMessage },
|
|
1073
|
+
{ no: 4, name: "parent_id", kind: "message", T: () => ConversationId },
|
|
1074
|
+
{ no: 5, name: "time_created", kind: "message", T: () => Timestamp },
|
|
1075
|
+
{ no: 6, name: "author_id", kind: "message", T: () => EntityId },
|
|
1076
|
+
{ no: 7, name: "target_actor_id", kind: "message", T: () => EntityId },
|
|
1077
|
+
{ no: 8, name: "parameters", kind: "message", T: () => ParameterData },
|
|
1078
|
+
{ no: 9, name: "flags", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }
|
|
1079
|
+
]);
|
|
1080
|
+
}
|
|
1081
|
+
create(value?: PartialMessage<PncpRequestCallback>): PncpRequestCallback {
|
|
1082
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1083
|
+
message.messageId = "";
|
|
1084
|
+
message.flags = 0;
|
|
1085
|
+
if (value !== undefined)
|
|
1086
|
+
reflectionMergePartial<PncpRequestCallback>(this, message, value);
|
|
1087
|
+
return message;
|
|
1088
|
+
}
|
|
1089
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PncpRequestCallback): PncpRequestCallback {
|
|
1090
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1091
|
+
while (reader.pos < end) {
|
|
1092
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1093
|
+
switch (fieldNo) {
|
|
1094
|
+
case /* pncp.v1.ConversationId id */ 1:
|
|
1095
|
+
message.id = ConversationId.internalBinaryRead(reader, reader.uint32(), options, message.id);
|
|
1096
|
+
break;
|
|
1097
|
+
case /* string message_id */ 2:
|
|
1098
|
+
message.messageId = reader.string();
|
|
1099
|
+
break;
|
|
1100
|
+
case /* pncp.v1.PncpSkillMessage body */ 3:
|
|
1101
|
+
message.body = PncpSkillMessage.internalBinaryRead(reader, reader.uint32(), options, message.body);
|
|
1102
|
+
break;
|
|
1103
|
+
case /* optional pncp.v1.ConversationId parent_id */ 4:
|
|
1104
|
+
message.parentId = ConversationId.internalBinaryRead(reader, reader.uint32(), options, message.parentId);
|
|
1105
|
+
break;
|
|
1106
|
+
case /* google.protobuf.Timestamp time_created */ 5:
|
|
1107
|
+
message.timeCreated = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.timeCreated);
|
|
1108
|
+
break;
|
|
1109
|
+
case /* pncp.v1.EntityId author_id */ 6:
|
|
1110
|
+
message.authorId = EntityId.internalBinaryRead(reader, reader.uint32(), options, message.authorId);
|
|
1111
|
+
break;
|
|
1112
|
+
case /* optional pncp.v1.EntityId target_actor_id */ 7:
|
|
1113
|
+
message.targetActorId = EntityId.internalBinaryRead(reader, reader.uint32(), options, message.targetActorId);
|
|
1114
|
+
break;
|
|
1115
|
+
case /* pncp.v1.ParameterData parameters */ 8:
|
|
1116
|
+
message.parameters = ParameterData.internalBinaryRead(reader, reader.uint32(), options, message.parameters);
|
|
1117
|
+
break;
|
|
1118
|
+
case /* uint32 flags */ 9:
|
|
1119
|
+
message.flags = reader.uint32();
|
|
1120
|
+
break;
|
|
1121
|
+
default:
|
|
1122
|
+
let u = options.readUnknownField;
|
|
1123
|
+
if (u === "throw")
|
|
1124
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1125
|
+
let d = reader.skip(wireType);
|
|
1126
|
+
if (u !== false)
|
|
1127
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
return message;
|
|
1131
|
+
}
|
|
1132
|
+
internalBinaryWrite(message: PncpRequestCallback, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1133
|
+
/* pncp.v1.ConversationId id = 1; */
|
|
1134
|
+
if (message.id)
|
|
1135
|
+
ConversationId.internalBinaryWrite(message.id, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
1136
|
+
/* string message_id = 2; */
|
|
1137
|
+
if (message.messageId !== "")
|
|
1138
|
+
writer.tag(2, WireType.LengthDelimited).string(message.messageId);
|
|
1139
|
+
/* pncp.v1.PncpSkillMessage body = 3; */
|
|
1140
|
+
if (message.body)
|
|
1141
|
+
PncpSkillMessage.internalBinaryWrite(message.body, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
1142
|
+
/* optional pncp.v1.ConversationId parent_id = 4; */
|
|
1143
|
+
if (message.parentId)
|
|
1144
|
+
ConversationId.internalBinaryWrite(message.parentId, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
1145
|
+
/* google.protobuf.Timestamp time_created = 5; */
|
|
1146
|
+
if (message.timeCreated)
|
|
1147
|
+
Timestamp.internalBinaryWrite(message.timeCreated, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
1148
|
+
/* pncp.v1.EntityId author_id = 6; */
|
|
1149
|
+
if (message.authorId)
|
|
1150
|
+
EntityId.internalBinaryWrite(message.authorId, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
1151
|
+
/* optional pncp.v1.EntityId target_actor_id = 7; */
|
|
1152
|
+
if (message.targetActorId)
|
|
1153
|
+
EntityId.internalBinaryWrite(message.targetActorId, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
1154
|
+
/* pncp.v1.ParameterData parameters = 8; */
|
|
1155
|
+
if (message.parameters)
|
|
1156
|
+
ParameterData.internalBinaryWrite(message.parameters, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
|
|
1157
|
+
/* uint32 flags = 9; */
|
|
1158
|
+
if (message.flags !== 0)
|
|
1159
|
+
writer.tag(9, WireType.Varint).uint32(message.flags);
|
|
1160
|
+
let u = options.writeUnknownFields;
|
|
1161
|
+
if (u !== false)
|
|
1162
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1163
|
+
return writer;
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
/**
|
|
1167
|
+
* @generated MessageType for protobuf message pncp.v1.PncpRequestCallback
|
|
1168
|
+
*/
|
|
1169
|
+
export const PncpRequestCallback = new PncpRequestCallback$Type();
|
|
1170
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1171
|
+
class PncpMessageCallback$Type extends MessageType<PncpMessageCallback> {
|
|
1172
|
+
constructor() {
|
|
1173
|
+
super("pncp.v1.PncpMessageCallback", [
|
|
1174
|
+
{ no: 1, name: "id", kind: "message", T: () => ConversationId },
|
|
1175
|
+
{ no: 2, name: "message_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1176
|
+
{ no: 3, name: "time_created", kind: "message", T: () => Timestamp },
|
|
1177
|
+
{ no: 4, name: "key", kind: "message", T: () => Value },
|
|
1178
|
+
{ no: 5, name: "message", kind: "message", T: () => PncpMessage },
|
|
1179
|
+
{ no: 6, name: "params", kind: "message", T: () => Value },
|
|
1180
|
+
{ no: 7, name: "callback", kind: "message", T: () => Value },
|
|
1181
|
+
{ no: 8, name: "medium", kind: "message", T: () => Value },
|
|
1182
|
+
{ no: 9, name: "conversation_state", kind: "enum", T: () => ["pncp.v1.ConversationState", ConversationState] }
|
|
1183
|
+
]);
|
|
1184
|
+
}
|
|
1185
|
+
create(value?: PartialMessage<PncpMessageCallback>): PncpMessageCallback {
|
|
1186
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1187
|
+
message.messageId = "";
|
|
1188
|
+
message.conversationState = 0;
|
|
1189
|
+
if (value !== undefined)
|
|
1190
|
+
reflectionMergePartial<PncpMessageCallback>(this, message, value);
|
|
1191
|
+
return message;
|
|
1192
|
+
}
|
|
1193
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PncpMessageCallback): PncpMessageCallback {
|
|
1194
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1195
|
+
while (reader.pos < end) {
|
|
1196
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1197
|
+
switch (fieldNo) {
|
|
1198
|
+
case /* pncp.v1.ConversationId id */ 1:
|
|
1199
|
+
message.id = ConversationId.internalBinaryRead(reader, reader.uint32(), options, message.id);
|
|
1200
|
+
break;
|
|
1201
|
+
case /* string message_id */ 2:
|
|
1202
|
+
message.messageId = reader.string();
|
|
1203
|
+
break;
|
|
1204
|
+
case /* google.protobuf.Timestamp time_created */ 3:
|
|
1205
|
+
message.timeCreated = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.timeCreated);
|
|
1206
|
+
break;
|
|
1207
|
+
case /* optional otonoma.common.Value key */ 4:
|
|
1208
|
+
message.key = Value.internalBinaryRead(reader, reader.uint32(), options, message.key);
|
|
1209
|
+
break;
|
|
1210
|
+
case /* pncp.v1.PncpMessage message */ 5:
|
|
1211
|
+
message.message = PncpMessage.internalBinaryRead(reader, reader.uint32(), options, message.message);
|
|
1212
|
+
break;
|
|
1213
|
+
case /* optional otonoma.common.Value params */ 6:
|
|
1214
|
+
message.params = Value.internalBinaryRead(reader, reader.uint32(), options, message.params);
|
|
1215
|
+
break;
|
|
1216
|
+
case /* optional otonoma.common.Value callback */ 7:
|
|
1217
|
+
message.callback = Value.internalBinaryRead(reader, reader.uint32(), options, message.callback);
|
|
1218
|
+
break;
|
|
1219
|
+
case /* optional otonoma.common.Value medium */ 8:
|
|
1220
|
+
message.medium = Value.internalBinaryRead(reader, reader.uint32(), options, message.medium);
|
|
1221
|
+
break;
|
|
1222
|
+
case /* pncp.v1.ConversationState conversation_state */ 9:
|
|
1223
|
+
message.conversationState = reader.int32();
|
|
1224
|
+
break;
|
|
1225
|
+
default:
|
|
1226
|
+
let u = options.readUnknownField;
|
|
1227
|
+
if (u === "throw")
|
|
1228
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1229
|
+
let d = reader.skip(wireType);
|
|
1230
|
+
if (u !== false)
|
|
1231
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
return message;
|
|
1235
|
+
}
|
|
1236
|
+
internalBinaryWrite(message: PncpMessageCallback, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1237
|
+
/* pncp.v1.ConversationId id = 1; */
|
|
1238
|
+
if (message.id)
|
|
1239
|
+
ConversationId.internalBinaryWrite(message.id, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
1240
|
+
/* string message_id = 2; */
|
|
1241
|
+
if (message.messageId !== "")
|
|
1242
|
+
writer.tag(2, WireType.LengthDelimited).string(message.messageId);
|
|
1243
|
+
/* google.protobuf.Timestamp time_created = 3; */
|
|
1244
|
+
if (message.timeCreated)
|
|
1245
|
+
Timestamp.internalBinaryWrite(message.timeCreated, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
1246
|
+
/* optional otonoma.common.Value key = 4; */
|
|
1247
|
+
if (message.key)
|
|
1248
|
+
Value.internalBinaryWrite(message.key, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
1249
|
+
/* pncp.v1.PncpMessage message = 5; */
|
|
1250
|
+
if (message.message)
|
|
1251
|
+
PncpMessage.internalBinaryWrite(message.message, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
1252
|
+
/* optional otonoma.common.Value params = 6; */
|
|
1253
|
+
if (message.params)
|
|
1254
|
+
Value.internalBinaryWrite(message.params, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
1255
|
+
/* optional otonoma.common.Value callback = 7; */
|
|
1256
|
+
if (message.callback)
|
|
1257
|
+
Value.internalBinaryWrite(message.callback, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
1258
|
+
/* optional otonoma.common.Value medium = 8; */
|
|
1259
|
+
if (message.medium)
|
|
1260
|
+
Value.internalBinaryWrite(message.medium, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
|
|
1261
|
+
/* pncp.v1.ConversationState conversation_state = 9; */
|
|
1262
|
+
if (message.conversationState !== 0)
|
|
1263
|
+
writer.tag(9, WireType.Varint).int32(message.conversationState);
|
|
1264
|
+
let u = options.writeUnknownFields;
|
|
1265
|
+
if (u !== false)
|
|
1266
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1267
|
+
return writer;
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
/**
|
|
1271
|
+
* @generated MessageType for protobuf message pncp.v1.PncpMessageCallback
|
|
1272
|
+
*/
|
|
1273
|
+
export const PncpMessageCallback = new PncpMessageCallback$Type();
|
|
1274
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1275
|
+
class ParameterData$Type extends MessageType<ParameterData> {
|
|
1276
|
+
constructor() {
|
|
1277
|
+
super("pncp.v1.ParameterData", [
|
|
1278
|
+
{ no: 1, name: "provider", kind: "message", T: () => Value },
|
|
1279
|
+
{ no: 2, name: "skill", kind: "message", T: () => Value },
|
|
1280
|
+
{ no: 3, name: "medium", kind: "message", T: () => Value }
|
|
1281
|
+
]);
|
|
1282
|
+
}
|
|
1283
|
+
create(value?: PartialMessage<ParameterData>): ParameterData {
|
|
1284
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1285
|
+
if (value !== undefined)
|
|
1286
|
+
reflectionMergePartial<ParameterData>(this, message, value);
|
|
1287
|
+
return message;
|
|
1288
|
+
}
|
|
1289
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ParameterData): ParameterData {
|
|
1290
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1291
|
+
while (reader.pos < end) {
|
|
1292
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1293
|
+
switch (fieldNo) {
|
|
1294
|
+
case /* optional otonoma.common.Value provider */ 1:
|
|
1295
|
+
message.provider = Value.internalBinaryRead(reader, reader.uint32(), options, message.provider);
|
|
1296
|
+
break;
|
|
1297
|
+
case /* optional otonoma.common.Value skill */ 2:
|
|
1298
|
+
message.skill = Value.internalBinaryRead(reader, reader.uint32(), options, message.skill);
|
|
1299
|
+
break;
|
|
1300
|
+
case /* optional otonoma.common.Value medium */ 3:
|
|
1301
|
+
message.medium = Value.internalBinaryRead(reader, reader.uint32(), options, message.medium);
|
|
1302
|
+
break;
|
|
1303
|
+
default:
|
|
1304
|
+
let u = options.readUnknownField;
|
|
1305
|
+
if (u === "throw")
|
|
1306
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1307
|
+
let d = reader.skip(wireType);
|
|
1308
|
+
if (u !== false)
|
|
1309
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
return message;
|
|
1313
|
+
}
|
|
1314
|
+
internalBinaryWrite(message: ParameterData, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1315
|
+
/* optional otonoma.common.Value provider = 1; */
|
|
1316
|
+
if (message.provider)
|
|
1317
|
+
Value.internalBinaryWrite(message.provider, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
1318
|
+
/* optional otonoma.common.Value skill = 2; */
|
|
1319
|
+
if (message.skill)
|
|
1320
|
+
Value.internalBinaryWrite(message.skill, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
1321
|
+
/* optional otonoma.common.Value medium = 3; */
|
|
1322
|
+
if (message.medium)
|
|
1323
|
+
Value.internalBinaryWrite(message.medium, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
1324
|
+
let u = options.writeUnknownFields;
|
|
1325
|
+
if (u !== false)
|
|
1326
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1327
|
+
return writer;
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
/**
|
|
1331
|
+
* @generated MessageType for protobuf message pncp.v1.ParameterData
|
|
1332
|
+
*/
|
|
1333
|
+
export const ParameterData = new ParameterData$Type();
|