@avaprotocol/sdk-js 1.6.6 → 1.6.8
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/CHANGELOG.md +16 -0
- package/dist/index.d.ts +17 -30
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1262 -853
- package/dist/index.mjs +1273 -856
- package/dist/models/execution.d.ts +7 -9
- package/dist/models/execution.d.ts.map +1 -1
- package/dist/models/execution.js +17 -7
- package/dist/models/node/branch.d.ts +1 -0
- package/dist/models/node/branch.d.ts.map +1 -1
- package/dist/models/node/branch.js +4 -0
- package/dist/models/node/contractRead.d.ts +1 -0
- package/dist/models/node/contractRead.d.ts.map +1 -1
- package/dist/models/node/contractRead.js +11 -0
- package/dist/models/node/contractWrite.d.ts +1 -0
- package/dist/models/node/contractWrite.d.ts.map +1 -1
- package/dist/models/node/contractWrite.js +4 -0
- package/dist/models/node/customCode.d.ts +1 -0
- package/dist/models/node/customCode.d.ts.map +1 -1
- package/dist/models/node/customCode.js +9 -0
- package/dist/models/node/ethTransfer.d.ts +1 -0
- package/dist/models/node/ethTransfer.d.ts.map +1 -1
- package/dist/models/node/ethTransfer.js +4 -0
- package/dist/models/node/factory.d.ts +1 -0
- package/dist/models/node/factory.d.ts.map +1 -1
- package/dist/models/node/factory.js +54 -0
- package/dist/models/node/filter.d.ts +1 -0
- package/dist/models/node/filter.d.ts.map +1 -1
- package/dist/models/node/filter.js +4 -0
- package/dist/models/node/graphqlQuery.d.ts +1 -0
- package/dist/models/node/graphqlQuery.d.ts.map +1 -1
- package/dist/models/node/graphqlQuery.js +4 -0
- package/dist/models/node/loop.d.ts +1 -0
- package/dist/models/node/loop.d.ts.map +1 -1
- package/dist/models/node/loop.js +4 -0
- package/dist/models/node/restApi.d.ts +1 -0
- package/dist/models/node/restApi.d.ts.map +1 -1
- package/dist/models/node/restApi.js +15 -1
- package/dist/models/trigger/block.d.ts +6 -0
- package/dist/models/trigger/block.d.ts.map +1 -1
- package/dist/models/trigger/block.js +9 -0
- package/dist/models/trigger/cron.d.ts +8 -1
- package/dist/models/trigger/cron.d.ts.map +1 -1
- package/dist/models/trigger/cron.js +18 -1
- package/dist/models/trigger/event.d.ts +7 -1
- package/dist/models/trigger/event.d.ts.map +1 -1
- package/dist/models/trigger/event.js +10 -1
- package/dist/models/trigger/factory.d.ts +1 -0
- package/dist/models/trigger/factory.d.ts.map +1 -1
- package/dist/models/trigger/factory.js +42 -0
- package/dist/models/trigger/fixedTime.d.ts +8 -1
- package/dist/models/trigger/fixedTime.d.ts.map +1 -1
- package/dist/models/trigger/fixedTime.js +18 -1
- package/dist/models/trigger/interface.d.ts +1 -1
- package/dist/models/trigger/interface.d.ts.map +1 -1
- package/dist/models/trigger/manual.d.ts +13 -0
- package/dist/models/trigger/manual.d.ts.map +1 -1
- package/dist/models/trigger/manual.js +17 -0
- package/dist/utils.d.ts +34 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +116 -2
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -137,6 +137,9 @@ var require_avs_pb = __commonJS({
|
|
|
137
137
|
goog.exportSymbol("proto.aggregator.LoopNode.Config", null, global);
|
|
138
138
|
goog.exportSymbol("proto.aggregator.LoopNode.Output", null, global);
|
|
139
139
|
goog.exportSymbol("proto.aggregator.LoopNode.RunnerCase", null, global);
|
|
140
|
+
goog.exportSymbol("proto.aggregator.ManualTrigger", null, global);
|
|
141
|
+
goog.exportSymbol("proto.aggregator.ManualTrigger.Config", null, global);
|
|
142
|
+
goog.exportSymbol("proto.aggregator.ManualTrigger.Output", null, global);
|
|
140
143
|
goog.exportSymbol("proto.aggregator.NodeType", null, global);
|
|
141
144
|
goog.exportSymbol("proto.aggregator.NonceRequest", null, global);
|
|
142
145
|
goog.exportSymbol("proto.aggregator.NonceResp", null, global);
|
|
@@ -160,10 +163,10 @@ var require_avs_pb = __commonJS({
|
|
|
160
163
|
goog.exportSymbol("proto.aggregator.TaskStatus", null, global);
|
|
161
164
|
goog.exportSymbol("proto.aggregator.TaskTrigger", null, global);
|
|
162
165
|
goog.exportSymbol("proto.aggregator.TaskTrigger.TriggerTypeCase", null, global);
|
|
163
|
-
goog.exportSymbol("proto.aggregator.
|
|
166
|
+
goog.exportSymbol("proto.aggregator.TriggerTaskReq", null, global);
|
|
167
|
+
goog.exportSymbol("proto.aggregator.TriggerTaskReq.TriggerOutputCase", null, global);
|
|
168
|
+
goog.exportSymbol("proto.aggregator.TriggerTaskResp", null, global);
|
|
164
169
|
goog.exportSymbol("proto.aggregator.TriggerType", null, global);
|
|
165
|
-
goog.exportSymbol("proto.aggregator.UserTriggerTaskReq", null, global);
|
|
166
|
-
goog.exportSymbol("proto.aggregator.UserTriggerTaskResp", null, global);
|
|
167
170
|
proto.aggregator.IdReq = function(opt_data) {
|
|
168
171
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
169
172
|
};
|
|
@@ -269,6 +272,27 @@ var require_avs_pb = __commonJS({
|
|
|
269
272
|
if (goog.DEBUG && !COMPILED) {
|
|
270
273
|
proto.aggregator.EventTrigger.TransferLogOutput.displayName = "proto.aggregator.EventTrigger.TransferLogOutput";
|
|
271
274
|
}
|
|
275
|
+
proto.aggregator.ManualTrigger = function(opt_data) {
|
|
276
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
277
|
+
};
|
|
278
|
+
goog.inherits(proto.aggregator.ManualTrigger, jspb.Message);
|
|
279
|
+
if (goog.DEBUG && !COMPILED) {
|
|
280
|
+
proto.aggregator.ManualTrigger.displayName = "proto.aggregator.ManualTrigger";
|
|
281
|
+
}
|
|
282
|
+
proto.aggregator.ManualTrigger.Config = function(opt_data) {
|
|
283
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
284
|
+
};
|
|
285
|
+
goog.inherits(proto.aggregator.ManualTrigger.Config, jspb.Message);
|
|
286
|
+
if (goog.DEBUG && !COMPILED) {
|
|
287
|
+
proto.aggregator.ManualTrigger.Config.displayName = "proto.aggregator.ManualTrigger.Config";
|
|
288
|
+
}
|
|
289
|
+
proto.aggregator.ManualTrigger.Output = function(opt_data) {
|
|
290
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
291
|
+
};
|
|
292
|
+
goog.inherits(proto.aggregator.ManualTrigger.Output, jspb.Message);
|
|
293
|
+
if (goog.DEBUG && !COMPILED) {
|
|
294
|
+
proto.aggregator.ManualTrigger.Output.displayName = "proto.aggregator.ManualTrigger.Output";
|
|
295
|
+
}
|
|
272
296
|
proto.aggregator.TaskTrigger = function(opt_data) {
|
|
273
297
|
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aggregator.TaskTrigger.oneofGroups_);
|
|
274
298
|
};
|
|
@@ -612,13 +636,6 @@ var require_avs_pb = __commonJS({
|
|
|
612
636
|
if (goog.DEBUG && !COMPILED) {
|
|
613
637
|
proto.aggregator.KeyResp.displayName = "proto.aggregator.KeyResp";
|
|
614
638
|
}
|
|
615
|
-
proto.aggregator.TriggerReason = function(opt_data) {
|
|
616
|
-
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
617
|
-
};
|
|
618
|
-
goog.inherits(proto.aggregator.TriggerReason, jspb.Message);
|
|
619
|
-
if (goog.DEBUG && !COMPILED) {
|
|
620
|
-
proto.aggregator.TriggerReason.displayName = "proto.aggregator.TriggerReason";
|
|
621
|
-
}
|
|
622
639
|
proto.aggregator.GetWalletReq = function(opt_data) {
|
|
623
640
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
624
641
|
};
|
|
@@ -640,19 +657,19 @@ var require_avs_pb = __commonJS({
|
|
|
640
657
|
if (goog.DEBUG && !COMPILED) {
|
|
641
658
|
proto.aggregator.SetWalletReq.displayName = "proto.aggregator.SetWalletReq";
|
|
642
659
|
}
|
|
643
|
-
proto.aggregator.
|
|
644
|
-
jspb.Message.initialize(this, opt_data, 0, -1, null,
|
|
660
|
+
proto.aggregator.TriggerTaskReq = function(opt_data) {
|
|
661
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aggregator.TriggerTaskReq.oneofGroups_);
|
|
645
662
|
};
|
|
646
|
-
goog.inherits(proto.aggregator.
|
|
663
|
+
goog.inherits(proto.aggregator.TriggerTaskReq, jspb.Message);
|
|
647
664
|
if (goog.DEBUG && !COMPILED) {
|
|
648
|
-
proto.aggregator.
|
|
665
|
+
proto.aggregator.TriggerTaskReq.displayName = "proto.aggregator.TriggerTaskReq";
|
|
649
666
|
}
|
|
650
|
-
proto.aggregator.
|
|
667
|
+
proto.aggregator.TriggerTaskResp = function(opt_data) {
|
|
651
668
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
652
669
|
};
|
|
653
|
-
goog.inherits(proto.aggregator.
|
|
670
|
+
goog.inherits(proto.aggregator.TriggerTaskResp, jspb.Message);
|
|
654
671
|
if (goog.DEBUG && !COMPILED) {
|
|
655
|
-
proto.aggregator.
|
|
672
|
+
proto.aggregator.TriggerTaskResp.displayName = "proto.aggregator.TriggerTaskResp";
|
|
656
673
|
}
|
|
657
674
|
proto.aggregator.CreateOrUpdateSecretReq = function(opt_data) {
|
|
658
675
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
@@ -1005,7 +1022,8 @@ var require_avs_pb = __commonJS({
|
|
|
1005
1022
|
};
|
|
1006
1023
|
proto.aggregator.FixedTimeTrigger.Output.toObject = function(includeInstance, msg) {
|
|
1007
1024
|
var f, obj = {
|
|
1008
|
-
|
|
1025
|
+
timestamp: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
1026
|
+
timestampIso: jspb.Message.getFieldWithDefault(msg, 2, "")
|
|
1009
1027
|
};
|
|
1010
1028
|
if (includeInstance) {
|
|
1011
1029
|
obj.$jspbMessageInstance = msg;
|
|
@@ -1030,7 +1048,14 @@ var require_avs_pb = __commonJS({
|
|
|
1030
1048
|
/** @type {number} */
|
|
1031
1049
|
reader.readUint64()
|
|
1032
1050
|
);
|
|
1033
|
-
msg.
|
|
1051
|
+
msg.setTimestamp(value);
|
|
1052
|
+
break;
|
|
1053
|
+
case 2:
|
|
1054
|
+
var value = (
|
|
1055
|
+
/** @type {string} */
|
|
1056
|
+
reader.readString()
|
|
1057
|
+
);
|
|
1058
|
+
msg.setTimestampIso(value);
|
|
1034
1059
|
break;
|
|
1035
1060
|
default:
|
|
1036
1061
|
reader.skipField();
|
|
@@ -1046,23 +1071,39 @@ var require_avs_pb = __commonJS({
|
|
|
1046
1071
|
};
|
|
1047
1072
|
proto.aggregator.FixedTimeTrigger.Output.serializeBinaryToWriter = function(message, writer) {
|
|
1048
1073
|
var f = void 0;
|
|
1049
|
-
f = message.
|
|
1074
|
+
f = message.getTimestamp();
|
|
1050
1075
|
if (f !== 0) {
|
|
1051
1076
|
writer.writeUint64(
|
|
1052
1077
|
1,
|
|
1053
1078
|
f
|
|
1054
1079
|
);
|
|
1055
1080
|
}
|
|
1081
|
+
f = message.getTimestampIso();
|
|
1082
|
+
if (f.length > 0) {
|
|
1083
|
+
writer.writeString(
|
|
1084
|
+
2,
|
|
1085
|
+
f
|
|
1086
|
+
);
|
|
1087
|
+
}
|
|
1056
1088
|
};
|
|
1057
|
-
proto.aggregator.FixedTimeTrigger.Output.prototype.
|
|
1089
|
+
proto.aggregator.FixedTimeTrigger.Output.prototype.getTimestamp = function() {
|
|
1058
1090
|
return (
|
|
1059
1091
|
/** @type {number} */
|
|
1060
1092
|
jspb.Message.getFieldWithDefault(this, 1, 0)
|
|
1061
1093
|
);
|
|
1062
1094
|
};
|
|
1063
|
-
proto.aggregator.FixedTimeTrigger.Output.prototype.
|
|
1095
|
+
proto.aggregator.FixedTimeTrigger.Output.prototype.setTimestamp = function(value) {
|
|
1064
1096
|
return jspb.Message.setProto3IntField(this, 1, value);
|
|
1065
1097
|
};
|
|
1098
|
+
proto.aggregator.FixedTimeTrigger.Output.prototype.getTimestampIso = function() {
|
|
1099
|
+
return (
|
|
1100
|
+
/** @type {string} */
|
|
1101
|
+
jspb.Message.getFieldWithDefault(this, 2, "")
|
|
1102
|
+
);
|
|
1103
|
+
};
|
|
1104
|
+
proto.aggregator.FixedTimeTrigger.Output.prototype.setTimestampIso = function(value) {
|
|
1105
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
|
1106
|
+
};
|
|
1066
1107
|
proto.aggregator.FixedTimeTrigger.prototype.getConfig = function() {
|
|
1067
1108
|
return (
|
|
1068
1109
|
/** @type{?proto.aggregator.FixedTimeTrigger.Config} */
|
|
@@ -1209,8 +1250,8 @@ var require_avs_pb = __commonJS({
|
|
|
1209
1250
|
};
|
|
1210
1251
|
proto.aggregator.CronTrigger.Output.toObject = function(includeInstance, msg) {
|
|
1211
1252
|
var f, obj = {
|
|
1212
|
-
|
|
1213
|
-
|
|
1253
|
+
timestamp: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
1254
|
+
timestampIso: jspb.Message.getFieldWithDefault(msg, 2, "")
|
|
1214
1255
|
};
|
|
1215
1256
|
if (includeInstance) {
|
|
1216
1257
|
obj.$jspbMessageInstance = msg;
|
|
@@ -1235,14 +1276,14 @@ var require_avs_pb = __commonJS({
|
|
|
1235
1276
|
/** @type {number} */
|
|
1236
1277
|
reader.readUint64()
|
|
1237
1278
|
);
|
|
1238
|
-
msg.
|
|
1279
|
+
msg.setTimestamp(value);
|
|
1239
1280
|
break;
|
|
1240
1281
|
case 2:
|
|
1241
1282
|
var value = (
|
|
1242
1283
|
/** @type {string} */
|
|
1243
1284
|
reader.readString()
|
|
1244
1285
|
);
|
|
1245
|
-
msg.
|
|
1286
|
+
msg.setTimestampIso(value);
|
|
1246
1287
|
break;
|
|
1247
1288
|
default:
|
|
1248
1289
|
reader.skipField();
|
|
@@ -1258,14 +1299,14 @@ var require_avs_pb = __commonJS({
|
|
|
1258
1299
|
};
|
|
1259
1300
|
proto.aggregator.CronTrigger.Output.serializeBinaryToWriter = function(message, writer) {
|
|
1260
1301
|
var f = void 0;
|
|
1261
|
-
f = message.
|
|
1302
|
+
f = message.getTimestamp();
|
|
1262
1303
|
if (f !== 0) {
|
|
1263
1304
|
writer.writeUint64(
|
|
1264
1305
|
1,
|
|
1265
1306
|
f
|
|
1266
1307
|
);
|
|
1267
1308
|
}
|
|
1268
|
-
f = message.
|
|
1309
|
+
f = message.getTimestampIso();
|
|
1269
1310
|
if (f.length > 0) {
|
|
1270
1311
|
writer.writeString(
|
|
1271
1312
|
2,
|
|
@@ -1273,22 +1314,22 @@ var require_avs_pb = __commonJS({
|
|
|
1273
1314
|
);
|
|
1274
1315
|
}
|
|
1275
1316
|
};
|
|
1276
|
-
proto.aggregator.CronTrigger.Output.prototype.
|
|
1317
|
+
proto.aggregator.CronTrigger.Output.prototype.getTimestamp = function() {
|
|
1277
1318
|
return (
|
|
1278
1319
|
/** @type {number} */
|
|
1279
1320
|
jspb.Message.getFieldWithDefault(this, 1, 0)
|
|
1280
1321
|
);
|
|
1281
1322
|
};
|
|
1282
|
-
proto.aggregator.CronTrigger.Output.prototype.
|
|
1323
|
+
proto.aggregator.CronTrigger.Output.prototype.setTimestamp = function(value) {
|
|
1283
1324
|
return jspb.Message.setProto3IntField(this, 1, value);
|
|
1284
1325
|
};
|
|
1285
|
-
proto.aggregator.CronTrigger.Output.prototype.
|
|
1326
|
+
proto.aggregator.CronTrigger.Output.prototype.getTimestampIso = function() {
|
|
1286
1327
|
return (
|
|
1287
1328
|
/** @type {string} */
|
|
1288
1329
|
jspb.Message.getFieldWithDefault(this, 2, "")
|
|
1289
1330
|
);
|
|
1290
1331
|
};
|
|
1291
|
-
proto.aggregator.CronTrigger.Output.prototype.
|
|
1332
|
+
proto.aggregator.CronTrigger.Output.prototype.setTimestampIso = function(value) {
|
|
1292
1333
|
return jspb.Message.setProto3StringField(this, 2, value);
|
|
1293
1334
|
};
|
|
1294
1335
|
proto.aggregator.CronTrigger.prototype.getConfig = function() {
|
|
@@ -2359,6 +2400,178 @@ var require_avs_pb = __commonJS({
|
|
|
2359
2400
|
proto.aggregator.EventTrigger.prototype.hasConfig = function() {
|
|
2360
2401
|
return jspb.Message.getField(this, 1) != null;
|
|
2361
2402
|
};
|
|
2403
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
2404
|
+
proto.aggregator.ManualTrigger.prototype.toObject = function(opt_includeInstance) {
|
|
2405
|
+
return proto.aggregator.ManualTrigger.toObject(opt_includeInstance, this);
|
|
2406
|
+
};
|
|
2407
|
+
proto.aggregator.ManualTrigger.toObject = function(includeInstance, msg) {
|
|
2408
|
+
var f, obj = {
|
|
2409
|
+
config: (f = msg.getConfig()) && proto.aggregator.ManualTrigger.Config.toObject(includeInstance, f)
|
|
2410
|
+
};
|
|
2411
|
+
if (includeInstance) {
|
|
2412
|
+
obj.$jspbMessageInstance = msg;
|
|
2413
|
+
}
|
|
2414
|
+
return obj;
|
|
2415
|
+
};
|
|
2416
|
+
}
|
|
2417
|
+
proto.aggregator.ManualTrigger.deserializeBinary = function(bytes) {
|
|
2418
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
2419
|
+
var msg = new proto.aggregator.ManualTrigger();
|
|
2420
|
+
return proto.aggregator.ManualTrigger.deserializeBinaryFromReader(msg, reader);
|
|
2421
|
+
};
|
|
2422
|
+
proto.aggregator.ManualTrigger.deserializeBinaryFromReader = function(msg, reader) {
|
|
2423
|
+
while (reader.nextField()) {
|
|
2424
|
+
if (reader.isEndGroup()) {
|
|
2425
|
+
break;
|
|
2426
|
+
}
|
|
2427
|
+
var field = reader.getFieldNumber();
|
|
2428
|
+
switch (field) {
|
|
2429
|
+
case 1:
|
|
2430
|
+
var value = new proto.aggregator.ManualTrigger.Config();
|
|
2431
|
+
reader.readMessage(value, proto.aggregator.ManualTrigger.Config.deserializeBinaryFromReader);
|
|
2432
|
+
msg.setConfig(value);
|
|
2433
|
+
break;
|
|
2434
|
+
default:
|
|
2435
|
+
reader.skipField();
|
|
2436
|
+
break;
|
|
2437
|
+
}
|
|
2438
|
+
}
|
|
2439
|
+
return msg;
|
|
2440
|
+
};
|
|
2441
|
+
proto.aggregator.ManualTrigger.prototype.serializeBinary = function() {
|
|
2442
|
+
var writer = new jspb.BinaryWriter();
|
|
2443
|
+
proto.aggregator.ManualTrigger.serializeBinaryToWriter(this, writer);
|
|
2444
|
+
return writer.getResultBuffer();
|
|
2445
|
+
};
|
|
2446
|
+
proto.aggregator.ManualTrigger.serializeBinaryToWriter = function(message, writer) {
|
|
2447
|
+
var f = void 0;
|
|
2448
|
+
f = message.getConfig();
|
|
2449
|
+
if (f != null) {
|
|
2450
|
+
writer.writeMessage(
|
|
2451
|
+
1,
|
|
2452
|
+
f,
|
|
2453
|
+
proto.aggregator.ManualTrigger.Config.serializeBinaryToWriter
|
|
2454
|
+
);
|
|
2455
|
+
}
|
|
2456
|
+
};
|
|
2457
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
2458
|
+
proto.aggregator.ManualTrigger.Config.prototype.toObject = function(opt_includeInstance) {
|
|
2459
|
+
return proto.aggregator.ManualTrigger.Config.toObject(opt_includeInstance, this);
|
|
2460
|
+
};
|
|
2461
|
+
proto.aggregator.ManualTrigger.Config.toObject = function(includeInstance, msg) {
|
|
2462
|
+
var f, obj = {};
|
|
2463
|
+
if (includeInstance) {
|
|
2464
|
+
obj.$jspbMessageInstance = msg;
|
|
2465
|
+
}
|
|
2466
|
+
return obj;
|
|
2467
|
+
};
|
|
2468
|
+
}
|
|
2469
|
+
proto.aggregator.ManualTrigger.Config.deserializeBinary = function(bytes) {
|
|
2470
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
2471
|
+
var msg = new proto.aggregator.ManualTrigger.Config();
|
|
2472
|
+
return proto.aggregator.ManualTrigger.Config.deserializeBinaryFromReader(msg, reader);
|
|
2473
|
+
};
|
|
2474
|
+
proto.aggregator.ManualTrigger.Config.deserializeBinaryFromReader = function(msg, reader) {
|
|
2475
|
+
while (reader.nextField()) {
|
|
2476
|
+
if (reader.isEndGroup()) {
|
|
2477
|
+
break;
|
|
2478
|
+
}
|
|
2479
|
+
var field = reader.getFieldNumber();
|
|
2480
|
+
switch (field) {
|
|
2481
|
+
default:
|
|
2482
|
+
reader.skipField();
|
|
2483
|
+
break;
|
|
2484
|
+
}
|
|
2485
|
+
}
|
|
2486
|
+
return msg;
|
|
2487
|
+
};
|
|
2488
|
+
proto.aggregator.ManualTrigger.Config.prototype.serializeBinary = function() {
|
|
2489
|
+
var writer = new jspb.BinaryWriter();
|
|
2490
|
+
proto.aggregator.ManualTrigger.Config.serializeBinaryToWriter(this, writer);
|
|
2491
|
+
return writer.getResultBuffer();
|
|
2492
|
+
};
|
|
2493
|
+
proto.aggregator.ManualTrigger.Config.serializeBinaryToWriter = function(message, writer) {
|
|
2494
|
+
var f = void 0;
|
|
2495
|
+
};
|
|
2496
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
2497
|
+
proto.aggregator.ManualTrigger.Output.prototype.toObject = function(opt_includeInstance) {
|
|
2498
|
+
return proto.aggregator.ManualTrigger.Output.toObject(opt_includeInstance, this);
|
|
2499
|
+
};
|
|
2500
|
+
proto.aggregator.ManualTrigger.Output.toObject = function(includeInstance, msg) {
|
|
2501
|
+
var f, obj = {
|
|
2502
|
+
runAt: jspb.Message.getFieldWithDefault(msg, 1, 0)
|
|
2503
|
+
};
|
|
2504
|
+
if (includeInstance) {
|
|
2505
|
+
obj.$jspbMessageInstance = msg;
|
|
2506
|
+
}
|
|
2507
|
+
return obj;
|
|
2508
|
+
};
|
|
2509
|
+
}
|
|
2510
|
+
proto.aggregator.ManualTrigger.Output.deserializeBinary = function(bytes) {
|
|
2511
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
2512
|
+
var msg = new proto.aggregator.ManualTrigger.Output();
|
|
2513
|
+
return proto.aggregator.ManualTrigger.Output.deserializeBinaryFromReader(msg, reader);
|
|
2514
|
+
};
|
|
2515
|
+
proto.aggregator.ManualTrigger.Output.deserializeBinaryFromReader = function(msg, reader) {
|
|
2516
|
+
while (reader.nextField()) {
|
|
2517
|
+
if (reader.isEndGroup()) {
|
|
2518
|
+
break;
|
|
2519
|
+
}
|
|
2520
|
+
var field = reader.getFieldNumber();
|
|
2521
|
+
switch (field) {
|
|
2522
|
+
case 1:
|
|
2523
|
+
var value = (
|
|
2524
|
+
/** @type {number} */
|
|
2525
|
+
reader.readUint64()
|
|
2526
|
+
);
|
|
2527
|
+
msg.setRunAt(value);
|
|
2528
|
+
break;
|
|
2529
|
+
default:
|
|
2530
|
+
reader.skipField();
|
|
2531
|
+
break;
|
|
2532
|
+
}
|
|
2533
|
+
}
|
|
2534
|
+
return msg;
|
|
2535
|
+
};
|
|
2536
|
+
proto.aggregator.ManualTrigger.Output.prototype.serializeBinary = function() {
|
|
2537
|
+
var writer = new jspb.BinaryWriter();
|
|
2538
|
+
proto.aggregator.ManualTrigger.Output.serializeBinaryToWriter(this, writer);
|
|
2539
|
+
return writer.getResultBuffer();
|
|
2540
|
+
};
|
|
2541
|
+
proto.aggregator.ManualTrigger.Output.serializeBinaryToWriter = function(message, writer) {
|
|
2542
|
+
var f = void 0;
|
|
2543
|
+
f = message.getRunAt();
|
|
2544
|
+
if (f !== 0) {
|
|
2545
|
+
writer.writeUint64(
|
|
2546
|
+
1,
|
|
2547
|
+
f
|
|
2548
|
+
);
|
|
2549
|
+
}
|
|
2550
|
+
};
|
|
2551
|
+
proto.aggregator.ManualTrigger.Output.prototype.getRunAt = function() {
|
|
2552
|
+
return (
|
|
2553
|
+
/** @type {number} */
|
|
2554
|
+
jspb.Message.getFieldWithDefault(this, 1, 0)
|
|
2555
|
+
);
|
|
2556
|
+
};
|
|
2557
|
+
proto.aggregator.ManualTrigger.Output.prototype.setRunAt = function(value) {
|
|
2558
|
+
return jspb.Message.setProto3IntField(this, 1, value);
|
|
2559
|
+
};
|
|
2560
|
+
proto.aggregator.ManualTrigger.prototype.getConfig = function() {
|
|
2561
|
+
return (
|
|
2562
|
+
/** @type{?proto.aggregator.ManualTrigger.Config} */
|
|
2563
|
+
jspb.Message.getWrapperField(this, proto.aggregator.ManualTrigger.Config, 1)
|
|
2564
|
+
);
|
|
2565
|
+
};
|
|
2566
|
+
proto.aggregator.ManualTrigger.prototype.setConfig = function(value) {
|
|
2567
|
+
return jspb.Message.setWrapperField(this, 1, value);
|
|
2568
|
+
};
|
|
2569
|
+
proto.aggregator.ManualTrigger.prototype.clearConfig = function() {
|
|
2570
|
+
return this.setConfig(void 0);
|
|
2571
|
+
};
|
|
2572
|
+
proto.aggregator.ManualTrigger.prototype.hasConfig = function() {
|
|
2573
|
+
return jspb.Message.getField(this, 1) != null;
|
|
2574
|
+
};
|
|
2362
2575
|
proto.aggregator.TaskTrigger.oneofGroups_ = [[2, 3, 4, 5, 6]];
|
|
2363
2576
|
proto.aggregator.TaskTrigger.TriggerTypeCase = {
|
|
2364
2577
|
TRIGGER_TYPE_NOT_SET: 0,
|
|
@@ -3838,7 +4051,7 @@ var require_avs_pb = __commonJS({
|
|
|
3838
4051
|
};
|
|
3839
4052
|
proto.aggregator.RestAPINode.Output.toObject = function(includeInstance, msg) {
|
|
3840
4053
|
var f, obj = {
|
|
3841
|
-
data: (f = msg.getData()) &&
|
|
4054
|
+
data: (f = msg.getData()) && google_protobuf_struct_pb.Value.toObject(includeInstance, f)
|
|
3842
4055
|
};
|
|
3843
4056
|
if (includeInstance) {
|
|
3844
4057
|
obj.$jspbMessageInstance = msg;
|
|
@@ -3859,8 +4072,8 @@ var require_avs_pb = __commonJS({
|
|
|
3859
4072
|
var field = reader.getFieldNumber();
|
|
3860
4073
|
switch (field) {
|
|
3861
4074
|
case 1:
|
|
3862
|
-
var value = new
|
|
3863
|
-
reader.readMessage(value,
|
|
4075
|
+
var value = new google_protobuf_struct_pb.Value();
|
|
4076
|
+
reader.readMessage(value, google_protobuf_struct_pb.Value.deserializeBinaryFromReader);
|
|
3864
4077
|
msg.setData(value);
|
|
3865
4078
|
break;
|
|
3866
4079
|
default:
|
|
@@ -3882,14 +4095,14 @@ var require_avs_pb = __commonJS({
|
|
|
3882
4095
|
writer.writeMessage(
|
|
3883
4096
|
1,
|
|
3884
4097
|
f,
|
|
3885
|
-
|
|
4098
|
+
google_protobuf_struct_pb.Value.serializeBinaryToWriter
|
|
3886
4099
|
);
|
|
3887
4100
|
}
|
|
3888
4101
|
};
|
|
3889
4102
|
proto.aggregator.RestAPINode.Output.prototype.getData = function() {
|
|
3890
4103
|
return (
|
|
3891
|
-
/** @type{?proto.google.protobuf.
|
|
3892
|
-
jspb.Message.getWrapperField(this,
|
|
4104
|
+
/** @type{?proto.google.protobuf.Value} */
|
|
4105
|
+
jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Value, 1)
|
|
3893
4106
|
);
|
|
3894
4107
|
};
|
|
3895
4108
|
proto.aggregator.RestAPINode.Output.prototype.setData = function(value) {
|
|
@@ -5627,13 +5840,14 @@ var require_avs_pb = __commonJS({
|
|
|
5627
5840
|
return jspb.Message.getField(this, 18) != null;
|
|
5628
5841
|
};
|
|
5629
5842
|
proto.aggregator.Execution.repeatedFields_ = [8];
|
|
5630
|
-
proto.aggregator.Execution.oneofGroups_ = [[10, 11, 12, 13]];
|
|
5843
|
+
proto.aggregator.Execution.oneofGroups_ = [[10, 11, 12, 13, 14]];
|
|
5631
5844
|
proto.aggregator.Execution.OutputDataCase = {
|
|
5632
5845
|
OUTPUT_DATA_NOT_SET: 0,
|
|
5633
5846
|
BLOCK_TRIGGER: 10,
|
|
5634
5847
|
FIXED_TIME_TRIGGER: 11,
|
|
5635
5848
|
CRON_TRIGGER: 12,
|
|
5636
|
-
EVENT_TRIGGER: 13
|
|
5849
|
+
EVENT_TRIGGER: 13,
|
|
5850
|
+
MANUAL_TRIGGER: 14
|
|
5637
5851
|
};
|
|
5638
5852
|
proto.aggregator.Execution.prototype.getOutputDataCase = function() {
|
|
5639
5853
|
return (
|
|
@@ -5652,7 +5866,7 @@ var require_avs_pb = __commonJS({
|
|
|
5652
5866
|
endAt: jspb.Message.getFieldWithDefault(msg, 3, 0),
|
|
5653
5867
|
success: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
|
|
5654
5868
|
error: jspb.Message.getFieldWithDefault(msg, 5, ""),
|
|
5655
|
-
|
|
5869
|
+
triggerType: jspb.Message.getFieldWithDefault(msg, 6, 0),
|
|
5656
5870
|
stepsList: jspb.Message.toObjectList(
|
|
5657
5871
|
msg.getStepsList(),
|
|
5658
5872
|
proto.aggregator.Execution.Step.toObject,
|
|
@@ -5662,7 +5876,8 @@ var require_avs_pb = __commonJS({
|
|
|
5662
5876
|
blockTrigger: (f = msg.getBlockTrigger()) && proto.aggregator.BlockTrigger.Output.toObject(includeInstance, f),
|
|
5663
5877
|
fixedTimeTrigger: (f = msg.getFixedTimeTrigger()) && proto.aggregator.FixedTimeTrigger.Output.toObject(includeInstance, f),
|
|
5664
5878
|
cronTrigger: (f = msg.getCronTrigger()) && proto.aggregator.CronTrigger.Output.toObject(includeInstance, f),
|
|
5665
|
-
eventTrigger: (f = msg.getEventTrigger()) && proto.aggregator.EventTrigger.Output.toObject(includeInstance, f)
|
|
5879
|
+
eventTrigger: (f = msg.getEventTrigger()) && proto.aggregator.EventTrigger.Output.toObject(includeInstance, f),
|
|
5880
|
+
manualTrigger: (f = msg.getManualTrigger()) && proto.aggregator.ManualTrigger.Output.toObject(includeInstance, f)
|
|
5666
5881
|
};
|
|
5667
5882
|
if (includeInstance) {
|
|
5668
5883
|
obj.$jspbMessageInstance = msg;
|
|
@@ -5718,9 +5933,11 @@ var require_avs_pb = __commonJS({
|
|
|
5718
5933
|
msg.setError(value);
|
|
5719
5934
|
break;
|
|
5720
5935
|
case 6:
|
|
5721
|
-
var value =
|
|
5722
|
-
|
|
5723
|
-
|
|
5936
|
+
var value = (
|
|
5937
|
+
/** @type {!proto.aggregator.TriggerType} */
|
|
5938
|
+
reader.readEnum()
|
|
5939
|
+
);
|
|
5940
|
+
msg.setTriggerType(value);
|
|
5724
5941
|
break;
|
|
5725
5942
|
case 8:
|
|
5726
5943
|
var value = new proto.aggregator.Execution.Step();
|
|
@@ -5754,6 +5971,11 @@ var require_avs_pb = __commonJS({
|
|
|
5754
5971
|
reader.readMessage(value, proto.aggregator.EventTrigger.Output.deserializeBinaryFromReader);
|
|
5755
5972
|
msg.setEventTrigger(value);
|
|
5756
5973
|
break;
|
|
5974
|
+
case 14:
|
|
5975
|
+
var value = new proto.aggregator.ManualTrigger.Output();
|
|
5976
|
+
reader.readMessage(value, proto.aggregator.ManualTrigger.Output.deserializeBinaryFromReader);
|
|
5977
|
+
msg.setManualTrigger(value);
|
|
5978
|
+
break;
|
|
5757
5979
|
default:
|
|
5758
5980
|
reader.skipField();
|
|
5759
5981
|
break;
|
|
@@ -5803,12 +6025,11 @@ var require_avs_pb = __commonJS({
|
|
|
5803
6025
|
f
|
|
5804
6026
|
);
|
|
5805
6027
|
}
|
|
5806
|
-
f = message.
|
|
5807
|
-
if (f
|
|
5808
|
-
writer.
|
|
6028
|
+
f = message.getTriggerType();
|
|
6029
|
+
if (f !== 0) {
|
|
6030
|
+
writer.writeEnum(
|
|
5809
6031
|
6,
|
|
5810
|
-
f
|
|
5811
|
-
proto.aggregator.TriggerReason.serializeBinaryToWriter
|
|
6032
|
+
f
|
|
5812
6033
|
);
|
|
5813
6034
|
}
|
|
5814
6035
|
f = message.getStepsList();
|
|
@@ -5858,6 +6079,14 @@ var require_avs_pb = __commonJS({
|
|
|
5858
6079
|
proto.aggregator.EventTrigger.Output.serializeBinaryToWriter
|
|
5859
6080
|
);
|
|
5860
6081
|
}
|
|
6082
|
+
f = message.getManualTrigger();
|
|
6083
|
+
if (f != null) {
|
|
6084
|
+
writer.writeMessage(
|
|
6085
|
+
14,
|
|
6086
|
+
f,
|
|
6087
|
+
proto.aggregator.ManualTrigger.Output.serializeBinaryToWriter
|
|
6088
|
+
);
|
|
6089
|
+
}
|
|
5861
6090
|
};
|
|
5862
6091
|
proto.aggregator.Execution.Step.repeatedFields_ = [16];
|
|
5863
6092
|
proto.aggregator.Execution.Step.oneofGroups_ = [[3, 4, 5, 6, 7, 8, 9, 10, 11]];
|
|
@@ -6399,20 +6628,14 @@ var require_avs_pb = __commonJS({
|
|
|
6399
6628
|
proto.aggregator.Execution.prototype.setError = function(value) {
|
|
6400
6629
|
return jspb.Message.setProto3StringField(this, 5, value);
|
|
6401
6630
|
};
|
|
6402
|
-
proto.aggregator.Execution.prototype.
|
|
6631
|
+
proto.aggregator.Execution.prototype.getTriggerType = function() {
|
|
6403
6632
|
return (
|
|
6404
|
-
/** @type{
|
|
6405
|
-
jspb.Message.
|
|
6633
|
+
/** @type {!proto.aggregator.TriggerType} */
|
|
6634
|
+
jspb.Message.getFieldWithDefault(this, 6, 0)
|
|
6406
6635
|
);
|
|
6407
6636
|
};
|
|
6408
|
-
proto.aggregator.Execution.prototype.
|
|
6409
|
-
return jspb.Message.
|
|
6410
|
-
};
|
|
6411
|
-
proto.aggregator.Execution.prototype.clearReason = function() {
|
|
6412
|
-
return this.setReason(void 0);
|
|
6413
|
-
};
|
|
6414
|
-
proto.aggregator.Execution.prototype.hasReason = function() {
|
|
6415
|
-
return jspb.Message.getField(this, 6) != null;
|
|
6637
|
+
proto.aggregator.Execution.prototype.setTriggerType = function(value) {
|
|
6638
|
+
return jspb.Message.setProto3EnumField(this, 6, value);
|
|
6416
6639
|
};
|
|
6417
6640
|
proto.aggregator.Execution.prototype.getStepsList = function() {
|
|
6418
6641
|
return (
|
|
@@ -6498,6 +6721,21 @@ var require_avs_pb = __commonJS({
|
|
|
6498
6721
|
proto.aggregator.Execution.prototype.hasEventTrigger = function() {
|
|
6499
6722
|
return jspb.Message.getField(this, 13) != null;
|
|
6500
6723
|
};
|
|
6724
|
+
proto.aggregator.Execution.prototype.getManualTrigger = function() {
|
|
6725
|
+
return (
|
|
6726
|
+
/** @type{?proto.aggregator.ManualTrigger.Output} */
|
|
6727
|
+
jspb.Message.getWrapperField(this, proto.aggregator.ManualTrigger.Output, 14)
|
|
6728
|
+
);
|
|
6729
|
+
};
|
|
6730
|
+
proto.aggregator.Execution.prototype.setManualTrigger = function(value) {
|
|
6731
|
+
return jspb.Message.setOneofWrapperField(this, 14, proto.aggregator.Execution.oneofGroups_[0], value);
|
|
6732
|
+
};
|
|
6733
|
+
proto.aggregator.Execution.prototype.clearManualTrigger = function() {
|
|
6734
|
+
return this.setManualTrigger(void 0);
|
|
6735
|
+
};
|
|
6736
|
+
proto.aggregator.Execution.prototype.hasManualTrigger = function() {
|
|
6737
|
+
return jspb.Message.getField(this, 14) != null;
|
|
6738
|
+
};
|
|
6501
6739
|
proto.aggregator.Task.repeatedFields_ = [13, 14];
|
|
6502
6740
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
6503
6741
|
proto.aggregator.Task.prototype.toObject = function(opt_includeInstance) {
|
|
@@ -8430,7 +8668,10 @@ var require_avs_pb = __commonJS({
|
|
|
8430
8668
|
};
|
|
8431
8669
|
proto.aggregator.KeyResp.toObject = function(includeInstance, msg) {
|
|
8432
8670
|
var f, obj = {
|
|
8433
|
-
|
|
8671
|
+
address: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
8672
|
+
key: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
8673
|
+
message: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
8674
|
+
expiry: jspb.Message.getFieldWithDefault(msg, 4, 0)
|
|
8434
8675
|
};
|
|
8435
8676
|
if (includeInstance) {
|
|
8436
8677
|
obj.$jspbMessageInstance = msg;
|
|
@@ -8451,12 +8692,33 @@ var require_avs_pb = __commonJS({
|
|
|
8451
8692
|
var field = reader.getFieldNumber();
|
|
8452
8693
|
switch (field) {
|
|
8453
8694
|
case 1:
|
|
8695
|
+
var value = (
|
|
8696
|
+
/** @type {string} */
|
|
8697
|
+
reader.readString()
|
|
8698
|
+
);
|
|
8699
|
+
msg.setAddress(value);
|
|
8700
|
+
break;
|
|
8701
|
+
case 2:
|
|
8454
8702
|
var value = (
|
|
8455
8703
|
/** @type {string} */
|
|
8456
8704
|
reader.readString()
|
|
8457
8705
|
);
|
|
8458
8706
|
msg.setKey(value);
|
|
8459
8707
|
break;
|
|
8708
|
+
case 3:
|
|
8709
|
+
var value = (
|
|
8710
|
+
/** @type {string} */
|
|
8711
|
+
reader.readString()
|
|
8712
|
+
);
|
|
8713
|
+
msg.setMessage(value);
|
|
8714
|
+
break;
|
|
8715
|
+
case 4:
|
|
8716
|
+
var value = (
|
|
8717
|
+
/** @type {number} */
|
|
8718
|
+
reader.readUint64()
|
|
8719
|
+
);
|
|
8720
|
+
msg.setExpiry(value);
|
|
8721
|
+
break;
|
|
8460
8722
|
default:
|
|
8461
8723
|
reader.skipField();
|
|
8462
8724
|
break;
|
|
@@ -8471,183 +8733,71 @@ var require_avs_pb = __commonJS({
|
|
|
8471
8733
|
};
|
|
8472
8734
|
proto.aggregator.KeyResp.serializeBinaryToWriter = function(message, writer) {
|
|
8473
8735
|
var f = void 0;
|
|
8474
|
-
f = message.
|
|
8736
|
+
f = message.getAddress();
|
|
8475
8737
|
if (f.length > 0) {
|
|
8476
8738
|
writer.writeString(
|
|
8477
8739
|
1,
|
|
8478
8740
|
f
|
|
8479
8741
|
);
|
|
8480
8742
|
}
|
|
8743
|
+
f = message.getKey();
|
|
8744
|
+
if (f.length > 0) {
|
|
8745
|
+
writer.writeString(
|
|
8746
|
+
2,
|
|
8747
|
+
f
|
|
8748
|
+
);
|
|
8749
|
+
}
|
|
8750
|
+
f = message.getMessage();
|
|
8751
|
+
if (f.length > 0) {
|
|
8752
|
+
writer.writeString(
|
|
8753
|
+
3,
|
|
8754
|
+
f
|
|
8755
|
+
);
|
|
8756
|
+
}
|
|
8757
|
+
f = message.getExpiry();
|
|
8758
|
+
if (f !== 0) {
|
|
8759
|
+
writer.writeUint64(
|
|
8760
|
+
4,
|
|
8761
|
+
f
|
|
8762
|
+
);
|
|
8763
|
+
}
|
|
8481
8764
|
};
|
|
8482
|
-
proto.aggregator.KeyResp.prototype.
|
|
8765
|
+
proto.aggregator.KeyResp.prototype.getAddress = function() {
|
|
8483
8766
|
return (
|
|
8484
8767
|
/** @type {string} */
|
|
8485
8768
|
jspb.Message.getFieldWithDefault(this, 1, "")
|
|
8486
8769
|
);
|
|
8487
8770
|
};
|
|
8488
|
-
proto.aggregator.KeyResp.prototype.
|
|
8771
|
+
proto.aggregator.KeyResp.prototype.setAddress = function(value) {
|
|
8489
8772
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
8490
8773
|
};
|
|
8491
|
-
|
|
8492
|
-
proto.aggregator.TriggerReason.prototype.toObject = function(opt_includeInstance) {
|
|
8493
|
-
return proto.aggregator.TriggerReason.toObject(opt_includeInstance, this);
|
|
8494
|
-
};
|
|
8495
|
-
proto.aggregator.TriggerReason.toObject = function(includeInstance, msg) {
|
|
8496
|
-
var f, obj = {
|
|
8497
|
-
blockNumber: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
8498
|
-
logIndex: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
|
8499
|
-
txHash: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
8500
|
-
epoch: jspb.Message.getFieldWithDefault(msg, 4, 0),
|
|
8501
|
-
type: jspb.Message.getFieldWithDefault(msg, 5, 0)
|
|
8502
|
-
};
|
|
8503
|
-
if (includeInstance) {
|
|
8504
|
-
obj.$jspbMessageInstance = msg;
|
|
8505
|
-
}
|
|
8506
|
-
return obj;
|
|
8507
|
-
};
|
|
8508
|
-
}
|
|
8509
|
-
proto.aggregator.TriggerReason.deserializeBinary = function(bytes) {
|
|
8510
|
-
var reader = new jspb.BinaryReader(bytes);
|
|
8511
|
-
var msg = new proto.aggregator.TriggerReason();
|
|
8512
|
-
return proto.aggregator.TriggerReason.deserializeBinaryFromReader(msg, reader);
|
|
8513
|
-
};
|
|
8514
|
-
proto.aggregator.TriggerReason.deserializeBinaryFromReader = function(msg, reader) {
|
|
8515
|
-
while (reader.nextField()) {
|
|
8516
|
-
if (reader.isEndGroup()) {
|
|
8517
|
-
break;
|
|
8518
|
-
}
|
|
8519
|
-
var field = reader.getFieldNumber();
|
|
8520
|
-
switch (field) {
|
|
8521
|
-
case 1:
|
|
8522
|
-
var value = (
|
|
8523
|
-
/** @type {number} */
|
|
8524
|
-
reader.readUint64()
|
|
8525
|
-
);
|
|
8526
|
-
msg.setBlockNumber(value);
|
|
8527
|
-
break;
|
|
8528
|
-
case 2:
|
|
8529
|
-
var value = (
|
|
8530
|
-
/** @type {number} */
|
|
8531
|
-
reader.readUint64()
|
|
8532
|
-
);
|
|
8533
|
-
msg.setLogIndex(value);
|
|
8534
|
-
break;
|
|
8535
|
-
case 3:
|
|
8536
|
-
var value = (
|
|
8537
|
-
/** @type {string} */
|
|
8538
|
-
reader.readString()
|
|
8539
|
-
);
|
|
8540
|
-
msg.setTxHash(value);
|
|
8541
|
-
break;
|
|
8542
|
-
case 4:
|
|
8543
|
-
var value = (
|
|
8544
|
-
/** @type {number} */
|
|
8545
|
-
reader.readUint64()
|
|
8546
|
-
);
|
|
8547
|
-
msg.setEpoch(value);
|
|
8548
|
-
break;
|
|
8549
|
-
case 5:
|
|
8550
|
-
var value = (
|
|
8551
|
-
/** @type {!proto.aggregator.TriggerType} */
|
|
8552
|
-
reader.readEnum()
|
|
8553
|
-
);
|
|
8554
|
-
msg.setType(value);
|
|
8555
|
-
break;
|
|
8556
|
-
default:
|
|
8557
|
-
reader.skipField();
|
|
8558
|
-
break;
|
|
8559
|
-
}
|
|
8560
|
-
}
|
|
8561
|
-
return msg;
|
|
8562
|
-
};
|
|
8563
|
-
proto.aggregator.TriggerReason.prototype.serializeBinary = function() {
|
|
8564
|
-
var writer = new jspb.BinaryWriter();
|
|
8565
|
-
proto.aggregator.TriggerReason.serializeBinaryToWriter(this, writer);
|
|
8566
|
-
return writer.getResultBuffer();
|
|
8567
|
-
};
|
|
8568
|
-
proto.aggregator.TriggerReason.serializeBinaryToWriter = function(message, writer) {
|
|
8569
|
-
var f = void 0;
|
|
8570
|
-
f = message.getBlockNumber();
|
|
8571
|
-
if (f !== 0) {
|
|
8572
|
-
writer.writeUint64(
|
|
8573
|
-
1,
|
|
8574
|
-
f
|
|
8575
|
-
);
|
|
8576
|
-
}
|
|
8577
|
-
f = message.getLogIndex();
|
|
8578
|
-
if (f !== 0) {
|
|
8579
|
-
writer.writeUint64(
|
|
8580
|
-
2,
|
|
8581
|
-
f
|
|
8582
|
-
);
|
|
8583
|
-
}
|
|
8584
|
-
f = message.getTxHash();
|
|
8585
|
-
if (f.length > 0) {
|
|
8586
|
-
writer.writeString(
|
|
8587
|
-
3,
|
|
8588
|
-
f
|
|
8589
|
-
);
|
|
8590
|
-
}
|
|
8591
|
-
f = message.getEpoch();
|
|
8592
|
-
if (f !== 0) {
|
|
8593
|
-
writer.writeUint64(
|
|
8594
|
-
4,
|
|
8595
|
-
f
|
|
8596
|
-
);
|
|
8597
|
-
}
|
|
8598
|
-
f = message.getType();
|
|
8599
|
-
if (f !== 0) {
|
|
8600
|
-
writer.writeEnum(
|
|
8601
|
-
5,
|
|
8602
|
-
f
|
|
8603
|
-
);
|
|
8604
|
-
}
|
|
8605
|
-
};
|
|
8606
|
-
proto.aggregator.TriggerReason.prototype.getBlockNumber = function() {
|
|
8607
|
-
return (
|
|
8608
|
-
/** @type {number} */
|
|
8609
|
-
jspb.Message.getFieldWithDefault(this, 1, 0)
|
|
8610
|
-
);
|
|
8611
|
-
};
|
|
8612
|
-
proto.aggregator.TriggerReason.prototype.setBlockNumber = function(value) {
|
|
8613
|
-
return jspb.Message.setProto3IntField(this, 1, value);
|
|
8614
|
-
};
|
|
8615
|
-
proto.aggregator.TriggerReason.prototype.getLogIndex = function() {
|
|
8774
|
+
proto.aggregator.KeyResp.prototype.getKey = function() {
|
|
8616
8775
|
return (
|
|
8617
|
-
/** @type {
|
|
8618
|
-
jspb.Message.getFieldWithDefault(this, 2,
|
|
8776
|
+
/** @type {string} */
|
|
8777
|
+
jspb.Message.getFieldWithDefault(this, 2, "")
|
|
8619
8778
|
);
|
|
8620
8779
|
};
|
|
8621
|
-
proto.aggregator.
|
|
8622
|
-
return jspb.Message.
|
|
8780
|
+
proto.aggregator.KeyResp.prototype.setKey = function(value) {
|
|
8781
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
|
8623
8782
|
};
|
|
8624
|
-
proto.aggregator.
|
|
8783
|
+
proto.aggregator.KeyResp.prototype.getMessage = function() {
|
|
8625
8784
|
return (
|
|
8626
8785
|
/** @type {string} */
|
|
8627
8786
|
jspb.Message.getFieldWithDefault(this, 3, "")
|
|
8628
8787
|
);
|
|
8629
8788
|
};
|
|
8630
|
-
proto.aggregator.
|
|
8789
|
+
proto.aggregator.KeyResp.prototype.setMessage = function(value) {
|
|
8631
8790
|
return jspb.Message.setProto3StringField(this, 3, value);
|
|
8632
8791
|
};
|
|
8633
|
-
proto.aggregator.
|
|
8792
|
+
proto.aggregator.KeyResp.prototype.getExpiry = function() {
|
|
8634
8793
|
return (
|
|
8635
8794
|
/** @type {number} */
|
|
8636
8795
|
jspb.Message.getFieldWithDefault(this, 4, 0)
|
|
8637
8796
|
);
|
|
8638
8797
|
};
|
|
8639
|
-
proto.aggregator.
|
|
8798
|
+
proto.aggregator.KeyResp.prototype.setExpiry = function(value) {
|
|
8640
8799
|
return jspb.Message.setProto3IntField(this, 4, value);
|
|
8641
8800
|
};
|
|
8642
|
-
proto.aggregator.TriggerReason.prototype.getType = function() {
|
|
8643
|
-
return (
|
|
8644
|
-
/** @type {!proto.aggregator.TriggerType} */
|
|
8645
|
-
jspb.Message.getFieldWithDefault(this, 5, 0)
|
|
8646
|
-
);
|
|
8647
|
-
};
|
|
8648
|
-
proto.aggregator.TriggerReason.prototype.setType = function(value) {
|
|
8649
|
-
return jspb.Message.setProto3EnumField(this, 5, value);
|
|
8650
|
-
};
|
|
8651
8801
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
8652
8802
|
proto.aggregator.GetWalletReq.prototype.toObject = function(opt_includeInstance) {
|
|
8653
8803
|
return proto.aggregator.GetWalletReq.toObject(opt_includeInstance, this);
|
|
@@ -9104,15 +9254,35 @@ var require_avs_pb = __commonJS({
|
|
|
9104
9254
|
proto.aggregator.SetWalletReq.prototype.setIsHidden = function(value) {
|
|
9105
9255
|
return jspb.Message.setProto3BooleanField(this, 3, value);
|
|
9106
9256
|
};
|
|
9257
|
+
proto.aggregator.TriggerTaskReq.oneofGroups_ = [[3, 4, 5, 6, 7]];
|
|
9258
|
+
proto.aggregator.TriggerTaskReq.TriggerOutputCase = {
|
|
9259
|
+
TRIGGER_OUTPUT_NOT_SET: 0,
|
|
9260
|
+
BLOCK_TRIGGER: 3,
|
|
9261
|
+
FIXED_TIME_TRIGGER: 4,
|
|
9262
|
+
CRON_TRIGGER: 5,
|
|
9263
|
+
EVENT_TRIGGER: 6,
|
|
9264
|
+
MANUAL_TRIGGER: 7
|
|
9265
|
+
};
|
|
9266
|
+
proto.aggregator.TriggerTaskReq.prototype.getTriggerOutputCase = function() {
|
|
9267
|
+
return (
|
|
9268
|
+
/** @type {proto.aggregator.TriggerTaskReq.TriggerOutputCase} */
|
|
9269
|
+
jspb.Message.computeOneofCase(this, proto.aggregator.TriggerTaskReq.oneofGroups_[0])
|
|
9270
|
+
);
|
|
9271
|
+
};
|
|
9107
9272
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
9108
|
-
proto.aggregator.
|
|
9109
|
-
return proto.aggregator.
|
|
9273
|
+
proto.aggregator.TriggerTaskReq.prototype.toObject = function(opt_includeInstance) {
|
|
9274
|
+
return proto.aggregator.TriggerTaskReq.toObject(opt_includeInstance, this);
|
|
9110
9275
|
};
|
|
9111
|
-
proto.aggregator.
|
|
9276
|
+
proto.aggregator.TriggerTaskReq.toObject = function(includeInstance, msg) {
|
|
9112
9277
|
var f, obj = {
|
|
9113
9278
|
taskId: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
9114
|
-
|
|
9115
|
-
|
|
9279
|
+
triggerType: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
|
9280
|
+
blockTrigger: (f = msg.getBlockTrigger()) && proto.aggregator.BlockTrigger.Output.toObject(includeInstance, f),
|
|
9281
|
+
fixedTimeTrigger: (f = msg.getFixedTimeTrigger()) && proto.aggregator.FixedTimeTrigger.Output.toObject(includeInstance, f),
|
|
9282
|
+
cronTrigger: (f = msg.getCronTrigger()) && proto.aggregator.CronTrigger.Output.toObject(includeInstance, f),
|
|
9283
|
+
eventTrigger: (f = msg.getEventTrigger()) && proto.aggregator.EventTrigger.Output.toObject(includeInstance, f),
|
|
9284
|
+
manualTrigger: (f = msg.getManualTrigger()) && proto.aggregator.ManualTrigger.Output.toObject(includeInstance, f),
|
|
9285
|
+
isBlocking: jspb.Message.getBooleanFieldWithDefault(msg, 8, false)
|
|
9116
9286
|
};
|
|
9117
9287
|
if (includeInstance) {
|
|
9118
9288
|
obj.$jspbMessageInstance = msg;
|
|
@@ -9120,12 +9290,12 @@ var require_avs_pb = __commonJS({
|
|
|
9120
9290
|
return obj;
|
|
9121
9291
|
};
|
|
9122
9292
|
}
|
|
9123
|
-
proto.aggregator.
|
|
9293
|
+
proto.aggregator.TriggerTaskReq.deserializeBinary = function(bytes) {
|
|
9124
9294
|
var reader = new jspb.BinaryReader(bytes);
|
|
9125
|
-
var msg = new proto.aggregator.
|
|
9126
|
-
return proto.aggregator.
|
|
9295
|
+
var msg = new proto.aggregator.TriggerTaskReq();
|
|
9296
|
+
return proto.aggregator.TriggerTaskReq.deserializeBinaryFromReader(msg, reader);
|
|
9127
9297
|
};
|
|
9128
|
-
proto.aggregator.
|
|
9298
|
+
proto.aggregator.TriggerTaskReq.deserializeBinaryFromReader = function(msg, reader) {
|
|
9129
9299
|
while (reader.nextField()) {
|
|
9130
9300
|
if (reader.isEndGroup()) {
|
|
9131
9301
|
break;
|
|
@@ -9140,11 +9310,38 @@ var require_avs_pb = __commonJS({
|
|
|
9140
9310
|
msg.setTaskId(value);
|
|
9141
9311
|
break;
|
|
9142
9312
|
case 2:
|
|
9143
|
-
var value =
|
|
9144
|
-
|
|
9145
|
-
|
|
9313
|
+
var value = (
|
|
9314
|
+
/** @type {!proto.aggregator.TriggerType} */
|
|
9315
|
+
reader.readEnum()
|
|
9316
|
+
);
|
|
9317
|
+
msg.setTriggerType(value);
|
|
9146
9318
|
break;
|
|
9147
9319
|
case 3:
|
|
9320
|
+
var value = new proto.aggregator.BlockTrigger.Output();
|
|
9321
|
+
reader.readMessage(value, proto.aggregator.BlockTrigger.Output.deserializeBinaryFromReader);
|
|
9322
|
+
msg.setBlockTrigger(value);
|
|
9323
|
+
break;
|
|
9324
|
+
case 4:
|
|
9325
|
+
var value = new proto.aggregator.FixedTimeTrigger.Output();
|
|
9326
|
+
reader.readMessage(value, proto.aggregator.FixedTimeTrigger.Output.deserializeBinaryFromReader);
|
|
9327
|
+
msg.setFixedTimeTrigger(value);
|
|
9328
|
+
break;
|
|
9329
|
+
case 5:
|
|
9330
|
+
var value = new proto.aggregator.CronTrigger.Output();
|
|
9331
|
+
reader.readMessage(value, proto.aggregator.CronTrigger.Output.deserializeBinaryFromReader);
|
|
9332
|
+
msg.setCronTrigger(value);
|
|
9333
|
+
break;
|
|
9334
|
+
case 6:
|
|
9335
|
+
var value = new proto.aggregator.EventTrigger.Output();
|
|
9336
|
+
reader.readMessage(value, proto.aggregator.EventTrigger.Output.deserializeBinaryFromReader);
|
|
9337
|
+
msg.setEventTrigger(value);
|
|
9338
|
+
break;
|
|
9339
|
+
case 7:
|
|
9340
|
+
var value = new proto.aggregator.ManualTrigger.Output();
|
|
9341
|
+
reader.readMessage(value, proto.aggregator.ManualTrigger.Output.deserializeBinaryFromReader);
|
|
9342
|
+
msg.setManualTrigger(value);
|
|
9343
|
+
break;
|
|
9344
|
+
case 8:
|
|
9148
9345
|
var value = (
|
|
9149
9346
|
/** @type {boolean} */
|
|
9150
9347
|
reader.readBool()
|
|
@@ -9158,12 +9355,12 @@ var require_avs_pb = __commonJS({
|
|
|
9158
9355
|
}
|
|
9159
9356
|
return msg;
|
|
9160
9357
|
};
|
|
9161
|
-
proto.aggregator.
|
|
9358
|
+
proto.aggregator.TriggerTaskReq.prototype.serializeBinary = function() {
|
|
9162
9359
|
var writer = new jspb.BinaryWriter();
|
|
9163
|
-
proto.aggregator.
|
|
9360
|
+
proto.aggregator.TriggerTaskReq.serializeBinaryToWriter(this, writer);
|
|
9164
9361
|
return writer.getResultBuffer();
|
|
9165
9362
|
};
|
|
9166
|
-
proto.aggregator.
|
|
9363
|
+
proto.aggregator.TriggerTaskReq.serializeBinaryToWriter = function(message, writer) {
|
|
9167
9364
|
var f = void 0;
|
|
9168
9365
|
f = message.getTaskId();
|
|
9169
9366
|
if (f.length > 0) {
|
|
@@ -9172,60 +9369,168 @@ var require_avs_pb = __commonJS({
|
|
|
9172
9369
|
f
|
|
9173
9370
|
);
|
|
9174
9371
|
}
|
|
9175
|
-
f = message.
|
|
9372
|
+
f = message.getTriggerType();
|
|
9373
|
+
if (f !== 0) {
|
|
9374
|
+
writer.writeEnum(
|
|
9375
|
+
2,
|
|
9376
|
+
f
|
|
9377
|
+
);
|
|
9378
|
+
}
|
|
9379
|
+
f = message.getBlockTrigger();
|
|
9380
|
+
if (f != null) {
|
|
9381
|
+
writer.writeMessage(
|
|
9382
|
+
3,
|
|
9383
|
+
f,
|
|
9384
|
+
proto.aggregator.BlockTrigger.Output.serializeBinaryToWriter
|
|
9385
|
+
);
|
|
9386
|
+
}
|
|
9387
|
+
f = message.getFixedTimeTrigger();
|
|
9176
9388
|
if (f != null) {
|
|
9177
9389
|
writer.writeMessage(
|
|
9178
|
-
|
|
9390
|
+
4,
|
|
9391
|
+
f,
|
|
9392
|
+
proto.aggregator.FixedTimeTrigger.Output.serializeBinaryToWriter
|
|
9393
|
+
);
|
|
9394
|
+
}
|
|
9395
|
+
f = message.getCronTrigger();
|
|
9396
|
+
if (f != null) {
|
|
9397
|
+
writer.writeMessage(
|
|
9398
|
+
5,
|
|
9399
|
+
f,
|
|
9400
|
+
proto.aggregator.CronTrigger.Output.serializeBinaryToWriter
|
|
9401
|
+
);
|
|
9402
|
+
}
|
|
9403
|
+
f = message.getEventTrigger();
|
|
9404
|
+
if (f != null) {
|
|
9405
|
+
writer.writeMessage(
|
|
9406
|
+
6,
|
|
9407
|
+
f,
|
|
9408
|
+
proto.aggregator.EventTrigger.Output.serializeBinaryToWriter
|
|
9409
|
+
);
|
|
9410
|
+
}
|
|
9411
|
+
f = message.getManualTrigger();
|
|
9412
|
+
if (f != null) {
|
|
9413
|
+
writer.writeMessage(
|
|
9414
|
+
7,
|
|
9179
9415
|
f,
|
|
9180
|
-
proto.aggregator.
|
|
9416
|
+
proto.aggregator.ManualTrigger.Output.serializeBinaryToWriter
|
|
9181
9417
|
);
|
|
9182
9418
|
}
|
|
9183
9419
|
f = message.getIsBlocking();
|
|
9184
9420
|
if (f) {
|
|
9185
9421
|
writer.writeBool(
|
|
9186
|
-
|
|
9422
|
+
8,
|
|
9187
9423
|
f
|
|
9188
9424
|
);
|
|
9189
9425
|
}
|
|
9190
9426
|
};
|
|
9191
|
-
proto.aggregator.
|
|
9427
|
+
proto.aggregator.TriggerTaskReq.prototype.getTaskId = function() {
|
|
9192
9428
|
return (
|
|
9193
9429
|
/** @type {string} */
|
|
9194
9430
|
jspb.Message.getFieldWithDefault(this, 1, "")
|
|
9195
9431
|
);
|
|
9196
9432
|
};
|
|
9197
|
-
proto.aggregator.
|
|
9433
|
+
proto.aggregator.TriggerTaskReq.prototype.setTaskId = function(value) {
|
|
9198
9434
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
9199
9435
|
};
|
|
9200
|
-
proto.aggregator.
|
|
9436
|
+
proto.aggregator.TriggerTaskReq.prototype.getTriggerType = function() {
|
|
9201
9437
|
return (
|
|
9202
|
-
/** @type{
|
|
9203
|
-
jspb.Message.
|
|
9438
|
+
/** @type {!proto.aggregator.TriggerType} */
|
|
9439
|
+
jspb.Message.getFieldWithDefault(this, 2, 0)
|
|
9204
9440
|
);
|
|
9205
9441
|
};
|
|
9206
|
-
proto.aggregator.
|
|
9207
|
-
return jspb.Message.
|
|
9442
|
+
proto.aggregator.TriggerTaskReq.prototype.setTriggerType = function(value) {
|
|
9443
|
+
return jspb.Message.setProto3EnumField(this, 2, value);
|
|
9444
|
+
};
|
|
9445
|
+
proto.aggregator.TriggerTaskReq.prototype.getBlockTrigger = function() {
|
|
9446
|
+
return (
|
|
9447
|
+
/** @type{?proto.aggregator.BlockTrigger.Output} */
|
|
9448
|
+
jspb.Message.getWrapperField(this, proto.aggregator.BlockTrigger.Output, 3)
|
|
9449
|
+
);
|
|
9208
9450
|
};
|
|
9209
|
-
proto.aggregator.
|
|
9210
|
-
return
|
|
9451
|
+
proto.aggregator.TriggerTaskReq.prototype.setBlockTrigger = function(value) {
|
|
9452
|
+
return jspb.Message.setOneofWrapperField(this, 3, proto.aggregator.TriggerTaskReq.oneofGroups_[0], value);
|
|
9211
9453
|
};
|
|
9212
|
-
proto.aggregator.
|
|
9213
|
-
return
|
|
9454
|
+
proto.aggregator.TriggerTaskReq.prototype.clearBlockTrigger = function() {
|
|
9455
|
+
return this.setBlockTrigger(void 0);
|
|
9456
|
+
};
|
|
9457
|
+
proto.aggregator.TriggerTaskReq.prototype.hasBlockTrigger = function() {
|
|
9458
|
+
return jspb.Message.getField(this, 3) != null;
|
|
9459
|
+
};
|
|
9460
|
+
proto.aggregator.TriggerTaskReq.prototype.getFixedTimeTrigger = function() {
|
|
9461
|
+
return (
|
|
9462
|
+
/** @type{?proto.aggregator.FixedTimeTrigger.Output} */
|
|
9463
|
+
jspb.Message.getWrapperField(this, proto.aggregator.FixedTimeTrigger.Output, 4)
|
|
9464
|
+
);
|
|
9465
|
+
};
|
|
9466
|
+
proto.aggregator.TriggerTaskReq.prototype.setFixedTimeTrigger = function(value) {
|
|
9467
|
+
return jspb.Message.setOneofWrapperField(this, 4, proto.aggregator.TriggerTaskReq.oneofGroups_[0], value);
|
|
9468
|
+
};
|
|
9469
|
+
proto.aggregator.TriggerTaskReq.prototype.clearFixedTimeTrigger = function() {
|
|
9470
|
+
return this.setFixedTimeTrigger(void 0);
|
|
9471
|
+
};
|
|
9472
|
+
proto.aggregator.TriggerTaskReq.prototype.hasFixedTimeTrigger = function() {
|
|
9473
|
+
return jspb.Message.getField(this, 4) != null;
|
|
9474
|
+
};
|
|
9475
|
+
proto.aggregator.TriggerTaskReq.prototype.getCronTrigger = function() {
|
|
9476
|
+
return (
|
|
9477
|
+
/** @type{?proto.aggregator.CronTrigger.Output} */
|
|
9478
|
+
jspb.Message.getWrapperField(this, proto.aggregator.CronTrigger.Output, 5)
|
|
9479
|
+
);
|
|
9480
|
+
};
|
|
9481
|
+
proto.aggregator.TriggerTaskReq.prototype.setCronTrigger = function(value) {
|
|
9482
|
+
return jspb.Message.setOneofWrapperField(this, 5, proto.aggregator.TriggerTaskReq.oneofGroups_[0], value);
|
|
9483
|
+
};
|
|
9484
|
+
proto.aggregator.TriggerTaskReq.prototype.clearCronTrigger = function() {
|
|
9485
|
+
return this.setCronTrigger(void 0);
|
|
9486
|
+
};
|
|
9487
|
+
proto.aggregator.TriggerTaskReq.prototype.hasCronTrigger = function() {
|
|
9488
|
+
return jspb.Message.getField(this, 5) != null;
|
|
9489
|
+
};
|
|
9490
|
+
proto.aggregator.TriggerTaskReq.prototype.getEventTrigger = function() {
|
|
9491
|
+
return (
|
|
9492
|
+
/** @type{?proto.aggregator.EventTrigger.Output} */
|
|
9493
|
+
jspb.Message.getWrapperField(this, proto.aggregator.EventTrigger.Output, 6)
|
|
9494
|
+
);
|
|
9495
|
+
};
|
|
9496
|
+
proto.aggregator.TriggerTaskReq.prototype.setEventTrigger = function(value) {
|
|
9497
|
+
return jspb.Message.setOneofWrapperField(this, 6, proto.aggregator.TriggerTaskReq.oneofGroups_[0], value);
|
|
9498
|
+
};
|
|
9499
|
+
proto.aggregator.TriggerTaskReq.prototype.clearEventTrigger = function() {
|
|
9500
|
+
return this.setEventTrigger(void 0);
|
|
9501
|
+
};
|
|
9502
|
+
proto.aggregator.TriggerTaskReq.prototype.hasEventTrigger = function() {
|
|
9503
|
+
return jspb.Message.getField(this, 6) != null;
|
|
9504
|
+
};
|
|
9505
|
+
proto.aggregator.TriggerTaskReq.prototype.getManualTrigger = function() {
|
|
9506
|
+
return (
|
|
9507
|
+
/** @type{?proto.aggregator.ManualTrigger.Output} */
|
|
9508
|
+
jspb.Message.getWrapperField(this, proto.aggregator.ManualTrigger.Output, 7)
|
|
9509
|
+
);
|
|
9510
|
+
};
|
|
9511
|
+
proto.aggregator.TriggerTaskReq.prototype.setManualTrigger = function(value) {
|
|
9512
|
+
return jspb.Message.setOneofWrapperField(this, 7, proto.aggregator.TriggerTaskReq.oneofGroups_[0], value);
|
|
9513
|
+
};
|
|
9514
|
+
proto.aggregator.TriggerTaskReq.prototype.clearManualTrigger = function() {
|
|
9515
|
+
return this.setManualTrigger(void 0);
|
|
9516
|
+
};
|
|
9517
|
+
proto.aggregator.TriggerTaskReq.prototype.hasManualTrigger = function() {
|
|
9518
|
+
return jspb.Message.getField(this, 7) != null;
|
|
9214
9519
|
};
|
|
9215
|
-
proto.aggregator.
|
|
9520
|
+
proto.aggregator.TriggerTaskReq.prototype.getIsBlocking = function() {
|
|
9216
9521
|
return (
|
|
9217
9522
|
/** @type {boolean} */
|
|
9218
|
-
jspb.Message.getBooleanFieldWithDefault(this,
|
|
9523
|
+
jspb.Message.getBooleanFieldWithDefault(this, 8, false)
|
|
9219
9524
|
);
|
|
9220
9525
|
};
|
|
9221
|
-
proto.aggregator.
|
|
9222
|
-
return jspb.Message.setProto3BooleanField(this,
|
|
9526
|
+
proto.aggregator.TriggerTaskReq.prototype.setIsBlocking = function(value) {
|
|
9527
|
+
return jspb.Message.setProto3BooleanField(this, 8, value);
|
|
9223
9528
|
};
|
|
9224
9529
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
9225
|
-
proto.aggregator.
|
|
9226
|
-
return proto.aggregator.
|
|
9530
|
+
proto.aggregator.TriggerTaskResp.prototype.toObject = function(opt_includeInstance) {
|
|
9531
|
+
return proto.aggregator.TriggerTaskResp.toObject(opt_includeInstance, this);
|
|
9227
9532
|
};
|
|
9228
|
-
proto.aggregator.
|
|
9533
|
+
proto.aggregator.TriggerTaskResp.toObject = function(includeInstance, msg) {
|
|
9229
9534
|
var f, obj = {
|
|
9230
9535
|
executionId: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
9231
9536
|
status: jspb.Message.getFieldWithDefault(msg, 2, 0)
|
|
@@ -9236,12 +9541,12 @@ var require_avs_pb = __commonJS({
|
|
|
9236
9541
|
return obj;
|
|
9237
9542
|
};
|
|
9238
9543
|
}
|
|
9239
|
-
proto.aggregator.
|
|
9544
|
+
proto.aggregator.TriggerTaskResp.deserializeBinary = function(bytes) {
|
|
9240
9545
|
var reader = new jspb.BinaryReader(bytes);
|
|
9241
|
-
var msg = new proto.aggregator.
|
|
9242
|
-
return proto.aggregator.
|
|
9546
|
+
var msg = new proto.aggregator.TriggerTaskResp();
|
|
9547
|
+
return proto.aggregator.TriggerTaskResp.deserializeBinaryFromReader(msg, reader);
|
|
9243
9548
|
};
|
|
9244
|
-
proto.aggregator.
|
|
9549
|
+
proto.aggregator.TriggerTaskResp.deserializeBinaryFromReader = function(msg, reader) {
|
|
9245
9550
|
while (reader.nextField()) {
|
|
9246
9551
|
if (reader.isEndGroup()) {
|
|
9247
9552
|
break;
|
|
@@ -9269,12 +9574,12 @@ var require_avs_pb = __commonJS({
|
|
|
9269
9574
|
}
|
|
9270
9575
|
return msg;
|
|
9271
9576
|
};
|
|
9272
|
-
proto.aggregator.
|
|
9577
|
+
proto.aggregator.TriggerTaskResp.prototype.serializeBinary = function() {
|
|
9273
9578
|
var writer = new jspb.BinaryWriter();
|
|
9274
|
-
proto.aggregator.
|
|
9579
|
+
proto.aggregator.TriggerTaskResp.serializeBinaryToWriter(this, writer);
|
|
9275
9580
|
return writer.getResultBuffer();
|
|
9276
9581
|
};
|
|
9277
|
-
proto.aggregator.
|
|
9582
|
+
proto.aggregator.TriggerTaskResp.serializeBinaryToWriter = function(message, writer) {
|
|
9278
9583
|
var f = void 0;
|
|
9279
9584
|
f = message.getExecutionId();
|
|
9280
9585
|
if (f.length > 0) {
|
|
@@ -9291,22 +9596,22 @@ var require_avs_pb = __commonJS({
|
|
|
9291
9596
|
);
|
|
9292
9597
|
}
|
|
9293
9598
|
};
|
|
9294
|
-
proto.aggregator.
|
|
9599
|
+
proto.aggregator.TriggerTaskResp.prototype.getExecutionId = function() {
|
|
9295
9600
|
return (
|
|
9296
9601
|
/** @type {string} */
|
|
9297
9602
|
jspb.Message.getFieldWithDefault(this, 1, "")
|
|
9298
9603
|
);
|
|
9299
9604
|
};
|
|
9300
|
-
proto.aggregator.
|
|
9605
|
+
proto.aggregator.TriggerTaskResp.prototype.setExecutionId = function(value) {
|
|
9301
9606
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
9302
9607
|
};
|
|
9303
|
-
proto.aggregator.
|
|
9608
|
+
proto.aggregator.TriggerTaskResp.prototype.getStatus = function() {
|
|
9304
9609
|
return (
|
|
9305
9610
|
/** @type {!proto.aggregator.ExecutionStatus} */
|
|
9306
9611
|
jspb.Message.getFieldWithDefault(this, 2, 0)
|
|
9307
9612
|
);
|
|
9308
9613
|
};
|
|
9309
|
-
proto.aggregator.
|
|
9614
|
+
proto.aggregator.TriggerTaskResp.prototype.setStatus = function(value) {
|
|
9310
9615
|
return jspb.Message.setProto3EnumField(this, 2, value);
|
|
9311
9616
|
};
|
|
9312
9617
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
@@ -11463,13 +11768,14 @@ var require_avs_pb = __commonJS({
|
|
|
11463
11768
|
this.getTriggerConfigMap().clear();
|
|
11464
11769
|
return this;
|
|
11465
11770
|
};
|
|
11466
|
-
proto.aggregator.RunTriggerResp.oneofGroups_ = [[10, 11, 12, 13]];
|
|
11771
|
+
proto.aggregator.RunTriggerResp.oneofGroups_ = [[10, 11, 12, 13, 14]];
|
|
11467
11772
|
proto.aggregator.RunTriggerResp.OutputDataCase = {
|
|
11468
11773
|
OUTPUT_DATA_NOT_SET: 0,
|
|
11469
11774
|
BLOCK_TRIGGER: 10,
|
|
11470
11775
|
FIXED_TIME_TRIGGER: 11,
|
|
11471
11776
|
CRON_TRIGGER: 12,
|
|
11472
|
-
EVENT_TRIGGER: 13
|
|
11777
|
+
EVENT_TRIGGER: 13,
|
|
11778
|
+
MANUAL_TRIGGER: 14
|
|
11473
11779
|
};
|
|
11474
11780
|
proto.aggregator.RunTriggerResp.prototype.getOutputDataCase = function() {
|
|
11475
11781
|
return (
|
|
@@ -11489,7 +11795,8 @@ var require_avs_pb = __commonJS({
|
|
|
11489
11795
|
blockTrigger: (f = msg.getBlockTrigger()) && proto.aggregator.BlockTrigger.Output.toObject(includeInstance, f),
|
|
11490
11796
|
fixedTimeTrigger: (f = msg.getFixedTimeTrigger()) && proto.aggregator.FixedTimeTrigger.Output.toObject(includeInstance, f),
|
|
11491
11797
|
cronTrigger: (f = msg.getCronTrigger()) && proto.aggregator.CronTrigger.Output.toObject(includeInstance, f),
|
|
11492
|
-
eventTrigger: (f = msg.getEventTrigger()) && proto.aggregator.EventTrigger.Output.toObject(includeInstance, f)
|
|
11798
|
+
eventTrigger: (f = msg.getEventTrigger()) && proto.aggregator.EventTrigger.Output.toObject(includeInstance, f),
|
|
11799
|
+
manualTrigger: (f = msg.getManualTrigger()) && proto.aggregator.ManualTrigger.Output.toObject(includeInstance, f)
|
|
11493
11800
|
};
|
|
11494
11801
|
if (includeInstance) {
|
|
11495
11802
|
obj.$jspbMessageInstance = msg;
|
|
@@ -11550,6 +11857,11 @@ var require_avs_pb = __commonJS({
|
|
|
11550
11857
|
reader.readMessage(value, proto.aggregator.EventTrigger.Output.deserializeBinaryFromReader);
|
|
11551
11858
|
msg.setEventTrigger(value);
|
|
11552
11859
|
break;
|
|
11860
|
+
case 14:
|
|
11861
|
+
var value = new proto.aggregator.ManualTrigger.Output();
|
|
11862
|
+
reader.readMessage(value, proto.aggregator.ManualTrigger.Output.deserializeBinaryFromReader);
|
|
11863
|
+
msg.setManualTrigger(value);
|
|
11864
|
+
break;
|
|
11553
11865
|
default:
|
|
11554
11866
|
reader.skipField();
|
|
11555
11867
|
break;
|
|
@@ -11617,6 +11929,14 @@ var require_avs_pb = __commonJS({
|
|
|
11617
11929
|
proto.aggregator.EventTrigger.Output.serializeBinaryToWriter
|
|
11618
11930
|
);
|
|
11619
11931
|
}
|
|
11932
|
+
f = message.getManualTrigger();
|
|
11933
|
+
if (f != null) {
|
|
11934
|
+
writer.writeMessage(
|
|
11935
|
+
14,
|
|
11936
|
+
f,
|
|
11937
|
+
proto.aggregator.ManualTrigger.Output.serializeBinaryToWriter
|
|
11938
|
+
);
|
|
11939
|
+
}
|
|
11620
11940
|
};
|
|
11621
11941
|
proto.aggregator.RunTriggerResp.prototype.getSuccess = function() {
|
|
11622
11942
|
return (
|
|
@@ -11705,11 +12025,26 @@ var require_avs_pb = __commonJS({
|
|
|
11705
12025
|
proto.aggregator.RunTriggerResp.prototype.hasEventTrigger = function() {
|
|
11706
12026
|
return jspb.Message.getField(this, 13) != null;
|
|
11707
12027
|
};
|
|
11708
|
-
|
|
11709
|
-
|
|
11710
|
-
|
|
11711
|
-
|
|
11712
|
-
|
|
12028
|
+
proto.aggregator.RunTriggerResp.prototype.getManualTrigger = function() {
|
|
12029
|
+
return (
|
|
12030
|
+
/** @type{?proto.aggregator.ManualTrigger.Output} */
|
|
12031
|
+
jspb.Message.getWrapperField(this, proto.aggregator.ManualTrigger.Output, 14)
|
|
12032
|
+
);
|
|
12033
|
+
};
|
|
12034
|
+
proto.aggregator.RunTriggerResp.prototype.setManualTrigger = function(value) {
|
|
12035
|
+
return jspb.Message.setOneofWrapperField(this, 14, proto.aggregator.RunTriggerResp.oneofGroups_[0], value);
|
|
12036
|
+
};
|
|
12037
|
+
proto.aggregator.RunTriggerResp.prototype.clearManualTrigger = function() {
|
|
12038
|
+
return this.setManualTrigger(void 0);
|
|
12039
|
+
};
|
|
12040
|
+
proto.aggregator.RunTriggerResp.prototype.hasManualTrigger = function() {
|
|
12041
|
+
return jspb.Message.getField(this, 14) != null;
|
|
12042
|
+
};
|
|
12043
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
12044
|
+
proto.aggregator.Evm.prototype.toObject = function(opt_includeInstance) {
|
|
12045
|
+
return proto.aggregator.Evm.toObject(opt_includeInstance, this);
|
|
12046
|
+
};
|
|
12047
|
+
proto.aggregator.Evm.toObject = function(includeInstance, msg) {
|
|
11713
12048
|
var f, obj = {};
|
|
11714
12049
|
if (includeInstance) {
|
|
11715
12050
|
obj.$jspbMessageInstance = msg;
|
|
@@ -12832,8 +13167,10 @@ var require_avs_pb = __commonJS({
|
|
|
12832
13167
|
EXECUTING: 4
|
|
12833
13168
|
};
|
|
12834
13169
|
proto.aggregator.ExecutionStatus = {
|
|
12835
|
-
|
|
12836
|
-
|
|
13170
|
+
EXECUTION_STATUS_UNSPECIFIED: 0,
|
|
13171
|
+
EXECUTION_STATUS_PENDING: 1,
|
|
13172
|
+
EXECUTION_STATUS_COMPLETED: 2,
|
|
13173
|
+
EXECUTION_STATUS_FAILED: 3
|
|
12837
13174
|
};
|
|
12838
13175
|
goog.object.extend(exports, proto.aggregator);
|
|
12839
13176
|
}
|
|
@@ -12844,352 +13181,352 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
12844
13181
|
"../../grpc_codegen/avs_grpc_pb.js"(exports) {
|
|
12845
13182
|
"use strict";
|
|
12846
13183
|
var grpc = __require("@grpc/grpc-js");
|
|
12847
|
-
var
|
|
13184
|
+
var avs_pb24 = require_avs_pb();
|
|
12848
13185
|
var google_protobuf_wrappers_pb = __require("google-protobuf/google/protobuf/wrappers_pb.js");
|
|
12849
13186
|
var google_protobuf_timestamp_pb = __require("google-protobuf/google/protobuf/timestamp_pb.js");
|
|
12850
13187
|
var google_protobuf_any_pb = __require("google-protobuf/google/protobuf/any_pb.js");
|
|
12851
13188
|
var google_protobuf_struct_pb = __require("google-protobuf/google/protobuf/struct_pb.js");
|
|
12852
13189
|
function serialize_aggregator_CreateOrUpdateSecretReq(arg) {
|
|
12853
|
-
if (!(arg instanceof
|
|
13190
|
+
if (!(arg instanceof avs_pb24.CreateOrUpdateSecretReq)) {
|
|
12854
13191
|
throw new Error("Expected argument of type aggregator.CreateOrUpdateSecretReq");
|
|
12855
13192
|
}
|
|
12856
13193
|
return Buffer.from(arg.serializeBinary());
|
|
12857
13194
|
}
|
|
12858
13195
|
function deserialize_aggregator_CreateOrUpdateSecretReq(buffer_arg) {
|
|
12859
|
-
return
|
|
13196
|
+
return avs_pb24.CreateOrUpdateSecretReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12860
13197
|
}
|
|
12861
13198
|
function serialize_aggregator_CreateTaskReq(arg) {
|
|
12862
|
-
if (!(arg instanceof
|
|
13199
|
+
if (!(arg instanceof avs_pb24.CreateTaskReq)) {
|
|
12863
13200
|
throw new Error("Expected argument of type aggregator.CreateTaskReq");
|
|
12864
13201
|
}
|
|
12865
13202
|
return Buffer.from(arg.serializeBinary());
|
|
12866
13203
|
}
|
|
12867
13204
|
function deserialize_aggregator_CreateTaskReq(buffer_arg) {
|
|
12868
|
-
return
|
|
13205
|
+
return avs_pb24.CreateTaskReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12869
13206
|
}
|
|
12870
13207
|
function serialize_aggregator_CreateTaskResp(arg) {
|
|
12871
|
-
if (!(arg instanceof
|
|
13208
|
+
if (!(arg instanceof avs_pb24.CreateTaskResp)) {
|
|
12872
13209
|
throw new Error("Expected argument of type aggregator.CreateTaskResp");
|
|
12873
13210
|
}
|
|
12874
13211
|
return Buffer.from(arg.serializeBinary());
|
|
12875
13212
|
}
|
|
12876
13213
|
function deserialize_aggregator_CreateTaskResp(buffer_arg) {
|
|
12877
|
-
return
|
|
13214
|
+
return avs_pb24.CreateTaskResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12878
13215
|
}
|
|
12879
13216
|
function serialize_aggregator_DeleteSecretReq(arg) {
|
|
12880
|
-
if (!(arg instanceof
|
|
13217
|
+
if (!(arg instanceof avs_pb24.DeleteSecretReq)) {
|
|
12881
13218
|
throw new Error("Expected argument of type aggregator.DeleteSecretReq");
|
|
12882
13219
|
}
|
|
12883
13220
|
return Buffer.from(arg.serializeBinary());
|
|
12884
13221
|
}
|
|
12885
13222
|
function deserialize_aggregator_DeleteSecretReq(buffer_arg) {
|
|
12886
|
-
return
|
|
13223
|
+
return avs_pb24.DeleteSecretReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12887
13224
|
}
|
|
12888
13225
|
function serialize_aggregator_Execution(arg) {
|
|
12889
|
-
if (!(arg instanceof
|
|
13226
|
+
if (!(arg instanceof avs_pb24.Execution)) {
|
|
12890
13227
|
throw new Error("Expected argument of type aggregator.Execution");
|
|
12891
13228
|
}
|
|
12892
13229
|
return Buffer.from(arg.serializeBinary());
|
|
12893
13230
|
}
|
|
12894
13231
|
function deserialize_aggregator_Execution(buffer_arg) {
|
|
12895
|
-
return
|
|
13232
|
+
return avs_pb24.Execution.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12896
13233
|
}
|
|
12897
13234
|
function serialize_aggregator_ExecutionReq(arg) {
|
|
12898
|
-
if (!(arg instanceof
|
|
13235
|
+
if (!(arg instanceof avs_pb24.ExecutionReq)) {
|
|
12899
13236
|
throw new Error("Expected argument of type aggregator.ExecutionReq");
|
|
12900
13237
|
}
|
|
12901
13238
|
return Buffer.from(arg.serializeBinary());
|
|
12902
13239
|
}
|
|
12903
13240
|
function deserialize_aggregator_ExecutionReq(buffer_arg) {
|
|
12904
|
-
return
|
|
13241
|
+
return avs_pb24.ExecutionReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12905
13242
|
}
|
|
12906
13243
|
function serialize_aggregator_ExecutionStatusResp(arg) {
|
|
12907
|
-
if (!(arg instanceof
|
|
13244
|
+
if (!(arg instanceof avs_pb24.ExecutionStatusResp)) {
|
|
12908
13245
|
throw new Error("Expected argument of type aggregator.ExecutionStatusResp");
|
|
12909
13246
|
}
|
|
12910
13247
|
return Buffer.from(arg.serializeBinary());
|
|
12911
13248
|
}
|
|
12912
13249
|
function deserialize_aggregator_ExecutionStatusResp(buffer_arg) {
|
|
12913
|
-
return
|
|
13250
|
+
return avs_pb24.ExecutionStatusResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12914
13251
|
}
|
|
12915
13252
|
function serialize_aggregator_GetExecutionCountReq(arg) {
|
|
12916
|
-
if (!(arg instanceof
|
|
13253
|
+
if (!(arg instanceof avs_pb24.GetExecutionCountReq)) {
|
|
12917
13254
|
throw new Error("Expected argument of type aggregator.GetExecutionCountReq");
|
|
12918
13255
|
}
|
|
12919
13256
|
return Buffer.from(arg.serializeBinary());
|
|
12920
13257
|
}
|
|
12921
13258
|
function deserialize_aggregator_GetExecutionCountReq(buffer_arg) {
|
|
12922
|
-
return
|
|
13259
|
+
return avs_pb24.GetExecutionCountReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12923
13260
|
}
|
|
12924
13261
|
function serialize_aggregator_GetExecutionCountResp(arg) {
|
|
12925
|
-
if (!(arg instanceof
|
|
13262
|
+
if (!(arg instanceof avs_pb24.GetExecutionCountResp)) {
|
|
12926
13263
|
throw new Error("Expected argument of type aggregator.GetExecutionCountResp");
|
|
12927
13264
|
}
|
|
12928
13265
|
return Buffer.from(arg.serializeBinary());
|
|
12929
13266
|
}
|
|
12930
13267
|
function deserialize_aggregator_GetExecutionCountResp(buffer_arg) {
|
|
12931
|
-
return
|
|
13268
|
+
return avs_pb24.GetExecutionCountResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12932
13269
|
}
|
|
12933
13270
|
function serialize_aggregator_GetExecutionStatsReq(arg) {
|
|
12934
|
-
if (!(arg instanceof
|
|
13271
|
+
if (!(arg instanceof avs_pb24.GetExecutionStatsReq)) {
|
|
12935
13272
|
throw new Error("Expected argument of type aggregator.GetExecutionStatsReq");
|
|
12936
13273
|
}
|
|
12937
13274
|
return Buffer.from(arg.serializeBinary());
|
|
12938
13275
|
}
|
|
12939
13276
|
function deserialize_aggregator_GetExecutionStatsReq(buffer_arg) {
|
|
12940
|
-
return
|
|
13277
|
+
return avs_pb24.GetExecutionStatsReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12941
13278
|
}
|
|
12942
13279
|
function serialize_aggregator_GetExecutionStatsResp(arg) {
|
|
12943
|
-
if (!(arg instanceof
|
|
13280
|
+
if (!(arg instanceof avs_pb24.GetExecutionStatsResp)) {
|
|
12944
13281
|
throw new Error("Expected argument of type aggregator.GetExecutionStatsResp");
|
|
12945
13282
|
}
|
|
12946
13283
|
return Buffer.from(arg.serializeBinary());
|
|
12947
13284
|
}
|
|
12948
13285
|
function deserialize_aggregator_GetExecutionStatsResp(buffer_arg) {
|
|
12949
|
-
return
|
|
13286
|
+
return avs_pb24.GetExecutionStatsResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12950
13287
|
}
|
|
12951
13288
|
function serialize_aggregator_GetKeyReq(arg) {
|
|
12952
|
-
if (!(arg instanceof
|
|
13289
|
+
if (!(arg instanceof avs_pb24.GetKeyReq)) {
|
|
12953
13290
|
throw new Error("Expected argument of type aggregator.GetKeyReq");
|
|
12954
13291
|
}
|
|
12955
13292
|
return Buffer.from(arg.serializeBinary());
|
|
12956
13293
|
}
|
|
12957
13294
|
function deserialize_aggregator_GetKeyReq(buffer_arg) {
|
|
12958
|
-
return
|
|
13295
|
+
return avs_pb24.GetKeyReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12959
13296
|
}
|
|
12960
13297
|
function serialize_aggregator_GetSignatureFormatReq(arg) {
|
|
12961
|
-
if (!(arg instanceof
|
|
13298
|
+
if (!(arg instanceof avs_pb24.GetSignatureFormatReq)) {
|
|
12962
13299
|
throw new Error("Expected argument of type aggregator.GetSignatureFormatReq");
|
|
12963
13300
|
}
|
|
12964
13301
|
return Buffer.from(arg.serializeBinary());
|
|
12965
13302
|
}
|
|
12966
13303
|
function deserialize_aggregator_GetSignatureFormatReq(buffer_arg) {
|
|
12967
|
-
return
|
|
13304
|
+
return avs_pb24.GetSignatureFormatReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12968
13305
|
}
|
|
12969
13306
|
function serialize_aggregator_GetSignatureFormatResp(arg) {
|
|
12970
|
-
if (!(arg instanceof
|
|
13307
|
+
if (!(arg instanceof avs_pb24.GetSignatureFormatResp)) {
|
|
12971
13308
|
throw new Error("Expected argument of type aggregator.GetSignatureFormatResp");
|
|
12972
13309
|
}
|
|
12973
13310
|
return Buffer.from(arg.serializeBinary());
|
|
12974
13311
|
}
|
|
12975
13312
|
function deserialize_aggregator_GetSignatureFormatResp(buffer_arg) {
|
|
12976
|
-
return
|
|
13313
|
+
return avs_pb24.GetSignatureFormatResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12977
13314
|
}
|
|
12978
13315
|
function serialize_aggregator_GetWalletReq(arg) {
|
|
12979
|
-
if (!(arg instanceof
|
|
13316
|
+
if (!(arg instanceof avs_pb24.GetWalletReq)) {
|
|
12980
13317
|
throw new Error("Expected argument of type aggregator.GetWalletReq");
|
|
12981
13318
|
}
|
|
12982
13319
|
return Buffer.from(arg.serializeBinary());
|
|
12983
13320
|
}
|
|
12984
13321
|
function deserialize_aggregator_GetWalletReq(buffer_arg) {
|
|
12985
|
-
return
|
|
13322
|
+
return avs_pb24.GetWalletReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12986
13323
|
}
|
|
12987
13324
|
function serialize_aggregator_GetWalletResp(arg) {
|
|
12988
|
-
if (!(arg instanceof
|
|
13325
|
+
if (!(arg instanceof avs_pb24.GetWalletResp)) {
|
|
12989
13326
|
throw new Error("Expected argument of type aggregator.GetWalletResp");
|
|
12990
13327
|
}
|
|
12991
13328
|
return Buffer.from(arg.serializeBinary());
|
|
12992
13329
|
}
|
|
12993
13330
|
function deserialize_aggregator_GetWalletResp(buffer_arg) {
|
|
12994
|
-
return
|
|
13331
|
+
return avs_pb24.GetWalletResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12995
13332
|
}
|
|
12996
13333
|
function serialize_aggregator_GetWorkflowCountReq(arg) {
|
|
12997
|
-
if (!(arg instanceof
|
|
13334
|
+
if (!(arg instanceof avs_pb24.GetWorkflowCountReq)) {
|
|
12998
13335
|
throw new Error("Expected argument of type aggregator.GetWorkflowCountReq");
|
|
12999
13336
|
}
|
|
13000
13337
|
return Buffer.from(arg.serializeBinary());
|
|
13001
13338
|
}
|
|
13002
13339
|
function deserialize_aggregator_GetWorkflowCountReq(buffer_arg) {
|
|
13003
|
-
return
|
|
13340
|
+
return avs_pb24.GetWorkflowCountReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
13004
13341
|
}
|
|
13005
13342
|
function serialize_aggregator_GetWorkflowCountResp(arg) {
|
|
13006
|
-
if (!(arg instanceof
|
|
13343
|
+
if (!(arg instanceof avs_pb24.GetWorkflowCountResp)) {
|
|
13007
13344
|
throw new Error("Expected argument of type aggregator.GetWorkflowCountResp");
|
|
13008
13345
|
}
|
|
13009
13346
|
return Buffer.from(arg.serializeBinary());
|
|
13010
13347
|
}
|
|
13011
13348
|
function deserialize_aggregator_GetWorkflowCountResp(buffer_arg) {
|
|
13012
|
-
return
|
|
13349
|
+
return avs_pb24.GetWorkflowCountResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
13013
13350
|
}
|
|
13014
13351
|
function serialize_aggregator_IdReq(arg) {
|
|
13015
|
-
if (!(arg instanceof
|
|
13352
|
+
if (!(arg instanceof avs_pb24.IdReq)) {
|
|
13016
13353
|
throw new Error("Expected argument of type aggregator.IdReq");
|
|
13017
13354
|
}
|
|
13018
13355
|
return Buffer.from(arg.serializeBinary());
|
|
13019
13356
|
}
|
|
13020
13357
|
function deserialize_aggregator_IdReq(buffer_arg) {
|
|
13021
|
-
return
|
|
13358
|
+
return avs_pb24.IdReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
13022
13359
|
}
|
|
13023
13360
|
function serialize_aggregator_KeyResp(arg) {
|
|
13024
|
-
if (!(arg instanceof
|
|
13361
|
+
if (!(arg instanceof avs_pb24.KeyResp)) {
|
|
13025
13362
|
throw new Error("Expected argument of type aggregator.KeyResp");
|
|
13026
13363
|
}
|
|
13027
13364
|
return Buffer.from(arg.serializeBinary());
|
|
13028
13365
|
}
|
|
13029
13366
|
function deserialize_aggregator_KeyResp(buffer_arg) {
|
|
13030
|
-
return
|
|
13367
|
+
return avs_pb24.KeyResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
13031
13368
|
}
|
|
13032
13369
|
function serialize_aggregator_ListExecutionsReq(arg) {
|
|
13033
|
-
if (!(arg instanceof
|
|
13370
|
+
if (!(arg instanceof avs_pb24.ListExecutionsReq)) {
|
|
13034
13371
|
throw new Error("Expected argument of type aggregator.ListExecutionsReq");
|
|
13035
13372
|
}
|
|
13036
13373
|
return Buffer.from(arg.serializeBinary());
|
|
13037
13374
|
}
|
|
13038
13375
|
function deserialize_aggregator_ListExecutionsReq(buffer_arg) {
|
|
13039
|
-
return
|
|
13376
|
+
return avs_pb24.ListExecutionsReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
13040
13377
|
}
|
|
13041
13378
|
function serialize_aggregator_ListExecutionsResp(arg) {
|
|
13042
|
-
if (!(arg instanceof
|
|
13379
|
+
if (!(arg instanceof avs_pb24.ListExecutionsResp)) {
|
|
13043
13380
|
throw new Error("Expected argument of type aggregator.ListExecutionsResp");
|
|
13044
13381
|
}
|
|
13045
13382
|
return Buffer.from(arg.serializeBinary());
|
|
13046
13383
|
}
|
|
13047
13384
|
function deserialize_aggregator_ListExecutionsResp(buffer_arg) {
|
|
13048
|
-
return
|
|
13385
|
+
return avs_pb24.ListExecutionsResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
13049
13386
|
}
|
|
13050
13387
|
function serialize_aggregator_ListSecretsReq(arg) {
|
|
13051
|
-
if (!(arg instanceof
|
|
13388
|
+
if (!(arg instanceof avs_pb24.ListSecretsReq)) {
|
|
13052
13389
|
throw new Error("Expected argument of type aggregator.ListSecretsReq");
|
|
13053
13390
|
}
|
|
13054
13391
|
return Buffer.from(arg.serializeBinary());
|
|
13055
13392
|
}
|
|
13056
13393
|
function deserialize_aggregator_ListSecretsReq(buffer_arg) {
|
|
13057
|
-
return
|
|
13394
|
+
return avs_pb24.ListSecretsReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
13058
13395
|
}
|
|
13059
13396
|
function serialize_aggregator_ListSecretsResp(arg) {
|
|
13060
|
-
if (!(arg instanceof
|
|
13397
|
+
if (!(arg instanceof avs_pb24.ListSecretsResp)) {
|
|
13061
13398
|
throw new Error("Expected argument of type aggregator.ListSecretsResp");
|
|
13062
13399
|
}
|
|
13063
13400
|
return Buffer.from(arg.serializeBinary());
|
|
13064
13401
|
}
|
|
13065
13402
|
function deserialize_aggregator_ListSecretsResp(buffer_arg) {
|
|
13066
|
-
return
|
|
13403
|
+
return avs_pb24.ListSecretsResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
13067
13404
|
}
|
|
13068
13405
|
function serialize_aggregator_ListTasksReq(arg) {
|
|
13069
|
-
if (!(arg instanceof
|
|
13406
|
+
if (!(arg instanceof avs_pb24.ListTasksReq)) {
|
|
13070
13407
|
throw new Error("Expected argument of type aggregator.ListTasksReq");
|
|
13071
13408
|
}
|
|
13072
13409
|
return Buffer.from(arg.serializeBinary());
|
|
13073
13410
|
}
|
|
13074
13411
|
function deserialize_aggregator_ListTasksReq(buffer_arg) {
|
|
13075
|
-
return
|
|
13412
|
+
return avs_pb24.ListTasksReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
13076
13413
|
}
|
|
13077
13414
|
function serialize_aggregator_ListTasksResp(arg) {
|
|
13078
|
-
if (!(arg instanceof
|
|
13415
|
+
if (!(arg instanceof avs_pb24.ListTasksResp)) {
|
|
13079
13416
|
throw new Error("Expected argument of type aggregator.ListTasksResp");
|
|
13080
13417
|
}
|
|
13081
13418
|
return Buffer.from(arg.serializeBinary());
|
|
13082
13419
|
}
|
|
13083
13420
|
function deserialize_aggregator_ListTasksResp(buffer_arg) {
|
|
13084
|
-
return
|
|
13421
|
+
return avs_pb24.ListTasksResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
13085
13422
|
}
|
|
13086
13423
|
function serialize_aggregator_ListWalletReq(arg) {
|
|
13087
|
-
if (!(arg instanceof
|
|
13424
|
+
if (!(arg instanceof avs_pb24.ListWalletReq)) {
|
|
13088
13425
|
throw new Error("Expected argument of type aggregator.ListWalletReq");
|
|
13089
13426
|
}
|
|
13090
13427
|
return Buffer.from(arg.serializeBinary());
|
|
13091
13428
|
}
|
|
13092
13429
|
function deserialize_aggregator_ListWalletReq(buffer_arg) {
|
|
13093
|
-
return
|
|
13430
|
+
return avs_pb24.ListWalletReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
13094
13431
|
}
|
|
13095
13432
|
function serialize_aggregator_ListWalletResp(arg) {
|
|
13096
|
-
if (!(arg instanceof
|
|
13433
|
+
if (!(arg instanceof avs_pb24.ListWalletResp)) {
|
|
13097
13434
|
throw new Error("Expected argument of type aggregator.ListWalletResp");
|
|
13098
13435
|
}
|
|
13099
13436
|
return Buffer.from(arg.serializeBinary());
|
|
13100
13437
|
}
|
|
13101
13438
|
function deserialize_aggregator_ListWalletResp(buffer_arg) {
|
|
13102
|
-
return
|
|
13439
|
+
return avs_pb24.ListWalletResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
13103
13440
|
}
|
|
13104
13441
|
function serialize_aggregator_NonceRequest(arg) {
|
|
13105
|
-
if (!(arg instanceof
|
|
13442
|
+
if (!(arg instanceof avs_pb24.NonceRequest)) {
|
|
13106
13443
|
throw new Error("Expected argument of type aggregator.NonceRequest");
|
|
13107
13444
|
}
|
|
13108
13445
|
return Buffer.from(arg.serializeBinary());
|
|
13109
13446
|
}
|
|
13110
13447
|
function deserialize_aggregator_NonceRequest(buffer_arg) {
|
|
13111
|
-
return
|
|
13448
|
+
return avs_pb24.NonceRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
13112
13449
|
}
|
|
13113
13450
|
function serialize_aggregator_NonceResp(arg) {
|
|
13114
|
-
if (!(arg instanceof
|
|
13451
|
+
if (!(arg instanceof avs_pb24.NonceResp)) {
|
|
13115
13452
|
throw new Error("Expected argument of type aggregator.NonceResp");
|
|
13116
13453
|
}
|
|
13117
13454
|
return Buffer.from(arg.serializeBinary());
|
|
13118
13455
|
}
|
|
13119
13456
|
function deserialize_aggregator_NonceResp(buffer_arg) {
|
|
13120
|
-
return
|
|
13457
|
+
return avs_pb24.NonceResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
13121
13458
|
}
|
|
13122
13459
|
function serialize_aggregator_RunNodeWithInputsReq(arg) {
|
|
13123
|
-
if (!(arg instanceof
|
|
13460
|
+
if (!(arg instanceof avs_pb24.RunNodeWithInputsReq)) {
|
|
13124
13461
|
throw new Error("Expected argument of type aggregator.RunNodeWithInputsReq");
|
|
13125
13462
|
}
|
|
13126
13463
|
return Buffer.from(arg.serializeBinary());
|
|
13127
13464
|
}
|
|
13128
13465
|
function deserialize_aggregator_RunNodeWithInputsReq(buffer_arg) {
|
|
13129
|
-
return
|
|
13466
|
+
return avs_pb24.RunNodeWithInputsReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
13130
13467
|
}
|
|
13131
13468
|
function serialize_aggregator_RunNodeWithInputsResp(arg) {
|
|
13132
|
-
if (!(arg instanceof
|
|
13469
|
+
if (!(arg instanceof avs_pb24.RunNodeWithInputsResp)) {
|
|
13133
13470
|
throw new Error("Expected argument of type aggregator.RunNodeWithInputsResp");
|
|
13134
13471
|
}
|
|
13135
13472
|
return Buffer.from(arg.serializeBinary());
|
|
13136
13473
|
}
|
|
13137
13474
|
function deserialize_aggregator_RunNodeWithInputsResp(buffer_arg) {
|
|
13138
|
-
return
|
|
13475
|
+
return avs_pb24.RunNodeWithInputsResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
13139
13476
|
}
|
|
13140
13477
|
function serialize_aggregator_RunTriggerReq(arg) {
|
|
13141
|
-
if (!(arg instanceof
|
|
13478
|
+
if (!(arg instanceof avs_pb24.RunTriggerReq)) {
|
|
13142
13479
|
throw new Error("Expected argument of type aggregator.RunTriggerReq");
|
|
13143
13480
|
}
|
|
13144
13481
|
return Buffer.from(arg.serializeBinary());
|
|
13145
13482
|
}
|
|
13146
13483
|
function deserialize_aggregator_RunTriggerReq(buffer_arg) {
|
|
13147
|
-
return
|
|
13484
|
+
return avs_pb24.RunTriggerReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
13148
13485
|
}
|
|
13149
13486
|
function serialize_aggregator_RunTriggerResp(arg) {
|
|
13150
|
-
if (!(arg instanceof
|
|
13487
|
+
if (!(arg instanceof avs_pb24.RunTriggerResp)) {
|
|
13151
13488
|
throw new Error("Expected argument of type aggregator.RunTriggerResp");
|
|
13152
13489
|
}
|
|
13153
13490
|
return Buffer.from(arg.serializeBinary());
|
|
13154
13491
|
}
|
|
13155
13492
|
function deserialize_aggregator_RunTriggerResp(buffer_arg) {
|
|
13156
|
-
return
|
|
13493
|
+
return avs_pb24.RunTriggerResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
13157
13494
|
}
|
|
13158
13495
|
function serialize_aggregator_SetWalletReq(arg) {
|
|
13159
|
-
if (!(arg instanceof
|
|
13496
|
+
if (!(arg instanceof avs_pb24.SetWalletReq)) {
|
|
13160
13497
|
throw new Error("Expected argument of type aggregator.SetWalletReq");
|
|
13161
13498
|
}
|
|
13162
13499
|
return Buffer.from(arg.serializeBinary());
|
|
13163
13500
|
}
|
|
13164
13501
|
function deserialize_aggregator_SetWalletReq(buffer_arg) {
|
|
13165
|
-
return
|
|
13502
|
+
return avs_pb24.SetWalletReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
13166
13503
|
}
|
|
13167
13504
|
function serialize_aggregator_Task(arg) {
|
|
13168
|
-
if (!(arg instanceof
|
|
13505
|
+
if (!(arg instanceof avs_pb24.Task)) {
|
|
13169
13506
|
throw new Error("Expected argument of type aggregator.Task");
|
|
13170
13507
|
}
|
|
13171
13508
|
return Buffer.from(arg.serializeBinary());
|
|
13172
13509
|
}
|
|
13173
13510
|
function deserialize_aggregator_Task(buffer_arg) {
|
|
13174
|
-
return
|
|
13511
|
+
return avs_pb24.Task.deserializeBinary(new Uint8Array(buffer_arg));
|
|
13175
13512
|
}
|
|
13176
|
-
function
|
|
13177
|
-
if (!(arg instanceof
|
|
13178
|
-
throw new Error("Expected argument of type aggregator.
|
|
13513
|
+
function serialize_aggregator_TriggerTaskReq(arg) {
|
|
13514
|
+
if (!(arg instanceof avs_pb24.TriggerTaskReq)) {
|
|
13515
|
+
throw new Error("Expected argument of type aggregator.TriggerTaskReq");
|
|
13179
13516
|
}
|
|
13180
13517
|
return Buffer.from(arg.serializeBinary());
|
|
13181
13518
|
}
|
|
13182
|
-
function
|
|
13183
|
-
return
|
|
13519
|
+
function deserialize_aggregator_TriggerTaskReq(buffer_arg) {
|
|
13520
|
+
return avs_pb24.TriggerTaskReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
13184
13521
|
}
|
|
13185
|
-
function
|
|
13186
|
-
if (!(arg instanceof
|
|
13187
|
-
throw new Error("Expected argument of type aggregator.
|
|
13522
|
+
function serialize_aggregator_TriggerTaskResp(arg) {
|
|
13523
|
+
if (!(arg instanceof avs_pb24.TriggerTaskResp)) {
|
|
13524
|
+
throw new Error("Expected argument of type aggregator.TriggerTaskResp");
|
|
13188
13525
|
}
|
|
13189
13526
|
return Buffer.from(arg.serializeBinary());
|
|
13190
13527
|
}
|
|
13191
|
-
function
|
|
13192
|
-
return
|
|
13528
|
+
function deserialize_aggregator_TriggerTaskResp(buffer_arg) {
|
|
13529
|
+
return avs_pb24.TriggerTaskResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
13193
13530
|
}
|
|
13194
13531
|
function serialize_google_protobuf_BoolValue(arg) {
|
|
13195
13532
|
if (!(arg instanceof google_protobuf_wrappers_pb.BoolValue)) {
|
|
@@ -13206,8 +13543,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13206
13543
|
path: "/aggregator.Aggregator/GetKey",
|
|
13207
13544
|
requestStream: false,
|
|
13208
13545
|
responseStream: false,
|
|
13209
|
-
requestType:
|
|
13210
|
-
responseType:
|
|
13546
|
+
requestType: avs_pb24.GetKeyReq,
|
|
13547
|
+
responseType: avs_pb24.KeyResp,
|
|
13211
13548
|
requestSerialize: serialize_aggregator_GetKeyReq,
|
|
13212
13549
|
requestDeserialize: deserialize_aggregator_GetKeyReq,
|
|
13213
13550
|
responseSerialize: serialize_aggregator_KeyResp,
|
|
@@ -13218,8 +13555,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13218
13555
|
path: "/aggregator.Aggregator/GetSignatureFormat",
|
|
13219
13556
|
requestStream: false,
|
|
13220
13557
|
responseStream: false,
|
|
13221
|
-
requestType:
|
|
13222
|
-
responseType:
|
|
13558
|
+
requestType: avs_pb24.GetSignatureFormatReq,
|
|
13559
|
+
responseType: avs_pb24.GetSignatureFormatResp,
|
|
13223
13560
|
requestSerialize: serialize_aggregator_GetSignatureFormatReq,
|
|
13224
13561
|
requestDeserialize: deserialize_aggregator_GetSignatureFormatReq,
|
|
13225
13562
|
responseSerialize: serialize_aggregator_GetSignatureFormatResp,
|
|
@@ -13230,8 +13567,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13230
13567
|
path: "/aggregator.Aggregator/GetNonce",
|
|
13231
13568
|
requestStream: false,
|
|
13232
13569
|
responseStream: false,
|
|
13233
|
-
requestType:
|
|
13234
|
-
responseType:
|
|
13570
|
+
requestType: avs_pb24.NonceRequest,
|
|
13571
|
+
responseType: avs_pb24.NonceResp,
|
|
13235
13572
|
requestSerialize: serialize_aggregator_NonceRequest,
|
|
13236
13573
|
requestDeserialize: deserialize_aggregator_NonceRequest,
|
|
13237
13574
|
responseSerialize: serialize_aggregator_NonceResp,
|
|
@@ -13241,8 +13578,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13241
13578
|
path: "/aggregator.Aggregator/GetWallet",
|
|
13242
13579
|
requestStream: false,
|
|
13243
13580
|
responseStream: false,
|
|
13244
|
-
requestType:
|
|
13245
|
-
responseType:
|
|
13581
|
+
requestType: avs_pb24.GetWalletReq,
|
|
13582
|
+
responseType: avs_pb24.GetWalletResp,
|
|
13246
13583
|
requestSerialize: serialize_aggregator_GetWalletReq,
|
|
13247
13584
|
requestDeserialize: deserialize_aggregator_GetWalletReq,
|
|
13248
13585
|
responseSerialize: serialize_aggregator_GetWalletResp,
|
|
@@ -13252,8 +13589,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13252
13589
|
path: "/aggregator.Aggregator/SetWallet",
|
|
13253
13590
|
requestStream: false,
|
|
13254
13591
|
responseStream: false,
|
|
13255
|
-
requestType:
|
|
13256
|
-
responseType:
|
|
13592
|
+
requestType: avs_pb24.SetWalletReq,
|
|
13593
|
+
responseType: avs_pb24.GetWalletResp,
|
|
13257
13594
|
requestSerialize: serialize_aggregator_SetWalletReq,
|
|
13258
13595
|
requestDeserialize: deserialize_aggregator_SetWalletReq,
|
|
13259
13596
|
responseSerialize: serialize_aggregator_GetWalletResp,
|
|
@@ -13263,8 +13600,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13263
13600
|
path: "/aggregator.Aggregator/ListWallets",
|
|
13264
13601
|
requestStream: false,
|
|
13265
13602
|
responseStream: false,
|
|
13266
|
-
requestType:
|
|
13267
|
-
responseType:
|
|
13603
|
+
requestType: avs_pb24.ListWalletReq,
|
|
13604
|
+
responseType: avs_pb24.ListWalletResp,
|
|
13268
13605
|
requestSerialize: serialize_aggregator_ListWalletReq,
|
|
13269
13606
|
requestDeserialize: deserialize_aggregator_ListWalletReq,
|
|
13270
13607
|
responseSerialize: serialize_aggregator_ListWalletResp,
|
|
@@ -13275,8 +13612,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13275
13612
|
path: "/aggregator.Aggregator/CreateTask",
|
|
13276
13613
|
requestStream: false,
|
|
13277
13614
|
responseStream: false,
|
|
13278
|
-
requestType:
|
|
13279
|
-
responseType:
|
|
13615
|
+
requestType: avs_pb24.CreateTaskReq,
|
|
13616
|
+
responseType: avs_pb24.CreateTaskResp,
|
|
13280
13617
|
requestSerialize: serialize_aggregator_CreateTaskReq,
|
|
13281
13618
|
requestDeserialize: deserialize_aggregator_CreateTaskReq,
|
|
13282
13619
|
responseSerialize: serialize_aggregator_CreateTaskResp,
|
|
@@ -13286,8 +13623,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13286
13623
|
path: "/aggregator.Aggregator/ListTasks",
|
|
13287
13624
|
requestStream: false,
|
|
13288
13625
|
responseStream: false,
|
|
13289
|
-
requestType:
|
|
13290
|
-
responseType:
|
|
13626
|
+
requestType: avs_pb24.ListTasksReq,
|
|
13627
|
+
responseType: avs_pb24.ListTasksResp,
|
|
13291
13628
|
requestSerialize: serialize_aggregator_ListTasksReq,
|
|
13292
13629
|
requestDeserialize: deserialize_aggregator_ListTasksReq,
|
|
13293
13630
|
responseSerialize: serialize_aggregator_ListTasksResp,
|
|
@@ -13297,8 +13634,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13297
13634
|
path: "/aggregator.Aggregator/GetTask",
|
|
13298
13635
|
requestStream: false,
|
|
13299
13636
|
responseStream: false,
|
|
13300
|
-
requestType:
|
|
13301
|
-
responseType:
|
|
13637
|
+
requestType: avs_pb24.IdReq,
|
|
13638
|
+
responseType: avs_pb24.Task,
|
|
13302
13639
|
requestSerialize: serialize_aggregator_IdReq,
|
|
13303
13640
|
requestDeserialize: deserialize_aggregator_IdReq,
|
|
13304
13641
|
responseSerialize: serialize_aggregator_Task,
|
|
@@ -13308,8 +13645,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13308
13645
|
path: "/aggregator.Aggregator/ListExecutions",
|
|
13309
13646
|
requestStream: false,
|
|
13310
13647
|
responseStream: false,
|
|
13311
|
-
requestType:
|
|
13312
|
-
responseType:
|
|
13648
|
+
requestType: avs_pb24.ListExecutionsReq,
|
|
13649
|
+
responseType: avs_pb24.ListExecutionsResp,
|
|
13313
13650
|
requestSerialize: serialize_aggregator_ListExecutionsReq,
|
|
13314
13651
|
requestDeserialize: deserialize_aggregator_ListExecutionsReq,
|
|
13315
13652
|
responseSerialize: serialize_aggregator_ListExecutionsResp,
|
|
@@ -13319,8 +13656,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13319
13656
|
path: "/aggregator.Aggregator/GetExecution",
|
|
13320
13657
|
requestStream: false,
|
|
13321
13658
|
responseStream: false,
|
|
13322
|
-
requestType:
|
|
13323
|
-
responseType:
|
|
13659
|
+
requestType: avs_pb24.ExecutionReq,
|
|
13660
|
+
responseType: avs_pb24.Execution,
|
|
13324
13661
|
requestSerialize: serialize_aggregator_ExecutionReq,
|
|
13325
13662
|
requestDeserialize: deserialize_aggregator_ExecutionReq,
|
|
13326
13663
|
responseSerialize: serialize_aggregator_Execution,
|
|
@@ -13330,8 +13667,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13330
13667
|
path: "/aggregator.Aggregator/GetExecutionStatus",
|
|
13331
13668
|
requestStream: false,
|
|
13332
13669
|
responseStream: false,
|
|
13333
|
-
requestType:
|
|
13334
|
-
responseType:
|
|
13670
|
+
requestType: avs_pb24.ExecutionReq,
|
|
13671
|
+
responseType: avs_pb24.ExecutionStatusResp,
|
|
13335
13672
|
requestSerialize: serialize_aggregator_ExecutionReq,
|
|
13336
13673
|
requestDeserialize: deserialize_aggregator_ExecutionReq,
|
|
13337
13674
|
responseSerialize: serialize_aggregator_ExecutionStatusResp,
|
|
@@ -13341,7 +13678,7 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13341
13678
|
path: "/aggregator.Aggregator/CancelTask",
|
|
13342
13679
|
requestStream: false,
|
|
13343
13680
|
responseStream: false,
|
|
13344
|
-
requestType:
|
|
13681
|
+
requestType: avs_pb24.IdReq,
|
|
13345
13682
|
responseType: google_protobuf_wrappers_pb.BoolValue,
|
|
13346
13683
|
requestSerialize: serialize_aggregator_IdReq,
|
|
13347
13684
|
requestDeserialize: deserialize_aggregator_IdReq,
|
|
@@ -13352,7 +13689,7 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13352
13689
|
path: "/aggregator.Aggregator/DeleteTask",
|
|
13353
13690
|
requestStream: false,
|
|
13354
13691
|
responseStream: false,
|
|
13355
|
-
requestType:
|
|
13692
|
+
requestType: avs_pb24.IdReq,
|
|
13356
13693
|
responseType: google_protobuf_wrappers_pb.BoolValue,
|
|
13357
13694
|
requestSerialize: serialize_aggregator_IdReq,
|
|
13358
13695
|
requestDeserialize: deserialize_aggregator_IdReq,
|
|
@@ -13363,12 +13700,12 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13363
13700
|
path: "/aggregator.Aggregator/TriggerTask",
|
|
13364
13701
|
requestStream: false,
|
|
13365
13702
|
responseStream: false,
|
|
13366
|
-
requestType:
|
|
13367
|
-
responseType:
|
|
13368
|
-
requestSerialize:
|
|
13369
|
-
requestDeserialize:
|
|
13370
|
-
responseSerialize:
|
|
13371
|
-
responseDeserialize:
|
|
13703
|
+
requestType: avs_pb24.TriggerTaskReq,
|
|
13704
|
+
responseType: avs_pb24.TriggerTaskResp,
|
|
13705
|
+
requestSerialize: serialize_aggregator_TriggerTaskReq,
|
|
13706
|
+
requestDeserialize: deserialize_aggregator_TriggerTaskReq,
|
|
13707
|
+
responseSerialize: serialize_aggregator_TriggerTaskResp,
|
|
13708
|
+
responseDeserialize: deserialize_aggregator_TriggerTaskResp
|
|
13372
13709
|
},
|
|
13373
13710
|
// CreateSecret allow you to define a secret to be used in your tasks. The secret can be used with a special syntax of ${{secrets.name }}.
|
|
13374
13711
|
// You can decide whether to grant secret to a single workflow or many workflow, or all of your workflow
|
|
@@ -13377,7 +13714,7 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13377
13714
|
path: "/aggregator.Aggregator/CreateSecret",
|
|
13378
13715
|
requestStream: false,
|
|
13379
13716
|
responseStream: false,
|
|
13380
|
-
requestType:
|
|
13717
|
+
requestType: avs_pb24.CreateOrUpdateSecretReq,
|
|
13381
13718
|
responseType: google_protobuf_wrappers_pb.BoolValue,
|
|
13382
13719
|
requestSerialize: serialize_aggregator_CreateOrUpdateSecretReq,
|
|
13383
13720
|
requestDeserialize: deserialize_aggregator_CreateOrUpdateSecretReq,
|
|
@@ -13388,7 +13725,7 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13388
13725
|
path: "/aggregator.Aggregator/DeleteSecret",
|
|
13389
13726
|
requestStream: false,
|
|
13390
13727
|
responseStream: false,
|
|
13391
|
-
requestType:
|
|
13728
|
+
requestType: avs_pb24.DeleteSecretReq,
|
|
13392
13729
|
responseType: google_protobuf_wrappers_pb.BoolValue,
|
|
13393
13730
|
requestSerialize: serialize_aggregator_DeleteSecretReq,
|
|
13394
13731
|
requestDeserialize: deserialize_aggregator_DeleteSecretReq,
|
|
@@ -13401,8 +13738,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13401
13738
|
path: "/aggregator.Aggregator/ListSecrets",
|
|
13402
13739
|
requestStream: false,
|
|
13403
13740
|
responseStream: false,
|
|
13404
|
-
requestType:
|
|
13405
|
-
responseType:
|
|
13741
|
+
requestType: avs_pb24.ListSecretsReq,
|
|
13742
|
+
responseType: avs_pb24.ListSecretsResp,
|
|
13406
13743
|
requestSerialize: serialize_aggregator_ListSecretsReq,
|
|
13407
13744
|
requestDeserialize: deserialize_aggregator_ListSecretsReq,
|
|
13408
13745
|
responseSerialize: serialize_aggregator_ListSecretsResp,
|
|
@@ -13414,7 +13751,7 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13414
13751
|
path: "/aggregator.Aggregator/UpdateSecret",
|
|
13415
13752
|
requestStream: false,
|
|
13416
13753
|
responseStream: false,
|
|
13417
|
-
requestType:
|
|
13754
|
+
requestType: avs_pb24.CreateOrUpdateSecretReq,
|
|
13418
13755
|
responseType: google_protobuf_wrappers_pb.BoolValue,
|
|
13419
13756
|
requestSerialize: serialize_aggregator_CreateOrUpdateSecretReq,
|
|
13420
13757
|
requestDeserialize: deserialize_aggregator_CreateOrUpdateSecretReq,
|
|
@@ -13431,8 +13768,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13431
13768
|
path: "/aggregator.Aggregator/GetWorkflowCount",
|
|
13432
13769
|
requestStream: false,
|
|
13433
13770
|
responseStream: false,
|
|
13434
|
-
requestType:
|
|
13435
|
-
responseType:
|
|
13771
|
+
requestType: avs_pb24.GetWorkflowCountReq,
|
|
13772
|
+
responseType: avs_pb24.GetWorkflowCountResp,
|
|
13436
13773
|
requestSerialize: serialize_aggregator_GetWorkflowCountReq,
|
|
13437
13774
|
requestDeserialize: deserialize_aggregator_GetWorkflowCountReq,
|
|
13438
13775
|
responseSerialize: serialize_aggregator_GetWorkflowCountResp,
|
|
@@ -13446,8 +13783,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13446
13783
|
path: "/aggregator.Aggregator/GetExecutionCount",
|
|
13447
13784
|
requestStream: false,
|
|
13448
13785
|
responseStream: false,
|
|
13449
|
-
requestType:
|
|
13450
|
-
responseType:
|
|
13786
|
+
requestType: avs_pb24.GetExecutionCountReq,
|
|
13787
|
+
responseType: avs_pb24.GetExecutionCountResp,
|
|
13451
13788
|
requestSerialize: serialize_aggregator_GetExecutionCountReq,
|
|
13452
13789
|
requestDeserialize: deserialize_aggregator_GetExecutionCountReq,
|
|
13453
13790
|
responseSerialize: serialize_aggregator_GetExecutionCountResp,
|
|
@@ -13460,8 +13797,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13460
13797
|
path: "/aggregator.Aggregator/GetExecutionStats",
|
|
13461
13798
|
requestStream: false,
|
|
13462
13799
|
responseStream: false,
|
|
13463
|
-
requestType:
|
|
13464
|
-
responseType:
|
|
13800
|
+
requestType: avs_pb24.GetExecutionStatsReq,
|
|
13801
|
+
responseType: avs_pb24.GetExecutionStatsResp,
|
|
13465
13802
|
requestSerialize: serialize_aggregator_GetExecutionStatsReq,
|
|
13466
13803
|
requestDeserialize: deserialize_aggregator_GetExecutionStatsReq,
|
|
13467
13804
|
responseSerialize: serialize_aggregator_GetExecutionStatsResp,
|
|
@@ -13472,8 +13809,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13472
13809
|
path: "/aggregator.Aggregator/RunNodeWithInputs",
|
|
13473
13810
|
requestStream: false,
|
|
13474
13811
|
responseStream: false,
|
|
13475
|
-
requestType:
|
|
13476
|
-
responseType:
|
|
13812
|
+
requestType: avs_pb24.RunNodeWithInputsReq,
|
|
13813
|
+
responseType: avs_pb24.RunNodeWithInputsResp,
|
|
13477
13814
|
requestSerialize: serialize_aggregator_RunNodeWithInputsReq,
|
|
13478
13815
|
requestDeserialize: deserialize_aggregator_RunNodeWithInputsReq,
|
|
13479
13816
|
responseSerialize: serialize_aggregator_RunNodeWithInputsResp,
|
|
@@ -13484,8 +13821,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13484
13821
|
path: "/aggregator.Aggregator/RunTrigger",
|
|
13485
13822
|
requestStream: false,
|
|
13486
13823
|
responseStream: false,
|
|
13487
|
-
requestType:
|
|
13488
|
-
responseType:
|
|
13824
|
+
requestType: avs_pb24.RunTriggerReq,
|
|
13825
|
+
responseType: avs_pb24.RunTriggerResp,
|
|
13489
13826
|
requestSerialize: serialize_aggregator_RunTriggerReq,
|
|
13490
13827
|
requestDeserialize: deserialize_aggregator_RunTriggerReq,
|
|
13491
13828
|
responseSerialize: serialize_aggregator_RunTriggerResp,
|
|
@@ -13498,12 +13835,11 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13498
13835
|
|
|
13499
13836
|
// src/index.ts
|
|
13500
13837
|
var import_avs_grpc_pb = __toESM(require_avs_grpc_pb());
|
|
13501
|
-
var
|
|
13502
|
-
import _5 from "lodash";
|
|
13838
|
+
var avs_pb23 = __toESM(require_avs_pb());
|
|
13503
13839
|
import { credentials, Metadata } from "@grpc/grpc-js";
|
|
13504
13840
|
|
|
13505
13841
|
// src/models/workflow.ts
|
|
13506
|
-
var
|
|
13842
|
+
var avs_pb19 = __toESM(require_avs_pb());
|
|
13507
13843
|
import _4 from "lodash";
|
|
13508
13844
|
|
|
13509
13845
|
// src/models/edge.ts
|
|
@@ -13527,6 +13863,9 @@ var Edge = class _Edge {
|
|
|
13527
13863
|
};
|
|
13528
13864
|
var edge_default = Edge;
|
|
13529
13865
|
|
|
13866
|
+
// src/models/trigger/factory.ts
|
|
13867
|
+
var avs_pb7 = __toESM(require_avs_pb());
|
|
13868
|
+
|
|
13530
13869
|
// src/models/trigger/block.ts
|
|
13531
13870
|
var avs_pb2 = __toESM(require_avs_pb());
|
|
13532
13871
|
|
|
@@ -13597,6 +13936,15 @@ var BlockTrigger2 = class _BlockTrigger extends interface_default {
|
|
|
13597
13936
|
getOutput() {
|
|
13598
13937
|
return this.output;
|
|
13599
13938
|
}
|
|
13939
|
+
/**
|
|
13940
|
+
* Extract output data from RunTriggerResp for block triggers
|
|
13941
|
+
* @param outputData - The RunTriggerResp containing block trigger output
|
|
13942
|
+
* @returns Plain JavaScript object with block trigger data
|
|
13943
|
+
*/
|
|
13944
|
+
static fromOutputData(outputData) {
|
|
13945
|
+
const blockOutput = outputData.getBlockTrigger();
|
|
13946
|
+
return blockOutput?.toObject() || null;
|
|
13947
|
+
}
|
|
13600
13948
|
};
|
|
13601
13949
|
var block_default = BlockTrigger2;
|
|
13602
13950
|
|
|
@@ -13639,13 +13987,28 @@ var CronTrigger2 = class _CronTrigger extends interface_default {
|
|
|
13639
13987
|
});
|
|
13640
13988
|
}
|
|
13641
13989
|
/**
|
|
13642
|
-
* Convert raw data from
|
|
13990
|
+
* Convert raw data from runTrigger response to CronOutput format
|
|
13643
13991
|
* @param rawData - The raw data from the gRPC response
|
|
13644
13992
|
* @returns {CronTriggerOutput | undefined} - The converted data
|
|
13645
13993
|
*/
|
|
13646
13994
|
getOutput() {
|
|
13647
13995
|
return this.output;
|
|
13648
13996
|
}
|
|
13997
|
+
/**
|
|
13998
|
+
* Extract output data from RunTriggerResp for cron triggers
|
|
13999
|
+
* Updated to handle timestamp and timestamp_iso instead of epoch
|
|
14000
|
+
* @param outputData - The RunTriggerResp containing cron trigger output
|
|
14001
|
+
* @returns Plain JavaScript object with cron trigger data
|
|
14002
|
+
*/
|
|
14003
|
+
static fromOutputData(outputData) {
|
|
14004
|
+
const cronOutput = outputData.getCronTrigger();
|
|
14005
|
+
if (!cronOutput) return null;
|
|
14006
|
+
const outputObj = cronOutput.toObject();
|
|
14007
|
+
return {
|
|
14008
|
+
timestamp: outputObj.timestamp,
|
|
14009
|
+
timestampIso: outputObj.timestampIso
|
|
14010
|
+
};
|
|
14011
|
+
}
|
|
13649
14012
|
};
|
|
13650
14013
|
var cron_default = CronTrigger2;
|
|
13651
14014
|
|
|
@@ -13713,13 +14076,22 @@ var EventTrigger2 = class _EventTrigger extends interface_default {
|
|
|
13713
14076
|
});
|
|
13714
14077
|
}
|
|
13715
14078
|
/**
|
|
13716
|
-
* Convert raw data from
|
|
14079
|
+
* Convert raw data from runTrigger response to EventOutput format
|
|
13717
14080
|
* @param rawData - The raw data from the gRPC response
|
|
13718
14081
|
* @returns {EventTriggerOutput | undefined} - The converted data
|
|
13719
14082
|
*/
|
|
13720
14083
|
getOutput() {
|
|
13721
14084
|
return this.output;
|
|
13722
14085
|
}
|
|
14086
|
+
/**
|
|
14087
|
+
* Extract output data from RunTriggerResp for event triggers
|
|
14088
|
+
* @param outputData - The RunTriggerResp containing event trigger output
|
|
14089
|
+
* @returns Plain JavaScript object with event trigger data
|
|
14090
|
+
*/
|
|
14091
|
+
static fromOutputData(outputData) {
|
|
14092
|
+
const eventOutput = outputData.getEventTrigger();
|
|
14093
|
+
return eventOutput?.toObject() || null;
|
|
14094
|
+
}
|
|
13723
14095
|
};
|
|
13724
14096
|
var event_default = EventTrigger2;
|
|
13725
14097
|
|
|
@@ -13762,13 +14134,28 @@ var FixedTimeTrigger2 = class _FixedTimeTrigger extends interface_default {
|
|
|
13762
14134
|
});
|
|
13763
14135
|
}
|
|
13764
14136
|
/**
|
|
13765
|
-
* Convert raw data from
|
|
14137
|
+
* Convert raw data from runTrigger response to FixedTimeOutput format
|
|
13766
14138
|
* @param rawData - The raw data from the gRPC response
|
|
13767
14139
|
* @returns {FixedTimeTriggerOutput | undefined} - The converted data
|
|
13768
14140
|
*/
|
|
13769
14141
|
getOutput() {
|
|
13770
14142
|
return this.output;
|
|
13771
14143
|
}
|
|
14144
|
+
/**
|
|
14145
|
+
* Extract output data from RunTriggerResp for fixed time triggers
|
|
14146
|
+
* Updated to handle timestamp and timestamp_iso instead of epoch
|
|
14147
|
+
* @param outputData - The RunTriggerResp containing fixed time trigger output
|
|
14148
|
+
* @returns Plain JavaScript object with fixed time trigger data
|
|
14149
|
+
*/
|
|
14150
|
+
static fromOutputData(outputData) {
|
|
14151
|
+
const fixedTimeOutput = outputData.getFixedTimeTrigger();
|
|
14152
|
+
if (!fixedTimeOutput) return null;
|
|
14153
|
+
const outputObj = fixedTimeOutput.toObject();
|
|
14154
|
+
return {
|
|
14155
|
+
timestamp: outputObj.timestamp,
|
|
14156
|
+
timestampIso: outputObj.timestampIso
|
|
14157
|
+
};
|
|
14158
|
+
}
|
|
13772
14159
|
};
|
|
13773
14160
|
var fixedTime_default = FixedTimeTrigger2;
|
|
13774
14161
|
|
|
@@ -13798,11 +14185,97 @@ var ManualTrigger = class _ManualTrigger extends interface_default {
|
|
|
13798
14185
|
getInputVariables() {
|
|
13799
14186
|
return this.data;
|
|
13800
14187
|
}
|
|
14188
|
+
/**
|
|
14189
|
+
* Convert raw data from runTrigger response to ManualOutput format
|
|
14190
|
+
* @param rawData - The raw data from the gRPC response
|
|
14191
|
+
* @returns {ManualTriggerOutput | undefined} - The converted data
|
|
14192
|
+
*/
|
|
14193
|
+
getOutput() {
|
|
14194
|
+
return this.output;
|
|
14195
|
+
}
|
|
14196
|
+
/**
|
|
14197
|
+
* Extract output data from RunTriggerResp for manual triggers
|
|
14198
|
+
* @param outputData - The RunTriggerResp containing manual trigger output
|
|
14199
|
+
* @returns Plain JavaScript object with manual trigger data
|
|
14200
|
+
*/
|
|
14201
|
+
static fromOutputData(outputData) {
|
|
14202
|
+
const manualOutput = outputData.getManualTrigger();
|
|
14203
|
+
return manualOutput?.toObject() || null;
|
|
14204
|
+
}
|
|
13801
14205
|
};
|
|
13802
14206
|
var manual_default = ManualTrigger;
|
|
13803
14207
|
|
|
13804
14208
|
// src/models/trigger/factory.ts
|
|
13805
14209
|
import { TriggerType as TriggerType6 } from "@avaprotocol/types";
|
|
14210
|
+
|
|
14211
|
+
// src/utils.ts
|
|
14212
|
+
import {
|
|
14213
|
+
Value as ProtobufValue,
|
|
14214
|
+
Struct as ProtobufStruct,
|
|
14215
|
+
ListValue as ProtobufListValue
|
|
14216
|
+
} from "google-protobuf/google/protobuf/struct_pb";
|
|
14217
|
+
function convertProtobufValueToJs(value) {
|
|
14218
|
+
if (!value) {
|
|
14219
|
+
return void 0;
|
|
14220
|
+
}
|
|
14221
|
+
switch (value.getKindCase()) {
|
|
14222
|
+
case ProtobufValue.KindCase.NULL_VALUE:
|
|
14223
|
+
return null;
|
|
14224
|
+
case ProtobufValue.KindCase.NUMBER_VALUE:
|
|
14225
|
+
return value.getNumberValue();
|
|
14226
|
+
case ProtobufValue.KindCase.STRING_VALUE:
|
|
14227
|
+
return value.getStringValue();
|
|
14228
|
+
case ProtobufValue.KindCase.BOOL_VALUE:
|
|
14229
|
+
return value.getBoolValue();
|
|
14230
|
+
case ProtobufValue.KindCase.STRUCT_VALUE: {
|
|
14231
|
+
const struct = value.getStructValue();
|
|
14232
|
+
if (!struct) return {};
|
|
14233
|
+
const jsObj = {};
|
|
14234
|
+
const fields = struct.getFieldsMap();
|
|
14235
|
+
fields.forEach((val, key) => {
|
|
14236
|
+
jsObj[key] = convertProtobufValueToJs(val);
|
|
14237
|
+
});
|
|
14238
|
+
return jsObj;
|
|
14239
|
+
}
|
|
14240
|
+
case ProtobufValue.KindCase.LIST_VALUE: {
|
|
14241
|
+
const list = value.getListValue();
|
|
14242
|
+
if (!list) return [];
|
|
14243
|
+
return list.getValuesList().map((item) => convertProtobufValueToJs(item));
|
|
14244
|
+
}
|
|
14245
|
+
case ProtobufValue.KindCase.KIND_NOT_SET:
|
|
14246
|
+
default:
|
|
14247
|
+
return void 0;
|
|
14248
|
+
}
|
|
14249
|
+
}
|
|
14250
|
+
function convertJSValueToProtobuf(value) {
|
|
14251
|
+
const protobufValue = new ProtobufValue();
|
|
14252
|
+
if (value === null || value === void 0) {
|
|
14253
|
+
protobufValue.setNullValue(0);
|
|
14254
|
+
} else if (typeof value === "number") {
|
|
14255
|
+
protobufValue.setNumberValue(value);
|
|
14256
|
+
} else if (typeof value === "string") {
|
|
14257
|
+
protobufValue.setStringValue(value);
|
|
14258
|
+
} else if (typeof value === "boolean") {
|
|
14259
|
+
protobufValue.setBoolValue(value);
|
|
14260
|
+
} else if (Array.isArray(value)) {
|
|
14261
|
+
const listValue = new ProtobufListValue();
|
|
14262
|
+
const convertedValues = value.map((item) => convertJSValueToProtobuf(item));
|
|
14263
|
+
listValue.setValuesList(convertedValues);
|
|
14264
|
+
protobufValue.setListValue(listValue);
|
|
14265
|
+
} else if (typeof value === "object") {
|
|
14266
|
+
const structValue = new ProtobufStruct();
|
|
14267
|
+
const fieldsMap = structValue.getFieldsMap();
|
|
14268
|
+
Object.entries(value).forEach(([key, val]) => {
|
|
14269
|
+
fieldsMap.set(key, convertJSValueToProtobuf(val));
|
|
14270
|
+
});
|
|
14271
|
+
protobufValue.setStructValue(structValue);
|
|
14272
|
+
} else {
|
|
14273
|
+
protobufValue.setStringValue(String(value));
|
|
14274
|
+
}
|
|
14275
|
+
return protobufValue;
|
|
14276
|
+
}
|
|
14277
|
+
|
|
14278
|
+
// src/models/trigger/factory.ts
|
|
13806
14279
|
var TriggerFactory = class {
|
|
13807
14280
|
/**
|
|
13808
14281
|
* Static factory method to create Trigger instances
|
|
@@ -13845,14 +14318,51 @@ var TriggerFactory = class {
|
|
|
13845
14318
|
throw new Error("Unknown trigger type");
|
|
13846
14319
|
}
|
|
13847
14320
|
}
|
|
14321
|
+
static fromOutputData(outputData) {
|
|
14322
|
+
let triggerOutput = null;
|
|
14323
|
+
let rawData = null;
|
|
14324
|
+
switch (outputData.getOutputDataCase()) {
|
|
14325
|
+
case avs_pb7.RunTriggerResp.OutputDataCase.BLOCK_TRIGGER:
|
|
14326
|
+
triggerOutput = outputData.getBlockTrigger();
|
|
14327
|
+
break;
|
|
14328
|
+
case avs_pb7.RunTriggerResp.OutputDataCase.FIXED_TIME_TRIGGER:
|
|
14329
|
+
triggerOutput = outputData.getFixedTimeTrigger();
|
|
14330
|
+
break;
|
|
14331
|
+
case avs_pb7.RunTriggerResp.OutputDataCase.CRON_TRIGGER:
|
|
14332
|
+
triggerOutput = outputData.getCronTrigger();
|
|
14333
|
+
break;
|
|
14334
|
+
case avs_pb7.RunTriggerResp.OutputDataCase.EVENT_TRIGGER:
|
|
14335
|
+
triggerOutput = outputData.getEventTrigger();
|
|
14336
|
+
break;
|
|
14337
|
+
case avs_pb7.RunTriggerResp.OutputDataCase.MANUAL_TRIGGER:
|
|
14338
|
+
triggerOutput = outputData.getManualTrigger();
|
|
14339
|
+
break;
|
|
14340
|
+
case avs_pb7.RunTriggerResp.OutputDataCase.OUTPUT_DATA_NOT_SET:
|
|
14341
|
+
default:
|
|
14342
|
+
throw new Error(
|
|
14343
|
+
`Unsupported output data case: ${outputData.getOutputDataCase()}`
|
|
14344
|
+
);
|
|
14345
|
+
}
|
|
14346
|
+
if (!triggerOutput) {
|
|
14347
|
+
return null;
|
|
14348
|
+
}
|
|
14349
|
+
if (typeof triggerOutput.getData === "function") {
|
|
14350
|
+
rawData = triggerOutput.getData();
|
|
14351
|
+
if (rawData) {
|
|
14352
|
+
return convertProtobufValueToJs(rawData);
|
|
14353
|
+
}
|
|
14354
|
+
}
|
|
14355
|
+
return triggerOutput.toObject();
|
|
14356
|
+
}
|
|
13848
14357
|
};
|
|
13849
14358
|
var factory_default = TriggerFactory;
|
|
13850
14359
|
|
|
13851
14360
|
// src/models/node/factory.ts
|
|
14361
|
+
var avs_pb18 = __toESM(require_avs_pb());
|
|
13852
14362
|
import _3 from "lodash";
|
|
13853
14363
|
|
|
13854
14364
|
// src/models/node/interface.ts
|
|
13855
|
-
var
|
|
14365
|
+
var avs_pb8 = __toESM(require_avs_pb());
|
|
13856
14366
|
import { NodeType, NodeTypeGoConverter } from "@avaprotocol/types";
|
|
13857
14367
|
import _2 from "lodash";
|
|
13858
14368
|
var Node = class {
|
|
@@ -13863,9 +14373,9 @@ var Node = class {
|
|
|
13863
14373
|
this.data = props.data;
|
|
13864
14374
|
}
|
|
13865
14375
|
toRequest() {
|
|
13866
|
-
const request = new
|
|
14376
|
+
const request = new avs_pb8.TaskNode();
|
|
13867
14377
|
const raw = request.serializeBinary();
|
|
13868
|
-
const parsed =
|
|
14378
|
+
const parsed = avs_pb8.TaskNode.deserializeBinary(raw);
|
|
13869
14379
|
if (!_2.isEqual(request, parsed)) {
|
|
13870
14380
|
throw new Error("Invalid request object");
|
|
13871
14381
|
}
|
|
@@ -13875,7 +14385,7 @@ var Node = class {
|
|
|
13875
14385
|
var interface_default2 = Node;
|
|
13876
14386
|
|
|
13877
14387
|
// src/models/node/contractWrite.ts
|
|
13878
|
-
var
|
|
14388
|
+
var avs_pb9 = __toESM(require_avs_pb());
|
|
13879
14389
|
import { NodeType as NodeType2 } from "@avaprotocol/types";
|
|
13880
14390
|
var ContractWriteNode2 = class _ContractWriteNode extends interface_default2 {
|
|
13881
14391
|
constructor(props) {
|
|
@@ -13890,11 +14400,11 @@ var ContractWriteNode2 = class _ContractWriteNode extends interface_default2 {
|
|
|
13890
14400
|
});
|
|
13891
14401
|
}
|
|
13892
14402
|
toRequest() {
|
|
13893
|
-
const request = new
|
|
14403
|
+
const request = new avs_pb9.TaskNode();
|
|
13894
14404
|
request.setId(this.id);
|
|
13895
14405
|
request.setName(this.name);
|
|
13896
|
-
const nodeData = new
|
|
13897
|
-
const config = new
|
|
14406
|
+
const nodeData = new avs_pb9.ContractWriteNode();
|
|
14407
|
+
const config = new avs_pb9.ContractWriteNode.Config();
|
|
13898
14408
|
config.setContractAddress(this.data.contractAddress);
|
|
13899
14409
|
config.setCallData(this.data.callData);
|
|
13900
14410
|
config.setContractAbi(this.data.contractAbi);
|
|
@@ -13902,11 +14412,15 @@ var ContractWriteNode2 = class _ContractWriteNode extends interface_default2 {
|
|
|
13902
14412
|
request.setContractWrite(nodeData);
|
|
13903
14413
|
return request;
|
|
13904
14414
|
}
|
|
14415
|
+
static fromOutputData(outputData) {
|
|
14416
|
+
const contractWriteOutput = outputData.getContractWrite();
|
|
14417
|
+
return contractWriteOutput?.toObject() || null;
|
|
14418
|
+
}
|
|
13905
14419
|
};
|
|
13906
14420
|
var contractWrite_default = ContractWriteNode2;
|
|
13907
14421
|
|
|
13908
14422
|
// src/models/node/customCode.ts
|
|
13909
|
-
var
|
|
14423
|
+
var avs_pb10 = __toESM(require_avs_pb());
|
|
13910
14424
|
import { NodeType as NodeType3 } from "@avaprotocol/types";
|
|
13911
14425
|
var CustomCodeNode2 = class _CustomCodeNode extends interface_default2 {
|
|
13912
14426
|
constructor(props) {
|
|
@@ -13921,22 +14435,29 @@ var CustomCodeNode2 = class _CustomCodeNode extends interface_default2 {
|
|
|
13921
14435
|
});
|
|
13922
14436
|
}
|
|
13923
14437
|
toRequest() {
|
|
13924
|
-
const request = new
|
|
14438
|
+
const request = new avs_pb10.TaskNode();
|
|
13925
14439
|
request.setId(this.id);
|
|
13926
14440
|
request.setName(this.name);
|
|
13927
|
-
const nodeData = new
|
|
13928
|
-
const config = new
|
|
14441
|
+
const nodeData = new avs_pb10.CustomCodeNode();
|
|
14442
|
+
const config = new avs_pb10.CustomCodeNode.Config();
|
|
13929
14443
|
config.setLang(this.data.lang);
|
|
13930
14444
|
config.setSource(this.data.source);
|
|
13931
14445
|
nodeData.setConfig(config);
|
|
13932
14446
|
request.setCustomCode(nodeData);
|
|
13933
14447
|
return request;
|
|
13934
14448
|
}
|
|
14449
|
+
static fromOutputData(outputData) {
|
|
14450
|
+
const customCodeOutput = outputData.getCustomCode();
|
|
14451
|
+
if (customCodeOutput?.getData()) {
|
|
14452
|
+
return convertProtobufValueToJs(customCodeOutput.getData());
|
|
14453
|
+
}
|
|
14454
|
+
return null;
|
|
14455
|
+
}
|
|
13935
14456
|
};
|
|
13936
14457
|
var customCode_default = CustomCodeNode2;
|
|
13937
14458
|
|
|
13938
14459
|
// src/models/node/graphqlQuery.ts
|
|
13939
|
-
var
|
|
14460
|
+
var avs_pb11 = __toESM(require_avs_pb());
|
|
13940
14461
|
import { NodeType as NodeType4 } from "@avaprotocol/types";
|
|
13941
14462
|
var GraphQLQueryNode2 = class _GraphQLQueryNode extends interface_default2 {
|
|
13942
14463
|
constructor(props) {
|
|
@@ -13955,11 +14476,11 @@ var GraphQLQueryNode2 = class _GraphQLQueryNode extends interface_default2 {
|
|
|
13955
14476
|
});
|
|
13956
14477
|
}
|
|
13957
14478
|
toRequest() {
|
|
13958
|
-
const request = new
|
|
14479
|
+
const request = new avs_pb11.TaskNode();
|
|
13959
14480
|
request.setId(this.id);
|
|
13960
14481
|
request.setName(this.name);
|
|
13961
|
-
const nodeData = new
|
|
13962
|
-
const config = new
|
|
14482
|
+
const nodeData = new avs_pb11.GraphQLQueryNode();
|
|
14483
|
+
const config = new avs_pb11.GraphQLQueryNode.Config();
|
|
13963
14484
|
config.setUrl(this.data.url);
|
|
13964
14485
|
config.setQuery(this.data.query);
|
|
13965
14486
|
if (this.data.variablesMap && this.data.variablesMap.length > 0) {
|
|
@@ -13972,12 +14493,18 @@ var GraphQLQueryNode2 = class _GraphQLQueryNode extends interface_default2 {
|
|
|
13972
14493
|
request.setGraphqlQuery(nodeData);
|
|
13973
14494
|
return request;
|
|
13974
14495
|
}
|
|
14496
|
+
static fromOutputData(outputData) {
|
|
14497
|
+
const graphqlOutput = outputData.getGraphql();
|
|
14498
|
+
return graphqlOutput?.toObject() || null;
|
|
14499
|
+
}
|
|
13975
14500
|
};
|
|
13976
14501
|
var graphqlQuery_default = GraphQLQueryNode2;
|
|
13977
14502
|
|
|
13978
14503
|
// src/models/node/restApi.ts
|
|
13979
|
-
var
|
|
13980
|
-
import {
|
|
14504
|
+
var avs_pb12 = __toESM(require_avs_pb());
|
|
14505
|
+
import {
|
|
14506
|
+
NodeType as NodeType5
|
|
14507
|
+
} from "@avaprotocol/types";
|
|
13981
14508
|
var RestAPINode2 = class _RestAPINode extends interface_default2 {
|
|
13982
14509
|
constructor(props) {
|
|
13983
14510
|
super({ ...props, type: NodeType5.RestAPI, data: props.data });
|
|
@@ -13991,29 +14518,43 @@ var RestAPINode2 = class _RestAPINode extends interface_default2 {
|
|
|
13991
14518
|
});
|
|
13992
14519
|
}
|
|
13993
14520
|
toRequest() {
|
|
13994
|
-
const request = new
|
|
14521
|
+
const request = new avs_pb12.TaskNode();
|
|
13995
14522
|
request.setId(this.id);
|
|
13996
14523
|
request.setName(this.name);
|
|
13997
|
-
const nodeData = new
|
|
13998
|
-
const config = new
|
|
14524
|
+
const nodeData = new avs_pb12.RestAPINode();
|
|
14525
|
+
const config = new avs_pb12.RestAPINode.Config();
|
|
13999
14526
|
config.setUrl(this.data.url);
|
|
14000
14527
|
config.setMethod(this.data.method);
|
|
14001
14528
|
config.setBody(this.data.body || "");
|
|
14002
14529
|
if (this.data.headersMap && this.data.headersMap.length > 0) {
|
|
14003
14530
|
const headersMap = config.getHeadersMap();
|
|
14004
|
-
this.data.headersMap.forEach(
|
|
14005
|
-
|
|
14006
|
-
|
|
14531
|
+
this.data.headersMap.forEach(
|
|
14532
|
+
([key, value]) => {
|
|
14533
|
+
headersMap.set(key, value);
|
|
14534
|
+
}
|
|
14535
|
+
);
|
|
14007
14536
|
}
|
|
14008
14537
|
nodeData.setConfig(config);
|
|
14009
14538
|
request.setRestApi(nodeData);
|
|
14010
14539
|
return request;
|
|
14011
14540
|
}
|
|
14541
|
+
static fromOutputData(outputData) {
|
|
14542
|
+
const restApiOutput = outputData.getRestApi();
|
|
14543
|
+
if (!restApiOutput) {
|
|
14544
|
+
console.log("Debug RestAPI: No restApiOutput found");
|
|
14545
|
+
return null;
|
|
14546
|
+
}
|
|
14547
|
+
const rawData = restApiOutput.getData();
|
|
14548
|
+
if (rawData) {
|
|
14549
|
+
return convertProtobufValueToJs(rawData);
|
|
14550
|
+
}
|
|
14551
|
+
return restApiOutput.toObject();
|
|
14552
|
+
}
|
|
14012
14553
|
};
|
|
14013
14554
|
var restApi_default = RestAPINode2;
|
|
14014
14555
|
|
|
14015
14556
|
// src/models/node/contractRead.ts
|
|
14016
|
-
var
|
|
14557
|
+
var avs_pb13 = __toESM(require_avs_pb());
|
|
14017
14558
|
import { NodeType as NodeType6 } from "@avaprotocol/types";
|
|
14018
14559
|
var ContractReadNode2 = class _ContractReadNode extends interface_default2 {
|
|
14019
14560
|
constructor(props) {
|
|
@@ -14028,11 +14569,11 @@ var ContractReadNode2 = class _ContractReadNode extends interface_default2 {
|
|
|
14028
14569
|
});
|
|
14029
14570
|
}
|
|
14030
14571
|
toRequest() {
|
|
14031
|
-
const request = new
|
|
14572
|
+
const request = new avs_pb13.TaskNode();
|
|
14032
14573
|
request.setId(this.id);
|
|
14033
14574
|
request.setName(this.name);
|
|
14034
|
-
const nodeData = new
|
|
14035
|
-
const config = new
|
|
14575
|
+
const nodeData = new avs_pb13.ContractReadNode();
|
|
14576
|
+
const config = new avs_pb13.ContractReadNode.Config();
|
|
14036
14577
|
config.setContractAddress(this.data.contractAddress);
|
|
14037
14578
|
config.setCallData(this.data.callData);
|
|
14038
14579
|
config.setContractAbi(this.data.contractAbi);
|
|
@@ -14040,11 +14581,21 @@ var ContractReadNode2 = class _ContractReadNode extends interface_default2 {
|
|
|
14040
14581
|
request.setContractRead(nodeData);
|
|
14041
14582
|
return request;
|
|
14042
14583
|
}
|
|
14584
|
+
static fromOutputData(outputData) {
|
|
14585
|
+
const contractReadOutput = outputData.getContractRead();
|
|
14586
|
+
if (contractReadOutput && contractReadOutput.getDataList()) {
|
|
14587
|
+
const dataList = contractReadOutput.getDataList();
|
|
14588
|
+
return {
|
|
14589
|
+
dataList: dataList.map((value) => convertProtobufValueToJs(value))
|
|
14590
|
+
};
|
|
14591
|
+
}
|
|
14592
|
+
return null;
|
|
14593
|
+
}
|
|
14043
14594
|
};
|
|
14044
14595
|
var contractRead_default = ContractReadNode2;
|
|
14045
14596
|
|
|
14046
14597
|
// src/models/node/ethTransfer.ts
|
|
14047
|
-
var
|
|
14598
|
+
var avs_pb14 = __toESM(require_avs_pb());
|
|
14048
14599
|
import { NodeType as NodeType7 } from "@avaprotocol/types";
|
|
14049
14600
|
var ETHTransferNode2 = class _ETHTransferNode extends interface_default2 {
|
|
14050
14601
|
constructor(props) {
|
|
@@ -14059,23 +14610,27 @@ var ETHTransferNode2 = class _ETHTransferNode extends interface_default2 {
|
|
|
14059
14610
|
});
|
|
14060
14611
|
}
|
|
14061
14612
|
toRequest() {
|
|
14062
|
-
const request = new
|
|
14613
|
+
const request = new avs_pb14.TaskNode();
|
|
14063
14614
|
request.setId(this.id);
|
|
14064
14615
|
request.setName(this.name);
|
|
14065
|
-
const nodeData = new
|
|
14066
|
-
const config = new
|
|
14616
|
+
const nodeData = new avs_pb14.ETHTransferNode();
|
|
14617
|
+
const config = new avs_pb14.ETHTransferNode.Config();
|
|
14067
14618
|
config.setDestination(this.data.destination);
|
|
14068
14619
|
config.setAmount(this.data.amount);
|
|
14069
14620
|
nodeData.setConfig(config);
|
|
14070
14621
|
request.setEthTransfer(nodeData);
|
|
14071
14622
|
return request;
|
|
14072
14623
|
}
|
|
14624
|
+
static fromOutputData(outputData) {
|
|
14625
|
+
const ethTransferOutput = outputData.getEthTransfer();
|
|
14626
|
+
return ethTransferOutput?.toObject() || null;
|
|
14627
|
+
}
|
|
14073
14628
|
};
|
|
14074
14629
|
var ethTransfer_default = ETHTransferNode2;
|
|
14075
14630
|
|
|
14076
14631
|
// src/models/node/branch.ts
|
|
14077
14632
|
import { NodeType as NodeType8 } from "@avaprotocol/types";
|
|
14078
|
-
var
|
|
14633
|
+
var avs_pb15 = __toESM(require_avs_pb());
|
|
14079
14634
|
var BranchNode2 = class _BranchNode extends interface_default2 {
|
|
14080
14635
|
constructor(props) {
|
|
14081
14636
|
super({ ...props, type: NodeType8.Branch, data: props.data });
|
|
@@ -14089,15 +14644,15 @@ var BranchNode2 = class _BranchNode extends interface_default2 {
|
|
|
14089
14644
|
});
|
|
14090
14645
|
}
|
|
14091
14646
|
toRequest() {
|
|
14092
|
-
const request = new
|
|
14647
|
+
const request = new avs_pb15.TaskNode();
|
|
14093
14648
|
request.setId(this.id);
|
|
14094
14649
|
request.setName(this.name);
|
|
14095
|
-
const nodeData = new
|
|
14096
|
-
const config = new
|
|
14650
|
+
const nodeData = new avs_pb15.BranchNode();
|
|
14651
|
+
const config = new avs_pb15.BranchNode.Config();
|
|
14097
14652
|
if (this.data.conditionsList && this.data.conditionsList.length > 0) {
|
|
14098
14653
|
const conditionsList = this.data.conditionsList.map(
|
|
14099
14654
|
(condition) => {
|
|
14100
|
-
const conditionObj = new
|
|
14655
|
+
const conditionObj = new avs_pb15.BranchNode.Condition();
|
|
14101
14656
|
conditionObj.setId(condition.id);
|
|
14102
14657
|
conditionObj.setType(condition.type);
|
|
14103
14658
|
conditionObj.setExpression(condition.expression);
|
|
@@ -14110,12 +14665,16 @@ var BranchNode2 = class _BranchNode extends interface_default2 {
|
|
|
14110
14665
|
request.setBranch(nodeData);
|
|
14111
14666
|
return request;
|
|
14112
14667
|
}
|
|
14668
|
+
static fromOutputData(outputData) {
|
|
14669
|
+
const branchOutput = outputData.getBranch();
|
|
14670
|
+
return branchOutput?.toObject() || null;
|
|
14671
|
+
}
|
|
14113
14672
|
// TODO: do we need a getConditionId() to avoid exporting BranchNodeData?
|
|
14114
14673
|
};
|
|
14115
14674
|
var branch_default = BranchNode2;
|
|
14116
14675
|
|
|
14117
14676
|
// src/models/node/filter.ts
|
|
14118
|
-
var
|
|
14677
|
+
var avs_pb16 = __toESM(require_avs_pb());
|
|
14119
14678
|
import { NodeType as NodeType9 } from "@avaprotocol/types";
|
|
14120
14679
|
var FilterNode2 = class _FilterNode extends interface_default2 {
|
|
14121
14680
|
constructor(props) {
|
|
@@ -14130,22 +14689,26 @@ var FilterNode2 = class _FilterNode extends interface_default2 {
|
|
|
14130
14689
|
});
|
|
14131
14690
|
}
|
|
14132
14691
|
toRequest() {
|
|
14133
|
-
const request = new
|
|
14692
|
+
const request = new avs_pb16.TaskNode();
|
|
14134
14693
|
request.setId(this.id);
|
|
14135
14694
|
request.setName(this.name);
|
|
14136
|
-
const nodeData = new
|
|
14137
|
-
const config = new
|
|
14695
|
+
const nodeData = new avs_pb16.FilterNode();
|
|
14696
|
+
const config = new avs_pb16.FilterNode.Config();
|
|
14138
14697
|
config.setExpression(this.data.expression);
|
|
14139
14698
|
config.setSourceId(this.data.sourceId || "");
|
|
14140
14699
|
nodeData.setConfig(config);
|
|
14141
14700
|
request.setFilter(nodeData);
|
|
14142
14701
|
return request;
|
|
14143
14702
|
}
|
|
14703
|
+
static fromOutputData(outputData) {
|
|
14704
|
+
const filterOutput = outputData.getFilter();
|
|
14705
|
+
return filterOutput?.toObject() || null;
|
|
14706
|
+
}
|
|
14144
14707
|
};
|
|
14145
14708
|
var filter_default = FilterNode2;
|
|
14146
14709
|
|
|
14147
14710
|
// src/models/node/loop.ts
|
|
14148
|
-
var
|
|
14711
|
+
var avs_pb17 = __toESM(require_avs_pb());
|
|
14149
14712
|
import { NodeType as NodeType10 } from "@avaprotocol/types";
|
|
14150
14713
|
var LoopNode2 = class _LoopNode extends interface_default2 {
|
|
14151
14714
|
constructor(props) {
|
|
@@ -14176,29 +14739,29 @@ var LoopNode2 = class _LoopNode extends interface_default2 {
|
|
|
14176
14739
|
});
|
|
14177
14740
|
}
|
|
14178
14741
|
toRequest() {
|
|
14179
|
-
const node = new
|
|
14180
|
-
const loopNode = new
|
|
14742
|
+
const node = new avs_pb17.TaskNode();
|
|
14743
|
+
const loopNode = new avs_pb17.LoopNode();
|
|
14181
14744
|
node.setId(this.id);
|
|
14182
14745
|
node.setName(this.name);
|
|
14183
14746
|
const data = this.data;
|
|
14184
|
-
const config = new
|
|
14747
|
+
const config = new avs_pb17.LoopNode.Config();
|
|
14185
14748
|
config.setSourceId(data.sourceId || "");
|
|
14186
14749
|
config.setIterVal(data.iterVal || "");
|
|
14187
14750
|
config.setIterKey(data.iterKey || "");
|
|
14188
14751
|
loopNode.setConfig(config);
|
|
14189
14752
|
if (data.ethTransfer) {
|
|
14190
|
-
const ethTransfer = new
|
|
14753
|
+
const ethTransfer = new avs_pb17.ETHTransferNode();
|
|
14191
14754
|
if (data.ethTransfer.config) {
|
|
14192
|
-
const config2 = new
|
|
14755
|
+
const config2 = new avs_pb17.ETHTransferNode.Config();
|
|
14193
14756
|
config2.setDestination(data.ethTransfer.config.destination);
|
|
14194
14757
|
config2.setAmount(data.ethTransfer.config.amount);
|
|
14195
14758
|
ethTransfer.setConfig(config2);
|
|
14196
14759
|
}
|
|
14197
14760
|
loopNode.setEthTransfer(ethTransfer);
|
|
14198
14761
|
} else if (data.contractWrite) {
|
|
14199
|
-
const contractWrite = new
|
|
14762
|
+
const contractWrite = new avs_pb17.ContractWriteNode();
|
|
14200
14763
|
if (data.contractWrite.config) {
|
|
14201
|
-
const config2 = new
|
|
14764
|
+
const config2 = new avs_pb17.ContractWriteNode.Config();
|
|
14202
14765
|
config2.setContractAddress(data.contractWrite.config.contractAddress);
|
|
14203
14766
|
config2.setCallData(data.contractWrite.config.callData);
|
|
14204
14767
|
config2.setContractAbi(data.contractWrite.config.contractAbi);
|
|
@@ -14206,9 +14769,9 @@ var LoopNode2 = class _LoopNode extends interface_default2 {
|
|
|
14206
14769
|
}
|
|
14207
14770
|
loopNode.setContractWrite(contractWrite);
|
|
14208
14771
|
} else if (data.contractRead) {
|
|
14209
|
-
const contractRead = new
|
|
14772
|
+
const contractRead = new avs_pb17.ContractReadNode();
|
|
14210
14773
|
if (data.contractRead.config) {
|
|
14211
|
-
const config2 = new
|
|
14774
|
+
const config2 = new avs_pb17.ContractReadNode.Config();
|
|
14212
14775
|
config2.setContractAddress(data.contractRead.config.contractAddress);
|
|
14213
14776
|
config2.setCallData(data.contractRead.config.callData);
|
|
14214
14777
|
config2.setContractAbi(data.contractRead.config.contractAbi);
|
|
@@ -14216,9 +14779,9 @@ var LoopNode2 = class _LoopNode extends interface_default2 {
|
|
|
14216
14779
|
}
|
|
14217
14780
|
loopNode.setContractRead(contractRead);
|
|
14218
14781
|
} else if (data.graphqlDataQuery) {
|
|
14219
|
-
const graphqlQuery = new
|
|
14782
|
+
const graphqlQuery = new avs_pb17.GraphQLQueryNode();
|
|
14220
14783
|
if (data.graphqlDataQuery.config) {
|
|
14221
|
-
const config2 = new
|
|
14784
|
+
const config2 = new avs_pb17.GraphQLQueryNode.Config();
|
|
14222
14785
|
config2.setUrl(data.graphqlDataQuery.config.url);
|
|
14223
14786
|
config2.setQuery(data.graphqlDataQuery.config.query);
|
|
14224
14787
|
if (data.graphqlDataQuery.config.variablesMap && data.graphqlDataQuery.config.variablesMap.length > 0) {
|
|
@@ -14230,9 +14793,9 @@ var LoopNode2 = class _LoopNode extends interface_default2 {
|
|
|
14230
14793
|
}
|
|
14231
14794
|
loopNode.setGraphqlDataQuery(graphqlQuery);
|
|
14232
14795
|
} else if (data.restApi) {
|
|
14233
|
-
const restApi = new
|
|
14796
|
+
const restApi = new avs_pb17.RestAPINode();
|
|
14234
14797
|
if (data.restApi.config) {
|
|
14235
|
-
const config2 = new
|
|
14798
|
+
const config2 = new avs_pb17.RestAPINode.Config();
|
|
14236
14799
|
config2.setUrl(data.restApi.config.url);
|
|
14237
14800
|
config2.setMethod(data.restApi.config.method);
|
|
14238
14801
|
config2.setBody(data.restApi.config.body || "");
|
|
@@ -14245,9 +14808,9 @@ var LoopNode2 = class _LoopNode extends interface_default2 {
|
|
|
14245
14808
|
}
|
|
14246
14809
|
loopNode.setRestApi(restApi);
|
|
14247
14810
|
} else if (data.customCode) {
|
|
14248
|
-
const customCode = new
|
|
14811
|
+
const customCode = new avs_pb17.CustomCodeNode();
|
|
14249
14812
|
if (data.customCode.config) {
|
|
14250
|
-
const config2 = new
|
|
14813
|
+
const config2 = new avs_pb17.CustomCodeNode.Config();
|
|
14251
14814
|
config2.setLang(data.customCode.config.lang);
|
|
14252
14815
|
config2.setSource(data.customCode.config.source);
|
|
14253
14816
|
customCode.setConfig(config2);
|
|
@@ -14257,6 +14820,10 @@ var LoopNode2 = class _LoopNode extends interface_default2 {
|
|
|
14257
14820
|
node.setLoop(loopNode);
|
|
14258
14821
|
return node;
|
|
14259
14822
|
}
|
|
14823
|
+
static fromOutputData(outputData) {
|
|
14824
|
+
const loopOutput = outputData.getLoop();
|
|
14825
|
+
return loopOutput?.toObject() || null;
|
|
14826
|
+
}
|
|
14260
14827
|
};
|
|
14261
14828
|
var loop_default = LoopNode2;
|
|
14262
14829
|
|
|
@@ -14319,6 +14886,52 @@ var NodeFactory = class {
|
|
|
14319
14886
|
throw new Error(`Unsupported node type: ${raw.getName()}`);
|
|
14320
14887
|
}
|
|
14321
14888
|
}
|
|
14889
|
+
static fromOutputData(outputData) {
|
|
14890
|
+
let nodeOutput = null;
|
|
14891
|
+
let rawData = null;
|
|
14892
|
+
switch (outputData.getOutputDataCase()) {
|
|
14893
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.REST_API:
|
|
14894
|
+
nodeOutput = outputData.getRestApi();
|
|
14895
|
+
break;
|
|
14896
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.CUSTOM_CODE:
|
|
14897
|
+
nodeOutput = outputData.getCustomCode();
|
|
14898
|
+
break;
|
|
14899
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.CONTRACT_READ:
|
|
14900
|
+
nodeOutput = outputData.getContractRead();
|
|
14901
|
+
break;
|
|
14902
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.CONTRACT_WRITE:
|
|
14903
|
+
nodeOutput = outputData.getContractWrite();
|
|
14904
|
+
break;
|
|
14905
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.ETH_TRANSFER:
|
|
14906
|
+
nodeOutput = outputData.getEthTransfer();
|
|
14907
|
+
break;
|
|
14908
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.GRAPHQL:
|
|
14909
|
+
nodeOutput = outputData.getGraphql();
|
|
14910
|
+
break;
|
|
14911
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.BRANCH:
|
|
14912
|
+
nodeOutput = outputData.getBranch();
|
|
14913
|
+
break;
|
|
14914
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.FILTER:
|
|
14915
|
+
nodeOutput = outputData.getFilter();
|
|
14916
|
+
break;
|
|
14917
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.LOOP:
|
|
14918
|
+
nodeOutput = outputData.getLoop();
|
|
14919
|
+
break;
|
|
14920
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.OUTPUT_DATA_NOT_SET:
|
|
14921
|
+
default:
|
|
14922
|
+
throw new Error(`Unsupported output data case: ${outputData.getOutputDataCase()}`);
|
|
14923
|
+
}
|
|
14924
|
+
if (!nodeOutput) {
|
|
14925
|
+
return null;
|
|
14926
|
+
}
|
|
14927
|
+
if (typeof nodeOutput.getData === "function") {
|
|
14928
|
+
rawData = nodeOutput.getData();
|
|
14929
|
+
if (rawData) {
|
|
14930
|
+
return convertProtobufValueToJs(rawData);
|
|
14931
|
+
}
|
|
14932
|
+
}
|
|
14933
|
+
return nodeOutput.toObject();
|
|
14934
|
+
}
|
|
14322
14935
|
};
|
|
14323
14936
|
var factory_default2 = NodeFactory;
|
|
14324
14937
|
|
|
@@ -14326,11 +14939,11 @@ var factory_default2 = NodeFactory;
|
|
|
14326
14939
|
import { WorkflowStatus } from "@avaprotocol/types";
|
|
14327
14940
|
function convertStatusToString(status) {
|
|
14328
14941
|
const conversionMap = {
|
|
14329
|
-
[
|
|
14330
|
-
[
|
|
14331
|
-
[
|
|
14332
|
-
[
|
|
14333
|
-
[
|
|
14942
|
+
[avs_pb19.TaskStatus.ACTIVE]: WorkflowStatus.Active,
|
|
14943
|
+
[avs_pb19.TaskStatus.COMPLETED]: WorkflowStatus.Completed,
|
|
14944
|
+
[avs_pb19.TaskStatus.FAILED]: WorkflowStatus.Failed,
|
|
14945
|
+
[avs_pb19.TaskStatus.CANCELED]: WorkflowStatus.Canceled,
|
|
14946
|
+
[avs_pb19.TaskStatus.EXECUTING]: WorkflowStatus.Executing
|
|
14334
14947
|
};
|
|
14335
14948
|
return conversionMap[status];
|
|
14336
14949
|
}
|
|
@@ -14418,7 +15031,7 @@ var Workflow = class _Workflow {
|
|
|
14418
15031
|
});
|
|
14419
15032
|
}
|
|
14420
15033
|
toRequest() {
|
|
14421
|
-
const request = new
|
|
15034
|
+
const request = new avs_pb19.CreateTaskReq();
|
|
14422
15035
|
request.setSmartWalletAddress(this.smartWalletAddress);
|
|
14423
15036
|
request.setTrigger(this.trigger.toRequest());
|
|
14424
15037
|
_4.map(this.nodes, (node) => request.addNodes(node.toRequest()));
|
|
@@ -14435,144 +15048,11 @@ var Workflow = class _Workflow {
|
|
|
14435
15048
|
var workflow_default = Workflow;
|
|
14436
15049
|
|
|
14437
15050
|
// src/models/execution.ts
|
|
14438
|
-
var
|
|
14439
|
-
|
|
14440
|
-
// src/models/trigger/reason.ts
|
|
14441
|
-
var avs_pb18 = __toESM(require_avs_pb());
|
|
14442
|
-
import { TriggerType as TriggerType8 } from "@avaprotocol/types";
|
|
14443
|
-
var convertTriggerType = (grpcType) => {
|
|
14444
|
-
const conversionMap = {
|
|
14445
|
-
[avs_pb18.TriggerType.TRIGGER_TYPE_FIXED_TIME]: TriggerType8.FixedTime,
|
|
14446
|
-
[avs_pb18.TriggerType.TRIGGER_TYPE_CRON]: TriggerType8.Cron,
|
|
14447
|
-
[avs_pb18.TriggerType.TRIGGER_TYPE_BLOCK]: TriggerType8.Block,
|
|
14448
|
-
[avs_pb18.TriggerType.TRIGGER_TYPE_EVENT]: TriggerType8.Event,
|
|
14449
|
-
[avs_pb18.TriggerType.TRIGGER_TYPE_MANUAL]: TriggerType8.Manual,
|
|
14450
|
-
[avs_pb18.TriggerType.TRIGGER_TYPE_UNSPECIFIED]: TriggerType8.Unspecified
|
|
14451
|
-
};
|
|
14452
|
-
return conversionMap[grpcType];
|
|
14453
|
-
};
|
|
14454
|
-
var TriggerReason2 = class _TriggerReason {
|
|
14455
|
-
constructor(props) {
|
|
14456
|
-
this.type = props.type;
|
|
14457
|
-
switch (props.type) {
|
|
14458
|
-
case TriggerType8.FixedTime:
|
|
14459
|
-
case TriggerType8.Cron:
|
|
14460
|
-
this.epoch = props.epoch;
|
|
14461
|
-
break;
|
|
14462
|
-
case TriggerType8.Block:
|
|
14463
|
-
this.blockNumber = props.blockNumber;
|
|
14464
|
-
break;
|
|
14465
|
-
case TriggerType8.Event:
|
|
14466
|
-
this.blockNumber = props.blockNumber;
|
|
14467
|
-
this.logIndex = props.logIndex;
|
|
14468
|
-
this.txHash = props.txHash;
|
|
14469
|
-
break;
|
|
14470
|
-
case TriggerType8.Manual:
|
|
14471
|
-
case TriggerType8.Unspecified:
|
|
14472
|
-
break;
|
|
14473
|
-
default:
|
|
14474
|
-
throw new Error("Unsupported trigger type");
|
|
14475
|
-
}
|
|
14476
|
-
}
|
|
14477
|
-
static fromResponse(data) {
|
|
14478
|
-
if (!data) {
|
|
14479
|
-
return void 0;
|
|
14480
|
-
}
|
|
14481
|
-
return new _TriggerReason({
|
|
14482
|
-
type: convertTriggerType(data.getType()),
|
|
14483
|
-
blockNumber: data.getBlockNumber(),
|
|
14484
|
-
epoch: data.getEpoch(),
|
|
14485
|
-
logIndex: data.getLogIndex(),
|
|
14486
|
-
txHash: data.getTxHash()
|
|
14487
|
-
});
|
|
14488
|
-
}
|
|
14489
|
-
toRequest() {
|
|
14490
|
-
const request = new avs_pb18.TriggerReason();
|
|
14491
|
-
switch (this.type) {
|
|
14492
|
-
case TriggerType8.FixedTime:
|
|
14493
|
-
request.setType(avs_pb18.TriggerType.TRIGGER_TYPE_FIXED_TIME);
|
|
14494
|
-
if (this.epoch) {
|
|
14495
|
-
request.setEpoch(this.epoch);
|
|
14496
|
-
}
|
|
14497
|
-
break;
|
|
14498
|
-
case TriggerType8.Cron:
|
|
14499
|
-
request.setType(avs_pb18.TriggerType.TRIGGER_TYPE_CRON);
|
|
14500
|
-
if (this.epoch) {
|
|
14501
|
-
request.setEpoch(this.epoch);
|
|
14502
|
-
}
|
|
14503
|
-
break;
|
|
14504
|
-
case TriggerType8.Block:
|
|
14505
|
-
request.setType(avs_pb18.TriggerType.TRIGGER_TYPE_BLOCK);
|
|
14506
|
-
if (this.blockNumber) {
|
|
14507
|
-
request.setBlockNumber(this.blockNumber);
|
|
14508
|
-
}
|
|
14509
|
-
break;
|
|
14510
|
-
case TriggerType8.Event:
|
|
14511
|
-
request.setType(avs_pb18.TriggerType.TRIGGER_TYPE_EVENT);
|
|
14512
|
-
if (this.blockNumber) {
|
|
14513
|
-
request.setBlockNumber(this.blockNumber);
|
|
14514
|
-
}
|
|
14515
|
-
if (this.logIndex) {
|
|
14516
|
-
request.setLogIndex(this.logIndex);
|
|
14517
|
-
}
|
|
14518
|
-
if (this.txHash) {
|
|
14519
|
-
request.setTxHash(this.txHash);
|
|
14520
|
-
}
|
|
14521
|
-
break;
|
|
14522
|
-
case TriggerType8.Manual:
|
|
14523
|
-
request.setType(avs_pb18.TriggerType.TRIGGER_TYPE_MANUAL);
|
|
14524
|
-
break;
|
|
14525
|
-
case TriggerType8.Unspecified:
|
|
14526
|
-
request.setType(avs_pb18.TriggerType.TRIGGER_TYPE_UNSPECIFIED);
|
|
14527
|
-
break;
|
|
14528
|
-
default:
|
|
14529
|
-
throw new Error("Unsupported trigger type");
|
|
14530
|
-
}
|
|
14531
|
-
return request;
|
|
14532
|
-
}
|
|
14533
|
-
};
|
|
14534
|
-
var reason_default = TriggerReason2;
|
|
14535
|
-
|
|
14536
|
-
// src/models/step.ts
|
|
14537
|
-
var avs_pb19 = __toESM(require_avs_pb());
|
|
14538
|
-
|
|
14539
|
-
// src/utils.ts
|
|
14540
|
-
import { Value as ProtobufValue } from "google-protobuf/google/protobuf/struct_pb";
|
|
14541
|
-
function convertProtobufValueToJs(value) {
|
|
14542
|
-
if (!value) {
|
|
14543
|
-
return void 0;
|
|
14544
|
-
}
|
|
14545
|
-
switch (value.getKindCase()) {
|
|
14546
|
-
case ProtobufValue.KindCase.NULL_VALUE:
|
|
14547
|
-
return null;
|
|
14548
|
-
case ProtobufValue.KindCase.NUMBER_VALUE:
|
|
14549
|
-
return value.getNumberValue();
|
|
14550
|
-
case ProtobufValue.KindCase.STRING_VALUE:
|
|
14551
|
-
return value.getStringValue();
|
|
14552
|
-
case ProtobufValue.KindCase.BOOL_VALUE:
|
|
14553
|
-
return value.getBoolValue();
|
|
14554
|
-
case ProtobufValue.KindCase.STRUCT_VALUE: {
|
|
14555
|
-
const struct = value.getStructValue();
|
|
14556
|
-
if (!struct) return {};
|
|
14557
|
-
const jsObj = {};
|
|
14558
|
-
const fields = struct.getFieldsMap();
|
|
14559
|
-
fields.forEach((val, key) => {
|
|
14560
|
-
jsObj[key] = convertProtobufValueToJs(val);
|
|
14561
|
-
});
|
|
14562
|
-
return jsObj;
|
|
14563
|
-
}
|
|
14564
|
-
case ProtobufValue.KindCase.LIST_VALUE: {
|
|
14565
|
-
const list = value.getListValue();
|
|
14566
|
-
if (!list) return [];
|
|
14567
|
-
return list.getValuesList().map((item) => convertProtobufValueToJs(item));
|
|
14568
|
-
}
|
|
14569
|
-
case ProtobufValue.KindCase.KIND_NOT_SET:
|
|
14570
|
-
default:
|
|
14571
|
-
return void 0;
|
|
14572
|
-
}
|
|
14573
|
-
}
|
|
15051
|
+
var avs_pb21 = __toESM(require_avs_pb());
|
|
15052
|
+
import { TriggerTypeConverter } from "@avaprotocol/types";
|
|
14574
15053
|
|
|
14575
15054
|
// src/models/step.ts
|
|
15055
|
+
var avs_pb20 = __toESM(require_avs_pb());
|
|
14576
15056
|
var Step = class _Step {
|
|
14577
15057
|
// Changed to any
|
|
14578
15058
|
constructor(props) {
|
|
@@ -14589,37 +15069,37 @@ var Step = class _Step {
|
|
|
14589
15069
|
const outputDataType = step.getOutputDataCase();
|
|
14590
15070
|
let nodeOutputMessage;
|
|
14591
15071
|
switch (outputDataType) {
|
|
14592
|
-
case
|
|
15072
|
+
case avs_pb20.Execution.Step.OutputDataCase.OUTPUT_DATA_NOT_SET:
|
|
14593
15073
|
return null;
|
|
14594
|
-
case
|
|
15074
|
+
case avs_pb20.Execution.Step.OutputDataCase.ETH_TRANSFER:
|
|
14595
15075
|
return step.getEthTransfer()?.toObject();
|
|
14596
15076
|
// Specific structure, not google.protobuf.Value
|
|
14597
|
-
case
|
|
15077
|
+
case avs_pb20.Execution.Step.OutputDataCase.GRAPHQL:
|
|
14598
15078
|
nodeOutputMessage = step.getGraphql();
|
|
14599
15079
|
return nodeOutputMessage && nodeOutputMessage.hasData() ? nodeOutputMessage.getData() : void 0;
|
|
14600
|
-
case
|
|
15080
|
+
case avs_pb20.Execution.Step.OutputDataCase.CONTRACT_READ:
|
|
14601
15081
|
nodeOutputMessage = step.getContractRead();
|
|
14602
15082
|
if (nodeOutputMessage) {
|
|
14603
15083
|
return nodeOutputMessage.getDataList().map((val) => convertProtobufValueToJs(val));
|
|
14604
15084
|
}
|
|
14605
15085
|
return [];
|
|
14606
15086
|
// Default to empty array if no data
|
|
14607
|
-
case
|
|
15087
|
+
case avs_pb20.Execution.Step.OutputDataCase.CONTRACT_WRITE:
|
|
14608
15088
|
return step.getContractWrite()?.toObject();
|
|
14609
15089
|
// Specific structure
|
|
14610
|
-
case
|
|
15090
|
+
case avs_pb20.Execution.Step.OutputDataCase.CUSTOM_CODE:
|
|
14611
15091
|
nodeOutputMessage = step.getCustomCode();
|
|
14612
15092
|
return nodeOutputMessage && nodeOutputMessage.hasData() ? convertProtobufValueToJs(nodeOutputMessage.getData()) : void 0;
|
|
14613
|
-
case
|
|
15093
|
+
case avs_pb20.Execution.Step.OutputDataCase.REST_API:
|
|
14614
15094
|
nodeOutputMessage = step.getRestApi();
|
|
14615
15095
|
return nodeOutputMessage && nodeOutputMessage.hasData() ? nodeOutputMessage.getData() : void 0;
|
|
14616
|
-
case
|
|
15096
|
+
case avs_pb20.Execution.Step.OutputDataCase.BRANCH:
|
|
14617
15097
|
return step.getBranch()?.toObject();
|
|
14618
15098
|
// Specific structure
|
|
14619
|
-
case
|
|
15099
|
+
case avs_pb20.Execution.Step.OutputDataCase.FILTER:
|
|
14620
15100
|
nodeOutputMessage = step.getFilter();
|
|
14621
15101
|
return nodeOutputMessage && nodeOutputMessage.hasData() ? nodeOutputMessage.getData() : void 0;
|
|
14622
|
-
case
|
|
15102
|
+
case avs_pb20.Execution.Step.OutputDataCase.LOOP:
|
|
14623
15103
|
return step.getLoop()?.getData();
|
|
14624
15104
|
default:
|
|
14625
15105
|
console.warn(
|
|
@@ -14654,26 +15134,32 @@ var Execution3 = class _Execution {
|
|
|
14654
15134
|
this.error = props.error;
|
|
14655
15135
|
this.stepsList = props.stepsList;
|
|
14656
15136
|
this.triggerName = props.triggerName;
|
|
14657
|
-
this.
|
|
15137
|
+
this.triggerType = props.triggerType;
|
|
14658
15138
|
this.triggerOutput = props.triggerOutput;
|
|
14659
15139
|
}
|
|
14660
15140
|
static fromResponse(execution) {
|
|
14661
15141
|
const triggerOutputDataType = execution.getOutputDataCase();
|
|
14662
15142
|
let triggerOutputData;
|
|
14663
15143
|
switch (triggerOutputDataType) {
|
|
14664
|
-
case
|
|
15144
|
+
case avs_pb21.Execution.OutputDataCase.BLOCK_TRIGGER:
|
|
14665
15145
|
const blockOutput = execution.getBlockTrigger()?.toObject();
|
|
14666
15146
|
triggerOutputData = blockOutput ? { blockNumber: blockOutput.blockNumber } : void 0;
|
|
14667
15147
|
break;
|
|
14668
|
-
case
|
|
15148
|
+
case avs_pb21.Execution.OutputDataCase.FIXED_TIME_TRIGGER:
|
|
14669
15149
|
const fixedTimeOutput = execution.getFixedTimeTrigger()?.toObject();
|
|
14670
|
-
triggerOutputData = fixedTimeOutput ? {
|
|
15150
|
+
triggerOutputData = fixedTimeOutput ? {
|
|
15151
|
+
timestamp: fixedTimeOutput.timestamp,
|
|
15152
|
+
timestampIso: fixedTimeOutput.timestampIso
|
|
15153
|
+
} : void 0;
|
|
14671
15154
|
break;
|
|
14672
|
-
case
|
|
15155
|
+
case avs_pb21.Execution.OutputDataCase.CRON_TRIGGER:
|
|
14673
15156
|
const cronOutput = execution.getCronTrigger()?.toObject();
|
|
14674
|
-
triggerOutputData = cronOutput ? {
|
|
15157
|
+
triggerOutputData = cronOutput ? {
|
|
15158
|
+
timestamp: cronOutput.timestamp,
|
|
15159
|
+
timestampIso: cronOutput.timestampIso
|
|
15160
|
+
} : void 0;
|
|
14675
15161
|
break;
|
|
14676
|
-
case
|
|
15162
|
+
case avs_pb21.Execution.OutputDataCase.EVENT_TRIGGER:
|
|
14677
15163
|
const eventTrigger = execution.getEventTrigger();
|
|
14678
15164
|
if (eventTrigger) {
|
|
14679
15165
|
if (eventTrigger.hasEvmLog()) {
|
|
@@ -14683,7 +15169,11 @@ var Execution3 = class _Execution {
|
|
|
14683
15169
|
}
|
|
14684
15170
|
}
|
|
14685
15171
|
break;
|
|
14686
|
-
case
|
|
15172
|
+
case avs_pb21.Execution.OutputDataCase.MANUAL_TRIGGER:
|
|
15173
|
+
const manualOutput = execution.getManualTrigger()?.toObject();
|
|
15174
|
+
triggerOutputData = manualOutput || void 0;
|
|
15175
|
+
break;
|
|
15176
|
+
case avs_pb21.Execution.OutputDataCase.OUTPUT_DATA_NOT_SET:
|
|
14687
15177
|
triggerOutputData = void 0;
|
|
14688
15178
|
break;
|
|
14689
15179
|
}
|
|
@@ -14694,7 +15184,8 @@ var Execution3 = class _Execution {
|
|
|
14694
15184
|
success: execution.getSuccess(),
|
|
14695
15185
|
error: execution.getError(),
|
|
14696
15186
|
triggerName: execution.getTriggerName(),
|
|
14697
|
-
|
|
15187
|
+
triggerType: TriggerTypeConverter.fromProtobuf(execution.getTriggerType()),
|
|
15188
|
+
// Convert protobuf enum to SDK enum
|
|
14698
15189
|
triggerOutput: triggerOutputData,
|
|
14699
15190
|
stepsList: execution.getStepsList().map((step) => step_default.fromResponse(step))
|
|
14700
15191
|
});
|
|
@@ -14704,7 +15195,7 @@ var Execution3 = class _Execution {
|
|
|
14704
15195
|
var execution_default = Execution3;
|
|
14705
15196
|
|
|
14706
15197
|
// src/models/secret.ts
|
|
14707
|
-
var
|
|
15198
|
+
var avs_pb22 = __toESM(require_avs_pb());
|
|
14708
15199
|
var Secret = class {
|
|
14709
15200
|
constructor(props) {
|
|
14710
15201
|
this.name = props.name;
|
|
@@ -14717,7 +15208,7 @@ var Secret = class {
|
|
|
14717
15208
|
this.description = props.description;
|
|
14718
15209
|
}
|
|
14719
15210
|
toRequest() {
|
|
14720
|
-
const request = new
|
|
15211
|
+
const request = new avs_pb22.CreateOrUpdateSecretReq();
|
|
14721
15212
|
request.setName(this.name);
|
|
14722
15213
|
if (this.secret) {
|
|
14723
15214
|
request.setSecret(this.secret);
|
|
@@ -14735,9 +15226,10 @@ var secret_default = Secret;
|
|
|
14735
15226
|
|
|
14736
15227
|
// src/index.ts
|
|
14737
15228
|
import {
|
|
14738
|
-
TriggerType as
|
|
15229
|
+
TriggerType as TriggerType8,
|
|
14739
15230
|
NodeTypeGoConverter as NodeTypeGoConverter2,
|
|
14740
|
-
TriggerTypeGoConverter
|
|
15231
|
+
TriggerTypeGoConverter,
|
|
15232
|
+
TriggerTypeConverter as TriggerTypeConverter2
|
|
14741
15233
|
} from "@avaprotocol/types";
|
|
14742
15234
|
import { AUTH_KEY_HEADER, DEFAULT_LIMIT } from "@avaprotocol/types";
|
|
14743
15235
|
var BaseClient = class {
|
|
@@ -14772,7 +15264,7 @@ var BaseClient = class {
|
|
|
14772
15264
|
* @returns {Promise<GetSignatureFormatResponse>} - The response containing the signature format
|
|
14773
15265
|
*/
|
|
14774
15266
|
async getSignatureFormat(wallet) {
|
|
14775
|
-
const request = new
|
|
15267
|
+
const request = new avs_pb23.GetSignatureFormatReq();
|
|
14776
15268
|
request.setWallet(wallet);
|
|
14777
15269
|
const result = await this.sendGrpcRequest("getSignatureFormat", request);
|
|
14778
15270
|
return { message: result.getMessage() };
|
|
@@ -14787,7 +15279,7 @@ var BaseClient = class {
|
|
|
14787
15279
|
message,
|
|
14788
15280
|
apiKey
|
|
14789
15281
|
}) {
|
|
14790
|
-
const request = new
|
|
15282
|
+
const request = new avs_pb23.GetKeyReq();
|
|
14791
15283
|
request.setMessage(message);
|
|
14792
15284
|
request.setSignature(apiKey);
|
|
14793
15285
|
const result = await this.sendGrpcRequest("getKey", request);
|
|
@@ -14803,7 +15295,7 @@ var BaseClient = class {
|
|
|
14803
15295
|
message,
|
|
14804
15296
|
signature
|
|
14805
15297
|
}) {
|
|
14806
|
-
const request = new
|
|
15298
|
+
const request = new avs_pb23.GetKeyReq();
|
|
14807
15299
|
request.setMessage(message);
|
|
14808
15300
|
request.setSignature(signature);
|
|
14809
15301
|
const result = await this.sendGrpcRequest(
|
|
@@ -14842,112 +15334,32 @@ var BaseClient = class {
|
|
|
14842
15334
|
return this.factoryAddress;
|
|
14843
15335
|
}
|
|
14844
15336
|
/**
|
|
14845
|
-
* Send a gRPC request with
|
|
14846
|
-
* @param method - The method name
|
|
14847
|
-
* @param request - The request
|
|
14848
|
-
* @param options -
|
|
14849
|
-
* @returns {Promise<TResponse>} - The response from the
|
|
15337
|
+
* Send a gRPC request with authentication and error handling
|
|
15338
|
+
* @param method - The method name to call
|
|
15339
|
+
* @param request - The request object
|
|
15340
|
+
* @param options - Request options
|
|
15341
|
+
* @returns {Promise<TResponse>} - The response from the server
|
|
14850
15342
|
*/
|
|
14851
15343
|
sendGrpcRequest(method, request, options) {
|
|
14852
|
-
const metadata = _5.cloneDeep(this.metadata);
|
|
14853
|
-
if (options?.authKey) {
|
|
14854
|
-
metadata.set(AUTH_KEY_HEADER, options.authKey);
|
|
14855
|
-
} else if (this.authKey) {
|
|
14856
|
-
metadata.set(AUTH_KEY_HEADER, this.authKey);
|
|
14857
|
-
}
|
|
14858
15344
|
return new Promise((resolve, reject) => {
|
|
14859
|
-
|
|
15345
|
+
const metadata = new Metadata();
|
|
15346
|
+
const authKey = options?.authKey || this.authKey;
|
|
15347
|
+
if (authKey) {
|
|
15348
|
+
metadata.set(AUTH_KEY_HEADER, authKey);
|
|
15349
|
+
}
|
|
15350
|
+
this.rpcClient[method](
|
|
14860
15351
|
request,
|
|
14861
15352
|
metadata,
|
|
14862
15353
|
(error, response) => {
|
|
14863
|
-
if (error)
|
|
14864
|
-
|
|
15354
|
+
if (error) {
|
|
15355
|
+
reject(error);
|
|
15356
|
+
} else {
|
|
15357
|
+
resolve(response);
|
|
15358
|
+
}
|
|
14865
15359
|
}
|
|
14866
15360
|
);
|
|
14867
15361
|
});
|
|
14868
15362
|
}
|
|
14869
|
-
/**
|
|
14870
|
-
* Convert a protobuf Value to a JavaScript value
|
|
14871
|
-
* @param value - The protobuf Value object
|
|
14872
|
-
* @returns {any} - The converted JavaScript value
|
|
14873
|
-
*/
|
|
14874
|
-
convertProtobufValueToJS(value) {
|
|
14875
|
-
if (!value) return null;
|
|
14876
|
-
if (value.hasNullValue && value.hasNullValue()) {
|
|
14877
|
-
return null;
|
|
14878
|
-
}
|
|
14879
|
-
if (value.hasNumberValue && value.hasNumberValue()) {
|
|
14880
|
-
return value.getNumberValue();
|
|
14881
|
-
}
|
|
14882
|
-
if (value.hasStringValue && value.hasStringValue()) {
|
|
14883
|
-
return value.getStringValue();
|
|
14884
|
-
}
|
|
14885
|
-
if (value.hasBoolValue && value.hasBoolValue()) {
|
|
14886
|
-
return value.getBoolValue();
|
|
14887
|
-
}
|
|
14888
|
-
if (value.hasStructValue && value.hasStructValue()) {
|
|
14889
|
-
const struct = value.getStructValue();
|
|
14890
|
-
const result = {};
|
|
14891
|
-
if (struct && struct.getFieldsMap) {
|
|
14892
|
-
const fieldsMap = struct.getFieldsMap();
|
|
14893
|
-
fieldsMap.forEach((fieldValue, key) => {
|
|
14894
|
-
result[key] = this.convertProtobufValueToJS(fieldValue);
|
|
14895
|
-
});
|
|
14896
|
-
}
|
|
14897
|
-
return result;
|
|
14898
|
-
}
|
|
14899
|
-
if (value.hasListValue && value.hasListValue()) {
|
|
14900
|
-
const list = value.getListValue();
|
|
14901
|
-
if (list && list.getValuesList) {
|
|
14902
|
-
return list.getValuesList().map((item) => this.convertProtobufValueToJS(item));
|
|
14903
|
-
}
|
|
14904
|
-
return [];
|
|
14905
|
-
}
|
|
14906
|
-
if (typeof value.getNumberValue === "function") {
|
|
14907
|
-
return value.getNumberValue();
|
|
14908
|
-
}
|
|
14909
|
-
if (typeof value.getStringValue === "function") {
|
|
14910
|
-
return value.getStringValue();
|
|
14911
|
-
}
|
|
14912
|
-
if (typeof value.getBoolValue === "function") {
|
|
14913
|
-
return value.getBoolValue();
|
|
14914
|
-
}
|
|
14915
|
-
return value;
|
|
14916
|
-
}
|
|
14917
|
-
/**
|
|
14918
|
-
* Convert a JavaScript value to a protobuf Value
|
|
14919
|
-
* @param value - The JavaScript value to convert
|
|
14920
|
-
* @returns {any} - The protobuf Value object
|
|
14921
|
-
*/
|
|
14922
|
-
convertJSValueToProtobuf(value) {
|
|
14923
|
-
const protobufValue = new (__require("google-protobuf/google/protobuf/struct_pb")).Value();
|
|
14924
|
-
if (value === null || value === void 0) {
|
|
14925
|
-
protobufValue.setNullValue(0);
|
|
14926
|
-
} else if (typeof value === "number") {
|
|
14927
|
-
protobufValue.setNumberValue(value);
|
|
14928
|
-
} else if (typeof value === "string") {
|
|
14929
|
-
protobufValue.setStringValue(value);
|
|
14930
|
-
} else if (typeof value === "boolean") {
|
|
14931
|
-
protobufValue.setBoolValue(value);
|
|
14932
|
-
} else if (Array.isArray(value)) {
|
|
14933
|
-
const listValue = new (__require("google-protobuf/google/protobuf/struct_pb")).ListValue();
|
|
14934
|
-
const convertedValues = value.map(
|
|
14935
|
-
(item) => this.convertJSValueToProtobuf(item)
|
|
14936
|
-
);
|
|
14937
|
-
listValue.setValuesList(convertedValues);
|
|
14938
|
-
protobufValue.setListValue(listValue);
|
|
14939
|
-
} else if (typeof value === "object") {
|
|
14940
|
-
const structValue = new (__require("google-protobuf/google/protobuf/struct_pb")).Struct();
|
|
14941
|
-
const fieldsMap = structValue.getFieldsMap();
|
|
14942
|
-
Object.entries(value).forEach(([key, val]) => {
|
|
14943
|
-
fieldsMap.set(key, this.convertJSValueToProtobuf(val));
|
|
14944
|
-
});
|
|
14945
|
-
protobufValue.setStructValue(structValue);
|
|
14946
|
-
} else {
|
|
14947
|
-
protobufValue.setStringValue(String(value));
|
|
14948
|
-
}
|
|
14949
|
-
return protobufValue;
|
|
14950
|
-
}
|
|
14951
15363
|
};
|
|
14952
15364
|
var Client = class extends BaseClient {
|
|
14953
15365
|
constructor(config) {
|
|
@@ -14959,7 +15371,7 @@ var Client = class extends BaseClient {
|
|
|
14959
15371
|
* @returns {Promise<SmartWallet[]>} - The list of SmartWallet objects
|
|
14960
15372
|
*/
|
|
14961
15373
|
async getWallets(options) {
|
|
14962
|
-
const request = new
|
|
15374
|
+
const request = new avs_pb23.ListWalletReq();
|
|
14963
15375
|
const result = await this.sendGrpcRequest("listWallets", request, options);
|
|
14964
15376
|
return result.getItemsList().map((item) => item.toObject());
|
|
14965
15377
|
}
|
|
@@ -14971,7 +15383,7 @@ var Client = class extends BaseClient {
|
|
|
14971
15383
|
* @returns {Promise<SmartWallet>} - The added SmartWallet object
|
|
14972
15384
|
*/
|
|
14973
15385
|
async getWallet({ salt, factoryAddress }, options) {
|
|
14974
|
-
const request = new
|
|
15386
|
+
const request = new avs_pb23.GetWalletReq();
|
|
14975
15387
|
request.setSalt(salt);
|
|
14976
15388
|
if (factoryAddress) {
|
|
14977
15389
|
request.setFactoryAddress(factoryAddress);
|
|
@@ -15000,7 +15412,7 @@ var Client = class extends BaseClient {
|
|
|
15000
15412
|
* @returns {Promise<SmartWallet>} - The updated SmartWallet object
|
|
15001
15413
|
*/
|
|
15002
15414
|
async setWallet({ salt, factoryAddress }, { isHidden }, requestOptions) {
|
|
15003
|
-
const request = new
|
|
15415
|
+
const request = new avs_pb23.SetWalletReq();
|
|
15004
15416
|
request.setSalt(salt);
|
|
15005
15417
|
if (factoryAddress) {
|
|
15006
15418
|
request.setFactoryAddress(factoryAddress);
|
|
@@ -15048,7 +15460,7 @@ var Client = class extends BaseClient {
|
|
|
15048
15460
|
* @returns {Promise<{ items: Workflow[]; pageInfo: PageInfo }>} - The list of Workflow objects with nested pagination metadata
|
|
15049
15461
|
*/
|
|
15050
15462
|
async getWorkflows(addresses, options) {
|
|
15051
|
-
const request = new
|
|
15463
|
+
const request = new avs_pb23.ListTasksReq();
|
|
15052
15464
|
for (const a of addresses) {
|
|
15053
15465
|
request.addSmartWalletAddress(a);
|
|
15054
15466
|
}
|
|
@@ -15087,7 +15499,7 @@ var Client = class extends BaseClient {
|
|
|
15087
15499
|
* @returns {Promise<number>} - The count of workflows
|
|
15088
15500
|
*/
|
|
15089
15501
|
async getWorkflowCount(addresses, options) {
|
|
15090
|
-
const request = new
|
|
15502
|
+
const request = new avs_pb23.GetWorkflowCountReq();
|
|
15091
15503
|
request.setAddressesList(addresses);
|
|
15092
15504
|
const result = await this.sendGrpcRequest("getWorkflowCount", request, options);
|
|
15093
15505
|
return result.getTotal();
|
|
@@ -15103,7 +15515,7 @@ var Client = class extends BaseClient {
|
|
|
15103
15515
|
* @returns {Promise<{ items: Execution[]; pageInfo: PageInfo }>} - The list of Execution objects with nested pagination metadata
|
|
15104
15516
|
*/
|
|
15105
15517
|
async getExecutions(workflows, options) {
|
|
15106
|
-
const request = new
|
|
15518
|
+
const request = new avs_pb23.ListExecutionsReq();
|
|
15107
15519
|
for (const w of workflows) {
|
|
15108
15520
|
request.addTaskIds(w);
|
|
15109
15521
|
}
|
|
@@ -15137,7 +15549,7 @@ var Client = class extends BaseClient {
|
|
|
15137
15549
|
* @returns {Promise<Execution>} - The Execution object
|
|
15138
15550
|
*/
|
|
15139
15551
|
async getExecution(workflowId, executionId, options) {
|
|
15140
|
-
const request = new
|
|
15552
|
+
const request = new avs_pb23.ExecutionReq();
|
|
15141
15553
|
request.setTaskId(workflowId);
|
|
15142
15554
|
request.setExecutionId(executionId);
|
|
15143
15555
|
const result = await this.sendGrpcRequest("getExecution", request, options);
|
|
@@ -15150,7 +15562,7 @@ var Client = class extends BaseClient {
|
|
|
15150
15562
|
* @returns {Promise<number>} - The count of executions
|
|
15151
15563
|
*/
|
|
15152
15564
|
async getExecutionCount(workflows, options) {
|
|
15153
|
-
const request = new
|
|
15565
|
+
const request = new avs_pb23.GetExecutionCountReq();
|
|
15154
15566
|
request.setWorkflowIdsList(workflows);
|
|
15155
15567
|
const result = await this.sendGrpcRequest("getExecutionCount", request, options);
|
|
15156
15568
|
return result.getTotal();
|
|
@@ -15163,7 +15575,7 @@ var Client = class extends BaseClient {
|
|
|
15163
15575
|
* @returns {Promise<ExecutionStatus>} - The status of the execution
|
|
15164
15576
|
*/
|
|
15165
15577
|
async getExecutionStatus(workflowId, executionId, options) {
|
|
15166
|
-
const request = new
|
|
15578
|
+
const request = new avs_pb23.ExecutionReq();
|
|
15167
15579
|
request.setTaskId(workflowId);
|
|
15168
15580
|
request.setExecutionId(executionId);
|
|
15169
15581
|
const result = await this.sendGrpcRequest("getExecutionStatus", request, options);
|
|
@@ -15176,7 +15588,7 @@ var Client = class extends BaseClient {
|
|
|
15176
15588
|
* @returns {Promise<Workflow>} - The Workflow object
|
|
15177
15589
|
*/
|
|
15178
15590
|
async getWorkflow(id, options) {
|
|
15179
|
-
const request = new
|
|
15591
|
+
const request = new avs_pb23.IdReq();
|
|
15180
15592
|
request.setId(id);
|
|
15181
15593
|
const result = await this.sendGrpcRequest(
|
|
15182
15594
|
"getTask",
|
|
@@ -15186,23 +15598,94 @@ var Client = class extends BaseClient {
|
|
|
15186
15598
|
return workflow_default.fromResponse(result);
|
|
15187
15599
|
}
|
|
15188
15600
|
/**
|
|
15189
|
-
* Trigger a workflow
|
|
15190
|
-
* @param {
|
|
15601
|
+
* Trigger a workflow with the new flattened trigger data structure
|
|
15602
|
+
* @param {Object} params - The trigger parameters
|
|
15191
15603
|
* @param {string} params.id - The workflow id
|
|
15192
|
-
* @param {
|
|
15193
|
-
* @param {boolean}
|
|
15194
|
-
* @param {RequestOptions}
|
|
15195
|
-
* @returns {Promise<avs_pb.
|
|
15604
|
+
* @param {TriggerDataProps} params.triggerData - The trigger data
|
|
15605
|
+
* @param {boolean} params.isBlocking - Whether to block until execution completes
|
|
15606
|
+
* @param {RequestOptions} options - Request options
|
|
15607
|
+
* @returns {Promise<avs_pb.TriggerTaskResp.AsObject>} - The response from triggering the workflow
|
|
15196
15608
|
*/
|
|
15197
15609
|
async triggerWorkflow({
|
|
15198
15610
|
id,
|
|
15199
|
-
|
|
15611
|
+
triggerData,
|
|
15200
15612
|
isBlocking = false
|
|
15201
15613
|
}, options) {
|
|
15202
|
-
const request = new
|
|
15614
|
+
const request = new avs_pb23.TriggerTaskReq();
|
|
15203
15615
|
request.setTaskId(id);
|
|
15204
|
-
request.
|
|
15616
|
+
request.setTriggerType(TriggerTypeConverter2.toProtobuf(triggerData.type));
|
|
15205
15617
|
request.setIsBlocking(isBlocking);
|
|
15618
|
+
switch (triggerData.type) {
|
|
15619
|
+
case TriggerType8.FixedTime: {
|
|
15620
|
+
const fixedTimeOutput = new avs_pb23.FixedTimeTrigger.Output();
|
|
15621
|
+
fixedTimeOutput.setTimestamp(triggerData.timestamp);
|
|
15622
|
+
fixedTimeOutput.setTimestampIso(triggerData.timestampIso);
|
|
15623
|
+
request.setFixedTimeTrigger(fixedTimeOutput);
|
|
15624
|
+
break;
|
|
15625
|
+
}
|
|
15626
|
+
case TriggerType8.Cron: {
|
|
15627
|
+
const cronOutput = new avs_pb23.CronTrigger.Output();
|
|
15628
|
+
cronOutput.setTimestamp(triggerData.timestamp);
|
|
15629
|
+
cronOutput.setTimestampIso(triggerData.timestampIso);
|
|
15630
|
+
request.setCronTrigger(cronOutput);
|
|
15631
|
+
break;
|
|
15632
|
+
}
|
|
15633
|
+
case TriggerType8.Block: {
|
|
15634
|
+
const blockData = triggerData;
|
|
15635
|
+
const blockOutput = new avs_pb23.BlockTrigger.Output();
|
|
15636
|
+
blockOutput.setBlockNumber(blockData.blockNumber);
|
|
15637
|
+
if (blockData.blockHash) blockOutput.setBlockHash(blockData.blockHash);
|
|
15638
|
+
if (blockData.timestamp) blockOutput.setTimestamp(blockData.timestamp);
|
|
15639
|
+
if (blockData.parentHash) blockOutput.setParentHash(blockData.parentHash);
|
|
15640
|
+
if (blockData.difficulty) blockOutput.setDifficulty(blockData.difficulty);
|
|
15641
|
+
if (blockData.gasLimit) blockOutput.setGasLimit(blockData.gasLimit);
|
|
15642
|
+
if (blockData.gasUsed) blockOutput.setGasUsed(blockData.gasUsed);
|
|
15643
|
+
request.setBlockTrigger(blockOutput);
|
|
15644
|
+
break;
|
|
15645
|
+
}
|
|
15646
|
+
case TriggerType8.Event: {
|
|
15647
|
+
const eventData = triggerData;
|
|
15648
|
+
const eventOutput = new avs_pb23.EventTrigger.Output();
|
|
15649
|
+
if (eventData.evmLog) {
|
|
15650
|
+
const evmLog = new avs_pb23.Evm.Log();
|
|
15651
|
+
evmLog.setAddress(eventData.evmLog.address);
|
|
15652
|
+
evmLog.setBlockNumber(eventData.evmLog.blockNumber);
|
|
15653
|
+
evmLog.setTransactionHash(eventData.evmLog.transactionHash);
|
|
15654
|
+
evmLog.setIndex(eventData.evmLog.index);
|
|
15655
|
+
eventOutput.setEvmLog(evmLog);
|
|
15656
|
+
}
|
|
15657
|
+
if (eventData.transferLog) {
|
|
15658
|
+
const transferLog = new avs_pb23.EventTrigger.TransferLogOutput();
|
|
15659
|
+
transferLog.setTokenName(eventData.transferLog.tokenName);
|
|
15660
|
+
transferLog.setTokenSymbol(eventData.transferLog.tokenSymbol);
|
|
15661
|
+
transferLog.setTokenDecimals(eventData.transferLog.tokenDecimals);
|
|
15662
|
+
transferLog.setTransactionHash(eventData.transferLog.transactionHash);
|
|
15663
|
+
transferLog.setAddress(eventData.transferLog.address);
|
|
15664
|
+
transferLog.setBlockNumber(eventData.transferLog.blockNumber);
|
|
15665
|
+
transferLog.setBlockTimestamp(eventData.transferLog.blockTimestamp);
|
|
15666
|
+
transferLog.setFromAddress(eventData.transferLog.fromAddress);
|
|
15667
|
+
transferLog.setToAddress(eventData.transferLog.toAddress);
|
|
15668
|
+
transferLog.setValue(eventData.transferLog.value);
|
|
15669
|
+
transferLog.setValueFormatted(eventData.transferLog.valueFormatted);
|
|
15670
|
+
transferLog.setTransactionIndex(eventData.transferLog.transactionIndex);
|
|
15671
|
+
transferLog.setLogIndex(eventData.transferLog.logIndex);
|
|
15672
|
+
eventOutput.setTransferLog(transferLog);
|
|
15673
|
+
}
|
|
15674
|
+
request.setEventTrigger(eventOutput);
|
|
15675
|
+
break;
|
|
15676
|
+
}
|
|
15677
|
+
case TriggerType8.Manual: {
|
|
15678
|
+
const manualData = triggerData;
|
|
15679
|
+
const manualOutput = new avs_pb23.ManualTrigger.Output();
|
|
15680
|
+
if (manualData.runAt) manualOutput.setRunAt(manualData.runAt);
|
|
15681
|
+
request.setManualTrigger(manualOutput);
|
|
15682
|
+
break;
|
|
15683
|
+
}
|
|
15684
|
+
case TriggerType8.Unspecified:
|
|
15685
|
+
break;
|
|
15686
|
+
default:
|
|
15687
|
+
throw new Error(`Unsupported trigger type: ${triggerData.type}`);
|
|
15688
|
+
}
|
|
15206
15689
|
const result = await this.sendGrpcRequest("triggerTask", request, options);
|
|
15207
15690
|
return result.toObject();
|
|
15208
15691
|
}
|
|
@@ -15213,7 +15696,7 @@ var Client = class extends BaseClient {
|
|
|
15213
15696
|
* @returns {Promise<boolean>} - Whether the workflow was successfully canceled
|
|
15214
15697
|
*/
|
|
15215
15698
|
async cancelWorkflow(id, options) {
|
|
15216
|
-
const request = new
|
|
15699
|
+
const request = new avs_pb23.IdReq();
|
|
15217
15700
|
request.setId(id);
|
|
15218
15701
|
const result = await this.sendGrpcRequest(
|
|
15219
15702
|
"cancelTask",
|
|
@@ -15229,7 +15712,7 @@ var Client = class extends BaseClient {
|
|
|
15229
15712
|
* @returns {Promise<boolean>} - Whether the workflow was successfully deleted
|
|
15230
15713
|
*/
|
|
15231
15714
|
async deleteWorkflow(id, options) {
|
|
15232
|
-
const request = new
|
|
15715
|
+
const request = new avs_pb23.IdReq();
|
|
15233
15716
|
request.setId(id);
|
|
15234
15717
|
const result = await this.sendGrpcRequest(
|
|
15235
15718
|
"deleteTask",
|
|
@@ -15249,7 +15732,7 @@ var Client = class extends BaseClient {
|
|
|
15249
15732
|
* @returns {Promise<boolean>} - True if the secret was created successfully
|
|
15250
15733
|
*/
|
|
15251
15734
|
async createSecret(name, value, options) {
|
|
15252
|
-
const request = new
|
|
15735
|
+
const request = new avs_pb23.CreateOrUpdateSecretReq();
|
|
15253
15736
|
request.setName(name);
|
|
15254
15737
|
request.setSecret(value);
|
|
15255
15738
|
if (options?.workflowId) {
|
|
@@ -15272,7 +15755,7 @@ var Client = class extends BaseClient {
|
|
|
15272
15755
|
* @returns {Promise<boolean>} - True if the secret was updated successfully
|
|
15273
15756
|
*/
|
|
15274
15757
|
async updateSecret(name, value, options) {
|
|
15275
|
-
const request = new
|
|
15758
|
+
const request = new avs_pb23.CreateOrUpdateSecretReq();
|
|
15276
15759
|
request.setName(name);
|
|
15277
15760
|
request.setSecret(value);
|
|
15278
15761
|
if (options?.workflowId) {
|
|
@@ -15299,7 +15782,7 @@ var Client = class extends BaseClient {
|
|
|
15299
15782
|
* @returns {Promise<{ items: SecretProps[]; pageInfo: PageInfo }>} - The list of Secret objects with nested pagination metadata
|
|
15300
15783
|
*/
|
|
15301
15784
|
async getSecrets(options) {
|
|
15302
|
-
const request = new
|
|
15785
|
+
const request = new avs_pb23.ListSecretsReq();
|
|
15303
15786
|
if (options?.workflowId) {
|
|
15304
15787
|
request.setWorkflowId(options.workflowId);
|
|
15305
15788
|
}
|
|
@@ -15354,7 +15837,7 @@ var Client = class extends BaseClient {
|
|
|
15354
15837
|
* @returns {Promise<boolean>} - True if the secret was deleted successfully
|
|
15355
15838
|
*/
|
|
15356
15839
|
async deleteSecret(name, options) {
|
|
15357
|
-
const request = new
|
|
15840
|
+
const request = new avs_pb23.DeleteSecretReq();
|
|
15358
15841
|
request.setName(name);
|
|
15359
15842
|
if (options?.workflowId) {
|
|
15360
15843
|
request.setWorkflowId(options.workflowId);
|
|
@@ -15375,80 +15858,40 @@ var Client = class extends BaseClient {
|
|
|
15375
15858
|
* @returns {Promise<RunNodeWithInputsResponse>} - The response from running the node
|
|
15376
15859
|
*/
|
|
15377
15860
|
async runNodeWithInputs({ nodeType, nodeConfig, inputVariables = {} }, options) {
|
|
15378
|
-
|
|
15379
|
-
|
|
15380
|
-
|
|
15381
|
-
|
|
15382
|
-
|
|
15383
|
-
|
|
15384
|
-
|
|
15385
|
-
|
|
15386
|
-
if (triggerTypes.includes(nodeType)) {
|
|
15387
|
-
return {
|
|
15388
|
-
success: false,
|
|
15389
|
-
error: `Trigger type "${nodeType}" should use the runTrigger() method instead of runNodeWithInputs()`,
|
|
15390
|
-
nodeId: ""
|
|
15391
|
-
};
|
|
15392
|
-
}
|
|
15393
|
-
const request = new avs_pb22.RunNodeWithInputsReq();
|
|
15394
|
-
const protobufNodeType = NodeTypeGoConverter2.fromGoString(nodeType);
|
|
15395
|
-
request.setNodeType(protobufNodeType);
|
|
15396
|
-
const nodeConfigMap = request.getNodeConfigMap();
|
|
15397
|
-
for (const [key, value] of Object.entries(nodeConfig)) {
|
|
15398
|
-
nodeConfigMap.set(key, this.convertJSValueToProtobuf(value));
|
|
15399
|
-
}
|
|
15400
|
-
if (inputVariables && Object.keys(inputVariables).length > 0) {
|
|
15401
|
-
const inputVarsMap = request.getInputVariablesMap();
|
|
15402
|
-
for (const [key, value] of Object.entries(inputVariables)) {
|
|
15403
|
-
inputVarsMap.set(key, this.convertJSValueToProtobuf(value));
|
|
15404
|
-
}
|
|
15405
|
-
}
|
|
15406
|
-
const result = await this.sendGrpcRequest("runNodeWithInputs", request, options);
|
|
15407
|
-
let data;
|
|
15408
|
-
const outputCase = result.getOutputDataCase();
|
|
15409
|
-
if (outputCase !== avs_pb22.RunNodeWithInputsResp.OutputDataCase.OUTPUT_DATA_NOT_SET) {
|
|
15410
|
-
switch (outputCase) {
|
|
15411
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.ETH_TRANSFER:
|
|
15412
|
-
data = result.getEthTransfer()?.toObject();
|
|
15413
|
-
break;
|
|
15414
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.GRAPHQL:
|
|
15415
|
-
data = result.getGraphql()?.toObject();
|
|
15416
|
-
break;
|
|
15417
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.CONTRACT_READ:
|
|
15418
|
-
data = result.getContractRead()?.toObject();
|
|
15419
|
-
break;
|
|
15420
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.CONTRACT_WRITE:
|
|
15421
|
-
data = result.getContractWrite()?.toObject();
|
|
15422
|
-
break;
|
|
15423
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.CUSTOM_CODE:
|
|
15424
|
-
data = result.getCustomCode()?.toObject();
|
|
15425
|
-
break;
|
|
15426
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.REST_API:
|
|
15427
|
-
data = result.getRestApi()?.toObject();
|
|
15428
|
-
break;
|
|
15429
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.BRANCH:
|
|
15430
|
-
data = result.getBranch()?.toObject();
|
|
15431
|
-
break;
|
|
15432
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.FILTER:
|
|
15433
|
-
data = result.getFilter()?.toObject();
|
|
15434
|
-
break;
|
|
15435
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.LOOP:
|
|
15436
|
-
data = result.getLoop()?.toObject();
|
|
15437
|
-
break;
|
|
15438
|
-
}
|
|
15439
|
-
}
|
|
15440
|
-
return {
|
|
15441
|
-
success: result.getSuccess(),
|
|
15442
|
-
data,
|
|
15443
|
-
error: result.getError(),
|
|
15444
|
-
nodeId: result.getNodeId()
|
|
15445
|
-
};
|
|
15446
|
-
} catch (error) {
|
|
15861
|
+
const triggerTypes = [
|
|
15862
|
+
TriggerType8.Block,
|
|
15863
|
+
TriggerType8.FixedTime,
|
|
15864
|
+
TriggerType8.Cron,
|
|
15865
|
+
TriggerType8.Event,
|
|
15866
|
+
TriggerType8.Manual
|
|
15867
|
+
];
|
|
15868
|
+
if (triggerTypes.includes(nodeType)) {
|
|
15447
15869
|
return {
|
|
15448
15870
|
success: false,
|
|
15449
|
-
error:
|
|
15871
|
+
error: `Trigger type "${nodeType}" should use the runTrigger() method instead of runNodeWithInputs()`,
|
|
15872
|
+
nodeId: ""
|
|
15450
15873
|
};
|
|
15451
15874
|
}
|
|
15875
|
+
const request = new avs_pb23.RunNodeWithInputsReq();
|
|
15876
|
+
const protobufNodeType = NodeTypeGoConverter2.fromGoString(nodeType);
|
|
15877
|
+
request.setNodeType(protobufNodeType);
|
|
15878
|
+
const nodeConfigMap = request.getNodeConfigMap();
|
|
15879
|
+
for (const [key, value] of Object.entries(nodeConfig)) {
|
|
15880
|
+
nodeConfigMap.set(key, convertJSValueToProtobuf(value));
|
|
15881
|
+
}
|
|
15882
|
+
if (inputVariables && Object.keys(inputVariables).length > 0) {
|
|
15883
|
+
const inputVarsMap = request.getInputVariablesMap();
|
|
15884
|
+
for (const [key, value] of Object.entries(inputVariables)) {
|
|
15885
|
+
inputVarsMap.set(key, convertJSValueToProtobuf(value));
|
|
15886
|
+
}
|
|
15887
|
+
}
|
|
15888
|
+
const result = await this.sendGrpcRequest("runNodeWithInputs", request, options);
|
|
15889
|
+
return {
|
|
15890
|
+
success: result.getSuccess(),
|
|
15891
|
+
data: factory_default2.fromOutputData(result),
|
|
15892
|
+
error: result.getError(),
|
|
15893
|
+
nodeId: result.getNodeId()
|
|
15894
|
+
};
|
|
15452
15895
|
}
|
|
15453
15896
|
/**
|
|
15454
15897
|
* Run a trigger for testing purposes
|
|
@@ -15459,45 +15902,20 @@ var Client = class extends BaseClient {
|
|
|
15459
15902
|
* @returns {Promise<RunTriggerResponse>} - The response from running the trigger
|
|
15460
15903
|
*/
|
|
15461
15904
|
async runTrigger({ triggerType, triggerConfig }, options) {
|
|
15462
|
-
|
|
15463
|
-
|
|
15464
|
-
|
|
15465
|
-
|
|
15466
|
-
|
|
15467
|
-
|
|
15468
|
-
|
|
15469
|
-
|
|
15470
|
-
|
|
15471
|
-
|
|
15472
|
-
|
|
15473
|
-
|
|
15474
|
-
|
|
15475
|
-
|
|
15476
|
-
data = result.getBlockTrigger()?.toObject();
|
|
15477
|
-
break;
|
|
15478
|
-
case avs_pb22.RunTriggerResp.OutputDataCase.FIXED_TIME_TRIGGER:
|
|
15479
|
-
data = result.getFixedTimeTrigger()?.toObject();
|
|
15480
|
-
break;
|
|
15481
|
-
case avs_pb22.RunTriggerResp.OutputDataCase.CRON_TRIGGER:
|
|
15482
|
-
data = result.getCronTrigger()?.toObject();
|
|
15483
|
-
break;
|
|
15484
|
-
case avs_pb22.RunTriggerResp.OutputDataCase.EVENT_TRIGGER:
|
|
15485
|
-
data = result.getEventTrigger()?.toObject();
|
|
15486
|
-
break;
|
|
15487
|
-
}
|
|
15488
|
-
}
|
|
15489
|
-
return {
|
|
15490
|
-
success: result.getSuccess(),
|
|
15491
|
-
data,
|
|
15492
|
-
error: result.getError(),
|
|
15493
|
-
triggerId: result.getTriggerId()
|
|
15494
|
-
};
|
|
15495
|
-
} catch (error) {
|
|
15496
|
-
return {
|
|
15497
|
-
success: false,
|
|
15498
|
-
error: error.message || "An error occurred"
|
|
15499
|
-
};
|
|
15500
|
-
}
|
|
15905
|
+
const request = new avs_pb23.RunTriggerReq();
|
|
15906
|
+
const protobufTriggerType = TriggerTypeGoConverter.fromGoString(triggerType);
|
|
15907
|
+
request.setTriggerType(protobufTriggerType);
|
|
15908
|
+
const triggerConfigMap = request.getTriggerConfigMap();
|
|
15909
|
+
for (const [key, value] of Object.entries(triggerConfig)) {
|
|
15910
|
+
triggerConfigMap.set(key, convertJSValueToProtobuf(value));
|
|
15911
|
+
}
|
|
15912
|
+
const result = await this.sendGrpcRequest("runTrigger", request, options);
|
|
15913
|
+
return {
|
|
15914
|
+
success: result.getSuccess(),
|
|
15915
|
+
data: factory_default.fromOutputData(result),
|
|
15916
|
+
error: result.getError(),
|
|
15917
|
+
triggerId: result.getTriggerId()
|
|
15918
|
+
};
|
|
15501
15919
|
}
|
|
15502
15920
|
};
|
|
15503
15921
|
export {
|
|
@@ -15525,6 +15943,5 @@ export {
|
|
|
15525
15943
|
step_default as Step,
|
|
15526
15944
|
interface_default as Trigger,
|
|
15527
15945
|
factory_default as TriggerFactory,
|
|
15528
|
-
reason_default as TriggerReason,
|
|
15529
15946
|
workflow_default as Workflow
|
|
15530
15947
|
};
|