@kronos-ts/axon-server 0.1.0
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/dist/axon-server-event-store.d.ts +16 -0
- package/dist/axon-server-event-store.d.ts.map +1 -0
- package/dist/axon-server-event-store.js +282 -0
- package/dist/axon-server-event-store.js.map +1 -0
- package/dist/axon-server-snapshot-store.d.ts +12 -0
- package/dist/axon-server-snapshot-store.d.ts.map +1 -0
- package/dist/axon-server-snapshot-store.js +88 -0
- package/dist/axon-server-snapshot-store.js.map +1 -0
- package/dist/axon-server.d.ts +115 -0
- package/dist/axon-server.d.ts.map +1 -0
- package/dist/axon-server.js +986 -0
- package/dist/axon-server.js.map +1 -0
- package/dist/connection-manager.d.ts +49 -0
- package/dist/connection-manager.d.ts.map +1 -0
- package/dist/connection-manager.js +37 -0
- package/dist/connection-manager.js.map +1 -0
- package/dist/connection.d.ts +129 -0
- package/dist/connection.d.ts.map +1 -0
- package/dist/connection.js +130 -0
- package/dist/connection.js.map +1 -0
- package/dist/errors.d.ts +96 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +189 -0
- package/dist/errors.js.map +1 -0
- package/dist/event-processor-info.d.ts +35 -0
- package/dist/event-processor-info.d.ts.map +1 -0
- package/dist/event-processor-info.js +28 -0
- package/dist/event-processor-info.js.map +1 -0
- package/dist/flow-controlled-sender.d.ts +30 -0
- package/dist/flow-controlled-sender.d.ts.map +1 -0
- package/dist/flow-controlled-sender.js +60 -0
- package/dist/flow-controlled-sender.js.map +1 -0
- package/dist/generated/command.d.ts +158 -0
- package/dist/generated/command.d.ts.map +1 -0
- package/dist/generated/command.js +970 -0
- package/dist/generated/command.js.map +1 -0
- package/dist/generated/common.d.ts +130 -0
- package/dist/generated/common.d.ts.map +1 -0
- package/dist/generated/common.js +908 -0
- package/dist/generated/common.js.map +1 -0
- package/dist/generated/control.d.ts +293 -0
- package/dist/generated/control.d.ts.map +1 -0
- package/dist/generated/control.js +1938 -0
- package/dist/generated/control.js.map +1 -0
- package/dist/generated/dcb.d.ts +650 -0
- package/dist/generated/dcb.d.ts.map +1 -0
- package/dist/generated/dcb.js +2943 -0
- package/dist/generated/dcb.js.map +1 -0
- package/dist/generated/event.d.ts +667 -0
- package/dist/generated/event.d.ts.map +1 -0
- package/dist/generated/event.js +3185 -0
- package/dist/generated/event.js.map +1 -0
- package/dist/generated/google/protobuf/empty.d.ts +30 -0
- package/dist/generated/google/protobuf/empty.d.ts.map +1 -0
- package/dist/generated/google/protobuf/empty.js +46 -0
- package/dist/generated/google/protobuf/empty.js.map +1 -0
- package/dist/generated/query.d.ts +300 -0
- package/dist/generated/query.d.ts.map +1 -0
- package/dist/generated/query.js +2183 -0
- package/dist/generated/query.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/message-size.d.ts +38 -0
- package/dist/message-size.d.ts.map +1 -0
- package/dist/message-size.js +57 -0
- package/dist/message-size.js.map +1 -0
- package/dist/metadata-conversion.d.ts +11 -0
- package/dist/metadata-conversion.d.ts.map +1 -0
- package/dist/metadata-conversion.js +51 -0
- package/dist/metadata-conversion.js.map +1 -0
- package/dist/outbound-stream.d.ts +15 -0
- package/dist/outbound-stream.d.ts.map +1 -0
- package/dist/outbound-stream.js +39 -0
- package/dist/outbound-stream.js.map +1 -0
- package/dist/platform-service.d.ts +119 -0
- package/dist/platform-service.d.ts.map +1 -0
- package/dist/platform-service.js +250 -0
- package/dist/platform-service.js.map +1 -0
- package/dist/shutdown-latch.d.ts +38 -0
- package/dist/shutdown-latch.d.ts.map +1 -0
- package/dist/shutdown-latch.js +51 -0
- package/dist/shutdown-latch.js.map +1 -0
- package/package.json +69 -0
- package/src/axon-server-event-store.ts +358 -0
- package/src/axon-server-snapshot-store.ts +118 -0
- package/src/axon-server.ts +1202 -0
- package/src/connection-manager.ts +88 -0
- package/src/connection.ts +272 -0
- package/src/errors.ts +223 -0
- package/src/event-processor-info.ts +62 -0
- package/src/flow-controlled-sender.ts +91 -0
- package/src/generated/command.ts +1231 -0
- package/src/generated/common.ts +1097 -0
- package/src/generated/control.ts +2419 -0
- package/src/generated/dcb.ts +3826 -0
- package/src/generated/event.ts +4076 -0
- package/src/generated/google/protobuf/empty.ts +84 -0
- package/src/generated/query.ts +2723 -0
- package/src/index.ts +75 -0
- package/src/message-size.ts +75 -0
- package/src/metadata-conversion.ts +46 -0
- package/src/outbound-stream.ts +52 -0
- package/src/platform-service.ts +361 -0
- package/src/shutdown-latch.ts +97 -0
|
@@ -0,0 +1,908 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.6
|
|
4
|
+
// protoc v3.19.1
|
|
5
|
+
// source: common.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
8
|
+
export const protobufPackage = "io.axoniq.axonserver.grpc";
|
|
9
|
+
/** An enumeration of possible keys for processing instructions. */
|
|
10
|
+
export var ProcessingKey;
|
|
11
|
+
(function (ProcessingKey) {
|
|
12
|
+
/** ROUTING_KEY - key indicating that the attached value should be used for consistent routing. */
|
|
13
|
+
ProcessingKey[ProcessingKey["ROUTING_KEY"] = 0] = "ROUTING_KEY";
|
|
14
|
+
/** PRIORITY - key indicating that the attached value indicates relative priority of this message. */
|
|
15
|
+
ProcessingKey[ProcessingKey["PRIORITY"] = 1] = "PRIORITY";
|
|
16
|
+
/** TIMEOUT - key indicating that the accompanied message has a finite validity. The attached value contains the number of milliseconds. */
|
|
17
|
+
ProcessingKey[ProcessingKey["TIMEOUT"] = 2] = "TIMEOUT";
|
|
18
|
+
/** NR_OF_RESULTS - key indicating that the requester expects at most the given number of results from this message. Use -1 for unlimited. */
|
|
19
|
+
ProcessingKey[ProcessingKey["NR_OF_RESULTS"] = 3] = "NR_OF_RESULTS";
|
|
20
|
+
/** SERVER_SUPPORTS_STREAMING - key indicating whether Axon Server supports streaming. */
|
|
21
|
+
ProcessingKey[ProcessingKey["SERVER_SUPPORTS_STREAMING"] = 7] = "SERVER_SUPPORTS_STREAMING";
|
|
22
|
+
/** CLIENT_SUPPORTS_STREAMING - key indicating whether Client supports streaming. */
|
|
23
|
+
ProcessingKey[ProcessingKey["CLIENT_SUPPORTS_STREAMING"] = 8] = "CLIENT_SUPPORTS_STREAMING";
|
|
24
|
+
ProcessingKey[ProcessingKey["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
25
|
+
})(ProcessingKey || (ProcessingKey = {}));
|
|
26
|
+
export function processingKeyFromJSON(object) {
|
|
27
|
+
switch (object) {
|
|
28
|
+
case 0:
|
|
29
|
+
case "ROUTING_KEY":
|
|
30
|
+
return ProcessingKey.ROUTING_KEY;
|
|
31
|
+
case 1:
|
|
32
|
+
case "PRIORITY":
|
|
33
|
+
return ProcessingKey.PRIORITY;
|
|
34
|
+
case 2:
|
|
35
|
+
case "TIMEOUT":
|
|
36
|
+
return ProcessingKey.TIMEOUT;
|
|
37
|
+
case 3:
|
|
38
|
+
case "NR_OF_RESULTS":
|
|
39
|
+
return ProcessingKey.NR_OF_RESULTS;
|
|
40
|
+
case 7:
|
|
41
|
+
case "SERVER_SUPPORTS_STREAMING":
|
|
42
|
+
return ProcessingKey.SERVER_SUPPORTS_STREAMING;
|
|
43
|
+
case 8:
|
|
44
|
+
case "CLIENT_SUPPORTS_STREAMING":
|
|
45
|
+
return ProcessingKey.CLIENT_SUPPORTS_STREAMING;
|
|
46
|
+
case -1:
|
|
47
|
+
case "UNRECOGNIZED":
|
|
48
|
+
default:
|
|
49
|
+
return ProcessingKey.UNRECOGNIZED;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export function processingKeyToJSON(object) {
|
|
53
|
+
switch (object) {
|
|
54
|
+
case ProcessingKey.ROUTING_KEY:
|
|
55
|
+
return "ROUTING_KEY";
|
|
56
|
+
case ProcessingKey.PRIORITY:
|
|
57
|
+
return "PRIORITY";
|
|
58
|
+
case ProcessingKey.TIMEOUT:
|
|
59
|
+
return "TIMEOUT";
|
|
60
|
+
case ProcessingKey.NR_OF_RESULTS:
|
|
61
|
+
return "NR_OF_RESULTS";
|
|
62
|
+
case ProcessingKey.SERVER_SUPPORTS_STREAMING:
|
|
63
|
+
return "SERVER_SUPPORTS_STREAMING";
|
|
64
|
+
case ProcessingKey.CLIENT_SUPPORTS_STREAMING:
|
|
65
|
+
return "CLIENT_SUPPORTS_STREAMING";
|
|
66
|
+
case ProcessingKey.UNRECOGNIZED:
|
|
67
|
+
default:
|
|
68
|
+
return "UNRECOGNIZED";
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/** Defines status values for a scheduled task */
|
|
72
|
+
export var TaskStatus;
|
|
73
|
+
(function (TaskStatus) {
|
|
74
|
+
/** SCHEDULED - Task is scheduled for execution */
|
|
75
|
+
TaskStatus[TaskStatus["SCHEDULED"] = 0] = "SCHEDULED";
|
|
76
|
+
/** COMPLETED - Task execution completed successfully */
|
|
77
|
+
TaskStatus[TaskStatus["COMPLETED"] = 1] = "COMPLETED";
|
|
78
|
+
/** FAILED - Task execution failed with non transient exception */
|
|
79
|
+
TaskStatus[TaskStatus["FAILED"] = 2] = "FAILED";
|
|
80
|
+
/** RUNNING - Task execution is in progress */
|
|
81
|
+
TaskStatus[TaskStatus["RUNNING"] = 3] = "RUNNING";
|
|
82
|
+
/** CANCELLED - Task execution is in progress */
|
|
83
|
+
TaskStatus[TaskStatus["CANCELLED"] = 4] = "CANCELLED";
|
|
84
|
+
TaskStatus[TaskStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
85
|
+
})(TaskStatus || (TaskStatus = {}));
|
|
86
|
+
export function taskStatusFromJSON(object) {
|
|
87
|
+
switch (object) {
|
|
88
|
+
case 0:
|
|
89
|
+
case "SCHEDULED":
|
|
90
|
+
return TaskStatus.SCHEDULED;
|
|
91
|
+
case 1:
|
|
92
|
+
case "COMPLETED":
|
|
93
|
+
return TaskStatus.COMPLETED;
|
|
94
|
+
case 2:
|
|
95
|
+
case "FAILED":
|
|
96
|
+
return TaskStatus.FAILED;
|
|
97
|
+
case 3:
|
|
98
|
+
case "RUNNING":
|
|
99
|
+
return TaskStatus.RUNNING;
|
|
100
|
+
case 4:
|
|
101
|
+
case "CANCELLED":
|
|
102
|
+
return TaskStatus.CANCELLED;
|
|
103
|
+
case -1:
|
|
104
|
+
case "UNRECOGNIZED":
|
|
105
|
+
default:
|
|
106
|
+
return TaskStatus.UNRECOGNIZED;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
export function taskStatusToJSON(object) {
|
|
110
|
+
switch (object) {
|
|
111
|
+
case TaskStatus.SCHEDULED:
|
|
112
|
+
return "SCHEDULED";
|
|
113
|
+
case TaskStatus.COMPLETED:
|
|
114
|
+
return "COMPLETED";
|
|
115
|
+
case TaskStatus.FAILED:
|
|
116
|
+
return "FAILED";
|
|
117
|
+
case TaskStatus.RUNNING:
|
|
118
|
+
return "RUNNING";
|
|
119
|
+
case TaskStatus.CANCELLED:
|
|
120
|
+
return "CANCELLED";
|
|
121
|
+
case TaskStatus.UNRECOGNIZED:
|
|
122
|
+
default:
|
|
123
|
+
return "UNRECOGNIZED";
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function createBaseSerializedObject() {
|
|
127
|
+
return { type: "", revision: "", data: new Uint8Array(0) };
|
|
128
|
+
}
|
|
129
|
+
export const SerializedObject = {
|
|
130
|
+
encode(message, writer = new BinaryWriter()) {
|
|
131
|
+
if (message.type !== "") {
|
|
132
|
+
writer.uint32(10).string(message.type);
|
|
133
|
+
}
|
|
134
|
+
if (message.revision !== "") {
|
|
135
|
+
writer.uint32(18).string(message.revision);
|
|
136
|
+
}
|
|
137
|
+
if (message.data.length !== 0) {
|
|
138
|
+
writer.uint32(26).bytes(message.data);
|
|
139
|
+
}
|
|
140
|
+
return writer;
|
|
141
|
+
},
|
|
142
|
+
decode(input, length) {
|
|
143
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
144
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
145
|
+
const message = createBaseSerializedObject();
|
|
146
|
+
while (reader.pos < end) {
|
|
147
|
+
const tag = reader.uint32();
|
|
148
|
+
switch (tag >>> 3) {
|
|
149
|
+
case 1: {
|
|
150
|
+
if (tag !== 10) {
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
message.type = reader.string();
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
case 2: {
|
|
157
|
+
if (tag !== 18) {
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
message.revision = reader.string();
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
case 3: {
|
|
164
|
+
if (tag !== 26) {
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
message.data = reader.bytes();
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
172
|
+
break;
|
|
173
|
+
}
|
|
174
|
+
reader.skip(tag & 7);
|
|
175
|
+
}
|
|
176
|
+
return message;
|
|
177
|
+
},
|
|
178
|
+
fromJSON(object) {
|
|
179
|
+
return {
|
|
180
|
+
type: isSet(object.type) ? globalThis.String(object.type) : "",
|
|
181
|
+
revision: isSet(object.revision) ? globalThis.String(object.revision) : "",
|
|
182
|
+
data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0),
|
|
183
|
+
};
|
|
184
|
+
},
|
|
185
|
+
toJSON(message) {
|
|
186
|
+
const obj = {};
|
|
187
|
+
if (message.type !== "") {
|
|
188
|
+
obj.type = message.type;
|
|
189
|
+
}
|
|
190
|
+
if (message.revision !== "") {
|
|
191
|
+
obj.revision = message.revision;
|
|
192
|
+
}
|
|
193
|
+
if (message.data.length !== 0) {
|
|
194
|
+
obj.data = base64FromBytes(message.data);
|
|
195
|
+
}
|
|
196
|
+
return obj;
|
|
197
|
+
},
|
|
198
|
+
create(base) {
|
|
199
|
+
return SerializedObject.fromPartial(base ?? {});
|
|
200
|
+
},
|
|
201
|
+
fromPartial(object) {
|
|
202
|
+
const message = createBaseSerializedObject();
|
|
203
|
+
message.type = object.type ?? "";
|
|
204
|
+
message.revision = object.revision ?? "";
|
|
205
|
+
message.data = object.data ?? new Uint8Array(0);
|
|
206
|
+
return message;
|
|
207
|
+
},
|
|
208
|
+
};
|
|
209
|
+
function createBaseMetaDataValue() {
|
|
210
|
+
return {
|
|
211
|
+
textValue: undefined,
|
|
212
|
+
numberValue: undefined,
|
|
213
|
+
booleanValue: undefined,
|
|
214
|
+
doubleValue: undefined,
|
|
215
|
+
bytesValue: undefined,
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
export const MetaDataValue = {
|
|
219
|
+
encode(message, writer = new BinaryWriter()) {
|
|
220
|
+
if (message.textValue !== undefined) {
|
|
221
|
+
writer.uint32(10).string(message.textValue);
|
|
222
|
+
}
|
|
223
|
+
if (message.numberValue !== undefined) {
|
|
224
|
+
if (BigInt.asIntN(64, message.numberValue) !== message.numberValue) {
|
|
225
|
+
throw new globalThis.Error("value provided for field message.numberValue of type sint64 too large");
|
|
226
|
+
}
|
|
227
|
+
writer.uint32(16).sint64(message.numberValue);
|
|
228
|
+
}
|
|
229
|
+
if (message.booleanValue !== undefined) {
|
|
230
|
+
writer.uint32(24).bool(message.booleanValue);
|
|
231
|
+
}
|
|
232
|
+
if (message.doubleValue !== undefined) {
|
|
233
|
+
writer.uint32(33).double(message.doubleValue);
|
|
234
|
+
}
|
|
235
|
+
if (message.bytesValue !== undefined) {
|
|
236
|
+
SerializedObject.encode(message.bytesValue, writer.uint32(42).fork()).join();
|
|
237
|
+
}
|
|
238
|
+
return writer;
|
|
239
|
+
},
|
|
240
|
+
decode(input, length) {
|
|
241
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
242
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
243
|
+
const message = createBaseMetaDataValue();
|
|
244
|
+
while (reader.pos < end) {
|
|
245
|
+
const tag = reader.uint32();
|
|
246
|
+
switch (tag >>> 3) {
|
|
247
|
+
case 1: {
|
|
248
|
+
if (tag !== 10) {
|
|
249
|
+
break;
|
|
250
|
+
}
|
|
251
|
+
message.textValue = reader.string();
|
|
252
|
+
continue;
|
|
253
|
+
}
|
|
254
|
+
case 2: {
|
|
255
|
+
if (tag !== 16) {
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
message.numberValue = reader.sint64();
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
261
|
+
case 3: {
|
|
262
|
+
if (tag !== 24) {
|
|
263
|
+
break;
|
|
264
|
+
}
|
|
265
|
+
message.booleanValue = reader.bool();
|
|
266
|
+
continue;
|
|
267
|
+
}
|
|
268
|
+
case 4: {
|
|
269
|
+
if (tag !== 33) {
|
|
270
|
+
break;
|
|
271
|
+
}
|
|
272
|
+
message.doubleValue = reader.double();
|
|
273
|
+
continue;
|
|
274
|
+
}
|
|
275
|
+
case 5: {
|
|
276
|
+
if (tag !== 42) {
|
|
277
|
+
break;
|
|
278
|
+
}
|
|
279
|
+
message.bytesValue = SerializedObject.decode(reader, reader.uint32());
|
|
280
|
+
continue;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
reader.skip(tag & 7);
|
|
287
|
+
}
|
|
288
|
+
return message;
|
|
289
|
+
},
|
|
290
|
+
fromJSON(object) {
|
|
291
|
+
return {
|
|
292
|
+
textValue: isSet(object.textValue)
|
|
293
|
+
? globalThis.String(object.textValue)
|
|
294
|
+
: isSet(object.text_value)
|
|
295
|
+
? globalThis.String(object.text_value)
|
|
296
|
+
: undefined,
|
|
297
|
+
numberValue: isSet(object.numberValue)
|
|
298
|
+
? BigInt(object.numberValue)
|
|
299
|
+
: isSet(object.number_value)
|
|
300
|
+
? BigInt(object.number_value)
|
|
301
|
+
: undefined,
|
|
302
|
+
booleanValue: isSet(object.booleanValue)
|
|
303
|
+
? globalThis.Boolean(object.booleanValue)
|
|
304
|
+
: isSet(object.boolean_value)
|
|
305
|
+
? globalThis.Boolean(object.boolean_value)
|
|
306
|
+
: undefined,
|
|
307
|
+
doubleValue: isSet(object.doubleValue)
|
|
308
|
+
? globalThis.Number(object.doubleValue)
|
|
309
|
+
: isSet(object.double_value)
|
|
310
|
+
? globalThis.Number(object.double_value)
|
|
311
|
+
: undefined,
|
|
312
|
+
bytesValue: isSet(object.bytesValue)
|
|
313
|
+
? SerializedObject.fromJSON(object.bytesValue)
|
|
314
|
+
: isSet(object.bytes_value)
|
|
315
|
+
? SerializedObject.fromJSON(object.bytes_value)
|
|
316
|
+
: undefined,
|
|
317
|
+
};
|
|
318
|
+
},
|
|
319
|
+
toJSON(message) {
|
|
320
|
+
const obj = {};
|
|
321
|
+
if (message.textValue !== undefined) {
|
|
322
|
+
obj.textValue = message.textValue;
|
|
323
|
+
}
|
|
324
|
+
if (message.numberValue !== undefined) {
|
|
325
|
+
obj.numberValue = message.numberValue.toString();
|
|
326
|
+
}
|
|
327
|
+
if (message.booleanValue !== undefined) {
|
|
328
|
+
obj.booleanValue = message.booleanValue;
|
|
329
|
+
}
|
|
330
|
+
if (message.doubleValue !== undefined) {
|
|
331
|
+
obj.doubleValue = message.doubleValue;
|
|
332
|
+
}
|
|
333
|
+
if (message.bytesValue !== undefined) {
|
|
334
|
+
obj.bytesValue = SerializedObject.toJSON(message.bytesValue);
|
|
335
|
+
}
|
|
336
|
+
return obj;
|
|
337
|
+
},
|
|
338
|
+
create(base) {
|
|
339
|
+
return MetaDataValue.fromPartial(base ?? {});
|
|
340
|
+
},
|
|
341
|
+
fromPartial(object) {
|
|
342
|
+
const message = createBaseMetaDataValue();
|
|
343
|
+
message.textValue = object.textValue ?? undefined;
|
|
344
|
+
message.numberValue = object.numberValue ?? undefined;
|
|
345
|
+
message.booleanValue = object.booleanValue ?? undefined;
|
|
346
|
+
message.doubleValue = object.doubleValue ?? undefined;
|
|
347
|
+
message.bytesValue = (object.bytesValue !== undefined && object.bytesValue !== null)
|
|
348
|
+
? SerializedObject.fromPartial(object.bytesValue)
|
|
349
|
+
: undefined;
|
|
350
|
+
return message;
|
|
351
|
+
},
|
|
352
|
+
};
|
|
353
|
+
function createBaseProcessingInstruction() {
|
|
354
|
+
return { key: 0, value: undefined };
|
|
355
|
+
}
|
|
356
|
+
export const ProcessingInstruction = {
|
|
357
|
+
encode(message, writer = new BinaryWriter()) {
|
|
358
|
+
if (message.key !== 0) {
|
|
359
|
+
writer.uint32(8).int32(message.key);
|
|
360
|
+
}
|
|
361
|
+
if (message.value !== undefined) {
|
|
362
|
+
MetaDataValue.encode(message.value, writer.uint32(18).fork()).join();
|
|
363
|
+
}
|
|
364
|
+
return writer;
|
|
365
|
+
},
|
|
366
|
+
decode(input, length) {
|
|
367
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
368
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
369
|
+
const message = createBaseProcessingInstruction();
|
|
370
|
+
while (reader.pos < end) {
|
|
371
|
+
const tag = reader.uint32();
|
|
372
|
+
switch (tag >>> 3) {
|
|
373
|
+
case 1: {
|
|
374
|
+
if (tag !== 8) {
|
|
375
|
+
break;
|
|
376
|
+
}
|
|
377
|
+
message.key = reader.int32();
|
|
378
|
+
continue;
|
|
379
|
+
}
|
|
380
|
+
case 2: {
|
|
381
|
+
if (tag !== 18) {
|
|
382
|
+
break;
|
|
383
|
+
}
|
|
384
|
+
message.value = MetaDataValue.decode(reader, reader.uint32());
|
|
385
|
+
continue;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
389
|
+
break;
|
|
390
|
+
}
|
|
391
|
+
reader.skip(tag & 7);
|
|
392
|
+
}
|
|
393
|
+
return message;
|
|
394
|
+
},
|
|
395
|
+
fromJSON(object) {
|
|
396
|
+
return {
|
|
397
|
+
key: isSet(object.key) ? processingKeyFromJSON(object.key) : 0,
|
|
398
|
+
value: isSet(object.value) ? MetaDataValue.fromJSON(object.value) : undefined,
|
|
399
|
+
};
|
|
400
|
+
},
|
|
401
|
+
toJSON(message) {
|
|
402
|
+
const obj = {};
|
|
403
|
+
if (message.key !== 0) {
|
|
404
|
+
obj.key = processingKeyToJSON(message.key);
|
|
405
|
+
}
|
|
406
|
+
if (message.value !== undefined) {
|
|
407
|
+
obj.value = MetaDataValue.toJSON(message.value);
|
|
408
|
+
}
|
|
409
|
+
return obj;
|
|
410
|
+
},
|
|
411
|
+
create(base) {
|
|
412
|
+
return ProcessingInstruction.fromPartial(base ?? {});
|
|
413
|
+
},
|
|
414
|
+
fromPartial(object) {
|
|
415
|
+
const message = createBaseProcessingInstruction();
|
|
416
|
+
message.key = object.key ?? 0;
|
|
417
|
+
message.value = (object.value !== undefined && object.value !== null)
|
|
418
|
+
? MetaDataValue.fromPartial(object.value)
|
|
419
|
+
: undefined;
|
|
420
|
+
return message;
|
|
421
|
+
},
|
|
422
|
+
};
|
|
423
|
+
function createBaseErrorMessage() {
|
|
424
|
+
return { message: "", location: "", details: [], errorCode: "" };
|
|
425
|
+
}
|
|
426
|
+
export const ErrorMessage = {
|
|
427
|
+
encode(message, writer = new BinaryWriter()) {
|
|
428
|
+
if (message.message !== "") {
|
|
429
|
+
writer.uint32(10).string(message.message);
|
|
430
|
+
}
|
|
431
|
+
if (message.location !== "") {
|
|
432
|
+
writer.uint32(18).string(message.location);
|
|
433
|
+
}
|
|
434
|
+
for (const v of message.details) {
|
|
435
|
+
writer.uint32(26).string(v);
|
|
436
|
+
}
|
|
437
|
+
if (message.errorCode !== "") {
|
|
438
|
+
writer.uint32(34).string(message.errorCode);
|
|
439
|
+
}
|
|
440
|
+
return writer;
|
|
441
|
+
},
|
|
442
|
+
decode(input, length) {
|
|
443
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
444
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
445
|
+
const message = createBaseErrorMessage();
|
|
446
|
+
while (reader.pos < end) {
|
|
447
|
+
const tag = reader.uint32();
|
|
448
|
+
switch (tag >>> 3) {
|
|
449
|
+
case 1: {
|
|
450
|
+
if (tag !== 10) {
|
|
451
|
+
break;
|
|
452
|
+
}
|
|
453
|
+
message.message = reader.string();
|
|
454
|
+
continue;
|
|
455
|
+
}
|
|
456
|
+
case 2: {
|
|
457
|
+
if (tag !== 18) {
|
|
458
|
+
break;
|
|
459
|
+
}
|
|
460
|
+
message.location = reader.string();
|
|
461
|
+
continue;
|
|
462
|
+
}
|
|
463
|
+
case 3: {
|
|
464
|
+
if (tag !== 26) {
|
|
465
|
+
break;
|
|
466
|
+
}
|
|
467
|
+
message.details.push(reader.string());
|
|
468
|
+
continue;
|
|
469
|
+
}
|
|
470
|
+
case 4: {
|
|
471
|
+
if (tag !== 34) {
|
|
472
|
+
break;
|
|
473
|
+
}
|
|
474
|
+
message.errorCode = reader.string();
|
|
475
|
+
continue;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
479
|
+
break;
|
|
480
|
+
}
|
|
481
|
+
reader.skip(tag & 7);
|
|
482
|
+
}
|
|
483
|
+
return message;
|
|
484
|
+
},
|
|
485
|
+
fromJSON(object) {
|
|
486
|
+
return {
|
|
487
|
+
message: isSet(object.message) ? globalThis.String(object.message) : "",
|
|
488
|
+
location: isSet(object.location) ? globalThis.String(object.location) : "",
|
|
489
|
+
details: globalThis.Array.isArray(object?.details) ? object.details.map((e) => globalThis.String(e)) : [],
|
|
490
|
+
errorCode: isSet(object.errorCode)
|
|
491
|
+
? globalThis.String(object.errorCode)
|
|
492
|
+
: isSet(object.error_code)
|
|
493
|
+
? globalThis.String(object.error_code)
|
|
494
|
+
: "",
|
|
495
|
+
};
|
|
496
|
+
},
|
|
497
|
+
toJSON(message) {
|
|
498
|
+
const obj = {};
|
|
499
|
+
if (message.message !== "") {
|
|
500
|
+
obj.message = message.message;
|
|
501
|
+
}
|
|
502
|
+
if (message.location !== "") {
|
|
503
|
+
obj.location = message.location;
|
|
504
|
+
}
|
|
505
|
+
if (message.details?.length) {
|
|
506
|
+
obj.details = message.details;
|
|
507
|
+
}
|
|
508
|
+
if (message.errorCode !== "") {
|
|
509
|
+
obj.errorCode = message.errorCode;
|
|
510
|
+
}
|
|
511
|
+
return obj;
|
|
512
|
+
},
|
|
513
|
+
create(base) {
|
|
514
|
+
return ErrorMessage.fromPartial(base ?? {});
|
|
515
|
+
},
|
|
516
|
+
fromPartial(object) {
|
|
517
|
+
const message = createBaseErrorMessage();
|
|
518
|
+
message.message = object.message ?? "";
|
|
519
|
+
message.location = object.location ?? "";
|
|
520
|
+
message.details = object.details?.map((e) => e) || [];
|
|
521
|
+
message.errorCode = object.errorCode ?? "";
|
|
522
|
+
return message;
|
|
523
|
+
},
|
|
524
|
+
};
|
|
525
|
+
function createBaseFlowControl() {
|
|
526
|
+
return { clientId: "", permits: 0n };
|
|
527
|
+
}
|
|
528
|
+
export const FlowControl = {
|
|
529
|
+
encode(message, writer = new BinaryWriter()) {
|
|
530
|
+
if (message.clientId !== "") {
|
|
531
|
+
writer.uint32(18).string(message.clientId);
|
|
532
|
+
}
|
|
533
|
+
if (message.permits !== 0n) {
|
|
534
|
+
if (BigInt.asIntN(64, message.permits) !== message.permits) {
|
|
535
|
+
throw new globalThis.Error("value provided for field message.permits of type int64 too large");
|
|
536
|
+
}
|
|
537
|
+
writer.uint32(24).int64(message.permits);
|
|
538
|
+
}
|
|
539
|
+
return writer;
|
|
540
|
+
},
|
|
541
|
+
decode(input, length) {
|
|
542
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
543
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
544
|
+
const message = createBaseFlowControl();
|
|
545
|
+
while (reader.pos < end) {
|
|
546
|
+
const tag = reader.uint32();
|
|
547
|
+
switch (tag >>> 3) {
|
|
548
|
+
case 2: {
|
|
549
|
+
if (tag !== 18) {
|
|
550
|
+
break;
|
|
551
|
+
}
|
|
552
|
+
message.clientId = reader.string();
|
|
553
|
+
continue;
|
|
554
|
+
}
|
|
555
|
+
case 3: {
|
|
556
|
+
if (tag !== 24) {
|
|
557
|
+
break;
|
|
558
|
+
}
|
|
559
|
+
message.permits = reader.int64();
|
|
560
|
+
continue;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
564
|
+
break;
|
|
565
|
+
}
|
|
566
|
+
reader.skip(tag & 7);
|
|
567
|
+
}
|
|
568
|
+
return message;
|
|
569
|
+
},
|
|
570
|
+
fromJSON(object) {
|
|
571
|
+
return {
|
|
572
|
+
clientId: isSet(object.clientId)
|
|
573
|
+
? globalThis.String(object.clientId)
|
|
574
|
+
: isSet(object.client_id)
|
|
575
|
+
? globalThis.String(object.client_id)
|
|
576
|
+
: "",
|
|
577
|
+
permits: isSet(object.permits) ? BigInt(object.permits) : 0n,
|
|
578
|
+
};
|
|
579
|
+
},
|
|
580
|
+
toJSON(message) {
|
|
581
|
+
const obj = {};
|
|
582
|
+
if (message.clientId !== "") {
|
|
583
|
+
obj.clientId = message.clientId;
|
|
584
|
+
}
|
|
585
|
+
if (message.permits !== 0n) {
|
|
586
|
+
obj.permits = message.permits.toString();
|
|
587
|
+
}
|
|
588
|
+
return obj;
|
|
589
|
+
},
|
|
590
|
+
create(base) {
|
|
591
|
+
return FlowControl.fromPartial(base ?? {});
|
|
592
|
+
},
|
|
593
|
+
fromPartial(object) {
|
|
594
|
+
const message = createBaseFlowControl();
|
|
595
|
+
message.clientId = object.clientId ?? "";
|
|
596
|
+
message.permits = object.permits ?? 0n;
|
|
597
|
+
return message;
|
|
598
|
+
},
|
|
599
|
+
};
|
|
600
|
+
function createBaseInstructionAck() {
|
|
601
|
+
return { instructionId: "", success: false, error: undefined };
|
|
602
|
+
}
|
|
603
|
+
export const InstructionAck = {
|
|
604
|
+
encode(message, writer = new BinaryWriter()) {
|
|
605
|
+
if (message.instructionId !== "") {
|
|
606
|
+
writer.uint32(10).string(message.instructionId);
|
|
607
|
+
}
|
|
608
|
+
if (message.success !== false) {
|
|
609
|
+
writer.uint32(16).bool(message.success);
|
|
610
|
+
}
|
|
611
|
+
if (message.error !== undefined) {
|
|
612
|
+
ErrorMessage.encode(message.error, writer.uint32(26).fork()).join();
|
|
613
|
+
}
|
|
614
|
+
return writer;
|
|
615
|
+
},
|
|
616
|
+
decode(input, length) {
|
|
617
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
618
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
619
|
+
const message = createBaseInstructionAck();
|
|
620
|
+
while (reader.pos < end) {
|
|
621
|
+
const tag = reader.uint32();
|
|
622
|
+
switch (tag >>> 3) {
|
|
623
|
+
case 1: {
|
|
624
|
+
if (tag !== 10) {
|
|
625
|
+
break;
|
|
626
|
+
}
|
|
627
|
+
message.instructionId = reader.string();
|
|
628
|
+
continue;
|
|
629
|
+
}
|
|
630
|
+
case 2: {
|
|
631
|
+
if (tag !== 16) {
|
|
632
|
+
break;
|
|
633
|
+
}
|
|
634
|
+
message.success = reader.bool();
|
|
635
|
+
continue;
|
|
636
|
+
}
|
|
637
|
+
case 3: {
|
|
638
|
+
if (tag !== 26) {
|
|
639
|
+
break;
|
|
640
|
+
}
|
|
641
|
+
message.error = ErrorMessage.decode(reader, reader.uint32());
|
|
642
|
+
continue;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
646
|
+
break;
|
|
647
|
+
}
|
|
648
|
+
reader.skip(tag & 7);
|
|
649
|
+
}
|
|
650
|
+
return message;
|
|
651
|
+
},
|
|
652
|
+
fromJSON(object) {
|
|
653
|
+
return {
|
|
654
|
+
instructionId: isSet(object.instructionId)
|
|
655
|
+
? globalThis.String(object.instructionId)
|
|
656
|
+
: isSet(object.instruction_id)
|
|
657
|
+
? globalThis.String(object.instruction_id)
|
|
658
|
+
: "",
|
|
659
|
+
success: isSet(object.success) ? globalThis.Boolean(object.success) : false,
|
|
660
|
+
error: isSet(object.error) ? ErrorMessage.fromJSON(object.error) : undefined,
|
|
661
|
+
};
|
|
662
|
+
},
|
|
663
|
+
toJSON(message) {
|
|
664
|
+
const obj = {};
|
|
665
|
+
if (message.instructionId !== "") {
|
|
666
|
+
obj.instructionId = message.instructionId;
|
|
667
|
+
}
|
|
668
|
+
if (message.success !== false) {
|
|
669
|
+
obj.success = message.success;
|
|
670
|
+
}
|
|
671
|
+
if (message.error !== undefined) {
|
|
672
|
+
obj.error = ErrorMessage.toJSON(message.error);
|
|
673
|
+
}
|
|
674
|
+
return obj;
|
|
675
|
+
},
|
|
676
|
+
create(base) {
|
|
677
|
+
return InstructionAck.fromPartial(base ?? {});
|
|
678
|
+
},
|
|
679
|
+
fromPartial(object) {
|
|
680
|
+
const message = createBaseInstructionAck();
|
|
681
|
+
message.instructionId = object.instructionId ?? "";
|
|
682
|
+
message.success = object.success ?? false;
|
|
683
|
+
message.error = (object.error !== undefined && object.error !== null)
|
|
684
|
+
? ErrorMessage.fromPartial(object.error)
|
|
685
|
+
: undefined;
|
|
686
|
+
return message;
|
|
687
|
+
},
|
|
688
|
+
};
|
|
689
|
+
function createBaseInstructionResult() {
|
|
690
|
+
return { instructionId: "", success: false, error: undefined };
|
|
691
|
+
}
|
|
692
|
+
export const InstructionResult = {
|
|
693
|
+
encode(message, writer = new BinaryWriter()) {
|
|
694
|
+
if (message.instructionId !== "") {
|
|
695
|
+
writer.uint32(10).string(message.instructionId);
|
|
696
|
+
}
|
|
697
|
+
if (message.success !== false) {
|
|
698
|
+
writer.uint32(16).bool(message.success);
|
|
699
|
+
}
|
|
700
|
+
if (message.error !== undefined) {
|
|
701
|
+
ErrorMessage.encode(message.error, writer.uint32(26).fork()).join();
|
|
702
|
+
}
|
|
703
|
+
return writer;
|
|
704
|
+
},
|
|
705
|
+
decode(input, length) {
|
|
706
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
707
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
708
|
+
const message = createBaseInstructionResult();
|
|
709
|
+
while (reader.pos < end) {
|
|
710
|
+
const tag = reader.uint32();
|
|
711
|
+
switch (tag >>> 3) {
|
|
712
|
+
case 1: {
|
|
713
|
+
if (tag !== 10) {
|
|
714
|
+
break;
|
|
715
|
+
}
|
|
716
|
+
message.instructionId = reader.string();
|
|
717
|
+
continue;
|
|
718
|
+
}
|
|
719
|
+
case 2: {
|
|
720
|
+
if (tag !== 16) {
|
|
721
|
+
break;
|
|
722
|
+
}
|
|
723
|
+
message.success = reader.bool();
|
|
724
|
+
continue;
|
|
725
|
+
}
|
|
726
|
+
case 3: {
|
|
727
|
+
if (tag !== 26) {
|
|
728
|
+
break;
|
|
729
|
+
}
|
|
730
|
+
message.error = ErrorMessage.decode(reader, reader.uint32());
|
|
731
|
+
continue;
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
735
|
+
break;
|
|
736
|
+
}
|
|
737
|
+
reader.skip(tag & 7);
|
|
738
|
+
}
|
|
739
|
+
return message;
|
|
740
|
+
},
|
|
741
|
+
fromJSON(object) {
|
|
742
|
+
return {
|
|
743
|
+
instructionId: isSet(object.instructionId)
|
|
744
|
+
? globalThis.String(object.instructionId)
|
|
745
|
+
: isSet(object.instruction_id)
|
|
746
|
+
? globalThis.String(object.instruction_id)
|
|
747
|
+
: "",
|
|
748
|
+
success: isSet(object.success) ? globalThis.Boolean(object.success) : false,
|
|
749
|
+
error: isSet(object.error) ? ErrorMessage.fromJSON(object.error) : undefined,
|
|
750
|
+
};
|
|
751
|
+
},
|
|
752
|
+
toJSON(message) {
|
|
753
|
+
const obj = {};
|
|
754
|
+
if (message.instructionId !== "") {
|
|
755
|
+
obj.instructionId = message.instructionId;
|
|
756
|
+
}
|
|
757
|
+
if (message.success !== false) {
|
|
758
|
+
obj.success = message.success;
|
|
759
|
+
}
|
|
760
|
+
if (message.error !== undefined) {
|
|
761
|
+
obj.error = ErrorMessage.toJSON(message.error);
|
|
762
|
+
}
|
|
763
|
+
return obj;
|
|
764
|
+
},
|
|
765
|
+
create(base) {
|
|
766
|
+
return InstructionResult.fromPartial(base ?? {});
|
|
767
|
+
},
|
|
768
|
+
fromPartial(object) {
|
|
769
|
+
const message = createBaseInstructionResult();
|
|
770
|
+
message.instructionId = object.instructionId ?? "";
|
|
771
|
+
message.success = object.success ?? false;
|
|
772
|
+
message.error = (object.error !== undefined && object.error !== null)
|
|
773
|
+
? ErrorMessage.fromPartial(object.error)
|
|
774
|
+
: undefined;
|
|
775
|
+
return message;
|
|
776
|
+
},
|
|
777
|
+
};
|
|
778
|
+
function createBaseComponent() {
|
|
779
|
+
return { component: "" };
|
|
780
|
+
}
|
|
781
|
+
export const Component = {
|
|
782
|
+
encode(message, writer = new BinaryWriter()) {
|
|
783
|
+
if (message.component !== "") {
|
|
784
|
+
writer.uint32(10).string(message.component);
|
|
785
|
+
}
|
|
786
|
+
return writer;
|
|
787
|
+
},
|
|
788
|
+
decode(input, length) {
|
|
789
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
790
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
791
|
+
const message = createBaseComponent();
|
|
792
|
+
while (reader.pos < end) {
|
|
793
|
+
const tag = reader.uint32();
|
|
794
|
+
switch (tag >>> 3) {
|
|
795
|
+
case 1: {
|
|
796
|
+
if (tag !== 10) {
|
|
797
|
+
break;
|
|
798
|
+
}
|
|
799
|
+
message.component = reader.string();
|
|
800
|
+
continue;
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
804
|
+
break;
|
|
805
|
+
}
|
|
806
|
+
reader.skip(tag & 7);
|
|
807
|
+
}
|
|
808
|
+
return message;
|
|
809
|
+
},
|
|
810
|
+
fromJSON(object) {
|
|
811
|
+
return { component: isSet(object.component) ? globalThis.String(object.component) : "" };
|
|
812
|
+
},
|
|
813
|
+
toJSON(message) {
|
|
814
|
+
const obj = {};
|
|
815
|
+
if (message.component !== "") {
|
|
816
|
+
obj.component = message.component;
|
|
817
|
+
}
|
|
818
|
+
return obj;
|
|
819
|
+
},
|
|
820
|
+
create(base) {
|
|
821
|
+
return Component.fromPartial(base ?? {});
|
|
822
|
+
},
|
|
823
|
+
fromPartial(object) {
|
|
824
|
+
const message = createBaseComponent();
|
|
825
|
+
message.component = object.component ?? "";
|
|
826
|
+
return message;
|
|
827
|
+
},
|
|
828
|
+
};
|
|
829
|
+
function createBasePrincipal() {
|
|
830
|
+
return { user: "" };
|
|
831
|
+
}
|
|
832
|
+
export const Principal = {
|
|
833
|
+
encode(message, writer = new BinaryWriter()) {
|
|
834
|
+
if (message.user !== "") {
|
|
835
|
+
writer.uint32(10).string(message.user);
|
|
836
|
+
}
|
|
837
|
+
return writer;
|
|
838
|
+
},
|
|
839
|
+
decode(input, length) {
|
|
840
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
841
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
842
|
+
const message = createBasePrincipal();
|
|
843
|
+
while (reader.pos < end) {
|
|
844
|
+
const tag = reader.uint32();
|
|
845
|
+
switch (tag >>> 3) {
|
|
846
|
+
case 1: {
|
|
847
|
+
if (tag !== 10) {
|
|
848
|
+
break;
|
|
849
|
+
}
|
|
850
|
+
message.user = reader.string();
|
|
851
|
+
continue;
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
855
|
+
break;
|
|
856
|
+
}
|
|
857
|
+
reader.skip(tag & 7);
|
|
858
|
+
}
|
|
859
|
+
return message;
|
|
860
|
+
},
|
|
861
|
+
fromJSON(object) {
|
|
862
|
+
return { user: isSet(object.user) ? globalThis.String(object.user) : "" };
|
|
863
|
+
},
|
|
864
|
+
toJSON(message) {
|
|
865
|
+
const obj = {};
|
|
866
|
+
if (message.user !== "") {
|
|
867
|
+
obj.user = message.user;
|
|
868
|
+
}
|
|
869
|
+
return obj;
|
|
870
|
+
},
|
|
871
|
+
create(base) {
|
|
872
|
+
return Principal.fromPartial(base ?? {});
|
|
873
|
+
},
|
|
874
|
+
fromPartial(object) {
|
|
875
|
+
const message = createBasePrincipal();
|
|
876
|
+
message.user = object.user ?? "";
|
|
877
|
+
return message;
|
|
878
|
+
},
|
|
879
|
+
};
|
|
880
|
+
function bytesFromBase64(b64) {
|
|
881
|
+
if (globalThis.Buffer) {
|
|
882
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
883
|
+
}
|
|
884
|
+
else {
|
|
885
|
+
const bin = globalThis.atob(b64);
|
|
886
|
+
const arr = new Uint8Array(bin.length);
|
|
887
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
888
|
+
arr[i] = bin.charCodeAt(i);
|
|
889
|
+
}
|
|
890
|
+
return arr;
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
function base64FromBytes(arr) {
|
|
894
|
+
if (globalThis.Buffer) {
|
|
895
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
896
|
+
}
|
|
897
|
+
else {
|
|
898
|
+
const bin = [];
|
|
899
|
+
arr.forEach((byte) => {
|
|
900
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
901
|
+
});
|
|
902
|
+
return globalThis.btoa(bin.join(""));
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
function isSet(value) {
|
|
906
|
+
return value !== null && value !== undefined;
|
|
907
|
+
}
|
|
908
|
+
//# sourceMappingURL=common.js.map
|