@avaprotocol/sdk-js 1.6.5 → 1.6.7
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 +19 -28
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1201 -741
- package/dist/index.mjs +1213 -743
- 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 +7 -1
- package/dist/models/trigger/cron.d.ts.map +1 -1
- package/dist/models/trigger/cron.js +10 -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 +7 -1
- package/dist/models/trigger/fixedTime.d.ts.map +1 -1
- package/dist/models/trigger/fixedTime.js +10 -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.js
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);
|
|
@@ -147,6 +150,9 @@ var require_avs_pb = __commonJS({
|
|
|
147
150
|
goog.exportSymbol("proto.aggregator.RunNodeWithInputsReq", null, global);
|
|
148
151
|
goog.exportSymbol("proto.aggregator.RunNodeWithInputsResp", null, global);
|
|
149
152
|
goog.exportSymbol("proto.aggregator.RunNodeWithInputsResp.OutputDataCase", null, global);
|
|
153
|
+
goog.exportSymbol("proto.aggregator.RunTriggerReq", null, global);
|
|
154
|
+
goog.exportSymbol("proto.aggregator.RunTriggerResp", null, global);
|
|
155
|
+
goog.exportSymbol("proto.aggregator.RunTriggerResp.OutputDataCase", null, global);
|
|
150
156
|
goog.exportSymbol("proto.aggregator.Secret", null, global);
|
|
151
157
|
goog.exportSymbol("proto.aggregator.SetWalletReq", null, global);
|
|
152
158
|
goog.exportSymbol("proto.aggregator.SmartWallet", null, global);
|
|
@@ -266,6 +272,27 @@ var require_avs_pb = __commonJS({
|
|
|
266
272
|
if (goog.DEBUG && !COMPILED) {
|
|
267
273
|
proto.aggregator.EventTrigger.TransferLogOutput.displayName = "proto.aggregator.EventTrigger.TransferLogOutput";
|
|
268
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
|
+
}
|
|
269
296
|
proto.aggregator.TaskTrigger = function(opt_data) {
|
|
270
297
|
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aggregator.TaskTrigger.oneofGroups_);
|
|
271
298
|
};
|
|
@@ -763,6 +790,20 @@ var require_avs_pb = __commonJS({
|
|
|
763
790
|
if (goog.DEBUG && !COMPILED) {
|
|
764
791
|
proto.aggregator.RunNodeWithInputsResp.displayName = "proto.aggregator.RunNodeWithInputsResp";
|
|
765
792
|
}
|
|
793
|
+
proto.aggregator.RunTriggerReq = function(opt_data) {
|
|
794
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
795
|
+
};
|
|
796
|
+
goog.inherits(proto.aggregator.RunTriggerReq, jspb.Message);
|
|
797
|
+
if (goog.DEBUG && !COMPILED) {
|
|
798
|
+
proto.aggregator.RunTriggerReq.displayName = "proto.aggregator.RunTriggerReq";
|
|
799
|
+
}
|
|
800
|
+
proto.aggregator.RunTriggerResp = function(opt_data) {
|
|
801
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aggregator.RunTriggerResp.oneofGroups_);
|
|
802
|
+
};
|
|
803
|
+
goog.inherits(proto.aggregator.RunTriggerResp, jspb.Message);
|
|
804
|
+
if (goog.DEBUG && !COMPILED) {
|
|
805
|
+
proto.aggregator.RunTriggerResp.displayName = "proto.aggregator.RunTriggerResp";
|
|
806
|
+
}
|
|
766
807
|
proto.aggregator.Evm = function(opt_data) {
|
|
767
808
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
768
809
|
};
|
|
@@ -2342,6 +2383,178 @@ var require_avs_pb = __commonJS({
|
|
|
2342
2383
|
proto.aggregator.EventTrigger.prototype.hasConfig = function() {
|
|
2343
2384
|
return jspb.Message.getField(this, 1) != null;
|
|
2344
2385
|
};
|
|
2386
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
2387
|
+
proto.aggregator.ManualTrigger.prototype.toObject = function(opt_includeInstance) {
|
|
2388
|
+
return proto.aggregator.ManualTrigger.toObject(opt_includeInstance, this);
|
|
2389
|
+
};
|
|
2390
|
+
proto.aggregator.ManualTrigger.toObject = function(includeInstance, msg) {
|
|
2391
|
+
var f, obj = {
|
|
2392
|
+
config: (f = msg.getConfig()) && proto.aggregator.ManualTrigger.Config.toObject(includeInstance, f)
|
|
2393
|
+
};
|
|
2394
|
+
if (includeInstance) {
|
|
2395
|
+
obj.$jspbMessageInstance = msg;
|
|
2396
|
+
}
|
|
2397
|
+
return obj;
|
|
2398
|
+
};
|
|
2399
|
+
}
|
|
2400
|
+
proto.aggregator.ManualTrigger.deserializeBinary = function(bytes) {
|
|
2401
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
2402
|
+
var msg = new proto.aggregator.ManualTrigger();
|
|
2403
|
+
return proto.aggregator.ManualTrigger.deserializeBinaryFromReader(msg, reader);
|
|
2404
|
+
};
|
|
2405
|
+
proto.aggregator.ManualTrigger.deserializeBinaryFromReader = function(msg, reader) {
|
|
2406
|
+
while (reader.nextField()) {
|
|
2407
|
+
if (reader.isEndGroup()) {
|
|
2408
|
+
break;
|
|
2409
|
+
}
|
|
2410
|
+
var field = reader.getFieldNumber();
|
|
2411
|
+
switch (field) {
|
|
2412
|
+
case 1:
|
|
2413
|
+
var value = new proto.aggregator.ManualTrigger.Config();
|
|
2414
|
+
reader.readMessage(value, proto.aggregator.ManualTrigger.Config.deserializeBinaryFromReader);
|
|
2415
|
+
msg.setConfig(value);
|
|
2416
|
+
break;
|
|
2417
|
+
default:
|
|
2418
|
+
reader.skipField();
|
|
2419
|
+
break;
|
|
2420
|
+
}
|
|
2421
|
+
}
|
|
2422
|
+
return msg;
|
|
2423
|
+
};
|
|
2424
|
+
proto.aggregator.ManualTrigger.prototype.serializeBinary = function() {
|
|
2425
|
+
var writer = new jspb.BinaryWriter();
|
|
2426
|
+
proto.aggregator.ManualTrigger.serializeBinaryToWriter(this, writer);
|
|
2427
|
+
return writer.getResultBuffer();
|
|
2428
|
+
};
|
|
2429
|
+
proto.aggregator.ManualTrigger.serializeBinaryToWriter = function(message, writer) {
|
|
2430
|
+
var f = void 0;
|
|
2431
|
+
f = message.getConfig();
|
|
2432
|
+
if (f != null) {
|
|
2433
|
+
writer.writeMessage(
|
|
2434
|
+
1,
|
|
2435
|
+
f,
|
|
2436
|
+
proto.aggregator.ManualTrigger.Config.serializeBinaryToWriter
|
|
2437
|
+
);
|
|
2438
|
+
}
|
|
2439
|
+
};
|
|
2440
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
2441
|
+
proto.aggregator.ManualTrigger.Config.prototype.toObject = function(opt_includeInstance) {
|
|
2442
|
+
return proto.aggregator.ManualTrigger.Config.toObject(opt_includeInstance, this);
|
|
2443
|
+
};
|
|
2444
|
+
proto.aggregator.ManualTrigger.Config.toObject = function(includeInstance, msg) {
|
|
2445
|
+
var f, obj = {};
|
|
2446
|
+
if (includeInstance) {
|
|
2447
|
+
obj.$jspbMessageInstance = msg;
|
|
2448
|
+
}
|
|
2449
|
+
return obj;
|
|
2450
|
+
};
|
|
2451
|
+
}
|
|
2452
|
+
proto.aggregator.ManualTrigger.Config.deserializeBinary = function(bytes) {
|
|
2453
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
2454
|
+
var msg = new proto.aggregator.ManualTrigger.Config();
|
|
2455
|
+
return proto.aggregator.ManualTrigger.Config.deserializeBinaryFromReader(msg, reader);
|
|
2456
|
+
};
|
|
2457
|
+
proto.aggregator.ManualTrigger.Config.deserializeBinaryFromReader = function(msg, reader) {
|
|
2458
|
+
while (reader.nextField()) {
|
|
2459
|
+
if (reader.isEndGroup()) {
|
|
2460
|
+
break;
|
|
2461
|
+
}
|
|
2462
|
+
var field = reader.getFieldNumber();
|
|
2463
|
+
switch (field) {
|
|
2464
|
+
default:
|
|
2465
|
+
reader.skipField();
|
|
2466
|
+
break;
|
|
2467
|
+
}
|
|
2468
|
+
}
|
|
2469
|
+
return msg;
|
|
2470
|
+
};
|
|
2471
|
+
proto.aggregator.ManualTrigger.Config.prototype.serializeBinary = function() {
|
|
2472
|
+
var writer = new jspb.BinaryWriter();
|
|
2473
|
+
proto.aggregator.ManualTrigger.Config.serializeBinaryToWriter(this, writer);
|
|
2474
|
+
return writer.getResultBuffer();
|
|
2475
|
+
};
|
|
2476
|
+
proto.aggregator.ManualTrigger.Config.serializeBinaryToWriter = function(message, writer) {
|
|
2477
|
+
var f = void 0;
|
|
2478
|
+
};
|
|
2479
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
2480
|
+
proto.aggregator.ManualTrigger.Output.prototype.toObject = function(opt_includeInstance) {
|
|
2481
|
+
return proto.aggregator.ManualTrigger.Output.toObject(opt_includeInstance, this);
|
|
2482
|
+
};
|
|
2483
|
+
proto.aggregator.ManualTrigger.Output.toObject = function(includeInstance, msg) {
|
|
2484
|
+
var f, obj = {
|
|
2485
|
+
runAt: jspb.Message.getFieldWithDefault(msg, 1, 0)
|
|
2486
|
+
};
|
|
2487
|
+
if (includeInstance) {
|
|
2488
|
+
obj.$jspbMessageInstance = msg;
|
|
2489
|
+
}
|
|
2490
|
+
return obj;
|
|
2491
|
+
};
|
|
2492
|
+
}
|
|
2493
|
+
proto.aggregator.ManualTrigger.Output.deserializeBinary = function(bytes) {
|
|
2494
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
2495
|
+
var msg = new proto.aggregator.ManualTrigger.Output();
|
|
2496
|
+
return proto.aggregator.ManualTrigger.Output.deserializeBinaryFromReader(msg, reader);
|
|
2497
|
+
};
|
|
2498
|
+
proto.aggregator.ManualTrigger.Output.deserializeBinaryFromReader = function(msg, reader) {
|
|
2499
|
+
while (reader.nextField()) {
|
|
2500
|
+
if (reader.isEndGroup()) {
|
|
2501
|
+
break;
|
|
2502
|
+
}
|
|
2503
|
+
var field = reader.getFieldNumber();
|
|
2504
|
+
switch (field) {
|
|
2505
|
+
case 1:
|
|
2506
|
+
var value = (
|
|
2507
|
+
/** @type {number} */
|
|
2508
|
+
reader.readUint64()
|
|
2509
|
+
);
|
|
2510
|
+
msg.setRunAt(value);
|
|
2511
|
+
break;
|
|
2512
|
+
default:
|
|
2513
|
+
reader.skipField();
|
|
2514
|
+
break;
|
|
2515
|
+
}
|
|
2516
|
+
}
|
|
2517
|
+
return msg;
|
|
2518
|
+
};
|
|
2519
|
+
proto.aggregator.ManualTrigger.Output.prototype.serializeBinary = function() {
|
|
2520
|
+
var writer = new jspb.BinaryWriter();
|
|
2521
|
+
proto.aggregator.ManualTrigger.Output.serializeBinaryToWriter(this, writer);
|
|
2522
|
+
return writer.getResultBuffer();
|
|
2523
|
+
};
|
|
2524
|
+
proto.aggregator.ManualTrigger.Output.serializeBinaryToWriter = function(message, writer) {
|
|
2525
|
+
var f = void 0;
|
|
2526
|
+
f = message.getRunAt();
|
|
2527
|
+
if (f !== 0) {
|
|
2528
|
+
writer.writeUint64(
|
|
2529
|
+
1,
|
|
2530
|
+
f
|
|
2531
|
+
);
|
|
2532
|
+
}
|
|
2533
|
+
};
|
|
2534
|
+
proto.aggregator.ManualTrigger.Output.prototype.getRunAt = function() {
|
|
2535
|
+
return (
|
|
2536
|
+
/** @type {number} */
|
|
2537
|
+
jspb.Message.getFieldWithDefault(this, 1, 0)
|
|
2538
|
+
);
|
|
2539
|
+
};
|
|
2540
|
+
proto.aggregator.ManualTrigger.Output.prototype.setRunAt = function(value) {
|
|
2541
|
+
return jspb.Message.setProto3IntField(this, 1, value);
|
|
2542
|
+
};
|
|
2543
|
+
proto.aggregator.ManualTrigger.prototype.getConfig = function() {
|
|
2544
|
+
return (
|
|
2545
|
+
/** @type{?proto.aggregator.ManualTrigger.Config} */
|
|
2546
|
+
jspb.Message.getWrapperField(this, proto.aggregator.ManualTrigger.Config, 1)
|
|
2547
|
+
);
|
|
2548
|
+
};
|
|
2549
|
+
proto.aggregator.ManualTrigger.prototype.setConfig = function(value) {
|
|
2550
|
+
return jspb.Message.setWrapperField(this, 1, value);
|
|
2551
|
+
};
|
|
2552
|
+
proto.aggregator.ManualTrigger.prototype.clearConfig = function() {
|
|
2553
|
+
return this.setConfig(void 0);
|
|
2554
|
+
};
|
|
2555
|
+
proto.aggregator.ManualTrigger.prototype.hasConfig = function() {
|
|
2556
|
+
return jspb.Message.getField(this, 1) != null;
|
|
2557
|
+
};
|
|
2345
2558
|
proto.aggregator.TaskTrigger.oneofGroups_ = [[2, 3, 4, 5, 6]];
|
|
2346
2559
|
proto.aggregator.TaskTrigger.TriggerTypeCase = {
|
|
2347
2560
|
TRIGGER_TYPE_NOT_SET: 0,
|
|
@@ -3821,7 +4034,7 @@ var require_avs_pb = __commonJS({
|
|
|
3821
4034
|
};
|
|
3822
4035
|
proto.aggregator.RestAPINode.Output.toObject = function(includeInstance, msg) {
|
|
3823
4036
|
var f, obj = {
|
|
3824
|
-
data: (f = msg.getData()) &&
|
|
4037
|
+
data: (f = msg.getData()) && google_protobuf_struct_pb.Value.toObject(includeInstance, f)
|
|
3825
4038
|
};
|
|
3826
4039
|
if (includeInstance) {
|
|
3827
4040
|
obj.$jspbMessageInstance = msg;
|
|
@@ -3842,8 +4055,8 @@ var require_avs_pb = __commonJS({
|
|
|
3842
4055
|
var field = reader.getFieldNumber();
|
|
3843
4056
|
switch (field) {
|
|
3844
4057
|
case 1:
|
|
3845
|
-
var value = new
|
|
3846
|
-
reader.readMessage(value,
|
|
4058
|
+
var value = new google_protobuf_struct_pb.Value();
|
|
4059
|
+
reader.readMessage(value, google_protobuf_struct_pb.Value.deserializeBinaryFromReader);
|
|
3847
4060
|
msg.setData(value);
|
|
3848
4061
|
break;
|
|
3849
4062
|
default:
|
|
@@ -3865,14 +4078,14 @@ var require_avs_pb = __commonJS({
|
|
|
3865
4078
|
writer.writeMessage(
|
|
3866
4079
|
1,
|
|
3867
4080
|
f,
|
|
3868
|
-
|
|
4081
|
+
google_protobuf_struct_pb.Value.serializeBinaryToWriter
|
|
3869
4082
|
);
|
|
3870
4083
|
}
|
|
3871
4084
|
};
|
|
3872
4085
|
proto.aggregator.RestAPINode.Output.prototype.getData = function() {
|
|
3873
4086
|
return (
|
|
3874
|
-
/** @type{?proto.google.protobuf.
|
|
3875
|
-
jspb.Message.getWrapperField(this,
|
|
4087
|
+
/** @type{?proto.google.protobuf.Value} */
|
|
4088
|
+
jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Value, 1)
|
|
3876
4089
|
);
|
|
3877
4090
|
};
|
|
3878
4091
|
proto.aggregator.RestAPINode.Output.prototype.setData = function(value) {
|
|
@@ -10964,7 +11177,7 @@ var require_avs_pb = __commonJS({
|
|
|
10964
11177
|
this.getInputVariablesMap().clear();
|
|
10965
11178
|
return this;
|
|
10966
11179
|
};
|
|
10967
|
-
proto.aggregator.RunNodeWithInputsResp.oneofGroups_ = [[10, 11, 12, 13, 14, 15, 16, 17, 18
|
|
11180
|
+
proto.aggregator.RunNodeWithInputsResp.oneofGroups_ = [[10, 11, 12, 13, 14, 15, 16, 17, 18]];
|
|
10968
11181
|
proto.aggregator.RunNodeWithInputsResp.OutputDataCase = {
|
|
10969
11182
|
OUTPUT_DATA_NOT_SET: 0,
|
|
10970
11183
|
ETH_TRANSFER: 10,
|
|
@@ -10975,11 +11188,7 @@ var require_avs_pb = __commonJS({
|
|
|
10975
11188
|
REST_API: 15,
|
|
10976
11189
|
BRANCH: 16,
|
|
10977
11190
|
FILTER: 17,
|
|
10978
|
-
LOOP: 18
|
|
10979
|
-
BLOCK_TRIGGER: 20,
|
|
10980
|
-
FIXED_TIME_TRIGGER: 21,
|
|
10981
|
-
CRON_TRIGGER: 22,
|
|
10982
|
-
EVENT_TRIGGER: 23
|
|
11191
|
+
LOOP: 18
|
|
10983
11192
|
};
|
|
10984
11193
|
proto.aggregator.RunNodeWithInputsResp.prototype.getOutputDataCase = function() {
|
|
10985
11194
|
return (
|
|
@@ -11004,11 +11213,7 @@ var require_avs_pb = __commonJS({
|
|
|
11004
11213
|
restApi: (f = msg.getRestApi()) && proto.aggregator.RestAPINode.Output.toObject(includeInstance, f),
|
|
11005
11214
|
branch: (f = msg.getBranch()) && proto.aggregator.BranchNode.Output.toObject(includeInstance, f),
|
|
11006
11215
|
filter: (f = msg.getFilter()) && proto.aggregator.FilterNode.Output.toObject(includeInstance, f),
|
|
11007
|
-
loop: (f = msg.getLoop()) && proto.aggregator.LoopNode.Output.toObject(includeInstance, f)
|
|
11008
|
-
blockTrigger: (f = msg.getBlockTrigger()) && proto.aggregator.BlockTrigger.Output.toObject(includeInstance, f),
|
|
11009
|
-
fixedTimeTrigger: (f = msg.getFixedTimeTrigger()) && proto.aggregator.FixedTimeTrigger.Output.toObject(includeInstance, f),
|
|
11010
|
-
cronTrigger: (f = msg.getCronTrigger()) && proto.aggregator.CronTrigger.Output.toObject(includeInstance, f),
|
|
11011
|
-
eventTrigger: (f = msg.getEventTrigger()) && proto.aggregator.EventTrigger.Output.toObject(includeInstance, f)
|
|
11216
|
+
loop: (f = msg.getLoop()) && proto.aggregator.LoopNode.Output.toObject(includeInstance, f)
|
|
11012
11217
|
};
|
|
11013
11218
|
if (includeInstance) {
|
|
11014
11219
|
obj.$jspbMessageInstance = msg;
|
|
@@ -11094,26 +11299,6 @@ var require_avs_pb = __commonJS({
|
|
|
11094
11299
|
reader.readMessage(value, proto.aggregator.LoopNode.Output.deserializeBinaryFromReader);
|
|
11095
11300
|
msg.setLoop(value);
|
|
11096
11301
|
break;
|
|
11097
|
-
case 20:
|
|
11098
|
-
var value = new proto.aggregator.BlockTrigger.Output();
|
|
11099
|
-
reader.readMessage(value, proto.aggregator.BlockTrigger.Output.deserializeBinaryFromReader);
|
|
11100
|
-
msg.setBlockTrigger(value);
|
|
11101
|
-
break;
|
|
11102
|
-
case 21:
|
|
11103
|
-
var value = new proto.aggregator.FixedTimeTrigger.Output();
|
|
11104
|
-
reader.readMessage(value, proto.aggregator.FixedTimeTrigger.Output.deserializeBinaryFromReader);
|
|
11105
|
-
msg.setFixedTimeTrigger(value);
|
|
11106
|
-
break;
|
|
11107
|
-
case 22:
|
|
11108
|
-
var value = new proto.aggregator.CronTrigger.Output();
|
|
11109
|
-
reader.readMessage(value, proto.aggregator.CronTrigger.Output.deserializeBinaryFromReader);
|
|
11110
|
-
msg.setCronTrigger(value);
|
|
11111
|
-
break;
|
|
11112
|
-
case 23:
|
|
11113
|
-
var value = new proto.aggregator.EventTrigger.Output();
|
|
11114
|
-
reader.readMessage(value, proto.aggregator.EventTrigger.Output.deserializeBinaryFromReader);
|
|
11115
|
-
msg.setEventTrigger(value);
|
|
11116
|
-
break;
|
|
11117
11302
|
default:
|
|
11118
11303
|
reader.skipField();
|
|
11119
11304
|
break;
|
|
@@ -11221,38 +11406,6 @@ var require_avs_pb = __commonJS({
|
|
|
11221
11406
|
proto.aggregator.LoopNode.Output.serializeBinaryToWriter
|
|
11222
11407
|
);
|
|
11223
11408
|
}
|
|
11224
|
-
f = message.getBlockTrigger();
|
|
11225
|
-
if (f != null) {
|
|
11226
|
-
writer.writeMessage(
|
|
11227
|
-
20,
|
|
11228
|
-
f,
|
|
11229
|
-
proto.aggregator.BlockTrigger.Output.serializeBinaryToWriter
|
|
11230
|
-
);
|
|
11231
|
-
}
|
|
11232
|
-
f = message.getFixedTimeTrigger();
|
|
11233
|
-
if (f != null) {
|
|
11234
|
-
writer.writeMessage(
|
|
11235
|
-
21,
|
|
11236
|
-
f,
|
|
11237
|
-
proto.aggregator.FixedTimeTrigger.Output.serializeBinaryToWriter
|
|
11238
|
-
);
|
|
11239
|
-
}
|
|
11240
|
-
f = message.getCronTrigger();
|
|
11241
|
-
if (f != null) {
|
|
11242
|
-
writer.writeMessage(
|
|
11243
|
-
22,
|
|
11244
|
-
f,
|
|
11245
|
-
proto.aggregator.CronTrigger.Output.serializeBinaryToWriter
|
|
11246
|
-
);
|
|
11247
|
-
}
|
|
11248
|
-
f = message.getEventTrigger();
|
|
11249
|
-
if (f != null) {
|
|
11250
|
-
writer.writeMessage(
|
|
11251
|
-
23,
|
|
11252
|
-
f,
|
|
11253
|
-
proto.aggregator.EventTrigger.Output.serializeBinaryToWriter
|
|
11254
|
-
);
|
|
11255
|
-
}
|
|
11256
11409
|
};
|
|
11257
11410
|
proto.aggregator.RunNodeWithInputsResp.prototype.getSuccess = function() {
|
|
11258
11411
|
return (
|
|
@@ -11416,92 +11569,394 @@ var require_avs_pb = __commonJS({
|
|
|
11416
11569
|
proto.aggregator.RunNodeWithInputsResp.prototype.hasLoop = function() {
|
|
11417
11570
|
return jspb.Message.getField(this, 18) != null;
|
|
11418
11571
|
};
|
|
11419
|
-
proto.aggregator.RunNodeWithInputsResp.prototype.getBlockTrigger = function() {
|
|
11420
|
-
return (
|
|
11421
|
-
/** @type{?proto.aggregator.BlockTrigger.Output} */
|
|
11422
|
-
jspb.Message.getWrapperField(this, proto.aggregator.BlockTrigger.Output, 20)
|
|
11423
|
-
);
|
|
11424
|
-
};
|
|
11425
|
-
proto.aggregator.RunNodeWithInputsResp.prototype.setBlockTrigger = function(value) {
|
|
11426
|
-
return jspb.Message.setOneofWrapperField(this, 20, proto.aggregator.RunNodeWithInputsResp.oneofGroups_[0], value);
|
|
11427
|
-
};
|
|
11428
|
-
proto.aggregator.RunNodeWithInputsResp.prototype.clearBlockTrigger = function() {
|
|
11429
|
-
return this.setBlockTrigger(void 0);
|
|
11430
|
-
};
|
|
11431
|
-
proto.aggregator.RunNodeWithInputsResp.prototype.hasBlockTrigger = function() {
|
|
11432
|
-
return jspb.Message.getField(this, 20) != null;
|
|
11433
|
-
};
|
|
11434
|
-
proto.aggregator.RunNodeWithInputsResp.prototype.getFixedTimeTrigger = function() {
|
|
11435
|
-
return (
|
|
11436
|
-
/** @type{?proto.aggregator.FixedTimeTrigger.Output} */
|
|
11437
|
-
jspb.Message.getWrapperField(this, proto.aggregator.FixedTimeTrigger.Output, 21)
|
|
11438
|
-
);
|
|
11439
|
-
};
|
|
11440
|
-
proto.aggregator.RunNodeWithInputsResp.prototype.setFixedTimeTrigger = function(value) {
|
|
11441
|
-
return jspb.Message.setOneofWrapperField(this, 21, proto.aggregator.RunNodeWithInputsResp.oneofGroups_[0], value);
|
|
11442
|
-
};
|
|
11443
|
-
proto.aggregator.RunNodeWithInputsResp.prototype.clearFixedTimeTrigger = function() {
|
|
11444
|
-
return this.setFixedTimeTrigger(void 0);
|
|
11445
|
-
};
|
|
11446
|
-
proto.aggregator.RunNodeWithInputsResp.prototype.hasFixedTimeTrigger = function() {
|
|
11447
|
-
return jspb.Message.getField(this, 21) != null;
|
|
11448
|
-
};
|
|
11449
|
-
proto.aggregator.RunNodeWithInputsResp.prototype.getCronTrigger = function() {
|
|
11450
|
-
return (
|
|
11451
|
-
/** @type{?proto.aggregator.CronTrigger.Output} */
|
|
11452
|
-
jspb.Message.getWrapperField(this, proto.aggregator.CronTrigger.Output, 22)
|
|
11453
|
-
);
|
|
11454
|
-
};
|
|
11455
|
-
proto.aggregator.RunNodeWithInputsResp.prototype.setCronTrigger = function(value) {
|
|
11456
|
-
return jspb.Message.setOneofWrapperField(this, 22, proto.aggregator.RunNodeWithInputsResp.oneofGroups_[0], value);
|
|
11457
|
-
};
|
|
11458
|
-
proto.aggregator.RunNodeWithInputsResp.prototype.clearCronTrigger = function() {
|
|
11459
|
-
return this.setCronTrigger(void 0);
|
|
11460
|
-
};
|
|
11461
|
-
proto.aggregator.RunNodeWithInputsResp.prototype.hasCronTrigger = function() {
|
|
11462
|
-
return jspb.Message.getField(this, 22) != null;
|
|
11463
|
-
};
|
|
11464
|
-
proto.aggregator.RunNodeWithInputsResp.prototype.getEventTrigger = function() {
|
|
11465
|
-
return (
|
|
11466
|
-
/** @type{?proto.aggregator.EventTrigger.Output} */
|
|
11467
|
-
jspb.Message.getWrapperField(this, proto.aggregator.EventTrigger.Output, 23)
|
|
11468
|
-
);
|
|
11469
|
-
};
|
|
11470
|
-
proto.aggregator.RunNodeWithInputsResp.prototype.setEventTrigger = function(value) {
|
|
11471
|
-
return jspb.Message.setOneofWrapperField(this, 23, proto.aggregator.RunNodeWithInputsResp.oneofGroups_[0], value);
|
|
11472
|
-
};
|
|
11473
|
-
proto.aggregator.RunNodeWithInputsResp.prototype.clearEventTrigger = function() {
|
|
11474
|
-
return this.setEventTrigger(void 0);
|
|
11475
|
-
};
|
|
11476
|
-
proto.aggregator.RunNodeWithInputsResp.prototype.hasEventTrigger = function() {
|
|
11477
|
-
return jspb.Message.getField(this, 23) != null;
|
|
11478
|
-
};
|
|
11479
11572
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
11480
|
-
proto.aggregator.
|
|
11481
|
-
return proto.aggregator.
|
|
11573
|
+
proto.aggregator.RunTriggerReq.prototype.toObject = function(opt_includeInstance) {
|
|
11574
|
+
return proto.aggregator.RunTriggerReq.toObject(opt_includeInstance, this);
|
|
11482
11575
|
};
|
|
11483
|
-
proto.aggregator.
|
|
11484
|
-
var f, obj = {
|
|
11576
|
+
proto.aggregator.RunTriggerReq.toObject = function(includeInstance, msg) {
|
|
11577
|
+
var f, obj = {
|
|
11578
|
+
triggerType: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
11579
|
+
triggerConfigMap: (f = msg.getTriggerConfigMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : []
|
|
11580
|
+
};
|
|
11485
11581
|
if (includeInstance) {
|
|
11486
11582
|
obj.$jspbMessageInstance = msg;
|
|
11487
11583
|
}
|
|
11488
11584
|
return obj;
|
|
11489
11585
|
};
|
|
11490
11586
|
}
|
|
11491
|
-
proto.aggregator.
|
|
11587
|
+
proto.aggregator.RunTriggerReq.deserializeBinary = function(bytes) {
|
|
11492
11588
|
var reader = new jspb.BinaryReader(bytes);
|
|
11493
|
-
var msg = new proto.aggregator.
|
|
11494
|
-
return proto.aggregator.
|
|
11589
|
+
var msg = new proto.aggregator.RunTriggerReq();
|
|
11590
|
+
return proto.aggregator.RunTriggerReq.deserializeBinaryFromReader(msg, reader);
|
|
11495
11591
|
};
|
|
11496
|
-
proto.aggregator.
|
|
11592
|
+
proto.aggregator.RunTriggerReq.deserializeBinaryFromReader = function(msg, reader) {
|
|
11497
11593
|
while (reader.nextField()) {
|
|
11498
11594
|
if (reader.isEndGroup()) {
|
|
11499
11595
|
break;
|
|
11500
11596
|
}
|
|
11501
11597
|
var field = reader.getFieldNumber();
|
|
11502
11598
|
switch (field) {
|
|
11503
|
-
|
|
11504
|
-
|
|
11599
|
+
case 1:
|
|
11600
|
+
var value = (
|
|
11601
|
+
/** @type {!proto.aggregator.TriggerType} */
|
|
11602
|
+
reader.readEnum()
|
|
11603
|
+
);
|
|
11604
|
+
msg.setTriggerType(value);
|
|
11605
|
+
break;
|
|
11606
|
+
case 2:
|
|
11607
|
+
var value = msg.getTriggerConfigMap();
|
|
11608
|
+
reader.readMessage(value, function(message, reader2) {
|
|
11609
|
+
jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value());
|
|
11610
|
+
});
|
|
11611
|
+
break;
|
|
11612
|
+
default:
|
|
11613
|
+
reader.skipField();
|
|
11614
|
+
break;
|
|
11615
|
+
}
|
|
11616
|
+
}
|
|
11617
|
+
return msg;
|
|
11618
|
+
};
|
|
11619
|
+
proto.aggregator.RunTriggerReq.prototype.serializeBinary = function() {
|
|
11620
|
+
var writer = new jspb.BinaryWriter();
|
|
11621
|
+
proto.aggregator.RunTriggerReq.serializeBinaryToWriter(this, writer);
|
|
11622
|
+
return writer.getResultBuffer();
|
|
11623
|
+
};
|
|
11624
|
+
proto.aggregator.RunTriggerReq.serializeBinaryToWriter = function(message, writer) {
|
|
11625
|
+
var f = void 0;
|
|
11626
|
+
f = message.getTriggerType();
|
|
11627
|
+
if (f !== 0) {
|
|
11628
|
+
writer.writeEnum(
|
|
11629
|
+
1,
|
|
11630
|
+
f
|
|
11631
|
+
);
|
|
11632
|
+
}
|
|
11633
|
+
f = message.getTriggerConfigMap(true);
|
|
11634
|
+
if (f && f.getLength() > 0) {
|
|
11635
|
+
f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter);
|
|
11636
|
+
}
|
|
11637
|
+
};
|
|
11638
|
+
proto.aggregator.RunTriggerReq.prototype.getTriggerType = function() {
|
|
11639
|
+
return (
|
|
11640
|
+
/** @type {!proto.aggregator.TriggerType} */
|
|
11641
|
+
jspb.Message.getFieldWithDefault(this, 1, 0)
|
|
11642
|
+
);
|
|
11643
|
+
};
|
|
11644
|
+
proto.aggregator.RunTriggerReq.prototype.setTriggerType = function(value) {
|
|
11645
|
+
return jspb.Message.setProto3EnumField(this, 1, value);
|
|
11646
|
+
};
|
|
11647
|
+
proto.aggregator.RunTriggerReq.prototype.getTriggerConfigMap = function(opt_noLazyCreate) {
|
|
11648
|
+
return (
|
|
11649
|
+
/** @type {!jspb.Map<string,!proto.google.protobuf.Value>} */
|
|
11650
|
+
jspb.Message.getMapField(
|
|
11651
|
+
this,
|
|
11652
|
+
2,
|
|
11653
|
+
opt_noLazyCreate,
|
|
11654
|
+
proto.google.protobuf.Value
|
|
11655
|
+
)
|
|
11656
|
+
);
|
|
11657
|
+
};
|
|
11658
|
+
proto.aggregator.RunTriggerReq.prototype.clearTriggerConfigMap = function() {
|
|
11659
|
+
this.getTriggerConfigMap().clear();
|
|
11660
|
+
return this;
|
|
11661
|
+
};
|
|
11662
|
+
proto.aggregator.RunTriggerResp.oneofGroups_ = [[10, 11, 12, 13, 14]];
|
|
11663
|
+
proto.aggregator.RunTriggerResp.OutputDataCase = {
|
|
11664
|
+
OUTPUT_DATA_NOT_SET: 0,
|
|
11665
|
+
BLOCK_TRIGGER: 10,
|
|
11666
|
+
FIXED_TIME_TRIGGER: 11,
|
|
11667
|
+
CRON_TRIGGER: 12,
|
|
11668
|
+
EVENT_TRIGGER: 13,
|
|
11669
|
+
MANUAL_TRIGGER: 14
|
|
11670
|
+
};
|
|
11671
|
+
proto.aggregator.RunTriggerResp.prototype.getOutputDataCase = function() {
|
|
11672
|
+
return (
|
|
11673
|
+
/** @type {proto.aggregator.RunTriggerResp.OutputDataCase} */
|
|
11674
|
+
jspb.Message.computeOneofCase(this, proto.aggregator.RunTriggerResp.oneofGroups_[0])
|
|
11675
|
+
);
|
|
11676
|
+
};
|
|
11677
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
11678
|
+
proto.aggregator.RunTriggerResp.prototype.toObject = function(opt_includeInstance) {
|
|
11679
|
+
return proto.aggregator.RunTriggerResp.toObject(opt_includeInstance, this);
|
|
11680
|
+
};
|
|
11681
|
+
proto.aggregator.RunTriggerResp.toObject = function(includeInstance, msg) {
|
|
11682
|
+
var f, obj = {
|
|
11683
|
+
success: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
|
|
11684
|
+
error: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
11685
|
+
triggerId: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
11686
|
+
blockTrigger: (f = msg.getBlockTrigger()) && proto.aggregator.BlockTrigger.Output.toObject(includeInstance, f),
|
|
11687
|
+
fixedTimeTrigger: (f = msg.getFixedTimeTrigger()) && proto.aggregator.FixedTimeTrigger.Output.toObject(includeInstance, f),
|
|
11688
|
+
cronTrigger: (f = msg.getCronTrigger()) && proto.aggregator.CronTrigger.Output.toObject(includeInstance, f),
|
|
11689
|
+
eventTrigger: (f = msg.getEventTrigger()) && proto.aggregator.EventTrigger.Output.toObject(includeInstance, f),
|
|
11690
|
+
manualTrigger: (f = msg.getManualTrigger()) && proto.aggregator.ManualTrigger.Output.toObject(includeInstance, f)
|
|
11691
|
+
};
|
|
11692
|
+
if (includeInstance) {
|
|
11693
|
+
obj.$jspbMessageInstance = msg;
|
|
11694
|
+
}
|
|
11695
|
+
return obj;
|
|
11696
|
+
};
|
|
11697
|
+
}
|
|
11698
|
+
proto.aggregator.RunTriggerResp.deserializeBinary = function(bytes) {
|
|
11699
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
11700
|
+
var msg = new proto.aggregator.RunTriggerResp();
|
|
11701
|
+
return proto.aggregator.RunTriggerResp.deserializeBinaryFromReader(msg, reader);
|
|
11702
|
+
};
|
|
11703
|
+
proto.aggregator.RunTriggerResp.deserializeBinaryFromReader = function(msg, reader) {
|
|
11704
|
+
while (reader.nextField()) {
|
|
11705
|
+
if (reader.isEndGroup()) {
|
|
11706
|
+
break;
|
|
11707
|
+
}
|
|
11708
|
+
var field = reader.getFieldNumber();
|
|
11709
|
+
switch (field) {
|
|
11710
|
+
case 1:
|
|
11711
|
+
var value = (
|
|
11712
|
+
/** @type {boolean} */
|
|
11713
|
+
reader.readBool()
|
|
11714
|
+
);
|
|
11715
|
+
msg.setSuccess(value);
|
|
11716
|
+
break;
|
|
11717
|
+
case 2:
|
|
11718
|
+
var value = (
|
|
11719
|
+
/** @type {string} */
|
|
11720
|
+
reader.readString()
|
|
11721
|
+
);
|
|
11722
|
+
msg.setError(value);
|
|
11723
|
+
break;
|
|
11724
|
+
case 3:
|
|
11725
|
+
var value = (
|
|
11726
|
+
/** @type {string} */
|
|
11727
|
+
reader.readString()
|
|
11728
|
+
);
|
|
11729
|
+
msg.setTriggerId(value);
|
|
11730
|
+
break;
|
|
11731
|
+
case 10:
|
|
11732
|
+
var value = new proto.aggregator.BlockTrigger.Output();
|
|
11733
|
+
reader.readMessage(value, proto.aggregator.BlockTrigger.Output.deserializeBinaryFromReader);
|
|
11734
|
+
msg.setBlockTrigger(value);
|
|
11735
|
+
break;
|
|
11736
|
+
case 11:
|
|
11737
|
+
var value = new proto.aggregator.FixedTimeTrigger.Output();
|
|
11738
|
+
reader.readMessage(value, proto.aggregator.FixedTimeTrigger.Output.deserializeBinaryFromReader);
|
|
11739
|
+
msg.setFixedTimeTrigger(value);
|
|
11740
|
+
break;
|
|
11741
|
+
case 12:
|
|
11742
|
+
var value = new proto.aggregator.CronTrigger.Output();
|
|
11743
|
+
reader.readMessage(value, proto.aggregator.CronTrigger.Output.deserializeBinaryFromReader);
|
|
11744
|
+
msg.setCronTrigger(value);
|
|
11745
|
+
break;
|
|
11746
|
+
case 13:
|
|
11747
|
+
var value = new proto.aggregator.EventTrigger.Output();
|
|
11748
|
+
reader.readMessage(value, proto.aggregator.EventTrigger.Output.deserializeBinaryFromReader);
|
|
11749
|
+
msg.setEventTrigger(value);
|
|
11750
|
+
break;
|
|
11751
|
+
case 14:
|
|
11752
|
+
var value = new proto.aggregator.ManualTrigger.Output();
|
|
11753
|
+
reader.readMessage(value, proto.aggregator.ManualTrigger.Output.deserializeBinaryFromReader);
|
|
11754
|
+
msg.setManualTrigger(value);
|
|
11755
|
+
break;
|
|
11756
|
+
default:
|
|
11757
|
+
reader.skipField();
|
|
11758
|
+
break;
|
|
11759
|
+
}
|
|
11760
|
+
}
|
|
11761
|
+
return msg;
|
|
11762
|
+
};
|
|
11763
|
+
proto.aggregator.RunTriggerResp.prototype.serializeBinary = function() {
|
|
11764
|
+
var writer = new jspb.BinaryWriter();
|
|
11765
|
+
proto.aggregator.RunTriggerResp.serializeBinaryToWriter(this, writer);
|
|
11766
|
+
return writer.getResultBuffer();
|
|
11767
|
+
};
|
|
11768
|
+
proto.aggregator.RunTriggerResp.serializeBinaryToWriter = function(message, writer) {
|
|
11769
|
+
var f = void 0;
|
|
11770
|
+
f = message.getSuccess();
|
|
11771
|
+
if (f) {
|
|
11772
|
+
writer.writeBool(
|
|
11773
|
+
1,
|
|
11774
|
+
f
|
|
11775
|
+
);
|
|
11776
|
+
}
|
|
11777
|
+
f = message.getError();
|
|
11778
|
+
if (f.length > 0) {
|
|
11779
|
+
writer.writeString(
|
|
11780
|
+
2,
|
|
11781
|
+
f
|
|
11782
|
+
);
|
|
11783
|
+
}
|
|
11784
|
+
f = message.getTriggerId();
|
|
11785
|
+
if (f.length > 0) {
|
|
11786
|
+
writer.writeString(
|
|
11787
|
+
3,
|
|
11788
|
+
f
|
|
11789
|
+
);
|
|
11790
|
+
}
|
|
11791
|
+
f = message.getBlockTrigger();
|
|
11792
|
+
if (f != null) {
|
|
11793
|
+
writer.writeMessage(
|
|
11794
|
+
10,
|
|
11795
|
+
f,
|
|
11796
|
+
proto.aggregator.BlockTrigger.Output.serializeBinaryToWriter
|
|
11797
|
+
);
|
|
11798
|
+
}
|
|
11799
|
+
f = message.getFixedTimeTrigger();
|
|
11800
|
+
if (f != null) {
|
|
11801
|
+
writer.writeMessage(
|
|
11802
|
+
11,
|
|
11803
|
+
f,
|
|
11804
|
+
proto.aggregator.FixedTimeTrigger.Output.serializeBinaryToWriter
|
|
11805
|
+
);
|
|
11806
|
+
}
|
|
11807
|
+
f = message.getCronTrigger();
|
|
11808
|
+
if (f != null) {
|
|
11809
|
+
writer.writeMessage(
|
|
11810
|
+
12,
|
|
11811
|
+
f,
|
|
11812
|
+
proto.aggregator.CronTrigger.Output.serializeBinaryToWriter
|
|
11813
|
+
);
|
|
11814
|
+
}
|
|
11815
|
+
f = message.getEventTrigger();
|
|
11816
|
+
if (f != null) {
|
|
11817
|
+
writer.writeMessage(
|
|
11818
|
+
13,
|
|
11819
|
+
f,
|
|
11820
|
+
proto.aggregator.EventTrigger.Output.serializeBinaryToWriter
|
|
11821
|
+
);
|
|
11822
|
+
}
|
|
11823
|
+
f = message.getManualTrigger();
|
|
11824
|
+
if (f != null) {
|
|
11825
|
+
writer.writeMessage(
|
|
11826
|
+
14,
|
|
11827
|
+
f,
|
|
11828
|
+
proto.aggregator.ManualTrigger.Output.serializeBinaryToWriter
|
|
11829
|
+
);
|
|
11830
|
+
}
|
|
11831
|
+
};
|
|
11832
|
+
proto.aggregator.RunTriggerResp.prototype.getSuccess = function() {
|
|
11833
|
+
return (
|
|
11834
|
+
/** @type {boolean} */
|
|
11835
|
+
jspb.Message.getBooleanFieldWithDefault(this, 1, false)
|
|
11836
|
+
);
|
|
11837
|
+
};
|
|
11838
|
+
proto.aggregator.RunTriggerResp.prototype.setSuccess = function(value) {
|
|
11839
|
+
return jspb.Message.setProto3BooleanField(this, 1, value);
|
|
11840
|
+
};
|
|
11841
|
+
proto.aggregator.RunTriggerResp.prototype.getError = function() {
|
|
11842
|
+
return (
|
|
11843
|
+
/** @type {string} */
|
|
11844
|
+
jspb.Message.getFieldWithDefault(this, 2, "")
|
|
11845
|
+
);
|
|
11846
|
+
};
|
|
11847
|
+
proto.aggregator.RunTriggerResp.prototype.setError = function(value) {
|
|
11848
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
|
11849
|
+
};
|
|
11850
|
+
proto.aggregator.RunTriggerResp.prototype.getTriggerId = function() {
|
|
11851
|
+
return (
|
|
11852
|
+
/** @type {string} */
|
|
11853
|
+
jspb.Message.getFieldWithDefault(this, 3, "")
|
|
11854
|
+
);
|
|
11855
|
+
};
|
|
11856
|
+
proto.aggregator.RunTriggerResp.prototype.setTriggerId = function(value) {
|
|
11857
|
+
return jspb.Message.setProto3StringField(this, 3, value);
|
|
11858
|
+
};
|
|
11859
|
+
proto.aggregator.RunTriggerResp.prototype.getBlockTrigger = function() {
|
|
11860
|
+
return (
|
|
11861
|
+
/** @type{?proto.aggregator.BlockTrigger.Output} */
|
|
11862
|
+
jspb.Message.getWrapperField(this, proto.aggregator.BlockTrigger.Output, 10)
|
|
11863
|
+
);
|
|
11864
|
+
};
|
|
11865
|
+
proto.aggregator.RunTriggerResp.prototype.setBlockTrigger = function(value) {
|
|
11866
|
+
return jspb.Message.setOneofWrapperField(this, 10, proto.aggregator.RunTriggerResp.oneofGroups_[0], value);
|
|
11867
|
+
};
|
|
11868
|
+
proto.aggregator.RunTriggerResp.prototype.clearBlockTrigger = function() {
|
|
11869
|
+
return this.setBlockTrigger(void 0);
|
|
11870
|
+
};
|
|
11871
|
+
proto.aggregator.RunTriggerResp.prototype.hasBlockTrigger = function() {
|
|
11872
|
+
return jspb.Message.getField(this, 10) != null;
|
|
11873
|
+
};
|
|
11874
|
+
proto.aggregator.RunTriggerResp.prototype.getFixedTimeTrigger = function() {
|
|
11875
|
+
return (
|
|
11876
|
+
/** @type{?proto.aggregator.FixedTimeTrigger.Output} */
|
|
11877
|
+
jspb.Message.getWrapperField(this, proto.aggregator.FixedTimeTrigger.Output, 11)
|
|
11878
|
+
);
|
|
11879
|
+
};
|
|
11880
|
+
proto.aggregator.RunTriggerResp.prototype.setFixedTimeTrigger = function(value) {
|
|
11881
|
+
return jspb.Message.setOneofWrapperField(this, 11, proto.aggregator.RunTriggerResp.oneofGroups_[0], value);
|
|
11882
|
+
};
|
|
11883
|
+
proto.aggregator.RunTriggerResp.prototype.clearFixedTimeTrigger = function() {
|
|
11884
|
+
return this.setFixedTimeTrigger(void 0);
|
|
11885
|
+
};
|
|
11886
|
+
proto.aggregator.RunTriggerResp.prototype.hasFixedTimeTrigger = function() {
|
|
11887
|
+
return jspb.Message.getField(this, 11) != null;
|
|
11888
|
+
};
|
|
11889
|
+
proto.aggregator.RunTriggerResp.prototype.getCronTrigger = function() {
|
|
11890
|
+
return (
|
|
11891
|
+
/** @type{?proto.aggregator.CronTrigger.Output} */
|
|
11892
|
+
jspb.Message.getWrapperField(this, proto.aggregator.CronTrigger.Output, 12)
|
|
11893
|
+
);
|
|
11894
|
+
};
|
|
11895
|
+
proto.aggregator.RunTriggerResp.prototype.setCronTrigger = function(value) {
|
|
11896
|
+
return jspb.Message.setOneofWrapperField(this, 12, proto.aggregator.RunTriggerResp.oneofGroups_[0], value);
|
|
11897
|
+
};
|
|
11898
|
+
proto.aggregator.RunTriggerResp.prototype.clearCronTrigger = function() {
|
|
11899
|
+
return this.setCronTrigger(void 0);
|
|
11900
|
+
};
|
|
11901
|
+
proto.aggregator.RunTriggerResp.prototype.hasCronTrigger = function() {
|
|
11902
|
+
return jspb.Message.getField(this, 12) != null;
|
|
11903
|
+
};
|
|
11904
|
+
proto.aggregator.RunTriggerResp.prototype.getEventTrigger = function() {
|
|
11905
|
+
return (
|
|
11906
|
+
/** @type{?proto.aggregator.EventTrigger.Output} */
|
|
11907
|
+
jspb.Message.getWrapperField(this, proto.aggregator.EventTrigger.Output, 13)
|
|
11908
|
+
);
|
|
11909
|
+
};
|
|
11910
|
+
proto.aggregator.RunTriggerResp.prototype.setEventTrigger = function(value) {
|
|
11911
|
+
return jspb.Message.setOneofWrapperField(this, 13, proto.aggregator.RunTriggerResp.oneofGroups_[0], value);
|
|
11912
|
+
};
|
|
11913
|
+
proto.aggregator.RunTriggerResp.prototype.clearEventTrigger = function() {
|
|
11914
|
+
return this.setEventTrigger(void 0);
|
|
11915
|
+
};
|
|
11916
|
+
proto.aggregator.RunTriggerResp.prototype.hasEventTrigger = function() {
|
|
11917
|
+
return jspb.Message.getField(this, 13) != null;
|
|
11918
|
+
};
|
|
11919
|
+
proto.aggregator.RunTriggerResp.prototype.getManualTrigger = function() {
|
|
11920
|
+
return (
|
|
11921
|
+
/** @type{?proto.aggregator.ManualTrigger.Output} */
|
|
11922
|
+
jspb.Message.getWrapperField(this, proto.aggregator.ManualTrigger.Output, 14)
|
|
11923
|
+
);
|
|
11924
|
+
};
|
|
11925
|
+
proto.aggregator.RunTriggerResp.prototype.setManualTrigger = function(value) {
|
|
11926
|
+
return jspb.Message.setOneofWrapperField(this, 14, proto.aggregator.RunTriggerResp.oneofGroups_[0], value);
|
|
11927
|
+
};
|
|
11928
|
+
proto.aggregator.RunTriggerResp.prototype.clearManualTrigger = function() {
|
|
11929
|
+
return this.setManualTrigger(void 0);
|
|
11930
|
+
};
|
|
11931
|
+
proto.aggregator.RunTriggerResp.prototype.hasManualTrigger = function() {
|
|
11932
|
+
return jspb.Message.getField(this, 14) != null;
|
|
11933
|
+
};
|
|
11934
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
11935
|
+
proto.aggregator.Evm.prototype.toObject = function(opt_includeInstance) {
|
|
11936
|
+
return proto.aggregator.Evm.toObject(opt_includeInstance, this);
|
|
11937
|
+
};
|
|
11938
|
+
proto.aggregator.Evm.toObject = function(includeInstance, msg) {
|
|
11939
|
+
var f, obj = {};
|
|
11940
|
+
if (includeInstance) {
|
|
11941
|
+
obj.$jspbMessageInstance = msg;
|
|
11942
|
+
}
|
|
11943
|
+
return obj;
|
|
11944
|
+
};
|
|
11945
|
+
}
|
|
11946
|
+
proto.aggregator.Evm.deserializeBinary = function(bytes) {
|
|
11947
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
11948
|
+
var msg = new proto.aggregator.Evm();
|
|
11949
|
+
return proto.aggregator.Evm.deserializeBinaryFromReader(msg, reader);
|
|
11950
|
+
};
|
|
11951
|
+
proto.aggregator.Evm.deserializeBinaryFromReader = function(msg, reader) {
|
|
11952
|
+
while (reader.nextField()) {
|
|
11953
|
+
if (reader.isEndGroup()) {
|
|
11954
|
+
break;
|
|
11955
|
+
}
|
|
11956
|
+
var field = reader.getFieldNumber();
|
|
11957
|
+
switch (field) {
|
|
11958
|
+
default:
|
|
11959
|
+
reader.skipField();
|
|
11505
11960
|
break;
|
|
11506
11961
|
}
|
|
11507
11962
|
}
|
|
@@ -12615,334 +13070,352 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
12615
13070
|
"../../grpc_codegen/avs_grpc_pb.js"(exports2) {
|
|
12616
13071
|
"use strict";
|
|
12617
13072
|
var grpc = require("@grpc/grpc-js");
|
|
12618
|
-
var
|
|
13073
|
+
var avs_pb25 = require_avs_pb();
|
|
12619
13074
|
var google_protobuf_wrappers_pb = require("google-protobuf/google/protobuf/wrappers_pb.js");
|
|
12620
13075
|
var google_protobuf_timestamp_pb = require("google-protobuf/google/protobuf/timestamp_pb.js");
|
|
12621
13076
|
var google_protobuf_any_pb = require("google-protobuf/google/protobuf/any_pb.js");
|
|
12622
13077
|
var google_protobuf_struct_pb = require("google-protobuf/google/protobuf/struct_pb.js");
|
|
12623
13078
|
function serialize_aggregator_CreateOrUpdateSecretReq(arg) {
|
|
12624
|
-
if (!(arg instanceof
|
|
13079
|
+
if (!(arg instanceof avs_pb25.CreateOrUpdateSecretReq)) {
|
|
12625
13080
|
throw new Error("Expected argument of type aggregator.CreateOrUpdateSecretReq");
|
|
12626
13081
|
}
|
|
12627
13082
|
return Buffer.from(arg.serializeBinary());
|
|
12628
13083
|
}
|
|
12629
13084
|
function deserialize_aggregator_CreateOrUpdateSecretReq(buffer_arg) {
|
|
12630
|
-
return
|
|
13085
|
+
return avs_pb25.CreateOrUpdateSecretReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12631
13086
|
}
|
|
12632
13087
|
function serialize_aggregator_CreateTaskReq(arg) {
|
|
12633
|
-
if (!(arg instanceof
|
|
13088
|
+
if (!(arg instanceof avs_pb25.CreateTaskReq)) {
|
|
12634
13089
|
throw new Error("Expected argument of type aggregator.CreateTaskReq");
|
|
12635
13090
|
}
|
|
12636
13091
|
return Buffer.from(arg.serializeBinary());
|
|
12637
13092
|
}
|
|
12638
13093
|
function deserialize_aggregator_CreateTaskReq(buffer_arg) {
|
|
12639
|
-
return
|
|
13094
|
+
return avs_pb25.CreateTaskReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12640
13095
|
}
|
|
12641
13096
|
function serialize_aggregator_CreateTaskResp(arg) {
|
|
12642
|
-
if (!(arg instanceof
|
|
13097
|
+
if (!(arg instanceof avs_pb25.CreateTaskResp)) {
|
|
12643
13098
|
throw new Error("Expected argument of type aggregator.CreateTaskResp");
|
|
12644
13099
|
}
|
|
12645
13100
|
return Buffer.from(arg.serializeBinary());
|
|
12646
13101
|
}
|
|
12647
13102
|
function deserialize_aggregator_CreateTaskResp(buffer_arg) {
|
|
12648
|
-
return
|
|
13103
|
+
return avs_pb25.CreateTaskResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12649
13104
|
}
|
|
12650
13105
|
function serialize_aggregator_DeleteSecretReq(arg) {
|
|
12651
|
-
if (!(arg instanceof
|
|
13106
|
+
if (!(arg instanceof avs_pb25.DeleteSecretReq)) {
|
|
12652
13107
|
throw new Error("Expected argument of type aggregator.DeleteSecretReq");
|
|
12653
13108
|
}
|
|
12654
13109
|
return Buffer.from(arg.serializeBinary());
|
|
12655
13110
|
}
|
|
12656
13111
|
function deserialize_aggregator_DeleteSecretReq(buffer_arg) {
|
|
12657
|
-
return
|
|
13112
|
+
return avs_pb25.DeleteSecretReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12658
13113
|
}
|
|
12659
13114
|
function serialize_aggregator_Execution(arg) {
|
|
12660
|
-
if (!(arg instanceof
|
|
13115
|
+
if (!(arg instanceof avs_pb25.Execution)) {
|
|
12661
13116
|
throw new Error("Expected argument of type aggregator.Execution");
|
|
12662
13117
|
}
|
|
12663
13118
|
return Buffer.from(arg.serializeBinary());
|
|
12664
13119
|
}
|
|
12665
13120
|
function deserialize_aggregator_Execution(buffer_arg) {
|
|
12666
|
-
return
|
|
13121
|
+
return avs_pb25.Execution.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12667
13122
|
}
|
|
12668
13123
|
function serialize_aggregator_ExecutionReq(arg) {
|
|
12669
|
-
if (!(arg instanceof
|
|
13124
|
+
if (!(arg instanceof avs_pb25.ExecutionReq)) {
|
|
12670
13125
|
throw new Error("Expected argument of type aggregator.ExecutionReq");
|
|
12671
13126
|
}
|
|
12672
13127
|
return Buffer.from(arg.serializeBinary());
|
|
12673
13128
|
}
|
|
12674
13129
|
function deserialize_aggregator_ExecutionReq(buffer_arg) {
|
|
12675
|
-
return
|
|
13130
|
+
return avs_pb25.ExecutionReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12676
13131
|
}
|
|
12677
13132
|
function serialize_aggregator_ExecutionStatusResp(arg) {
|
|
12678
|
-
if (!(arg instanceof
|
|
13133
|
+
if (!(arg instanceof avs_pb25.ExecutionStatusResp)) {
|
|
12679
13134
|
throw new Error("Expected argument of type aggregator.ExecutionStatusResp");
|
|
12680
13135
|
}
|
|
12681
13136
|
return Buffer.from(arg.serializeBinary());
|
|
12682
13137
|
}
|
|
12683
13138
|
function deserialize_aggregator_ExecutionStatusResp(buffer_arg) {
|
|
12684
|
-
return
|
|
13139
|
+
return avs_pb25.ExecutionStatusResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12685
13140
|
}
|
|
12686
13141
|
function serialize_aggregator_GetExecutionCountReq(arg) {
|
|
12687
|
-
if (!(arg instanceof
|
|
13142
|
+
if (!(arg instanceof avs_pb25.GetExecutionCountReq)) {
|
|
12688
13143
|
throw new Error("Expected argument of type aggregator.GetExecutionCountReq");
|
|
12689
13144
|
}
|
|
12690
13145
|
return Buffer.from(arg.serializeBinary());
|
|
12691
13146
|
}
|
|
12692
13147
|
function deserialize_aggregator_GetExecutionCountReq(buffer_arg) {
|
|
12693
|
-
return
|
|
13148
|
+
return avs_pb25.GetExecutionCountReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12694
13149
|
}
|
|
12695
13150
|
function serialize_aggregator_GetExecutionCountResp(arg) {
|
|
12696
|
-
if (!(arg instanceof
|
|
13151
|
+
if (!(arg instanceof avs_pb25.GetExecutionCountResp)) {
|
|
12697
13152
|
throw new Error("Expected argument of type aggregator.GetExecutionCountResp");
|
|
12698
13153
|
}
|
|
12699
13154
|
return Buffer.from(arg.serializeBinary());
|
|
12700
13155
|
}
|
|
12701
13156
|
function deserialize_aggregator_GetExecutionCountResp(buffer_arg) {
|
|
12702
|
-
return
|
|
13157
|
+
return avs_pb25.GetExecutionCountResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12703
13158
|
}
|
|
12704
13159
|
function serialize_aggregator_GetExecutionStatsReq(arg) {
|
|
12705
|
-
if (!(arg instanceof
|
|
13160
|
+
if (!(arg instanceof avs_pb25.GetExecutionStatsReq)) {
|
|
12706
13161
|
throw new Error("Expected argument of type aggregator.GetExecutionStatsReq");
|
|
12707
13162
|
}
|
|
12708
13163
|
return Buffer.from(arg.serializeBinary());
|
|
12709
13164
|
}
|
|
12710
13165
|
function deserialize_aggregator_GetExecutionStatsReq(buffer_arg) {
|
|
12711
|
-
return
|
|
13166
|
+
return avs_pb25.GetExecutionStatsReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12712
13167
|
}
|
|
12713
13168
|
function serialize_aggregator_GetExecutionStatsResp(arg) {
|
|
12714
|
-
if (!(arg instanceof
|
|
13169
|
+
if (!(arg instanceof avs_pb25.GetExecutionStatsResp)) {
|
|
12715
13170
|
throw new Error("Expected argument of type aggregator.GetExecutionStatsResp");
|
|
12716
13171
|
}
|
|
12717
13172
|
return Buffer.from(arg.serializeBinary());
|
|
12718
13173
|
}
|
|
12719
13174
|
function deserialize_aggregator_GetExecutionStatsResp(buffer_arg) {
|
|
12720
|
-
return
|
|
13175
|
+
return avs_pb25.GetExecutionStatsResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12721
13176
|
}
|
|
12722
13177
|
function serialize_aggregator_GetKeyReq(arg) {
|
|
12723
|
-
if (!(arg instanceof
|
|
13178
|
+
if (!(arg instanceof avs_pb25.GetKeyReq)) {
|
|
12724
13179
|
throw new Error("Expected argument of type aggregator.GetKeyReq");
|
|
12725
13180
|
}
|
|
12726
13181
|
return Buffer.from(arg.serializeBinary());
|
|
12727
13182
|
}
|
|
12728
13183
|
function deserialize_aggregator_GetKeyReq(buffer_arg) {
|
|
12729
|
-
return
|
|
13184
|
+
return avs_pb25.GetKeyReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12730
13185
|
}
|
|
12731
13186
|
function serialize_aggregator_GetSignatureFormatReq(arg) {
|
|
12732
|
-
if (!(arg instanceof
|
|
13187
|
+
if (!(arg instanceof avs_pb25.GetSignatureFormatReq)) {
|
|
12733
13188
|
throw new Error("Expected argument of type aggregator.GetSignatureFormatReq");
|
|
12734
13189
|
}
|
|
12735
13190
|
return Buffer.from(arg.serializeBinary());
|
|
12736
13191
|
}
|
|
12737
13192
|
function deserialize_aggregator_GetSignatureFormatReq(buffer_arg) {
|
|
12738
|
-
return
|
|
13193
|
+
return avs_pb25.GetSignatureFormatReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12739
13194
|
}
|
|
12740
13195
|
function serialize_aggregator_GetSignatureFormatResp(arg) {
|
|
12741
|
-
if (!(arg instanceof
|
|
13196
|
+
if (!(arg instanceof avs_pb25.GetSignatureFormatResp)) {
|
|
12742
13197
|
throw new Error("Expected argument of type aggregator.GetSignatureFormatResp");
|
|
12743
13198
|
}
|
|
12744
13199
|
return Buffer.from(arg.serializeBinary());
|
|
12745
13200
|
}
|
|
12746
13201
|
function deserialize_aggregator_GetSignatureFormatResp(buffer_arg) {
|
|
12747
|
-
return
|
|
13202
|
+
return avs_pb25.GetSignatureFormatResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12748
13203
|
}
|
|
12749
13204
|
function serialize_aggregator_GetWalletReq(arg) {
|
|
12750
|
-
if (!(arg instanceof
|
|
13205
|
+
if (!(arg instanceof avs_pb25.GetWalletReq)) {
|
|
12751
13206
|
throw new Error("Expected argument of type aggregator.GetWalletReq");
|
|
12752
13207
|
}
|
|
12753
13208
|
return Buffer.from(arg.serializeBinary());
|
|
12754
13209
|
}
|
|
12755
13210
|
function deserialize_aggregator_GetWalletReq(buffer_arg) {
|
|
12756
|
-
return
|
|
13211
|
+
return avs_pb25.GetWalletReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12757
13212
|
}
|
|
12758
13213
|
function serialize_aggregator_GetWalletResp(arg) {
|
|
12759
|
-
if (!(arg instanceof
|
|
13214
|
+
if (!(arg instanceof avs_pb25.GetWalletResp)) {
|
|
12760
13215
|
throw new Error("Expected argument of type aggregator.GetWalletResp");
|
|
12761
13216
|
}
|
|
12762
13217
|
return Buffer.from(arg.serializeBinary());
|
|
12763
13218
|
}
|
|
12764
13219
|
function deserialize_aggregator_GetWalletResp(buffer_arg) {
|
|
12765
|
-
return
|
|
13220
|
+
return avs_pb25.GetWalletResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12766
13221
|
}
|
|
12767
13222
|
function serialize_aggregator_GetWorkflowCountReq(arg) {
|
|
12768
|
-
if (!(arg instanceof
|
|
13223
|
+
if (!(arg instanceof avs_pb25.GetWorkflowCountReq)) {
|
|
12769
13224
|
throw new Error("Expected argument of type aggregator.GetWorkflowCountReq");
|
|
12770
13225
|
}
|
|
12771
13226
|
return Buffer.from(arg.serializeBinary());
|
|
12772
13227
|
}
|
|
12773
13228
|
function deserialize_aggregator_GetWorkflowCountReq(buffer_arg) {
|
|
12774
|
-
return
|
|
13229
|
+
return avs_pb25.GetWorkflowCountReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12775
13230
|
}
|
|
12776
13231
|
function serialize_aggregator_GetWorkflowCountResp(arg) {
|
|
12777
|
-
if (!(arg instanceof
|
|
13232
|
+
if (!(arg instanceof avs_pb25.GetWorkflowCountResp)) {
|
|
12778
13233
|
throw new Error("Expected argument of type aggregator.GetWorkflowCountResp");
|
|
12779
13234
|
}
|
|
12780
13235
|
return Buffer.from(arg.serializeBinary());
|
|
12781
13236
|
}
|
|
12782
13237
|
function deserialize_aggregator_GetWorkflowCountResp(buffer_arg) {
|
|
12783
|
-
return
|
|
13238
|
+
return avs_pb25.GetWorkflowCountResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12784
13239
|
}
|
|
12785
13240
|
function serialize_aggregator_IdReq(arg) {
|
|
12786
|
-
if (!(arg instanceof
|
|
13241
|
+
if (!(arg instanceof avs_pb25.IdReq)) {
|
|
12787
13242
|
throw new Error("Expected argument of type aggregator.IdReq");
|
|
12788
13243
|
}
|
|
12789
13244
|
return Buffer.from(arg.serializeBinary());
|
|
12790
13245
|
}
|
|
12791
13246
|
function deserialize_aggregator_IdReq(buffer_arg) {
|
|
12792
|
-
return
|
|
13247
|
+
return avs_pb25.IdReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12793
13248
|
}
|
|
12794
13249
|
function serialize_aggregator_KeyResp(arg) {
|
|
12795
|
-
if (!(arg instanceof
|
|
13250
|
+
if (!(arg instanceof avs_pb25.KeyResp)) {
|
|
12796
13251
|
throw new Error("Expected argument of type aggregator.KeyResp");
|
|
12797
13252
|
}
|
|
12798
13253
|
return Buffer.from(arg.serializeBinary());
|
|
12799
13254
|
}
|
|
12800
13255
|
function deserialize_aggregator_KeyResp(buffer_arg) {
|
|
12801
|
-
return
|
|
13256
|
+
return avs_pb25.KeyResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12802
13257
|
}
|
|
12803
13258
|
function serialize_aggregator_ListExecutionsReq(arg) {
|
|
12804
|
-
if (!(arg instanceof
|
|
13259
|
+
if (!(arg instanceof avs_pb25.ListExecutionsReq)) {
|
|
12805
13260
|
throw new Error("Expected argument of type aggregator.ListExecutionsReq");
|
|
12806
13261
|
}
|
|
12807
13262
|
return Buffer.from(arg.serializeBinary());
|
|
12808
13263
|
}
|
|
12809
13264
|
function deserialize_aggregator_ListExecutionsReq(buffer_arg) {
|
|
12810
|
-
return
|
|
13265
|
+
return avs_pb25.ListExecutionsReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12811
13266
|
}
|
|
12812
13267
|
function serialize_aggregator_ListExecutionsResp(arg) {
|
|
12813
|
-
if (!(arg instanceof
|
|
13268
|
+
if (!(arg instanceof avs_pb25.ListExecutionsResp)) {
|
|
12814
13269
|
throw new Error("Expected argument of type aggregator.ListExecutionsResp");
|
|
12815
13270
|
}
|
|
12816
13271
|
return Buffer.from(arg.serializeBinary());
|
|
12817
13272
|
}
|
|
12818
13273
|
function deserialize_aggregator_ListExecutionsResp(buffer_arg) {
|
|
12819
|
-
return
|
|
13274
|
+
return avs_pb25.ListExecutionsResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12820
13275
|
}
|
|
12821
13276
|
function serialize_aggregator_ListSecretsReq(arg) {
|
|
12822
|
-
if (!(arg instanceof
|
|
13277
|
+
if (!(arg instanceof avs_pb25.ListSecretsReq)) {
|
|
12823
13278
|
throw new Error("Expected argument of type aggregator.ListSecretsReq");
|
|
12824
13279
|
}
|
|
12825
13280
|
return Buffer.from(arg.serializeBinary());
|
|
12826
13281
|
}
|
|
12827
13282
|
function deserialize_aggregator_ListSecretsReq(buffer_arg) {
|
|
12828
|
-
return
|
|
13283
|
+
return avs_pb25.ListSecretsReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12829
13284
|
}
|
|
12830
13285
|
function serialize_aggregator_ListSecretsResp(arg) {
|
|
12831
|
-
if (!(arg instanceof
|
|
13286
|
+
if (!(arg instanceof avs_pb25.ListSecretsResp)) {
|
|
12832
13287
|
throw new Error("Expected argument of type aggregator.ListSecretsResp");
|
|
12833
13288
|
}
|
|
12834
13289
|
return Buffer.from(arg.serializeBinary());
|
|
12835
13290
|
}
|
|
12836
13291
|
function deserialize_aggregator_ListSecretsResp(buffer_arg) {
|
|
12837
|
-
return
|
|
13292
|
+
return avs_pb25.ListSecretsResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12838
13293
|
}
|
|
12839
13294
|
function serialize_aggregator_ListTasksReq(arg) {
|
|
12840
|
-
if (!(arg instanceof
|
|
13295
|
+
if (!(arg instanceof avs_pb25.ListTasksReq)) {
|
|
12841
13296
|
throw new Error("Expected argument of type aggregator.ListTasksReq");
|
|
12842
13297
|
}
|
|
12843
13298
|
return Buffer.from(arg.serializeBinary());
|
|
12844
13299
|
}
|
|
12845
13300
|
function deserialize_aggregator_ListTasksReq(buffer_arg) {
|
|
12846
|
-
return
|
|
13301
|
+
return avs_pb25.ListTasksReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12847
13302
|
}
|
|
12848
13303
|
function serialize_aggregator_ListTasksResp(arg) {
|
|
12849
|
-
if (!(arg instanceof
|
|
13304
|
+
if (!(arg instanceof avs_pb25.ListTasksResp)) {
|
|
12850
13305
|
throw new Error("Expected argument of type aggregator.ListTasksResp");
|
|
12851
13306
|
}
|
|
12852
13307
|
return Buffer.from(arg.serializeBinary());
|
|
12853
13308
|
}
|
|
12854
13309
|
function deserialize_aggregator_ListTasksResp(buffer_arg) {
|
|
12855
|
-
return
|
|
13310
|
+
return avs_pb25.ListTasksResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12856
13311
|
}
|
|
12857
13312
|
function serialize_aggregator_ListWalletReq(arg) {
|
|
12858
|
-
if (!(arg instanceof
|
|
13313
|
+
if (!(arg instanceof avs_pb25.ListWalletReq)) {
|
|
12859
13314
|
throw new Error("Expected argument of type aggregator.ListWalletReq");
|
|
12860
13315
|
}
|
|
12861
13316
|
return Buffer.from(arg.serializeBinary());
|
|
12862
13317
|
}
|
|
12863
13318
|
function deserialize_aggregator_ListWalletReq(buffer_arg) {
|
|
12864
|
-
return
|
|
13319
|
+
return avs_pb25.ListWalletReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12865
13320
|
}
|
|
12866
13321
|
function serialize_aggregator_ListWalletResp(arg) {
|
|
12867
|
-
if (!(arg instanceof
|
|
13322
|
+
if (!(arg instanceof avs_pb25.ListWalletResp)) {
|
|
12868
13323
|
throw new Error("Expected argument of type aggregator.ListWalletResp");
|
|
12869
13324
|
}
|
|
12870
13325
|
return Buffer.from(arg.serializeBinary());
|
|
12871
13326
|
}
|
|
12872
13327
|
function deserialize_aggregator_ListWalletResp(buffer_arg) {
|
|
12873
|
-
return
|
|
13328
|
+
return avs_pb25.ListWalletResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12874
13329
|
}
|
|
12875
13330
|
function serialize_aggregator_NonceRequest(arg) {
|
|
12876
|
-
if (!(arg instanceof
|
|
13331
|
+
if (!(arg instanceof avs_pb25.NonceRequest)) {
|
|
12877
13332
|
throw new Error("Expected argument of type aggregator.NonceRequest");
|
|
12878
13333
|
}
|
|
12879
13334
|
return Buffer.from(arg.serializeBinary());
|
|
12880
13335
|
}
|
|
12881
13336
|
function deserialize_aggregator_NonceRequest(buffer_arg) {
|
|
12882
|
-
return
|
|
13337
|
+
return avs_pb25.NonceRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12883
13338
|
}
|
|
12884
13339
|
function serialize_aggregator_NonceResp(arg) {
|
|
12885
|
-
if (!(arg instanceof
|
|
13340
|
+
if (!(arg instanceof avs_pb25.NonceResp)) {
|
|
12886
13341
|
throw new Error("Expected argument of type aggregator.NonceResp");
|
|
12887
13342
|
}
|
|
12888
13343
|
return Buffer.from(arg.serializeBinary());
|
|
12889
13344
|
}
|
|
12890
13345
|
function deserialize_aggregator_NonceResp(buffer_arg) {
|
|
12891
|
-
return
|
|
13346
|
+
return avs_pb25.NonceResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12892
13347
|
}
|
|
12893
13348
|
function serialize_aggregator_RunNodeWithInputsReq(arg) {
|
|
12894
|
-
if (!(arg instanceof
|
|
13349
|
+
if (!(arg instanceof avs_pb25.RunNodeWithInputsReq)) {
|
|
12895
13350
|
throw new Error("Expected argument of type aggregator.RunNodeWithInputsReq");
|
|
12896
13351
|
}
|
|
12897
13352
|
return Buffer.from(arg.serializeBinary());
|
|
12898
13353
|
}
|
|
12899
13354
|
function deserialize_aggregator_RunNodeWithInputsReq(buffer_arg) {
|
|
12900
|
-
return
|
|
13355
|
+
return avs_pb25.RunNodeWithInputsReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12901
13356
|
}
|
|
12902
13357
|
function serialize_aggregator_RunNodeWithInputsResp(arg) {
|
|
12903
|
-
if (!(arg instanceof
|
|
13358
|
+
if (!(arg instanceof avs_pb25.RunNodeWithInputsResp)) {
|
|
12904
13359
|
throw new Error("Expected argument of type aggregator.RunNodeWithInputsResp");
|
|
12905
13360
|
}
|
|
12906
13361
|
return Buffer.from(arg.serializeBinary());
|
|
12907
13362
|
}
|
|
12908
13363
|
function deserialize_aggregator_RunNodeWithInputsResp(buffer_arg) {
|
|
12909
|
-
return
|
|
13364
|
+
return avs_pb25.RunNodeWithInputsResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
13365
|
+
}
|
|
13366
|
+
function serialize_aggregator_RunTriggerReq(arg) {
|
|
13367
|
+
if (!(arg instanceof avs_pb25.RunTriggerReq)) {
|
|
13368
|
+
throw new Error("Expected argument of type aggregator.RunTriggerReq");
|
|
13369
|
+
}
|
|
13370
|
+
return Buffer.from(arg.serializeBinary());
|
|
13371
|
+
}
|
|
13372
|
+
function deserialize_aggregator_RunTriggerReq(buffer_arg) {
|
|
13373
|
+
return avs_pb25.RunTriggerReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
13374
|
+
}
|
|
13375
|
+
function serialize_aggregator_RunTriggerResp(arg) {
|
|
13376
|
+
if (!(arg instanceof avs_pb25.RunTriggerResp)) {
|
|
13377
|
+
throw new Error("Expected argument of type aggregator.RunTriggerResp");
|
|
13378
|
+
}
|
|
13379
|
+
return Buffer.from(arg.serializeBinary());
|
|
13380
|
+
}
|
|
13381
|
+
function deserialize_aggregator_RunTriggerResp(buffer_arg) {
|
|
13382
|
+
return avs_pb25.RunTriggerResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12910
13383
|
}
|
|
12911
13384
|
function serialize_aggregator_SetWalletReq(arg) {
|
|
12912
|
-
if (!(arg instanceof
|
|
13385
|
+
if (!(arg instanceof avs_pb25.SetWalletReq)) {
|
|
12913
13386
|
throw new Error("Expected argument of type aggregator.SetWalletReq");
|
|
12914
13387
|
}
|
|
12915
13388
|
return Buffer.from(arg.serializeBinary());
|
|
12916
13389
|
}
|
|
12917
13390
|
function deserialize_aggregator_SetWalletReq(buffer_arg) {
|
|
12918
|
-
return
|
|
13391
|
+
return avs_pb25.SetWalletReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12919
13392
|
}
|
|
12920
13393
|
function serialize_aggregator_Task(arg) {
|
|
12921
|
-
if (!(arg instanceof
|
|
13394
|
+
if (!(arg instanceof avs_pb25.Task)) {
|
|
12922
13395
|
throw new Error("Expected argument of type aggregator.Task");
|
|
12923
13396
|
}
|
|
12924
13397
|
return Buffer.from(arg.serializeBinary());
|
|
12925
13398
|
}
|
|
12926
13399
|
function deserialize_aggregator_Task(buffer_arg) {
|
|
12927
|
-
return
|
|
13400
|
+
return avs_pb25.Task.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12928
13401
|
}
|
|
12929
13402
|
function serialize_aggregator_UserTriggerTaskReq(arg) {
|
|
12930
|
-
if (!(arg instanceof
|
|
13403
|
+
if (!(arg instanceof avs_pb25.UserTriggerTaskReq)) {
|
|
12931
13404
|
throw new Error("Expected argument of type aggregator.UserTriggerTaskReq");
|
|
12932
13405
|
}
|
|
12933
13406
|
return Buffer.from(arg.serializeBinary());
|
|
12934
13407
|
}
|
|
12935
13408
|
function deserialize_aggregator_UserTriggerTaskReq(buffer_arg) {
|
|
12936
|
-
return
|
|
13409
|
+
return avs_pb25.UserTriggerTaskReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12937
13410
|
}
|
|
12938
13411
|
function serialize_aggregator_UserTriggerTaskResp(arg) {
|
|
12939
|
-
if (!(arg instanceof
|
|
13412
|
+
if (!(arg instanceof avs_pb25.UserTriggerTaskResp)) {
|
|
12940
13413
|
throw new Error("Expected argument of type aggregator.UserTriggerTaskResp");
|
|
12941
13414
|
}
|
|
12942
13415
|
return Buffer.from(arg.serializeBinary());
|
|
12943
13416
|
}
|
|
12944
13417
|
function deserialize_aggregator_UserTriggerTaskResp(buffer_arg) {
|
|
12945
|
-
return
|
|
13418
|
+
return avs_pb25.UserTriggerTaskResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
12946
13419
|
}
|
|
12947
13420
|
function serialize_google_protobuf_BoolValue(arg) {
|
|
12948
13421
|
if (!(arg instanceof google_protobuf_wrappers_pb.BoolValue)) {
|
|
@@ -12959,8 +13432,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
12959
13432
|
path: "/aggregator.Aggregator/GetKey",
|
|
12960
13433
|
requestStream: false,
|
|
12961
13434
|
responseStream: false,
|
|
12962
|
-
requestType:
|
|
12963
|
-
responseType:
|
|
13435
|
+
requestType: avs_pb25.GetKeyReq,
|
|
13436
|
+
responseType: avs_pb25.KeyResp,
|
|
12964
13437
|
requestSerialize: serialize_aggregator_GetKeyReq,
|
|
12965
13438
|
requestDeserialize: deserialize_aggregator_GetKeyReq,
|
|
12966
13439
|
responseSerialize: serialize_aggregator_KeyResp,
|
|
@@ -12971,8 +13444,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
12971
13444
|
path: "/aggregator.Aggregator/GetSignatureFormat",
|
|
12972
13445
|
requestStream: false,
|
|
12973
13446
|
responseStream: false,
|
|
12974
|
-
requestType:
|
|
12975
|
-
responseType:
|
|
13447
|
+
requestType: avs_pb25.GetSignatureFormatReq,
|
|
13448
|
+
responseType: avs_pb25.GetSignatureFormatResp,
|
|
12976
13449
|
requestSerialize: serialize_aggregator_GetSignatureFormatReq,
|
|
12977
13450
|
requestDeserialize: deserialize_aggregator_GetSignatureFormatReq,
|
|
12978
13451
|
responseSerialize: serialize_aggregator_GetSignatureFormatResp,
|
|
@@ -12983,8 +13456,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
12983
13456
|
path: "/aggregator.Aggregator/GetNonce",
|
|
12984
13457
|
requestStream: false,
|
|
12985
13458
|
responseStream: false,
|
|
12986
|
-
requestType:
|
|
12987
|
-
responseType:
|
|
13459
|
+
requestType: avs_pb25.NonceRequest,
|
|
13460
|
+
responseType: avs_pb25.NonceResp,
|
|
12988
13461
|
requestSerialize: serialize_aggregator_NonceRequest,
|
|
12989
13462
|
requestDeserialize: deserialize_aggregator_NonceRequest,
|
|
12990
13463
|
responseSerialize: serialize_aggregator_NonceResp,
|
|
@@ -12994,8 +13467,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
12994
13467
|
path: "/aggregator.Aggregator/GetWallet",
|
|
12995
13468
|
requestStream: false,
|
|
12996
13469
|
responseStream: false,
|
|
12997
|
-
requestType:
|
|
12998
|
-
responseType:
|
|
13470
|
+
requestType: avs_pb25.GetWalletReq,
|
|
13471
|
+
responseType: avs_pb25.GetWalletResp,
|
|
12999
13472
|
requestSerialize: serialize_aggregator_GetWalletReq,
|
|
13000
13473
|
requestDeserialize: deserialize_aggregator_GetWalletReq,
|
|
13001
13474
|
responseSerialize: serialize_aggregator_GetWalletResp,
|
|
@@ -13005,8 +13478,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13005
13478
|
path: "/aggregator.Aggregator/SetWallet",
|
|
13006
13479
|
requestStream: false,
|
|
13007
13480
|
responseStream: false,
|
|
13008
|
-
requestType:
|
|
13009
|
-
responseType:
|
|
13481
|
+
requestType: avs_pb25.SetWalletReq,
|
|
13482
|
+
responseType: avs_pb25.GetWalletResp,
|
|
13010
13483
|
requestSerialize: serialize_aggregator_SetWalletReq,
|
|
13011
13484
|
requestDeserialize: deserialize_aggregator_SetWalletReq,
|
|
13012
13485
|
responseSerialize: serialize_aggregator_GetWalletResp,
|
|
@@ -13016,8 +13489,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13016
13489
|
path: "/aggregator.Aggregator/ListWallets",
|
|
13017
13490
|
requestStream: false,
|
|
13018
13491
|
responseStream: false,
|
|
13019
|
-
requestType:
|
|
13020
|
-
responseType:
|
|
13492
|
+
requestType: avs_pb25.ListWalletReq,
|
|
13493
|
+
responseType: avs_pb25.ListWalletResp,
|
|
13021
13494
|
requestSerialize: serialize_aggregator_ListWalletReq,
|
|
13022
13495
|
requestDeserialize: deserialize_aggregator_ListWalletReq,
|
|
13023
13496
|
responseSerialize: serialize_aggregator_ListWalletResp,
|
|
@@ -13028,8 +13501,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13028
13501
|
path: "/aggregator.Aggregator/CreateTask",
|
|
13029
13502
|
requestStream: false,
|
|
13030
13503
|
responseStream: false,
|
|
13031
|
-
requestType:
|
|
13032
|
-
responseType:
|
|
13504
|
+
requestType: avs_pb25.CreateTaskReq,
|
|
13505
|
+
responseType: avs_pb25.CreateTaskResp,
|
|
13033
13506
|
requestSerialize: serialize_aggregator_CreateTaskReq,
|
|
13034
13507
|
requestDeserialize: deserialize_aggregator_CreateTaskReq,
|
|
13035
13508
|
responseSerialize: serialize_aggregator_CreateTaskResp,
|
|
@@ -13039,8 +13512,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13039
13512
|
path: "/aggregator.Aggregator/ListTasks",
|
|
13040
13513
|
requestStream: false,
|
|
13041
13514
|
responseStream: false,
|
|
13042
|
-
requestType:
|
|
13043
|
-
responseType:
|
|
13515
|
+
requestType: avs_pb25.ListTasksReq,
|
|
13516
|
+
responseType: avs_pb25.ListTasksResp,
|
|
13044
13517
|
requestSerialize: serialize_aggregator_ListTasksReq,
|
|
13045
13518
|
requestDeserialize: deserialize_aggregator_ListTasksReq,
|
|
13046
13519
|
responseSerialize: serialize_aggregator_ListTasksResp,
|
|
@@ -13050,8 +13523,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13050
13523
|
path: "/aggregator.Aggregator/GetTask",
|
|
13051
13524
|
requestStream: false,
|
|
13052
13525
|
responseStream: false,
|
|
13053
|
-
requestType:
|
|
13054
|
-
responseType:
|
|
13526
|
+
requestType: avs_pb25.IdReq,
|
|
13527
|
+
responseType: avs_pb25.Task,
|
|
13055
13528
|
requestSerialize: serialize_aggregator_IdReq,
|
|
13056
13529
|
requestDeserialize: deserialize_aggregator_IdReq,
|
|
13057
13530
|
responseSerialize: serialize_aggregator_Task,
|
|
@@ -13061,8 +13534,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13061
13534
|
path: "/aggregator.Aggregator/ListExecutions",
|
|
13062
13535
|
requestStream: false,
|
|
13063
13536
|
responseStream: false,
|
|
13064
|
-
requestType:
|
|
13065
|
-
responseType:
|
|
13537
|
+
requestType: avs_pb25.ListExecutionsReq,
|
|
13538
|
+
responseType: avs_pb25.ListExecutionsResp,
|
|
13066
13539
|
requestSerialize: serialize_aggregator_ListExecutionsReq,
|
|
13067
13540
|
requestDeserialize: deserialize_aggregator_ListExecutionsReq,
|
|
13068
13541
|
responseSerialize: serialize_aggregator_ListExecutionsResp,
|
|
@@ -13072,8 +13545,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13072
13545
|
path: "/aggregator.Aggregator/GetExecution",
|
|
13073
13546
|
requestStream: false,
|
|
13074
13547
|
responseStream: false,
|
|
13075
|
-
requestType:
|
|
13076
|
-
responseType:
|
|
13548
|
+
requestType: avs_pb25.ExecutionReq,
|
|
13549
|
+
responseType: avs_pb25.Execution,
|
|
13077
13550
|
requestSerialize: serialize_aggregator_ExecutionReq,
|
|
13078
13551
|
requestDeserialize: deserialize_aggregator_ExecutionReq,
|
|
13079
13552
|
responseSerialize: serialize_aggregator_Execution,
|
|
@@ -13083,8 +13556,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13083
13556
|
path: "/aggregator.Aggregator/GetExecutionStatus",
|
|
13084
13557
|
requestStream: false,
|
|
13085
13558
|
responseStream: false,
|
|
13086
|
-
requestType:
|
|
13087
|
-
responseType:
|
|
13559
|
+
requestType: avs_pb25.ExecutionReq,
|
|
13560
|
+
responseType: avs_pb25.ExecutionStatusResp,
|
|
13088
13561
|
requestSerialize: serialize_aggregator_ExecutionReq,
|
|
13089
13562
|
requestDeserialize: deserialize_aggregator_ExecutionReq,
|
|
13090
13563
|
responseSerialize: serialize_aggregator_ExecutionStatusResp,
|
|
@@ -13094,7 +13567,7 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13094
13567
|
path: "/aggregator.Aggregator/CancelTask",
|
|
13095
13568
|
requestStream: false,
|
|
13096
13569
|
responseStream: false,
|
|
13097
|
-
requestType:
|
|
13570
|
+
requestType: avs_pb25.IdReq,
|
|
13098
13571
|
responseType: google_protobuf_wrappers_pb.BoolValue,
|
|
13099
13572
|
requestSerialize: serialize_aggregator_IdReq,
|
|
13100
13573
|
requestDeserialize: deserialize_aggregator_IdReq,
|
|
@@ -13105,7 +13578,7 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13105
13578
|
path: "/aggregator.Aggregator/DeleteTask",
|
|
13106
13579
|
requestStream: false,
|
|
13107
13580
|
responseStream: false,
|
|
13108
|
-
requestType:
|
|
13581
|
+
requestType: avs_pb25.IdReq,
|
|
13109
13582
|
responseType: google_protobuf_wrappers_pb.BoolValue,
|
|
13110
13583
|
requestSerialize: serialize_aggregator_IdReq,
|
|
13111
13584
|
requestDeserialize: deserialize_aggregator_IdReq,
|
|
@@ -13116,8 +13589,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13116
13589
|
path: "/aggregator.Aggregator/TriggerTask",
|
|
13117
13590
|
requestStream: false,
|
|
13118
13591
|
responseStream: false,
|
|
13119
|
-
requestType:
|
|
13120
|
-
responseType:
|
|
13592
|
+
requestType: avs_pb25.UserTriggerTaskReq,
|
|
13593
|
+
responseType: avs_pb25.UserTriggerTaskResp,
|
|
13121
13594
|
requestSerialize: serialize_aggregator_UserTriggerTaskReq,
|
|
13122
13595
|
requestDeserialize: deserialize_aggregator_UserTriggerTaskReq,
|
|
13123
13596
|
responseSerialize: serialize_aggregator_UserTriggerTaskResp,
|
|
@@ -13130,7 +13603,7 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13130
13603
|
path: "/aggregator.Aggregator/CreateSecret",
|
|
13131
13604
|
requestStream: false,
|
|
13132
13605
|
responseStream: false,
|
|
13133
|
-
requestType:
|
|
13606
|
+
requestType: avs_pb25.CreateOrUpdateSecretReq,
|
|
13134
13607
|
responseType: google_protobuf_wrappers_pb.BoolValue,
|
|
13135
13608
|
requestSerialize: serialize_aggregator_CreateOrUpdateSecretReq,
|
|
13136
13609
|
requestDeserialize: deserialize_aggregator_CreateOrUpdateSecretReq,
|
|
@@ -13141,7 +13614,7 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13141
13614
|
path: "/aggregator.Aggregator/DeleteSecret",
|
|
13142
13615
|
requestStream: false,
|
|
13143
13616
|
responseStream: false,
|
|
13144
|
-
requestType:
|
|
13617
|
+
requestType: avs_pb25.DeleteSecretReq,
|
|
13145
13618
|
responseType: google_protobuf_wrappers_pb.BoolValue,
|
|
13146
13619
|
requestSerialize: serialize_aggregator_DeleteSecretReq,
|
|
13147
13620
|
requestDeserialize: deserialize_aggregator_DeleteSecretReq,
|
|
@@ -13154,8 +13627,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13154
13627
|
path: "/aggregator.Aggregator/ListSecrets",
|
|
13155
13628
|
requestStream: false,
|
|
13156
13629
|
responseStream: false,
|
|
13157
|
-
requestType:
|
|
13158
|
-
responseType:
|
|
13630
|
+
requestType: avs_pb25.ListSecretsReq,
|
|
13631
|
+
responseType: avs_pb25.ListSecretsResp,
|
|
13159
13632
|
requestSerialize: serialize_aggregator_ListSecretsReq,
|
|
13160
13633
|
requestDeserialize: deserialize_aggregator_ListSecretsReq,
|
|
13161
13634
|
responseSerialize: serialize_aggregator_ListSecretsResp,
|
|
@@ -13167,7 +13640,7 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13167
13640
|
path: "/aggregator.Aggregator/UpdateSecret",
|
|
13168
13641
|
requestStream: false,
|
|
13169
13642
|
responseStream: false,
|
|
13170
|
-
requestType:
|
|
13643
|
+
requestType: avs_pb25.CreateOrUpdateSecretReq,
|
|
13171
13644
|
responseType: google_protobuf_wrappers_pb.BoolValue,
|
|
13172
13645
|
requestSerialize: serialize_aggregator_CreateOrUpdateSecretReq,
|
|
13173
13646
|
requestDeserialize: deserialize_aggregator_CreateOrUpdateSecretReq,
|
|
@@ -13184,8 +13657,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13184
13657
|
path: "/aggregator.Aggregator/GetWorkflowCount",
|
|
13185
13658
|
requestStream: false,
|
|
13186
13659
|
responseStream: false,
|
|
13187
|
-
requestType:
|
|
13188
|
-
responseType:
|
|
13660
|
+
requestType: avs_pb25.GetWorkflowCountReq,
|
|
13661
|
+
responseType: avs_pb25.GetWorkflowCountResp,
|
|
13189
13662
|
requestSerialize: serialize_aggregator_GetWorkflowCountReq,
|
|
13190
13663
|
requestDeserialize: deserialize_aggregator_GetWorkflowCountReq,
|
|
13191
13664
|
responseSerialize: serialize_aggregator_GetWorkflowCountResp,
|
|
@@ -13199,8 +13672,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13199
13672
|
path: "/aggregator.Aggregator/GetExecutionCount",
|
|
13200
13673
|
requestStream: false,
|
|
13201
13674
|
responseStream: false,
|
|
13202
|
-
requestType:
|
|
13203
|
-
responseType:
|
|
13675
|
+
requestType: avs_pb25.GetExecutionCountReq,
|
|
13676
|
+
responseType: avs_pb25.GetExecutionCountResp,
|
|
13204
13677
|
requestSerialize: serialize_aggregator_GetExecutionCountReq,
|
|
13205
13678
|
requestDeserialize: deserialize_aggregator_GetExecutionCountReq,
|
|
13206
13679
|
responseSerialize: serialize_aggregator_GetExecutionCountResp,
|
|
@@ -13213,8 +13686,8 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13213
13686
|
path: "/aggregator.Aggregator/GetExecutionStats",
|
|
13214
13687
|
requestStream: false,
|
|
13215
13688
|
responseStream: false,
|
|
13216
|
-
requestType:
|
|
13217
|
-
responseType:
|
|
13689
|
+
requestType: avs_pb25.GetExecutionStatsReq,
|
|
13690
|
+
responseType: avs_pb25.GetExecutionStatsResp,
|
|
13218
13691
|
requestSerialize: serialize_aggregator_GetExecutionStatsReq,
|
|
13219
13692
|
requestDeserialize: deserialize_aggregator_GetExecutionStatsReq,
|
|
13220
13693
|
responseSerialize: serialize_aggregator_GetExecutionStatsResp,
|
|
@@ -13225,12 +13698,24 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13225
13698
|
path: "/aggregator.Aggregator/RunNodeWithInputs",
|
|
13226
13699
|
requestStream: false,
|
|
13227
13700
|
responseStream: false,
|
|
13228
|
-
requestType:
|
|
13229
|
-
responseType:
|
|
13701
|
+
requestType: avs_pb25.RunNodeWithInputsReq,
|
|
13702
|
+
responseType: avs_pb25.RunNodeWithInputsResp,
|
|
13230
13703
|
requestSerialize: serialize_aggregator_RunNodeWithInputsReq,
|
|
13231
13704
|
requestDeserialize: deserialize_aggregator_RunNodeWithInputsReq,
|
|
13232
13705
|
responseSerialize: serialize_aggregator_RunNodeWithInputsResp,
|
|
13233
13706
|
responseDeserialize: deserialize_aggregator_RunNodeWithInputsResp
|
|
13707
|
+
},
|
|
13708
|
+
// RunTrigger allows executing a single trigger for testing purposes (triggers don't accept inputs)
|
|
13709
|
+
runTrigger: {
|
|
13710
|
+
path: "/aggregator.Aggregator/RunTrigger",
|
|
13711
|
+
requestStream: false,
|
|
13712
|
+
responseStream: false,
|
|
13713
|
+
requestType: avs_pb25.RunTriggerReq,
|
|
13714
|
+
responseType: avs_pb25.RunTriggerResp,
|
|
13715
|
+
requestSerialize: serialize_aggregator_RunTriggerReq,
|
|
13716
|
+
requestDeserialize: deserialize_aggregator_RunTriggerReq,
|
|
13717
|
+
responseSerialize: serialize_aggregator_RunTriggerResp,
|
|
13718
|
+
responseDeserialize: deserialize_aggregator_RunTriggerResp
|
|
13234
13719
|
}
|
|
13235
13720
|
};
|
|
13236
13721
|
exports2.AggregatorClient = grpc.makeGenericClientConstructor(AggregatorService, "Aggregator");
|
|
@@ -13268,14 +13753,13 @@ __export(index_exports, {
|
|
|
13268
13753
|
Workflow: () => workflow_default
|
|
13269
13754
|
});
|
|
13270
13755
|
module.exports = __toCommonJS(index_exports);
|
|
13271
|
-
var import_lodash4 = __toESM(require("lodash"));
|
|
13272
13756
|
var import_grpc_js = require("@grpc/grpc-js");
|
|
13273
13757
|
var import_avs_grpc_pb = __toESM(require_avs_grpc_pb());
|
|
13274
|
-
var
|
|
13758
|
+
var avs_pb24 = __toESM(require_avs_pb());
|
|
13275
13759
|
|
|
13276
13760
|
// src/models/workflow.ts
|
|
13277
13761
|
var import_lodash3 = __toESM(require("lodash"));
|
|
13278
|
-
var
|
|
13762
|
+
var avs_pb19 = __toESM(require_avs_pb());
|
|
13279
13763
|
|
|
13280
13764
|
// src/models/edge.ts
|
|
13281
13765
|
var avs_pb = __toESM(require_avs_pb());
|
|
@@ -13298,6 +13782,9 @@ var Edge = class _Edge {
|
|
|
13298
13782
|
};
|
|
13299
13783
|
var edge_default = Edge;
|
|
13300
13784
|
|
|
13785
|
+
// src/models/trigger/factory.ts
|
|
13786
|
+
var avs_pb7 = __toESM(require_avs_pb());
|
|
13787
|
+
|
|
13301
13788
|
// src/models/trigger/block.ts
|
|
13302
13789
|
var avs_pb2 = __toESM(require_avs_pb());
|
|
13303
13790
|
|
|
@@ -13368,6 +13855,15 @@ var BlockTrigger2 = class _BlockTrigger extends interface_default {
|
|
|
13368
13855
|
getOutput() {
|
|
13369
13856
|
return this.output;
|
|
13370
13857
|
}
|
|
13858
|
+
/**
|
|
13859
|
+
* Extract output data from RunTriggerResp for block triggers
|
|
13860
|
+
* @param outputData - The RunTriggerResp containing block trigger output
|
|
13861
|
+
* @returns Plain JavaScript object with block trigger data
|
|
13862
|
+
*/
|
|
13863
|
+
static fromOutputData(outputData) {
|
|
13864
|
+
const blockOutput = outputData.getBlockTrigger();
|
|
13865
|
+
return blockOutput?.toObject() || null;
|
|
13866
|
+
}
|
|
13371
13867
|
};
|
|
13372
13868
|
var block_default = BlockTrigger2;
|
|
13373
13869
|
|
|
@@ -13410,13 +13906,22 @@ var CronTrigger2 = class _CronTrigger extends interface_default {
|
|
|
13410
13906
|
});
|
|
13411
13907
|
}
|
|
13412
13908
|
/**
|
|
13413
|
-
* Convert raw data from
|
|
13909
|
+
* Convert raw data from runTrigger response to CronOutput format
|
|
13414
13910
|
* @param rawData - The raw data from the gRPC response
|
|
13415
13911
|
* @returns {CronTriggerOutput | undefined} - The converted data
|
|
13416
13912
|
*/
|
|
13417
13913
|
getOutput() {
|
|
13418
13914
|
return this.output;
|
|
13419
13915
|
}
|
|
13916
|
+
/**
|
|
13917
|
+
* Extract output data from RunTriggerResp for cron triggers
|
|
13918
|
+
* @param outputData - The RunTriggerResp containing cron trigger output
|
|
13919
|
+
* @returns Plain JavaScript object with cron trigger data
|
|
13920
|
+
*/
|
|
13921
|
+
static fromOutputData(outputData) {
|
|
13922
|
+
const cronOutput = outputData.getCronTrigger();
|
|
13923
|
+
return cronOutput?.toObject() || null;
|
|
13924
|
+
}
|
|
13420
13925
|
};
|
|
13421
13926
|
var cron_default = CronTrigger2;
|
|
13422
13927
|
|
|
@@ -13484,13 +13989,22 @@ var EventTrigger2 = class _EventTrigger extends interface_default {
|
|
|
13484
13989
|
});
|
|
13485
13990
|
}
|
|
13486
13991
|
/**
|
|
13487
|
-
* Convert raw data from
|
|
13992
|
+
* Convert raw data from runTrigger response to EventOutput format
|
|
13488
13993
|
* @param rawData - The raw data from the gRPC response
|
|
13489
13994
|
* @returns {EventTriggerOutput | undefined} - The converted data
|
|
13490
13995
|
*/
|
|
13491
13996
|
getOutput() {
|
|
13492
13997
|
return this.output;
|
|
13493
13998
|
}
|
|
13999
|
+
/**
|
|
14000
|
+
* Extract output data from RunTriggerResp for event triggers
|
|
14001
|
+
* @param outputData - The RunTriggerResp containing event trigger output
|
|
14002
|
+
* @returns Plain JavaScript object with event trigger data
|
|
14003
|
+
*/
|
|
14004
|
+
static fromOutputData(outputData) {
|
|
14005
|
+
const eventOutput = outputData.getEventTrigger();
|
|
14006
|
+
return eventOutput?.toObject() || null;
|
|
14007
|
+
}
|
|
13494
14008
|
};
|
|
13495
14009
|
var event_default = EventTrigger2;
|
|
13496
14010
|
|
|
@@ -13533,13 +14047,22 @@ var FixedTimeTrigger2 = class _FixedTimeTrigger extends interface_default {
|
|
|
13533
14047
|
});
|
|
13534
14048
|
}
|
|
13535
14049
|
/**
|
|
13536
|
-
* Convert raw data from
|
|
14050
|
+
* Convert raw data from runTrigger response to FixedTimeOutput format
|
|
13537
14051
|
* @param rawData - The raw data from the gRPC response
|
|
13538
14052
|
* @returns {FixedTimeTriggerOutput | undefined} - The converted data
|
|
13539
14053
|
*/
|
|
13540
14054
|
getOutput() {
|
|
13541
14055
|
return this.output;
|
|
13542
14056
|
}
|
|
14057
|
+
/**
|
|
14058
|
+
* Extract output data from RunTriggerResp for fixed time triggers
|
|
14059
|
+
* @param outputData - The RunTriggerResp containing fixed time trigger output
|
|
14060
|
+
* @returns Plain JavaScript object with fixed time trigger data
|
|
14061
|
+
*/
|
|
14062
|
+
static fromOutputData(outputData) {
|
|
14063
|
+
const fixedTimeOutput = outputData.getFixedTimeTrigger();
|
|
14064
|
+
return fixedTimeOutput?.toObject() || null;
|
|
14065
|
+
}
|
|
13543
14066
|
};
|
|
13544
14067
|
var fixedTime_default = FixedTimeTrigger2;
|
|
13545
14068
|
|
|
@@ -13557,23 +14080,105 @@ var ManualTrigger = class _ManualTrigger extends interface_default {
|
|
|
13557
14080
|
trigger.setManual(true);
|
|
13558
14081
|
return trigger;
|
|
13559
14082
|
}
|
|
13560
|
-
static fromResponse(raw) {
|
|
13561
|
-
const obj = raw.toObject();
|
|
13562
|
-
return new _ManualTrigger({
|
|
13563
|
-
...obj,
|
|
13564
|
-
type: import_types5.TriggerType.Manual,
|
|
13565
|
-
data: null
|
|
13566
|
-
// Manual triggers don't have data in the protobuf response
|
|
14083
|
+
static fromResponse(raw) {
|
|
14084
|
+
const obj = raw.toObject();
|
|
14085
|
+
return new _ManualTrigger({
|
|
14086
|
+
...obj,
|
|
14087
|
+
type: import_types5.TriggerType.Manual,
|
|
14088
|
+
data: null
|
|
14089
|
+
// Manual triggers don't have data in the protobuf response
|
|
14090
|
+
});
|
|
14091
|
+
}
|
|
14092
|
+
getInputVariables() {
|
|
14093
|
+
return this.data;
|
|
14094
|
+
}
|
|
14095
|
+
/**
|
|
14096
|
+
* Convert raw data from runTrigger response to ManualOutput format
|
|
14097
|
+
* @param rawData - The raw data from the gRPC response
|
|
14098
|
+
* @returns {ManualTriggerOutput | undefined} - The converted data
|
|
14099
|
+
*/
|
|
14100
|
+
getOutput() {
|
|
14101
|
+
return this.output;
|
|
14102
|
+
}
|
|
14103
|
+
/**
|
|
14104
|
+
* Extract output data from RunTriggerResp for manual triggers
|
|
14105
|
+
* @param outputData - The RunTriggerResp containing manual trigger output
|
|
14106
|
+
* @returns Plain JavaScript object with manual trigger data
|
|
14107
|
+
*/
|
|
14108
|
+
static fromOutputData(outputData) {
|
|
14109
|
+
const manualOutput = outputData.getManualTrigger();
|
|
14110
|
+
return manualOutput?.toObject() || null;
|
|
14111
|
+
}
|
|
14112
|
+
};
|
|
14113
|
+
var manual_default = ManualTrigger;
|
|
14114
|
+
|
|
14115
|
+
// src/models/trigger/factory.ts
|
|
14116
|
+
var import_types6 = require("@avaprotocol/types");
|
|
14117
|
+
|
|
14118
|
+
// src/utils.ts
|
|
14119
|
+
var import_struct_pb = require("google-protobuf/google/protobuf/struct_pb");
|
|
14120
|
+
function convertProtobufValueToJs(value) {
|
|
14121
|
+
if (!value) {
|
|
14122
|
+
return void 0;
|
|
14123
|
+
}
|
|
14124
|
+
switch (value.getKindCase()) {
|
|
14125
|
+
case import_struct_pb.Value.KindCase.NULL_VALUE:
|
|
14126
|
+
return null;
|
|
14127
|
+
case import_struct_pb.Value.KindCase.NUMBER_VALUE:
|
|
14128
|
+
return value.getNumberValue();
|
|
14129
|
+
case import_struct_pb.Value.KindCase.STRING_VALUE:
|
|
14130
|
+
return value.getStringValue();
|
|
14131
|
+
case import_struct_pb.Value.KindCase.BOOL_VALUE:
|
|
14132
|
+
return value.getBoolValue();
|
|
14133
|
+
case import_struct_pb.Value.KindCase.STRUCT_VALUE: {
|
|
14134
|
+
const struct = value.getStructValue();
|
|
14135
|
+
if (!struct) return {};
|
|
14136
|
+
const jsObj = {};
|
|
14137
|
+
const fields = struct.getFieldsMap();
|
|
14138
|
+
fields.forEach((val, key) => {
|
|
14139
|
+
jsObj[key] = convertProtobufValueToJs(val);
|
|
14140
|
+
});
|
|
14141
|
+
return jsObj;
|
|
14142
|
+
}
|
|
14143
|
+
case import_struct_pb.Value.KindCase.LIST_VALUE: {
|
|
14144
|
+
const list = value.getListValue();
|
|
14145
|
+
if (!list) return [];
|
|
14146
|
+
return list.getValuesList().map((item) => convertProtobufValueToJs(item));
|
|
14147
|
+
}
|
|
14148
|
+
case import_struct_pb.Value.KindCase.KIND_NOT_SET:
|
|
14149
|
+
default:
|
|
14150
|
+
return void 0;
|
|
14151
|
+
}
|
|
14152
|
+
}
|
|
14153
|
+
function convertJSValueToProtobuf(value) {
|
|
14154
|
+
const protobufValue = new import_struct_pb.Value();
|
|
14155
|
+
if (value === null || value === void 0) {
|
|
14156
|
+
protobufValue.setNullValue(0);
|
|
14157
|
+
} else if (typeof value === "number") {
|
|
14158
|
+
protobufValue.setNumberValue(value);
|
|
14159
|
+
} else if (typeof value === "string") {
|
|
14160
|
+
protobufValue.setStringValue(value);
|
|
14161
|
+
} else if (typeof value === "boolean") {
|
|
14162
|
+
protobufValue.setBoolValue(value);
|
|
14163
|
+
} else if (Array.isArray(value)) {
|
|
14164
|
+
const listValue = new import_struct_pb.ListValue();
|
|
14165
|
+
const convertedValues = value.map((item) => convertJSValueToProtobuf(item));
|
|
14166
|
+
listValue.setValuesList(convertedValues);
|
|
14167
|
+
protobufValue.setListValue(listValue);
|
|
14168
|
+
} else if (typeof value === "object") {
|
|
14169
|
+
const structValue = new import_struct_pb.Struct();
|
|
14170
|
+
const fieldsMap = structValue.getFieldsMap();
|
|
14171
|
+
Object.entries(value).forEach(([key, val]) => {
|
|
14172
|
+
fieldsMap.set(key, convertJSValueToProtobuf(val));
|
|
13567
14173
|
});
|
|
14174
|
+
protobufValue.setStructValue(structValue);
|
|
14175
|
+
} else {
|
|
14176
|
+
protobufValue.setStringValue(String(value));
|
|
13568
14177
|
}
|
|
13569
|
-
|
|
13570
|
-
|
|
13571
|
-
}
|
|
13572
|
-
};
|
|
13573
|
-
var manual_default = ManualTrigger;
|
|
14178
|
+
return protobufValue;
|
|
14179
|
+
}
|
|
13574
14180
|
|
|
13575
14181
|
// src/models/trigger/factory.ts
|
|
13576
|
-
var import_types6 = require("@avaprotocol/types");
|
|
13577
14182
|
var TriggerFactory = class {
|
|
13578
14183
|
/**
|
|
13579
14184
|
* Static factory method to create Trigger instances
|
|
@@ -13616,14 +14221,51 @@ var TriggerFactory = class {
|
|
|
13616
14221
|
throw new Error("Unknown trigger type");
|
|
13617
14222
|
}
|
|
13618
14223
|
}
|
|
14224
|
+
static fromOutputData(outputData) {
|
|
14225
|
+
let triggerOutput = null;
|
|
14226
|
+
let rawData = null;
|
|
14227
|
+
switch (outputData.getOutputDataCase()) {
|
|
14228
|
+
case avs_pb7.RunTriggerResp.OutputDataCase.BLOCK_TRIGGER:
|
|
14229
|
+
triggerOutput = outputData.getBlockTrigger();
|
|
14230
|
+
break;
|
|
14231
|
+
case avs_pb7.RunTriggerResp.OutputDataCase.FIXED_TIME_TRIGGER:
|
|
14232
|
+
triggerOutput = outputData.getFixedTimeTrigger();
|
|
14233
|
+
break;
|
|
14234
|
+
case avs_pb7.RunTriggerResp.OutputDataCase.CRON_TRIGGER:
|
|
14235
|
+
triggerOutput = outputData.getCronTrigger();
|
|
14236
|
+
break;
|
|
14237
|
+
case avs_pb7.RunTriggerResp.OutputDataCase.EVENT_TRIGGER:
|
|
14238
|
+
triggerOutput = outputData.getEventTrigger();
|
|
14239
|
+
break;
|
|
14240
|
+
case avs_pb7.RunTriggerResp.OutputDataCase.MANUAL_TRIGGER:
|
|
14241
|
+
triggerOutput = outputData.getManualTrigger();
|
|
14242
|
+
break;
|
|
14243
|
+
case avs_pb7.RunTriggerResp.OutputDataCase.OUTPUT_DATA_NOT_SET:
|
|
14244
|
+
default:
|
|
14245
|
+
throw new Error(
|
|
14246
|
+
`Unsupported output data case: ${outputData.getOutputDataCase()}`
|
|
14247
|
+
);
|
|
14248
|
+
}
|
|
14249
|
+
if (!triggerOutput) {
|
|
14250
|
+
return null;
|
|
14251
|
+
}
|
|
14252
|
+
if (typeof triggerOutput.getData === "function") {
|
|
14253
|
+
rawData = triggerOutput.getData();
|
|
14254
|
+
if (rawData) {
|
|
14255
|
+
return convertProtobufValueToJs(rawData);
|
|
14256
|
+
}
|
|
14257
|
+
}
|
|
14258
|
+
return triggerOutput.toObject();
|
|
14259
|
+
}
|
|
13619
14260
|
};
|
|
13620
14261
|
var factory_default = TriggerFactory;
|
|
13621
14262
|
|
|
13622
14263
|
// src/models/node/factory.ts
|
|
14264
|
+
var avs_pb18 = __toESM(require_avs_pb());
|
|
13623
14265
|
var import_lodash2 = __toESM(require("lodash"));
|
|
13624
14266
|
|
|
13625
14267
|
// src/models/node/interface.ts
|
|
13626
|
-
var
|
|
14268
|
+
var avs_pb8 = __toESM(require_avs_pb());
|
|
13627
14269
|
var import_types7 = require("@avaprotocol/types");
|
|
13628
14270
|
var import_lodash = __toESM(require("lodash"));
|
|
13629
14271
|
var Node = class {
|
|
@@ -13634,9 +14276,9 @@ var Node = class {
|
|
|
13634
14276
|
this.data = props.data;
|
|
13635
14277
|
}
|
|
13636
14278
|
toRequest() {
|
|
13637
|
-
const request = new
|
|
14279
|
+
const request = new avs_pb8.TaskNode();
|
|
13638
14280
|
const raw = request.serializeBinary();
|
|
13639
|
-
const parsed =
|
|
14281
|
+
const parsed = avs_pb8.TaskNode.deserializeBinary(raw);
|
|
13640
14282
|
if (!import_lodash.default.isEqual(request, parsed)) {
|
|
13641
14283
|
throw new Error("Invalid request object");
|
|
13642
14284
|
}
|
|
@@ -13646,7 +14288,7 @@ var Node = class {
|
|
|
13646
14288
|
var interface_default2 = Node;
|
|
13647
14289
|
|
|
13648
14290
|
// src/models/node/contractWrite.ts
|
|
13649
|
-
var
|
|
14291
|
+
var avs_pb9 = __toESM(require_avs_pb());
|
|
13650
14292
|
var import_types8 = require("@avaprotocol/types");
|
|
13651
14293
|
var ContractWriteNode2 = class _ContractWriteNode extends interface_default2 {
|
|
13652
14294
|
constructor(props) {
|
|
@@ -13661,11 +14303,11 @@ var ContractWriteNode2 = class _ContractWriteNode extends interface_default2 {
|
|
|
13661
14303
|
});
|
|
13662
14304
|
}
|
|
13663
14305
|
toRequest() {
|
|
13664
|
-
const request = new
|
|
14306
|
+
const request = new avs_pb9.TaskNode();
|
|
13665
14307
|
request.setId(this.id);
|
|
13666
14308
|
request.setName(this.name);
|
|
13667
|
-
const nodeData = new
|
|
13668
|
-
const config = new
|
|
14309
|
+
const nodeData = new avs_pb9.ContractWriteNode();
|
|
14310
|
+
const config = new avs_pb9.ContractWriteNode.Config();
|
|
13669
14311
|
config.setContractAddress(this.data.contractAddress);
|
|
13670
14312
|
config.setCallData(this.data.callData);
|
|
13671
14313
|
config.setContractAbi(this.data.contractAbi);
|
|
@@ -13673,11 +14315,15 @@ var ContractWriteNode2 = class _ContractWriteNode extends interface_default2 {
|
|
|
13673
14315
|
request.setContractWrite(nodeData);
|
|
13674
14316
|
return request;
|
|
13675
14317
|
}
|
|
14318
|
+
static fromOutputData(outputData) {
|
|
14319
|
+
const contractWriteOutput = outputData.getContractWrite();
|
|
14320
|
+
return contractWriteOutput?.toObject() || null;
|
|
14321
|
+
}
|
|
13676
14322
|
};
|
|
13677
14323
|
var contractWrite_default = ContractWriteNode2;
|
|
13678
14324
|
|
|
13679
14325
|
// src/models/node/customCode.ts
|
|
13680
|
-
var
|
|
14326
|
+
var avs_pb10 = __toESM(require_avs_pb());
|
|
13681
14327
|
var import_types9 = require("@avaprotocol/types");
|
|
13682
14328
|
var CustomCodeNode2 = class _CustomCodeNode extends interface_default2 {
|
|
13683
14329
|
constructor(props) {
|
|
@@ -13692,22 +14338,29 @@ var CustomCodeNode2 = class _CustomCodeNode extends interface_default2 {
|
|
|
13692
14338
|
});
|
|
13693
14339
|
}
|
|
13694
14340
|
toRequest() {
|
|
13695
|
-
const request = new
|
|
14341
|
+
const request = new avs_pb10.TaskNode();
|
|
13696
14342
|
request.setId(this.id);
|
|
13697
14343
|
request.setName(this.name);
|
|
13698
|
-
const nodeData = new
|
|
13699
|
-
const config = new
|
|
14344
|
+
const nodeData = new avs_pb10.CustomCodeNode();
|
|
14345
|
+
const config = new avs_pb10.CustomCodeNode.Config();
|
|
13700
14346
|
config.setLang(this.data.lang);
|
|
13701
14347
|
config.setSource(this.data.source);
|
|
13702
14348
|
nodeData.setConfig(config);
|
|
13703
14349
|
request.setCustomCode(nodeData);
|
|
13704
14350
|
return request;
|
|
13705
14351
|
}
|
|
14352
|
+
static fromOutputData(outputData) {
|
|
14353
|
+
const customCodeOutput = outputData.getCustomCode();
|
|
14354
|
+
if (customCodeOutput?.getData()) {
|
|
14355
|
+
return convertProtobufValueToJs(customCodeOutput.getData());
|
|
14356
|
+
}
|
|
14357
|
+
return null;
|
|
14358
|
+
}
|
|
13706
14359
|
};
|
|
13707
14360
|
var customCode_default = CustomCodeNode2;
|
|
13708
14361
|
|
|
13709
14362
|
// src/models/node/graphqlQuery.ts
|
|
13710
|
-
var
|
|
14363
|
+
var avs_pb11 = __toESM(require_avs_pb());
|
|
13711
14364
|
var import_types10 = require("@avaprotocol/types");
|
|
13712
14365
|
var GraphQLQueryNode2 = class _GraphQLQueryNode extends interface_default2 {
|
|
13713
14366
|
constructor(props) {
|
|
@@ -13726,11 +14379,11 @@ var GraphQLQueryNode2 = class _GraphQLQueryNode extends interface_default2 {
|
|
|
13726
14379
|
});
|
|
13727
14380
|
}
|
|
13728
14381
|
toRequest() {
|
|
13729
|
-
const request = new
|
|
14382
|
+
const request = new avs_pb11.TaskNode();
|
|
13730
14383
|
request.setId(this.id);
|
|
13731
14384
|
request.setName(this.name);
|
|
13732
|
-
const nodeData = new
|
|
13733
|
-
const config = new
|
|
14385
|
+
const nodeData = new avs_pb11.GraphQLQueryNode();
|
|
14386
|
+
const config = new avs_pb11.GraphQLQueryNode.Config();
|
|
13734
14387
|
config.setUrl(this.data.url);
|
|
13735
14388
|
config.setQuery(this.data.query);
|
|
13736
14389
|
if (this.data.variablesMap && this.data.variablesMap.length > 0) {
|
|
@@ -13743,11 +14396,15 @@ var GraphQLQueryNode2 = class _GraphQLQueryNode extends interface_default2 {
|
|
|
13743
14396
|
request.setGraphqlQuery(nodeData);
|
|
13744
14397
|
return request;
|
|
13745
14398
|
}
|
|
14399
|
+
static fromOutputData(outputData) {
|
|
14400
|
+
const graphqlOutput = outputData.getGraphql();
|
|
14401
|
+
return graphqlOutput?.toObject() || null;
|
|
14402
|
+
}
|
|
13746
14403
|
};
|
|
13747
14404
|
var graphqlQuery_default = GraphQLQueryNode2;
|
|
13748
14405
|
|
|
13749
14406
|
// src/models/node/restApi.ts
|
|
13750
|
-
var
|
|
14407
|
+
var avs_pb12 = __toESM(require_avs_pb());
|
|
13751
14408
|
var import_types11 = require("@avaprotocol/types");
|
|
13752
14409
|
var RestAPINode2 = class _RestAPINode extends interface_default2 {
|
|
13753
14410
|
constructor(props) {
|
|
@@ -13762,29 +14419,43 @@ var RestAPINode2 = class _RestAPINode extends interface_default2 {
|
|
|
13762
14419
|
});
|
|
13763
14420
|
}
|
|
13764
14421
|
toRequest() {
|
|
13765
|
-
const request = new
|
|
14422
|
+
const request = new avs_pb12.TaskNode();
|
|
13766
14423
|
request.setId(this.id);
|
|
13767
14424
|
request.setName(this.name);
|
|
13768
|
-
const nodeData = new
|
|
13769
|
-
const config = new
|
|
14425
|
+
const nodeData = new avs_pb12.RestAPINode();
|
|
14426
|
+
const config = new avs_pb12.RestAPINode.Config();
|
|
13770
14427
|
config.setUrl(this.data.url);
|
|
13771
14428
|
config.setMethod(this.data.method);
|
|
13772
14429
|
config.setBody(this.data.body || "");
|
|
13773
14430
|
if (this.data.headersMap && this.data.headersMap.length > 0) {
|
|
13774
14431
|
const headersMap = config.getHeadersMap();
|
|
13775
|
-
this.data.headersMap.forEach(
|
|
13776
|
-
|
|
13777
|
-
|
|
14432
|
+
this.data.headersMap.forEach(
|
|
14433
|
+
([key, value]) => {
|
|
14434
|
+
headersMap.set(key, value);
|
|
14435
|
+
}
|
|
14436
|
+
);
|
|
13778
14437
|
}
|
|
13779
14438
|
nodeData.setConfig(config);
|
|
13780
14439
|
request.setRestApi(nodeData);
|
|
13781
14440
|
return request;
|
|
13782
14441
|
}
|
|
14442
|
+
static fromOutputData(outputData) {
|
|
14443
|
+
const restApiOutput = outputData.getRestApi();
|
|
14444
|
+
if (!restApiOutput) {
|
|
14445
|
+
console.log("Debug RestAPI: No restApiOutput found");
|
|
14446
|
+
return null;
|
|
14447
|
+
}
|
|
14448
|
+
const rawData = restApiOutput.getData();
|
|
14449
|
+
if (rawData) {
|
|
14450
|
+
return convertProtobufValueToJs(rawData);
|
|
14451
|
+
}
|
|
14452
|
+
return restApiOutput.toObject();
|
|
14453
|
+
}
|
|
13783
14454
|
};
|
|
13784
14455
|
var restApi_default = RestAPINode2;
|
|
13785
14456
|
|
|
13786
14457
|
// src/models/node/contractRead.ts
|
|
13787
|
-
var
|
|
14458
|
+
var avs_pb13 = __toESM(require_avs_pb());
|
|
13788
14459
|
var import_types12 = require("@avaprotocol/types");
|
|
13789
14460
|
var ContractReadNode2 = class _ContractReadNode extends interface_default2 {
|
|
13790
14461
|
constructor(props) {
|
|
@@ -13799,11 +14470,11 @@ var ContractReadNode2 = class _ContractReadNode extends interface_default2 {
|
|
|
13799
14470
|
});
|
|
13800
14471
|
}
|
|
13801
14472
|
toRequest() {
|
|
13802
|
-
const request = new
|
|
14473
|
+
const request = new avs_pb13.TaskNode();
|
|
13803
14474
|
request.setId(this.id);
|
|
13804
14475
|
request.setName(this.name);
|
|
13805
|
-
const nodeData = new
|
|
13806
|
-
const config = new
|
|
14476
|
+
const nodeData = new avs_pb13.ContractReadNode();
|
|
14477
|
+
const config = new avs_pb13.ContractReadNode.Config();
|
|
13807
14478
|
config.setContractAddress(this.data.contractAddress);
|
|
13808
14479
|
config.setCallData(this.data.callData);
|
|
13809
14480
|
config.setContractAbi(this.data.contractAbi);
|
|
@@ -13811,11 +14482,21 @@ var ContractReadNode2 = class _ContractReadNode extends interface_default2 {
|
|
|
13811
14482
|
request.setContractRead(nodeData);
|
|
13812
14483
|
return request;
|
|
13813
14484
|
}
|
|
14485
|
+
static fromOutputData(outputData) {
|
|
14486
|
+
const contractReadOutput = outputData.getContractRead();
|
|
14487
|
+
if (contractReadOutput && contractReadOutput.getDataList()) {
|
|
14488
|
+
const dataList = contractReadOutput.getDataList();
|
|
14489
|
+
return {
|
|
14490
|
+
dataList: dataList.map((value) => convertProtobufValueToJs(value))
|
|
14491
|
+
};
|
|
14492
|
+
}
|
|
14493
|
+
return null;
|
|
14494
|
+
}
|
|
13814
14495
|
};
|
|
13815
14496
|
var contractRead_default = ContractReadNode2;
|
|
13816
14497
|
|
|
13817
14498
|
// src/models/node/ethTransfer.ts
|
|
13818
|
-
var
|
|
14499
|
+
var avs_pb14 = __toESM(require_avs_pb());
|
|
13819
14500
|
var import_types13 = require("@avaprotocol/types");
|
|
13820
14501
|
var ETHTransferNode2 = class _ETHTransferNode extends interface_default2 {
|
|
13821
14502
|
constructor(props) {
|
|
@@ -13830,23 +14511,27 @@ var ETHTransferNode2 = class _ETHTransferNode extends interface_default2 {
|
|
|
13830
14511
|
});
|
|
13831
14512
|
}
|
|
13832
14513
|
toRequest() {
|
|
13833
|
-
const request = new
|
|
14514
|
+
const request = new avs_pb14.TaskNode();
|
|
13834
14515
|
request.setId(this.id);
|
|
13835
14516
|
request.setName(this.name);
|
|
13836
|
-
const nodeData = new
|
|
13837
|
-
const config = new
|
|
14517
|
+
const nodeData = new avs_pb14.ETHTransferNode();
|
|
14518
|
+
const config = new avs_pb14.ETHTransferNode.Config();
|
|
13838
14519
|
config.setDestination(this.data.destination);
|
|
13839
14520
|
config.setAmount(this.data.amount);
|
|
13840
14521
|
nodeData.setConfig(config);
|
|
13841
14522
|
request.setEthTransfer(nodeData);
|
|
13842
14523
|
return request;
|
|
13843
14524
|
}
|
|
14525
|
+
static fromOutputData(outputData) {
|
|
14526
|
+
const ethTransferOutput = outputData.getEthTransfer();
|
|
14527
|
+
return ethTransferOutput?.toObject() || null;
|
|
14528
|
+
}
|
|
13844
14529
|
};
|
|
13845
14530
|
var ethTransfer_default = ETHTransferNode2;
|
|
13846
14531
|
|
|
13847
14532
|
// src/models/node/branch.ts
|
|
13848
14533
|
var import_types14 = require("@avaprotocol/types");
|
|
13849
|
-
var
|
|
14534
|
+
var avs_pb15 = __toESM(require_avs_pb());
|
|
13850
14535
|
var BranchNode2 = class _BranchNode extends interface_default2 {
|
|
13851
14536
|
constructor(props) {
|
|
13852
14537
|
super({ ...props, type: import_types14.NodeType.Branch, data: props.data });
|
|
@@ -13860,15 +14545,15 @@ var BranchNode2 = class _BranchNode extends interface_default2 {
|
|
|
13860
14545
|
});
|
|
13861
14546
|
}
|
|
13862
14547
|
toRequest() {
|
|
13863
|
-
const request = new
|
|
14548
|
+
const request = new avs_pb15.TaskNode();
|
|
13864
14549
|
request.setId(this.id);
|
|
13865
14550
|
request.setName(this.name);
|
|
13866
|
-
const nodeData = new
|
|
13867
|
-
const config = new
|
|
14551
|
+
const nodeData = new avs_pb15.BranchNode();
|
|
14552
|
+
const config = new avs_pb15.BranchNode.Config();
|
|
13868
14553
|
if (this.data.conditionsList && this.data.conditionsList.length > 0) {
|
|
13869
14554
|
const conditionsList = this.data.conditionsList.map(
|
|
13870
14555
|
(condition) => {
|
|
13871
|
-
const conditionObj = new
|
|
14556
|
+
const conditionObj = new avs_pb15.BranchNode.Condition();
|
|
13872
14557
|
conditionObj.setId(condition.id);
|
|
13873
14558
|
conditionObj.setType(condition.type);
|
|
13874
14559
|
conditionObj.setExpression(condition.expression);
|
|
@@ -13881,12 +14566,16 @@ var BranchNode2 = class _BranchNode extends interface_default2 {
|
|
|
13881
14566
|
request.setBranch(nodeData);
|
|
13882
14567
|
return request;
|
|
13883
14568
|
}
|
|
14569
|
+
static fromOutputData(outputData) {
|
|
14570
|
+
const branchOutput = outputData.getBranch();
|
|
14571
|
+
return branchOutput?.toObject() || null;
|
|
14572
|
+
}
|
|
13884
14573
|
// TODO: do we need a getConditionId() to avoid exporting BranchNodeData?
|
|
13885
14574
|
};
|
|
13886
14575
|
var branch_default = BranchNode2;
|
|
13887
14576
|
|
|
13888
14577
|
// src/models/node/filter.ts
|
|
13889
|
-
var
|
|
14578
|
+
var avs_pb16 = __toESM(require_avs_pb());
|
|
13890
14579
|
var import_types15 = require("@avaprotocol/types");
|
|
13891
14580
|
var FilterNode2 = class _FilterNode extends interface_default2 {
|
|
13892
14581
|
constructor(props) {
|
|
@@ -13901,22 +14590,26 @@ var FilterNode2 = class _FilterNode extends interface_default2 {
|
|
|
13901
14590
|
});
|
|
13902
14591
|
}
|
|
13903
14592
|
toRequest() {
|
|
13904
|
-
const request = new
|
|
14593
|
+
const request = new avs_pb16.TaskNode();
|
|
13905
14594
|
request.setId(this.id);
|
|
13906
14595
|
request.setName(this.name);
|
|
13907
|
-
const nodeData = new
|
|
13908
|
-
const config = new
|
|
14596
|
+
const nodeData = new avs_pb16.FilterNode();
|
|
14597
|
+
const config = new avs_pb16.FilterNode.Config();
|
|
13909
14598
|
config.setExpression(this.data.expression);
|
|
13910
14599
|
config.setSourceId(this.data.sourceId || "");
|
|
13911
14600
|
nodeData.setConfig(config);
|
|
13912
14601
|
request.setFilter(nodeData);
|
|
13913
14602
|
return request;
|
|
13914
14603
|
}
|
|
14604
|
+
static fromOutputData(outputData) {
|
|
14605
|
+
const filterOutput = outputData.getFilter();
|
|
14606
|
+
return filterOutput?.toObject() || null;
|
|
14607
|
+
}
|
|
13915
14608
|
};
|
|
13916
14609
|
var filter_default = FilterNode2;
|
|
13917
14610
|
|
|
13918
14611
|
// src/models/node/loop.ts
|
|
13919
|
-
var
|
|
14612
|
+
var avs_pb17 = __toESM(require_avs_pb());
|
|
13920
14613
|
var import_types16 = require("@avaprotocol/types");
|
|
13921
14614
|
var LoopNode2 = class _LoopNode extends interface_default2 {
|
|
13922
14615
|
constructor(props) {
|
|
@@ -13947,29 +14640,29 @@ var LoopNode2 = class _LoopNode extends interface_default2 {
|
|
|
13947
14640
|
});
|
|
13948
14641
|
}
|
|
13949
14642
|
toRequest() {
|
|
13950
|
-
const node = new
|
|
13951
|
-
const loopNode = new
|
|
14643
|
+
const node = new avs_pb17.TaskNode();
|
|
14644
|
+
const loopNode = new avs_pb17.LoopNode();
|
|
13952
14645
|
node.setId(this.id);
|
|
13953
14646
|
node.setName(this.name);
|
|
13954
14647
|
const data = this.data;
|
|
13955
|
-
const config = new
|
|
14648
|
+
const config = new avs_pb17.LoopNode.Config();
|
|
13956
14649
|
config.setSourceId(data.sourceId || "");
|
|
13957
14650
|
config.setIterVal(data.iterVal || "");
|
|
13958
14651
|
config.setIterKey(data.iterKey || "");
|
|
13959
14652
|
loopNode.setConfig(config);
|
|
13960
14653
|
if (data.ethTransfer) {
|
|
13961
|
-
const ethTransfer = new
|
|
14654
|
+
const ethTransfer = new avs_pb17.ETHTransferNode();
|
|
13962
14655
|
if (data.ethTransfer.config) {
|
|
13963
|
-
const config2 = new
|
|
14656
|
+
const config2 = new avs_pb17.ETHTransferNode.Config();
|
|
13964
14657
|
config2.setDestination(data.ethTransfer.config.destination);
|
|
13965
14658
|
config2.setAmount(data.ethTransfer.config.amount);
|
|
13966
14659
|
ethTransfer.setConfig(config2);
|
|
13967
14660
|
}
|
|
13968
14661
|
loopNode.setEthTransfer(ethTransfer);
|
|
13969
14662
|
} else if (data.contractWrite) {
|
|
13970
|
-
const contractWrite = new
|
|
14663
|
+
const contractWrite = new avs_pb17.ContractWriteNode();
|
|
13971
14664
|
if (data.contractWrite.config) {
|
|
13972
|
-
const config2 = new
|
|
14665
|
+
const config2 = new avs_pb17.ContractWriteNode.Config();
|
|
13973
14666
|
config2.setContractAddress(data.contractWrite.config.contractAddress);
|
|
13974
14667
|
config2.setCallData(data.contractWrite.config.callData);
|
|
13975
14668
|
config2.setContractAbi(data.contractWrite.config.contractAbi);
|
|
@@ -13977,9 +14670,9 @@ var LoopNode2 = class _LoopNode extends interface_default2 {
|
|
|
13977
14670
|
}
|
|
13978
14671
|
loopNode.setContractWrite(contractWrite);
|
|
13979
14672
|
} else if (data.contractRead) {
|
|
13980
|
-
const contractRead = new
|
|
14673
|
+
const contractRead = new avs_pb17.ContractReadNode();
|
|
13981
14674
|
if (data.contractRead.config) {
|
|
13982
|
-
const config2 = new
|
|
14675
|
+
const config2 = new avs_pb17.ContractReadNode.Config();
|
|
13983
14676
|
config2.setContractAddress(data.contractRead.config.contractAddress);
|
|
13984
14677
|
config2.setCallData(data.contractRead.config.callData);
|
|
13985
14678
|
config2.setContractAbi(data.contractRead.config.contractAbi);
|
|
@@ -13987,9 +14680,9 @@ var LoopNode2 = class _LoopNode extends interface_default2 {
|
|
|
13987
14680
|
}
|
|
13988
14681
|
loopNode.setContractRead(contractRead);
|
|
13989
14682
|
} else if (data.graphqlDataQuery) {
|
|
13990
|
-
const graphqlQuery = new
|
|
14683
|
+
const graphqlQuery = new avs_pb17.GraphQLQueryNode();
|
|
13991
14684
|
if (data.graphqlDataQuery.config) {
|
|
13992
|
-
const config2 = new
|
|
14685
|
+
const config2 = new avs_pb17.GraphQLQueryNode.Config();
|
|
13993
14686
|
config2.setUrl(data.graphqlDataQuery.config.url);
|
|
13994
14687
|
config2.setQuery(data.graphqlDataQuery.config.query);
|
|
13995
14688
|
if (data.graphqlDataQuery.config.variablesMap && data.graphqlDataQuery.config.variablesMap.length > 0) {
|
|
@@ -14001,9 +14694,9 @@ var LoopNode2 = class _LoopNode extends interface_default2 {
|
|
|
14001
14694
|
}
|
|
14002
14695
|
loopNode.setGraphqlDataQuery(graphqlQuery);
|
|
14003
14696
|
} else if (data.restApi) {
|
|
14004
|
-
const restApi = new
|
|
14697
|
+
const restApi = new avs_pb17.RestAPINode();
|
|
14005
14698
|
if (data.restApi.config) {
|
|
14006
|
-
const config2 = new
|
|
14699
|
+
const config2 = new avs_pb17.RestAPINode.Config();
|
|
14007
14700
|
config2.setUrl(data.restApi.config.url);
|
|
14008
14701
|
config2.setMethod(data.restApi.config.method);
|
|
14009
14702
|
config2.setBody(data.restApi.config.body || "");
|
|
@@ -14016,9 +14709,9 @@ var LoopNode2 = class _LoopNode extends interface_default2 {
|
|
|
14016
14709
|
}
|
|
14017
14710
|
loopNode.setRestApi(restApi);
|
|
14018
14711
|
} else if (data.customCode) {
|
|
14019
|
-
const customCode = new
|
|
14712
|
+
const customCode = new avs_pb17.CustomCodeNode();
|
|
14020
14713
|
if (data.customCode.config) {
|
|
14021
|
-
const config2 = new
|
|
14714
|
+
const config2 = new avs_pb17.CustomCodeNode.Config();
|
|
14022
14715
|
config2.setLang(data.customCode.config.lang);
|
|
14023
14716
|
config2.setSource(data.customCode.config.source);
|
|
14024
14717
|
customCode.setConfig(config2);
|
|
@@ -14028,6 +14721,10 @@ var LoopNode2 = class _LoopNode extends interface_default2 {
|
|
|
14028
14721
|
node.setLoop(loopNode);
|
|
14029
14722
|
return node;
|
|
14030
14723
|
}
|
|
14724
|
+
static fromOutputData(outputData) {
|
|
14725
|
+
const loopOutput = outputData.getLoop();
|
|
14726
|
+
return loopOutput?.toObject() || null;
|
|
14727
|
+
}
|
|
14031
14728
|
};
|
|
14032
14729
|
var loop_default = LoopNode2;
|
|
14033
14730
|
|
|
@@ -14087,6 +14784,52 @@ var NodeFactory = class {
|
|
|
14087
14784
|
throw new Error(`Unsupported node type: ${raw.getName()}`);
|
|
14088
14785
|
}
|
|
14089
14786
|
}
|
|
14787
|
+
static fromOutputData(outputData) {
|
|
14788
|
+
let nodeOutput = null;
|
|
14789
|
+
let rawData = null;
|
|
14790
|
+
switch (outputData.getOutputDataCase()) {
|
|
14791
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.REST_API:
|
|
14792
|
+
nodeOutput = outputData.getRestApi();
|
|
14793
|
+
break;
|
|
14794
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.CUSTOM_CODE:
|
|
14795
|
+
nodeOutput = outputData.getCustomCode();
|
|
14796
|
+
break;
|
|
14797
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.CONTRACT_READ:
|
|
14798
|
+
nodeOutput = outputData.getContractRead();
|
|
14799
|
+
break;
|
|
14800
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.CONTRACT_WRITE:
|
|
14801
|
+
nodeOutput = outputData.getContractWrite();
|
|
14802
|
+
break;
|
|
14803
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.ETH_TRANSFER:
|
|
14804
|
+
nodeOutput = outputData.getEthTransfer();
|
|
14805
|
+
break;
|
|
14806
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.GRAPHQL:
|
|
14807
|
+
nodeOutput = outputData.getGraphql();
|
|
14808
|
+
break;
|
|
14809
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.BRANCH:
|
|
14810
|
+
nodeOutput = outputData.getBranch();
|
|
14811
|
+
break;
|
|
14812
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.FILTER:
|
|
14813
|
+
nodeOutput = outputData.getFilter();
|
|
14814
|
+
break;
|
|
14815
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.LOOP:
|
|
14816
|
+
nodeOutput = outputData.getLoop();
|
|
14817
|
+
break;
|
|
14818
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.OUTPUT_DATA_NOT_SET:
|
|
14819
|
+
default:
|
|
14820
|
+
throw new Error(`Unsupported output data case: ${outputData.getOutputDataCase()}`);
|
|
14821
|
+
}
|
|
14822
|
+
if (!nodeOutput) {
|
|
14823
|
+
return null;
|
|
14824
|
+
}
|
|
14825
|
+
if (typeof nodeOutput.getData === "function") {
|
|
14826
|
+
rawData = nodeOutput.getData();
|
|
14827
|
+
if (rawData) {
|
|
14828
|
+
return convertProtobufValueToJs(rawData);
|
|
14829
|
+
}
|
|
14830
|
+
}
|
|
14831
|
+
return nodeOutput.toObject();
|
|
14832
|
+
}
|
|
14090
14833
|
};
|
|
14091
14834
|
var factory_default2 = NodeFactory;
|
|
14092
14835
|
|
|
@@ -14094,11 +14837,11 @@ var factory_default2 = NodeFactory;
|
|
|
14094
14837
|
var import_types18 = require("@avaprotocol/types");
|
|
14095
14838
|
function convertStatusToString(status) {
|
|
14096
14839
|
const conversionMap = {
|
|
14097
|
-
[
|
|
14098
|
-
[
|
|
14099
|
-
[
|
|
14100
|
-
[
|
|
14101
|
-
[
|
|
14840
|
+
[avs_pb19.TaskStatus.ACTIVE]: import_types18.WorkflowStatus.Active,
|
|
14841
|
+
[avs_pb19.TaskStatus.COMPLETED]: import_types18.WorkflowStatus.Completed,
|
|
14842
|
+
[avs_pb19.TaskStatus.FAILED]: import_types18.WorkflowStatus.Failed,
|
|
14843
|
+
[avs_pb19.TaskStatus.CANCELED]: import_types18.WorkflowStatus.Canceled,
|
|
14844
|
+
[avs_pb19.TaskStatus.EXECUTING]: import_types18.WorkflowStatus.Executing
|
|
14102
14845
|
};
|
|
14103
14846
|
return conversionMap[status];
|
|
14104
14847
|
}
|
|
@@ -14186,7 +14929,7 @@ var Workflow = class _Workflow {
|
|
|
14186
14929
|
});
|
|
14187
14930
|
}
|
|
14188
14931
|
toRequest() {
|
|
14189
|
-
const request = new
|
|
14932
|
+
const request = new avs_pb19.CreateTaskReq();
|
|
14190
14933
|
request.setSmartWalletAddress(this.smartWalletAddress);
|
|
14191
14934
|
request.setTrigger(this.trigger.toRequest());
|
|
14192
14935
|
import_lodash3.default.map(this.nodes, (node) => request.addNodes(node.toRequest()));
|
|
@@ -14203,19 +14946,19 @@ var Workflow = class _Workflow {
|
|
|
14203
14946
|
var workflow_default = Workflow;
|
|
14204
14947
|
|
|
14205
14948
|
// src/models/execution.ts
|
|
14206
|
-
var
|
|
14949
|
+
var avs_pb22 = __toESM(require_avs_pb());
|
|
14207
14950
|
|
|
14208
14951
|
// src/models/trigger/reason.ts
|
|
14209
|
-
var
|
|
14952
|
+
var avs_pb20 = __toESM(require_avs_pb());
|
|
14210
14953
|
var import_types19 = require("@avaprotocol/types");
|
|
14211
14954
|
var convertTriggerType = (grpcType) => {
|
|
14212
14955
|
const conversionMap = {
|
|
14213
|
-
[
|
|
14214
|
-
[
|
|
14215
|
-
[
|
|
14216
|
-
[
|
|
14217
|
-
[
|
|
14218
|
-
[
|
|
14956
|
+
[avs_pb20.TriggerType.TRIGGER_TYPE_FIXED_TIME]: import_types19.TriggerType.FixedTime,
|
|
14957
|
+
[avs_pb20.TriggerType.TRIGGER_TYPE_CRON]: import_types19.TriggerType.Cron,
|
|
14958
|
+
[avs_pb20.TriggerType.TRIGGER_TYPE_BLOCK]: import_types19.TriggerType.Block,
|
|
14959
|
+
[avs_pb20.TriggerType.TRIGGER_TYPE_EVENT]: import_types19.TriggerType.Event,
|
|
14960
|
+
[avs_pb20.TriggerType.TRIGGER_TYPE_MANUAL]: import_types19.TriggerType.Manual,
|
|
14961
|
+
[avs_pb20.TriggerType.TRIGGER_TYPE_UNSPECIFIED]: import_types19.TriggerType.Unspecified
|
|
14219
14962
|
};
|
|
14220
14963
|
return conversionMap[grpcType];
|
|
14221
14964
|
};
|
|
@@ -14255,28 +14998,28 @@ var TriggerReason2 = class _TriggerReason {
|
|
|
14255
14998
|
});
|
|
14256
14999
|
}
|
|
14257
15000
|
toRequest() {
|
|
14258
|
-
const request = new
|
|
15001
|
+
const request = new avs_pb20.TriggerReason();
|
|
14259
15002
|
switch (this.type) {
|
|
14260
15003
|
case import_types19.TriggerType.FixedTime:
|
|
14261
|
-
request.setType(
|
|
15004
|
+
request.setType(avs_pb20.TriggerType.TRIGGER_TYPE_FIXED_TIME);
|
|
14262
15005
|
if (this.epoch) {
|
|
14263
15006
|
request.setEpoch(this.epoch);
|
|
14264
15007
|
}
|
|
14265
15008
|
break;
|
|
14266
15009
|
case import_types19.TriggerType.Cron:
|
|
14267
|
-
request.setType(
|
|
15010
|
+
request.setType(avs_pb20.TriggerType.TRIGGER_TYPE_CRON);
|
|
14268
15011
|
if (this.epoch) {
|
|
14269
15012
|
request.setEpoch(this.epoch);
|
|
14270
15013
|
}
|
|
14271
15014
|
break;
|
|
14272
15015
|
case import_types19.TriggerType.Block:
|
|
14273
|
-
request.setType(
|
|
15016
|
+
request.setType(avs_pb20.TriggerType.TRIGGER_TYPE_BLOCK);
|
|
14274
15017
|
if (this.blockNumber) {
|
|
14275
15018
|
request.setBlockNumber(this.blockNumber);
|
|
14276
15019
|
}
|
|
14277
15020
|
break;
|
|
14278
15021
|
case import_types19.TriggerType.Event:
|
|
14279
|
-
request.setType(
|
|
15022
|
+
request.setType(avs_pb20.TriggerType.TRIGGER_TYPE_EVENT);
|
|
14280
15023
|
if (this.blockNumber) {
|
|
14281
15024
|
request.setBlockNumber(this.blockNumber);
|
|
14282
15025
|
}
|
|
@@ -14288,10 +15031,10 @@ var TriggerReason2 = class _TriggerReason {
|
|
|
14288
15031
|
}
|
|
14289
15032
|
break;
|
|
14290
15033
|
case import_types19.TriggerType.Manual:
|
|
14291
|
-
request.setType(
|
|
15034
|
+
request.setType(avs_pb20.TriggerType.TRIGGER_TYPE_MANUAL);
|
|
14292
15035
|
break;
|
|
14293
15036
|
case import_types19.TriggerType.Unspecified:
|
|
14294
|
-
request.setType(
|
|
15037
|
+
request.setType(avs_pb20.TriggerType.TRIGGER_TYPE_UNSPECIFIED);
|
|
14295
15038
|
break;
|
|
14296
15039
|
default:
|
|
14297
15040
|
throw new Error("Unsupported trigger type");
|
|
@@ -14302,45 +15045,7 @@ var TriggerReason2 = class _TriggerReason {
|
|
|
14302
15045
|
var reason_default = TriggerReason2;
|
|
14303
15046
|
|
|
14304
15047
|
// src/models/step.ts
|
|
14305
|
-
var
|
|
14306
|
-
|
|
14307
|
-
// src/utils.ts
|
|
14308
|
-
var import_struct_pb = require("google-protobuf/google/protobuf/struct_pb");
|
|
14309
|
-
function convertProtobufValueToJs(value) {
|
|
14310
|
-
if (!value) {
|
|
14311
|
-
return void 0;
|
|
14312
|
-
}
|
|
14313
|
-
switch (value.getKindCase()) {
|
|
14314
|
-
case import_struct_pb.Value.KindCase.NULL_VALUE:
|
|
14315
|
-
return null;
|
|
14316
|
-
case import_struct_pb.Value.KindCase.NUMBER_VALUE:
|
|
14317
|
-
return value.getNumberValue();
|
|
14318
|
-
case import_struct_pb.Value.KindCase.STRING_VALUE:
|
|
14319
|
-
return value.getStringValue();
|
|
14320
|
-
case import_struct_pb.Value.KindCase.BOOL_VALUE:
|
|
14321
|
-
return value.getBoolValue();
|
|
14322
|
-
case import_struct_pb.Value.KindCase.STRUCT_VALUE: {
|
|
14323
|
-
const struct = value.getStructValue();
|
|
14324
|
-
if (!struct) return {};
|
|
14325
|
-
const jsObj = {};
|
|
14326
|
-
const fields = struct.getFieldsMap();
|
|
14327
|
-
fields.forEach((val, key) => {
|
|
14328
|
-
jsObj[key] = convertProtobufValueToJs(val);
|
|
14329
|
-
});
|
|
14330
|
-
return jsObj;
|
|
14331
|
-
}
|
|
14332
|
-
case import_struct_pb.Value.KindCase.LIST_VALUE: {
|
|
14333
|
-
const list = value.getListValue();
|
|
14334
|
-
if (!list) return [];
|
|
14335
|
-
return list.getValuesList().map((item) => convertProtobufValueToJs(item));
|
|
14336
|
-
}
|
|
14337
|
-
case import_struct_pb.Value.KindCase.KIND_NOT_SET:
|
|
14338
|
-
default:
|
|
14339
|
-
return void 0;
|
|
14340
|
-
}
|
|
14341
|
-
}
|
|
14342
|
-
|
|
14343
|
-
// src/models/step.ts
|
|
15048
|
+
var avs_pb21 = __toESM(require_avs_pb());
|
|
14344
15049
|
var Step = class _Step {
|
|
14345
15050
|
// Changed to any
|
|
14346
15051
|
constructor(props) {
|
|
@@ -14357,37 +15062,37 @@ var Step = class _Step {
|
|
|
14357
15062
|
const outputDataType = step.getOutputDataCase();
|
|
14358
15063
|
let nodeOutputMessage;
|
|
14359
15064
|
switch (outputDataType) {
|
|
14360
|
-
case
|
|
15065
|
+
case avs_pb21.Execution.Step.OutputDataCase.OUTPUT_DATA_NOT_SET:
|
|
14361
15066
|
return null;
|
|
14362
|
-
case
|
|
15067
|
+
case avs_pb21.Execution.Step.OutputDataCase.ETH_TRANSFER:
|
|
14363
15068
|
return step.getEthTransfer()?.toObject();
|
|
14364
15069
|
// Specific structure, not google.protobuf.Value
|
|
14365
|
-
case
|
|
15070
|
+
case avs_pb21.Execution.Step.OutputDataCase.GRAPHQL:
|
|
14366
15071
|
nodeOutputMessage = step.getGraphql();
|
|
14367
15072
|
return nodeOutputMessage && nodeOutputMessage.hasData() ? nodeOutputMessage.getData() : void 0;
|
|
14368
|
-
case
|
|
15073
|
+
case avs_pb21.Execution.Step.OutputDataCase.CONTRACT_READ:
|
|
14369
15074
|
nodeOutputMessage = step.getContractRead();
|
|
14370
15075
|
if (nodeOutputMessage) {
|
|
14371
15076
|
return nodeOutputMessage.getDataList().map((val) => convertProtobufValueToJs(val));
|
|
14372
15077
|
}
|
|
14373
15078
|
return [];
|
|
14374
15079
|
// Default to empty array if no data
|
|
14375
|
-
case
|
|
15080
|
+
case avs_pb21.Execution.Step.OutputDataCase.CONTRACT_WRITE:
|
|
14376
15081
|
return step.getContractWrite()?.toObject();
|
|
14377
15082
|
// Specific structure
|
|
14378
|
-
case
|
|
15083
|
+
case avs_pb21.Execution.Step.OutputDataCase.CUSTOM_CODE:
|
|
14379
15084
|
nodeOutputMessage = step.getCustomCode();
|
|
14380
15085
|
return nodeOutputMessage && nodeOutputMessage.hasData() ? convertProtobufValueToJs(nodeOutputMessage.getData()) : void 0;
|
|
14381
|
-
case
|
|
15086
|
+
case avs_pb21.Execution.Step.OutputDataCase.REST_API:
|
|
14382
15087
|
nodeOutputMessage = step.getRestApi();
|
|
14383
15088
|
return nodeOutputMessage && nodeOutputMessage.hasData() ? nodeOutputMessage.getData() : void 0;
|
|
14384
|
-
case
|
|
15089
|
+
case avs_pb21.Execution.Step.OutputDataCase.BRANCH:
|
|
14385
15090
|
return step.getBranch()?.toObject();
|
|
14386
15091
|
// Specific structure
|
|
14387
|
-
case
|
|
15092
|
+
case avs_pb21.Execution.Step.OutputDataCase.FILTER:
|
|
14388
15093
|
nodeOutputMessage = step.getFilter();
|
|
14389
15094
|
return nodeOutputMessage && nodeOutputMessage.hasData() ? nodeOutputMessage.getData() : void 0;
|
|
14390
|
-
case
|
|
15095
|
+
case avs_pb21.Execution.Step.OutputDataCase.LOOP:
|
|
14391
15096
|
return step.getLoop()?.getData();
|
|
14392
15097
|
default:
|
|
14393
15098
|
console.warn(
|
|
@@ -14429,19 +15134,19 @@ var Execution3 = class _Execution {
|
|
|
14429
15134
|
const triggerOutputDataType = execution.getOutputDataCase();
|
|
14430
15135
|
let triggerOutputData;
|
|
14431
15136
|
switch (triggerOutputDataType) {
|
|
14432
|
-
case
|
|
15137
|
+
case avs_pb22.Execution.OutputDataCase.BLOCK_TRIGGER:
|
|
14433
15138
|
const blockOutput = execution.getBlockTrigger()?.toObject();
|
|
14434
15139
|
triggerOutputData = blockOutput ? { blockNumber: blockOutput.blockNumber } : void 0;
|
|
14435
15140
|
break;
|
|
14436
|
-
case
|
|
15141
|
+
case avs_pb22.Execution.OutputDataCase.FIXED_TIME_TRIGGER:
|
|
14437
15142
|
const fixedTimeOutput = execution.getFixedTimeTrigger()?.toObject();
|
|
14438
15143
|
triggerOutputData = fixedTimeOutput ? { epoch: fixedTimeOutput.epoch } : void 0;
|
|
14439
15144
|
break;
|
|
14440
|
-
case
|
|
15145
|
+
case avs_pb22.Execution.OutputDataCase.CRON_TRIGGER:
|
|
14441
15146
|
const cronOutput = execution.getCronTrigger()?.toObject();
|
|
14442
15147
|
triggerOutputData = cronOutput ? { epoch: cronOutput.epoch, scheduleMatched: cronOutput.scheduleMatched } : void 0;
|
|
14443
15148
|
break;
|
|
14444
|
-
case
|
|
15149
|
+
case avs_pb22.Execution.OutputDataCase.EVENT_TRIGGER:
|
|
14445
15150
|
const eventTrigger = execution.getEventTrigger();
|
|
14446
15151
|
if (eventTrigger) {
|
|
14447
15152
|
if (eventTrigger.hasEvmLog()) {
|
|
@@ -14451,7 +15156,7 @@ var Execution3 = class _Execution {
|
|
|
14451
15156
|
}
|
|
14452
15157
|
}
|
|
14453
15158
|
break;
|
|
14454
|
-
case
|
|
15159
|
+
case avs_pb22.Execution.OutputDataCase.OUTPUT_DATA_NOT_SET:
|
|
14455
15160
|
triggerOutputData = void 0;
|
|
14456
15161
|
break;
|
|
14457
15162
|
}
|
|
@@ -14472,7 +15177,7 @@ var Execution3 = class _Execution {
|
|
|
14472
15177
|
var execution_default = Execution3;
|
|
14473
15178
|
|
|
14474
15179
|
// src/models/secret.ts
|
|
14475
|
-
var
|
|
15180
|
+
var avs_pb23 = __toESM(require_avs_pb());
|
|
14476
15181
|
var Secret = class {
|
|
14477
15182
|
constructor(props) {
|
|
14478
15183
|
this.name = props.name;
|
|
@@ -14485,7 +15190,7 @@ var Secret = class {
|
|
|
14485
15190
|
this.description = props.description;
|
|
14486
15191
|
}
|
|
14487
15192
|
toRequest() {
|
|
14488
|
-
const request = new
|
|
15193
|
+
const request = new avs_pb23.CreateOrUpdateSecretReq();
|
|
14489
15194
|
request.setName(this.name);
|
|
14490
15195
|
if (this.secret) {
|
|
14491
15196
|
request.setSecret(this.secret);
|
|
@@ -14536,7 +15241,7 @@ var BaseClient = class {
|
|
|
14536
15241
|
* @returns {Promise<GetSignatureFormatResponse>} - The response containing the signature format
|
|
14537
15242
|
*/
|
|
14538
15243
|
async getSignatureFormat(wallet) {
|
|
14539
|
-
const request = new
|
|
15244
|
+
const request = new avs_pb24.GetSignatureFormatReq();
|
|
14540
15245
|
request.setWallet(wallet);
|
|
14541
15246
|
const result = await this.sendGrpcRequest("getSignatureFormat", request);
|
|
14542
15247
|
return { message: result.getMessage() };
|
|
@@ -14551,7 +15256,7 @@ var BaseClient = class {
|
|
|
14551
15256
|
message,
|
|
14552
15257
|
apiKey
|
|
14553
15258
|
}) {
|
|
14554
|
-
const request = new
|
|
15259
|
+
const request = new avs_pb24.GetKeyReq();
|
|
14555
15260
|
request.setMessage(message);
|
|
14556
15261
|
request.setSignature(apiKey);
|
|
14557
15262
|
const result = await this.sendGrpcRequest("getKey", request);
|
|
@@ -14567,7 +15272,7 @@ var BaseClient = class {
|
|
|
14567
15272
|
message,
|
|
14568
15273
|
signature
|
|
14569
15274
|
}) {
|
|
14570
|
-
const request = new
|
|
15275
|
+
const request = new avs_pb24.GetKeyReq();
|
|
14571
15276
|
request.setMessage(message);
|
|
14572
15277
|
request.setSignature(signature);
|
|
14573
15278
|
const result = await this.sendGrpcRequest(
|
|
@@ -14606,112 +15311,32 @@ var BaseClient = class {
|
|
|
14606
15311
|
return this.factoryAddress;
|
|
14607
15312
|
}
|
|
14608
15313
|
/**
|
|
14609
|
-
* Send a gRPC request with
|
|
14610
|
-
* @param method - The method name
|
|
14611
|
-
* @param request - The request
|
|
14612
|
-
* @param options -
|
|
14613
|
-
* @returns {Promise<TResponse>} - The response from the
|
|
15314
|
+
* Send a gRPC request with authentication and error handling
|
|
15315
|
+
* @param method - The method name to call
|
|
15316
|
+
* @param request - The request object
|
|
15317
|
+
* @param options - Request options
|
|
15318
|
+
* @returns {Promise<TResponse>} - The response from the server
|
|
14614
15319
|
*/
|
|
14615
15320
|
sendGrpcRequest(method, request, options) {
|
|
14616
|
-
const metadata = import_lodash4.default.cloneDeep(this.metadata);
|
|
14617
|
-
if (options?.authKey) {
|
|
14618
|
-
metadata.set(import_types21.AUTH_KEY_HEADER, options.authKey);
|
|
14619
|
-
} else if (this.authKey) {
|
|
14620
|
-
metadata.set(import_types21.AUTH_KEY_HEADER, this.authKey);
|
|
14621
|
-
}
|
|
14622
15321
|
return new Promise((resolve, reject) => {
|
|
14623
|
-
|
|
15322
|
+
const metadata = new import_grpc_js.Metadata();
|
|
15323
|
+
const authKey = options?.authKey || this.authKey;
|
|
15324
|
+
if (authKey) {
|
|
15325
|
+
metadata.set(import_types21.AUTH_KEY_HEADER, authKey);
|
|
15326
|
+
}
|
|
15327
|
+
this.rpcClient[method](
|
|
14624
15328
|
request,
|
|
14625
15329
|
metadata,
|
|
14626
15330
|
(error, response) => {
|
|
14627
|
-
if (error)
|
|
14628
|
-
|
|
15331
|
+
if (error) {
|
|
15332
|
+
reject(error);
|
|
15333
|
+
} else {
|
|
15334
|
+
resolve(response);
|
|
15335
|
+
}
|
|
14629
15336
|
}
|
|
14630
15337
|
);
|
|
14631
15338
|
});
|
|
14632
15339
|
}
|
|
14633
|
-
/**
|
|
14634
|
-
* Convert a protobuf Value to a JavaScript value
|
|
14635
|
-
* @param value - The protobuf Value object
|
|
14636
|
-
* @returns {any} - The converted JavaScript value
|
|
14637
|
-
*/
|
|
14638
|
-
convertProtobufValueToJS(value) {
|
|
14639
|
-
if (!value) return null;
|
|
14640
|
-
if (value.hasNullValue && value.hasNullValue()) {
|
|
14641
|
-
return null;
|
|
14642
|
-
}
|
|
14643
|
-
if (value.hasNumberValue && value.hasNumberValue()) {
|
|
14644
|
-
return value.getNumberValue();
|
|
14645
|
-
}
|
|
14646
|
-
if (value.hasStringValue && value.hasStringValue()) {
|
|
14647
|
-
return value.getStringValue();
|
|
14648
|
-
}
|
|
14649
|
-
if (value.hasBoolValue && value.hasBoolValue()) {
|
|
14650
|
-
return value.getBoolValue();
|
|
14651
|
-
}
|
|
14652
|
-
if (value.hasStructValue && value.hasStructValue()) {
|
|
14653
|
-
const struct = value.getStructValue();
|
|
14654
|
-
const result = {};
|
|
14655
|
-
if (struct && struct.getFieldsMap) {
|
|
14656
|
-
const fieldsMap = struct.getFieldsMap();
|
|
14657
|
-
fieldsMap.forEach((fieldValue, key) => {
|
|
14658
|
-
result[key] = this.convertProtobufValueToJS(fieldValue);
|
|
14659
|
-
});
|
|
14660
|
-
}
|
|
14661
|
-
return result;
|
|
14662
|
-
}
|
|
14663
|
-
if (value.hasListValue && value.hasListValue()) {
|
|
14664
|
-
const list = value.getListValue();
|
|
14665
|
-
if (list && list.getValuesList) {
|
|
14666
|
-
return list.getValuesList().map((item) => this.convertProtobufValueToJS(item));
|
|
14667
|
-
}
|
|
14668
|
-
return [];
|
|
14669
|
-
}
|
|
14670
|
-
if (typeof value.getNumberValue === "function") {
|
|
14671
|
-
return value.getNumberValue();
|
|
14672
|
-
}
|
|
14673
|
-
if (typeof value.getStringValue === "function") {
|
|
14674
|
-
return value.getStringValue();
|
|
14675
|
-
}
|
|
14676
|
-
if (typeof value.getBoolValue === "function") {
|
|
14677
|
-
return value.getBoolValue();
|
|
14678
|
-
}
|
|
14679
|
-
return value;
|
|
14680
|
-
}
|
|
14681
|
-
/**
|
|
14682
|
-
* Convert a JavaScript value to a protobuf Value
|
|
14683
|
-
* @param value - The JavaScript value to convert
|
|
14684
|
-
* @returns {any} - The protobuf Value object
|
|
14685
|
-
*/
|
|
14686
|
-
convertJSValueToProtobuf(value) {
|
|
14687
|
-
const protobufValue = new (require("google-protobuf/google/protobuf/struct_pb")).Value();
|
|
14688
|
-
if (value === null || value === void 0) {
|
|
14689
|
-
protobufValue.setNullValue(0);
|
|
14690
|
-
} else if (typeof value === "number") {
|
|
14691
|
-
protobufValue.setNumberValue(value);
|
|
14692
|
-
} else if (typeof value === "string") {
|
|
14693
|
-
protobufValue.setStringValue(value);
|
|
14694
|
-
} else if (typeof value === "boolean") {
|
|
14695
|
-
protobufValue.setBoolValue(value);
|
|
14696
|
-
} else if (Array.isArray(value)) {
|
|
14697
|
-
const listValue = new (require("google-protobuf/google/protobuf/struct_pb")).ListValue();
|
|
14698
|
-
const convertedValues = value.map(
|
|
14699
|
-
(item) => this.convertJSValueToProtobuf(item)
|
|
14700
|
-
);
|
|
14701
|
-
listValue.setValuesList(convertedValues);
|
|
14702
|
-
protobufValue.setListValue(listValue);
|
|
14703
|
-
} else if (typeof value === "object") {
|
|
14704
|
-
const structValue = new (require("google-protobuf/google/protobuf/struct_pb")).Struct();
|
|
14705
|
-
const fieldsMap = structValue.getFieldsMap();
|
|
14706
|
-
Object.entries(value).forEach(([key, val]) => {
|
|
14707
|
-
fieldsMap.set(key, this.convertJSValueToProtobuf(val));
|
|
14708
|
-
});
|
|
14709
|
-
protobufValue.setStructValue(structValue);
|
|
14710
|
-
} else {
|
|
14711
|
-
protobufValue.setStringValue(String(value));
|
|
14712
|
-
}
|
|
14713
|
-
return protobufValue;
|
|
14714
|
-
}
|
|
14715
15340
|
};
|
|
14716
15341
|
var Client = class extends BaseClient {
|
|
14717
15342
|
constructor(config) {
|
|
@@ -14723,7 +15348,7 @@ var Client = class extends BaseClient {
|
|
|
14723
15348
|
* @returns {Promise<SmartWallet[]>} - The list of SmartWallet objects
|
|
14724
15349
|
*/
|
|
14725
15350
|
async getWallets(options) {
|
|
14726
|
-
const request = new
|
|
15351
|
+
const request = new avs_pb24.ListWalletReq();
|
|
14727
15352
|
const result = await this.sendGrpcRequest("listWallets", request, options);
|
|
14728
15353
|
return result.getItemsList().map((item) => item.toObject());
|
|
14729
15354
|
}
|
|
@@ -14735,7 +15360,7 @@ var Client = class extends BaseClient {
|
|
|
14735
15360
|
* @returns {Promise<SmartWallet>} - The added SmartWallet object
|
|
14736
15361
|
*/
|
|
14737
15362
|
async getWallet({ salt, factoryAddress }, options) {
|
|
14738
|
-
const request = new
|
|
15363
|
+
const request = new avs_pb24.GetWalletReq();
|
|
14739
15364
|
request.setSalt(salt);
|
|
14740
15365
|
if (factoryAddress) {
|
|
14741
15366
|
request.setFactoryAddress(factoryAddress);
|
|
@@ -14764,7 +15389,7 @@ var Client = class extends BaseClient {
|
|
|
14764
15389
|
* @returns {Promise<SmartWallet>} - The updated SmartWallet object
|
|
14765
15390
|
*/
|
|
14766
15391
|
async setWallet({ salt, factoryAddress }, { isHidden }, requestOptions) {
|
|
14767
|
-
const request = new
|
|
15392
|
+
const request = new avs_pb24.SetWalletReq();
|
|
14768
15393
|
request.setSalt(salt);
|
|
14769
15394
|
if (factoryAddress) {
|
|
14770
15395
|
request.setFactoryAddress(factoryAddress);
|
|
@@ -14812,7 +15437,7 @@ var Client = class extends BaseClient {
|
|
|
14812
15437
|
* @returns {Promise<{ items: Workflow[]; pageInfo: PageInfo }>} - The list of Workflow objects with nested pagination metadata
|
|
14813
15438
|
*/
|
|
14814
15439
|
async getWorkflows(addresses, options) {
|
|
14815
|
-
const request = new
|
|
15440
|
+
const request = new avs_pb24.ListTasksReq();
|
|
14816
15441
|
for (const a of addresses) {
|
|
14817
15442
|
request.addSmartWalletAddress(a);
|
|
14818
15443
|
}
|
|
@@ -14851,7 +15476,7 @@ var Client = class extends BaseClient {
|
|
|
14851
15476
|
* @returns {Promise<number>} - The count of workflows
|
|
14852
15477
|
*/
|
|
14853
15478
|
async getWorkflowCount(addresses, options) {
|
|
14854
|
-
const request = new
|
|
15479
|
+
const request = new avs_pb24.GetWorkflowCountReq();
|
|
14855
15480
|
request.setAddressesList(addresses);
|
|
14856
15481
|
const result = await this.sendGrpcRequest("getWorkflowCount", request, options);
|
|
14857
15482
|
return result.getTotal();
|
|
@@ -14867,7 +15492,7 @@ var Client = class extends BaseClient {
|
|
|
14867
15492
|
* @returns {Promise<{ items: Execution[]; pageInfo: PageInfo }>} - The list of Execution objects with nested pagination metadata
|
|
14868
15493
|
*/
|
|
14869
15494
|
async getExecutions(workflows, options) {
|
|
14870
|
-
const request = new
|
|
15495
|
+
const request = new avs_pb24.ListExecutionsReq();
|
|
14871
15496
|
for (const w of workflows) {
|
|
14872
15497
|
request.addTaskIds(w);
|
|
14873
15498
|
}
|
|
@@ -14901,7 +15526,7 @@ var Client = class extends BaseClient {
|
|
|
14901
15526
|
* @returns {Promise<Execution>} - The Execution object
|
|
14902
15527
|
*/
|
|
14903
15528
|
async getExecution(workflowId, executionId, options) {
|
|
14904
|
-
const request = new
|
|
15529
|
+
const request = new avs_pb24.ExecutionReq();
|
|
14905
15530
|
request.setTaskId(workflowId);
|
|
14906
15531
|
request.setExecutionId(executionId);
|
|
14907
15532
|
const result = await this.sendGrpcRequest("getExecution", request, options);
|
|
@@ -14914,7 +15539,7 @@ var Client = class extends BaseClient {
|
|
|
14914
15539
|
* @returns {Promise<number>} - The count of executions
|
|
14915
15540
|
*/
|
|
14916
15541
|
async getExecutionCount(workflows, options) {
|
|
14917
|
-
const request = new
|
|
15542
|
+
const request = new avs_pb24.GetExecutionCountReq();
|
|
14918
15543
|
request.setWorkflowIdsList(workflows);
|
|
14919
15544
|
const result = await this.sendGrpcRequest("getExecutionCount", request, options);
|
|
14920
15545
|
return result.getTotal();
|
|
@@ -14927,7 +15552,7 @@ var Client = class extends BaseClient {
|
|
|
14927
15552
|
* @returns {Promise<ExecutionStatus>} - The status of the execution
|
|
14928
15553
|
*/
|
|
14929
15554
|
async getExecutionStatus(workflowId, executionId, options) {
|
|
14930
|
-
const request = new
|
|
15555
|
+
const request = new avs_pb24.ExecutionReq();
|
|
14931
15556
|
request.setTaskId(workflowId);
|
|
14932
15557
|
request.setExecutionId(executionId);
|
|
14933
15558
|
const result = await this.sendGrpcRequest("getExecutionStatus", request, options);
|
|
@@ -14940,7 +15565,7 @@ var Client = class extends BaseClient {
|
|
|
14940
15565
|
* @returns {Promise<Workflow>} - The Workflow object
|
|
14941
15566
|
*/
|
|
14942
15567
|
async getWorkflow(id, options) {
|
|
14943
|
-
const request = new
|
|
15568
|
+
const request = new avs_pb24.IdReq();
|
|
14944
15569
|
request.setId(id);
|
|
14945
15570
|
const result = await this.sendGrpcRequest(
|
|
14946
15571
|
"getTask",
|
|
@@ -14963,7 +15588,7 @@ var Client = class extends BaseClient {
|
|
|
14963
15588
|
reason,
|
|
14964
15589
|
isBlocking = false
|
|
14965
15590
|
}, options) {
|
|
14966
|
-
const request = new
|
|
15591
|
+
const request = new avs_pb24.UserTriggerTaskReq();
|
|
14967
15592
|
request.setTaskId(id);
|
|
14968
15593
|
request.setReason(new reason_default(reason).toRequest());
|
|
14969
15594
|
request.setIsBlocking(isBlocking);
|
|
@@ -14977,7 +15602,7 @@ var Client = class extends BaseClient {
|
|
|
14977
15602
|
* @returns {Promise<boolean>} - Whether the workflow was successfully canceled
|
|
14978
15603
|
*/
|
|
14979
15604
|
async cancelWorkflow(id, options) {
|
|
14980
|
-
const request = new
|
|
15605
|
+
const request = new avs_pb24.IdReq();
|
|
14981
15606
|
request.setId(id);
|
|
14982
15607
|
const result = await this.sendGrpcRequest(
|
|
14983
15608
|
"cancelTask",
|
|
@@ -14993,7 +15618,7 @@ var Client = class extends BaseClient {
|
|
|
14993
15618
|
* @returns {Promise<boolean>} - Whether the workflow was successfully deleted
|
|
14994
15619
|
*/
|
|
14995
15620
|
async deleteWorkflow(id, options) {
|
|
14996
|
-
const request = new
|
|
15621
|
+
const request = new avs_pb24.IdReq();
|
|
14997
15622
|
request.setId(id);
|
|
14998
15623
|
const result = await this.sendGrpcRequest(
|
|
14999
15624
|
"deleteTask",
|
|
@@ -15013,7 +15638,7 @@ var Client = class extends BaseClient {
|
|
|
15013
15638
|
* @returns {Promise<boolean>} - True if the secret was created successfully
|
|
15014
15639
|
*/
|
|
15015
15640
|
async createSecret(name, value, options) {
|
|
15016
|
-
const request = new
|
|
15641
|
+
const request = new avs_pb24.CreateOrUpdateSecretReq();
|
|
15017
15642
|
request.setName(name);
|
|
15018
15643
|
request.setSecret(value);
|
|
15019
15644
|
if (options?.workflowId) {
|
|
@@ -15036,7 +15661,7 @@ var Client = class extends BaseClient {
|
|
|
15036
15661
|
* @returns {Promise<boolean>} - True if the secret was updated successfully
|
|
15037
15662
|
*/
|
|
15038
15663
|
async updateSecret(name, value, options) {
|
|
15039
|
-
const request = new
|
|
15664
|
+
const request = new avs_pb24.CreateOrUpdateSecretReq();
|
|
15040
15665
|
request.setName(name);
|
|
15041
15666
|
request.setSecret(value);
|
|
15042
15667
|
if (options?.workflowId) {
|
|
@@ -15063,7 +15688,7 @@ var Client = class extends BaseClient {
|
|
|
15063
15688
|
* @returns {Promise<{ items: SecretProps[]; pageInfo: PageInfo }>} - The list of Secret objects with nested pagination metadata
|
|
15064
15689
|
*/
|
|
15065
15690
|
async getSecrets(options) {
|
|
15066
|
-
const request = new
|
|
15691
|
+
const request = new avs_pb24.ListSecretsReq();
|
|
15067
15692
|
if (options?.workflowId) {
|
|
15068
15693
|
request.setWorkflowId(options.workflowId);
|
|
15069
15694
|
}
|
|
@@ -15118,7 +15743,7 @@ var Client = class extends BaseClient {
|
|
|
15118
15743
|
* @returns {Promise<boolean>} - True if the secret was deleted successfully
|
|
15119
15744
|
*/
|
|
15120
15745
|
async deleteSecret(name, options) {
|
|
15121
|
-
const request = new
|
|
15746
|
+
const request = new avs_pb24.DeleteSecretReq();
|
|
15122
15747
|
request.setName(name);
|
|
15123
15748
|
if (options?.workflowId) {
|
|
15124
15749
|
request.setWorkflowId(options.workflowId);
|
|
@@ -15130,237 +15755,72 @@ var Client = class extends BaseClient {
|
|
|
15130
15755
|
return result.getValue();
|
|
15131
15756
|
}
|
|
15132
15757
|
/**
|
|
15133
|
-
* Run a node with inputs
|
|
15758
|
+
* Run a node with inputs for testing purposes
|
|
15134
15759
|
* @param {RunNodeWithInputsRequest} params - The parameters for running the node
|
|
15135
|
-
* @param {string} params.nodeType - The type of the node
|
|
15760
|
+
* @param {string} params.nodeType - The type of the node (restApi, customCode, etc.)
|
|
15136
15761
|
* @param {Record<string, any>} params.nodeConfig - The configuration for the node
|
|
15137
|
-
* @param {Record<string, any>} params.inputVariables -
|
|
15138
|
-
* @param {string} params.walletAddress - The wallet address to use for the node
|
|
15762
|
+
* @param {Record<string, any>} params.inputVariables - Variables to pass to the node
|
|
15139
15763
|
* @param {RequestOptions} options - Request options
|
|
15140
15764
|
* @returns {Promise<RunNodeWithInputsResponse>} - The response from running the node
|
|
15141
15765
|
*/
|
|
15142
15766
|
async runNodeWithInputs({ nodeType, nodeConfig, inputVariables = {} }, options) {
|
|
15143
|
-
|
|
15144
|
-
|
|
15145
|
-
|
|
15146
|
-
|
|
15147
|
-
|
|
15148
|
-
|
|
15149
|
-
|
|
15150
|
-
|
|
15151
|
-
}
|
|
15152
|
-
const request = new avs_pb22.RunNodeWithInputsReq();
|
|
15153
|
-
let protobufNodeType;
|
|
15154
|
-
switch (nodeType) {
|
|
15155
|
-
// Trigger types - map to CUSTOM_CODE since they're handled specially by the backend
|
|
15156
|
-
case "blockTrigger":
|
|
15157
|
-
case "fixedTimeTrigger":
|
|
15158
|
-
case "cronTrigger":
|
|
15159
|
-
case "eventTrigger":
|
|
15160
|
-
case "manualTrigger":
|
|
15161
|
-
protobufNodeType = avs_pb22.NodeType.NODE_TYPE_CUSTOM_CODE;
|
|
15162
|
-
break;
|
|
15163
|
-
// Regular node types
|
|
15164
|
-
default:
|
|
15165
|
-
protobufNodeType = import_types20.NodeTypeGoConverter.fromGoString(nodeType);
|
|
15166
|
-
break;
|
|
15167
|
-
}
|
|
15168
|
-
request.setNodeType(protobufNodeType);
|
|
15169
|
-
const nodeConfigMap = request.getNodeConfigMap();
|
|
15170
|
-
for (const [key, value] of Object.entries(nodeConfig)) {
|
|
15171
|
-
nodeConfigMap.set(key, this.convertJSValueToProtobuf(value));
|
|
15172
|
-
}
|
|
15173
|
-
if (inputVariables && Object.keys(inputVariables).length > 0) {
|
|
15174
|
-
const inputVarsMap = request.getInputVariablesMap();
|
|
15175
|
-
for (const [key, value] of Object.entries(inputVariables)) {
|
|
15176
|
-
inputVarsMap.set(key, this.convertJSValueToProtobuf(value));
|
|
15177
|
-
}
|
|
15178
|
-
}
|
|
15179
|
-
const result = await this.sendGrpcRequest("runNodeWithInputs", request, options);
|
|
15180
|
-
let data;
|
|
15181
|
-
const outputCase = result.getOutputDataCase();
|
|
15182
|
-
if (outputCase !== avs_pb22.RunNodeWithInputsResp.OutputDataCase.OUTPUT_DATA_NOT_SET) {
|
|
15183
|
-
switch (outputCase) {
|
|
15184
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.ETH_TRANSFER:
|
|
15185
|
-
data = result.getEthTransfer()?.toObject();
|
|
15186
|
-
break;
|
|
15187
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.GRAPHQL:
|
|
15188
|
-
data = result.getGraphql()?.toObject();
|
|
15189
|
-
break;
|
|
15190
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.CONTRACT_READ:
|
|
15191
|
-
data = result.getContractRead()?.toObject();
|
|
15192
|
-
break;
|
|
15193
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.CONTRACT_WRITE:
|
|
15194
|
-
data = result.getContractWrite()?.toObject();
|
|
15195
|
-
break;
|
|
15196
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.CUSTOM_CODE:
|
|
15197
|
-
data = result.getCustomCode()?.toObject();
|
|
15198
|
-
break;
|
|
15199
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.REST_API:
|
|
15200
|
-
data = result.getRestApi()?.toObject();
|
|
15201
|
-
break;
|
|
15202
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.BRANCH:
|
|
15203
|
-
data = result.getBranch()?.toObject();
|
|
15204
|
-
break;
|
|
15205
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.FILTER:
|
|
15206
|
-
data = result.getFilter()?.toObject();
|
|
15207
|
-
break;
|
|
15208
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.LOOP:
|
|
15209
|
-
data = result.getLoop()?.toObject();
|
|
15210
|
-
break;
|
|
15211
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.BLOCK_TRIGGER:
|
|
15212
|
-
data = result.getBlockTrigger()?.toObject();
|
|
15213
|
-
break;
|
|
15214
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.FIXED_TIME_TRIGGER:
|
|
15215
|
-
data = result.getFixedTimeTrigger()?.toObject();
|
|
15216
|
-
break;
|
|
15217
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.CRON_TRIGGER:
|
|
15218
|
-
data = result.getCronTrigger()?.toObject();
|
|
15219
|
-
break;
|
|
15220
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.EVENT_TRIGGER:
|
|
15221
|
-
data = result.getEventTrigger()?.toObject();
|
|
15222
|
-
break;
|
|
15223
|
-
}
|
|
15224
|
-
}
|
|
15225
|
-
return {
|
|
15226
|
-
success: result.getSuccess(),
|
|
15227
|
-
data,
|
|
15228
|
-
error: result.getError(),
|
|
15229
|
-
nodeId: result.getNodeId()
|
|
15230
|
-
};
|
|
15231
|
-
} catch (error) {
|
|
15767
|
+
const triggerTypes = [
|
|
15768
|
+
import_types20.TriggerType.Block,
|
|
15769
|
+
import_types20.TriggerType.FixedTime,
|
|
15770
|
+
import_types20.TriggerType.Cron,
|
|
15771
|
+
import_types20.TriggerType.Event,
|
|
15772
|
+
import_types20.TriggerType.Manual
|
|
15773
|
+
];
|
|
15774
|
+
if (triggerTypes.includes(nodeType)) {
|
|
15232
15775
|
return {
|
|
15233
15776
|
success: false,
|
|
15234
|
-
error:
|
|
15235
|
-
|
|
15236
|
-
|
|
15237
|
-
|
|
15238
|
-
|
|
15239
|
-
const
|
|
15240
|
-
|
|
15241
|
-
|
|
15242
|
-
|
|
15243
|
-
|
|
15244
|
-
}
|
|
15245
|
-
|
|
15246
|
-
|
|
15247
|
-
|
|
15248
|
-
|
|
15249
|
-
|
|
15250
|
-
|
|
15251
|
-
|
|
15252
|
-
|
|
15253
|
-
|
|
15254
|
-
|
|
15255
|
-
|
|
15256
|
-
|
|
15257
|
-
|
|
15258
|
-
filter: import_types20.NodeType.Filter,
|
|
15259
|
-
loop: import_types20.NodeType.Loop
|
|
15260
|
-
};
|
|
15261
|
-
return typeMap[nodeType] || null;
|
|
15262
|
-
}
|
|
15263
|
-
createNodeData(nodeType, config) {
|
|
15264
|
-
switch (nodeType) {
|
|
15265
|
-
case "blockTrigger":
|
|
15266
|
-
return {
|
|
15267
|
-
config: {
|
|
15268
|
-
lang: 0,
|
|
15269
|
-
// JavaScript
|
|
15270
|
-
source: "return { blockNumber: Math.floor(Math.random() * 10000000) };"
|
|
15271
|
-
// Simulate block trigger
|
|
15272
|
-
}
|
|
15273
|
-
};
|
|
15274
|
-
case "restApi":
|
|
15275
|
-
return {
|
|
15276
|
-
config: {
|
|
15277
|
-
url: config.url || "",
|
|
15278
|
-
method: config.method || "GET",
|
|
15279
|
-
body: config.body || "",
|
|
15280
|
-
headersMap: Object.entries(config.headers || {})
|
|
15281
|
-
}
|
|
15282
|
-
};
|
|
15283
|
-
case "contractRead":
|
|
15284
|
-
return {
|
|
15285
|
-
config: {
|
|
15286
|
-
contractAddress: config.contractAddress || "",
|
|
15287
|
-
callData: config.callData || "",
|
|
15288
|
-
contractAbi: config.contractAbi || ""
|
|
15289
|
-
}
|
|
15290
|
-
};
|
|
15291
|
-
case "customCode":
|
|
15292
|
-
return {
|
|
15293
|
-
config: {
|
|
15294
|
-
lang: config.lang || 0,
|
|
15295
|
-
// JavaScript
|
|
15296
|
-
source: config.source || 'return { message: "Node executed successfully" };'
|
|
15297
|
-
}
|
|
15298
|
-
};
|
|
15299
|
-
case "loop":
|
|
15300
|
-
return {
|
|
15301
|
-
config: {
|
|
15302
|
-
sourceId: config.sourceId || "",
|
|
15303
|
-
iterVal: config.iterVal || "",
|
|
15304
|
-
iterKey: config.iterKey || ""
|
|
15305
|
-
}
|
|
15306
|
-
};
|
|
15307
|
-
case "branch":
|
|
15308
|
-
return {
|
|
15309
|
-
config: {
|
|
15310
|
-
conditionsList: config.conditions || []
|
|
15311
|
-
}
|
|
15312
|
-
};
|
|
15313
|
-
case "filter":
|
|
15314
|
-
return {
|
|
15315
|
-
config: {
|
|
15316
|
-
expression: config.expression || "",
|
|
15317
|
-
sourceId: config.sourceId || config.input || ""
|
|
15318
|
-
}
|
|
15319
|
-
};
|
|
15320
|
-
default:
|
|
15321
|
-
throw new Error(`Unsupported node type: ${nodeType}`);
|
|
15322
|
-
}
|
|
15323
|
-
}
|
|
15324
|
-
createTempWorkflowForNode(node, triggerId, inputVariables) {
|
|
15325
|
-
if (node.type === import_types20.NodeType.CustomCode && inputVariables && Object.keys(inputVariables).length > 0) {
|
|
15326
|
-
const customCodeData = node.data;
|
|
15327
|
-
if (customCodeData.config) {
|
|
15328
|
-
const variableDefinitions = Object.entries(inputVariables).map(([key, value]) => {
|
|
15329
|
-
const valueStr = typeof value === "string" ? `"${value}"` : JSON.stringify(value);
|
|
15330
|
-
return `const ${key} = ${valueStr};`;
|
|
15331
|
-
}).join("\n");
|
|
15332
|
-
customCodeData.config.source = `${variableDefinitions}
|
|
15333
|
-
${customCodeData.config.source}`;
|
|
15334
|
-
}
|
|
15335
|
-
}
|
|
15336
|
-
const trigger = factory_default.create({
|
|
15337
|
-
id: triggerId,
|
|
15338
|
-
name: "manual_trigger",
|
|
15339
|
-
type: import_types20.TriggerType.Manual,
|
|
15340
|
-
data: inputVariables
|
|
15341
|
-
// Store input variables in the trigger data
|
|
15342
|
-
});
|
|
15343
|
-
return new workflow_default({
|
|
15344
|
-
smartWalletAddress: "",
|
|
15345
|
-
trigger,
|
|
15346
|
-
nodes: [node],
|
|
15347
|
-
edges: [
|
|
15348
|
-
new edge_default({
|
|
15349
|
-
id: `edge_${Date.now()}`,
|
|
15350
|
-
source: triggerId,
|
|
15351
|
-
target: node.id
|
|
15352
|
-
})
|
|
15353
|
-
],
|
|
15354
|
-
startAt: Date.now(),
|
|
15355
|
-
expiredAt: Date.now() + 36e5,
|
|
15356
|
-
// 1 hour from now
|
|
15357
|
-
maxExecution: 1
|
|
15358
|
-
});
|
|
15777
|
+
error: `Trigger type "${nodeType}" should use the runTrigger() method instead of runNodeWithInputs()`,
|
|
15778
|
+
nodeId: ""
|
|
15779
|
+
};
|
|
15780
|
+
}
|
|
15781
|
+
const request = new avs_pb24.RunNodeWithInputsReq();
|
|
15782
|
+
const protobufNodeType = import_types20.NodeTypeGoConverter.fromGoString(nodeType);
|
|
15783
|
+
request.setNodeType(protobufNodeType);
|
|
15784
|
+
const nodeConfigMap = request.getNodeConfigMap();
|
|
15785
|
+
for (const [key, value] of Object.entries(nodeConfig)) {
|
|
15786
|
+
nodeConfigMap.set(key, convertJSValueToProtobuf(value));
|
|
15787
|
+
}
|
|
15788
|
+
if (inputVariables && Object.keys(inputVariables).length > 0) {
|
|
15789
|
+
const inputVarsMap = request.getInputVariablesMap();
|
|
15790
|
+
for (const [key, value] of Object.entries(inputVariables)) {
|
|
15791
|
+
inputVarsMap.set(key, convertJSValueToProtobuf(value));
|
|
15792
|
+
}
|
|
15793
|
+
}
|
|
15794
|
+
const result = await this.sendGrpcRequest("runNodeWithInputs", request, options);
|
|
15795
|
+
return {
|
|
15796
|
+
success: result.getSuccess(),
|
|
15797
|
+
data: factory_default2.fromOutputData(result),
|
|
15798
|
+
error: result.getError(),
|
|
15799
|
+
nodeId: result.getNodeId()
|
|
15800
|
+
};
|
|
15359
15801
|
}
|
|
15360
|
-
|
|
15802
|
+
/**
|
|
15803
|
+
* Run a trigger for testing purposes
|
|
15804
|
+
* @param {RunTriggerRequest} params - The parameters for running the trigger
|
|
15805
|
+
* @param {string} params.triggerType - The type of the trigger (blockTrigger, cronTrigger, etc.)
|
|
15806
|
+
* @param {Record<string, any>} params.triggerConfig - The configuration for the trigger
|
|
15807
|
+
* @param {RequestOptions} options - Request options
|
|
15808
|
+
* @returns {Promise<RunTriggerResponse>} - The response from running the trigger
|
|
15809
|
+
*/
|
|
15810
|
+
async runTrigger({ triggerType, triggerConfig }, options) {
|
|
15811
|
+
const request = new avs_pb24.RunTriggerReq();
|
|
15812
|
+
const protobufTriggerType = import_types20.TriggerTypeGoConverter.fromGoString(triggerType);
|
|
15813
|
+
request.setTriggerType(protobufTriggerType);
|
|
15814
|
+
const triggerConfigMap = request.getTriggerConfigMap();
|
|
15815
|
+
for (const [key, value] of Object.entries(triggerConfig)) {
|
|
15816
|
+
triggerConfigMap.set(key, convertJSValueToProtobuf(value));
|
|
15817
|
+
}
|
|
15818
|
+
const result = await this.sendGrpcRequest("runTrigger", request, options);
|
|
15361
15819
|
return {
|
|
15362
|
-
|
|
15363
|
-
|
|
15820
|
+
success: result.getSuccess(),
|
|
15821
|
+
data: factory_default.fromOutputData(result),
|
|
15822
|
+
error: result.getError(),
|
|
15823
|
+
triggerId: result.getTriggerId()
|
|
15364
15824
|
};
|
|
15365
15825
|
}
|
|
15366
15826
|
};
|