@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.mjs
CHANGED
|
@@ -137,6 +137,9 @@ var require_avs_pb = __commonJS({
|
|
|
137
137
|
goog.exportSymbol("proto.aggregator.LoopNode.Config", null, global);
|
|
138
138
|
goog.exportSymbol("proto.aggregator.LoopNode.Output", null, global);
|
|
139
139
|
goog.exportSymbol("proto.aggregator.LoopNode.RunnerCase", null, global);
|
|
140
|
+
goog.exportSymbol("proto.aggregator.ManualTrigger", null, global);
|
|
141
|
+
goog.exportSymbol("proto.aggregator.ManualTrigger.Config", null, global);
|
|
142
|
+
goog.exportSymbol("proto.aggregator.ManualTrigger.Output", null, global);
|
|
140
143
|
goog.exportSymbol("proto.aggregator.NodeType", null, global);
|
|
141
144
|
goog.exportSymbol("proto.aggregator.NonceRequest", null, global);
|
|
142
145
|
goog.exportSymbol("proto.aggregator.NonceResp", null, global);
|
|
@@ -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"(exports) {
|
|
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
|
exports.AggregatorClient = grpc.makeGenericClientConstructor(AggregatorService, "Aggregator");
|
|
@@ -13239,12 +13724,11 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
13239
13724
|
|
|
13240
13725
|
// src/index.ts
|
|
13241
13726
|
var import_avs_grpc_pb = __toESM(require_avs_grpc_pb());
|
|
13242
|
-
var
|
|
13243
|
-
import _5 from "lodash";
|
|
13727
|
+
var avs_pb24 = __toESM(require_avs_pb());
|
|
13244
13728
|
import { credentials, Metadata } from "@grpc/grpc-js";
|
|
13245
13729
|
|
|
13246
13730
|
// src/models/workflow.ts
|
|
13247
|
-
var
|
|
13731
|
+
var avs_pb19 = __toESM(require_avs_pb());
|
|
13248
13732
|
import _4 from "lodash";
|
|
13249
13733
|
|
|
13250
13734
|
// src/models/edge.ts
|
|
@@ -13268,6 +13752,9 @@ var Edge = class _Edge {
|
|
|
13268
13752
|
};
|
|
13269
13753
|
var edge_default = Edge;
|
|
13270
13754
|
|
|
13755
|
+
// src/models/trigger/factory.ts
|
|
13756
|
+
var avs_pb7 = __toESM(require_avs_pb());
|
|
13757
|
+
|
|
13271
13758
|
// src/models/trigger/block.ts
|
|
13272
13759
|
var avs_pb2 = __toESM(require_avs_pb());
|
|
13273
13760
|
|
|
@@ -13338,6 +13825,15 @@ var BlockTrigger2 = class _BlockTrigger extends interface_default {
|
|
|
13338
13825
|
getOutput() {
|
|
13339
13826
|
return this.output;
|
|
13340
13827
|
}
|
|
13828
|
+
/**
|
|
13829
|
+
* Extract output data from RunTriggerResp for block triggers
|
|
13830
|
+
* @param outputData - The RunTriggerResp containing block trigger output
|
|
13831
|
+
* @returns Plain JavaScript object with block trigger data
|
|
13832
|
+
*/
|
|
13833
|
+
static fromOutputData(outputData) {
|
|
13834
|
+
const blockOutput = outputData.getBlockTrigger();
|
|
13835
|
+
return blockOutput?.toObject() || null;
|
|
13836
|
+
}
|
|
13341
13837
|
};
|
|
13342
13838
|
var block_default = BlockTrigger2;
|
|
13343
13839
|
|
|
@@ -13380,13 +13876,22 @@ var CronTrigger2 = class _CronTrigger extends interface_default {
|
|
|
13380
13876
|
});
|
|
13381
13877
|
}
|
|
13382
13878
|
/**
|
|
13383
|
-
* Convert raw data from
|
|
13879
|
+
* Convert raw data from runTrigger response to CronOutput format
|
|
13384
13880
|
* @param rawData - The raw data from the gRPC response
|
|
13385
13881
|
* @returns {CronTriggerOutput | undefined} - The converted data
|
|
13386
13882
|
*/
|
|
13387
13883
|
getOutput() {
|
|
13388
13884
|
return this.output;
|
|
13389
13885
|
}
|
|
13886
|
+
/**
|
|
13887
|
+
* Extract output data from RunTriggerResp for cron triggers
|
|
13888
|
+
* @param outputData - The RunTriggerResp containing cron trigger output
|
|
13889
|
+
* @returns Plain JavaScript object with cron trigger data
|
|
13890
|
+
*/
|
|
13891
|
+
static fromOutputData(outputData) {
|
|
13892
|
+
const cronOutput = outputData.getCronTrigger();
|
|
13893
|
+
return cronOutput?.toObject() || null;
|
|
13894
|
+
}
|
|
13390
13895
|
};
|
|
13391
13896
|
var cron_default = CronTrigger2;
|
|
13392
13897
|
|
|
@@ -13454,13 +13959,22 @@ var EventTrigger2 = class _EventTrigger extends interface_default {
|
|
|
13454
13959
|
});
|
|
13455
13960
|
}
|
|
13456
13961
|
/**
|
|
13457
|
-
* Convert raw data from
|
|
13962
|
+
* Convert raw data from runTrigger response to EventOutput format
|
|
13458
13963
|
* @param rawData - The raw data from the gRPC response
|
|
13459
13964
|
* @returns {EventTriggerOutput | undefined} - The converted data
|
|
13460
13965
|
*/
|
|
13461
13966
|
getOutput() {
|
|
13462
13967
|
return this.output;
|
|
13463
13968
|
}
|
|
13969
|
+
/**
|
|
13970
|
+
* Extract output data from RunTriggerResp for event triggers
|
|
13971
|
+
* @param outputData - The RunTriggerResp containing event trigger output
|
|
13972
|
+
* @returns Plain JavaScript object with event trigger data
|
|
13973
|
+
*/
|
|
13974
|
+
static fromOutputData(outputData) {
|
|
13975
|
+
const eventOutput = outputData.getEventTrigger();
|
|
13976
|
+
return eventOutput?.toObject() || null;
|
|
13977
|
+
}
|
|
13464
13978
|
};
|
|
13465
13979
|
var event_default = EventTrigger2;
|
|
13466
13980
|
|
|
@@ -13503,13 +14017,22 @@ var FixedTimeTrigger2 = class _FixedTimeTrigger extends interface_default {
|
|
|
13503
14017
|
});
|
|
13504
14018
|
}
|
|
13505
14019
|
/**
|
|
13506
|
-
* Convert raw data from
|
|
14020
|
+
* Convert raw data from runTrigger response to FixedTimeOutput format
|
|
13507
14021
|
* @param rawData - The raw data from the gRPC response
|
|
13508
14022
|
* @returns {FixedTimeTriggerOutput | undefined} - The converted data
|
|
13509
14023
|
*/
|
|
13510
14024
|
getOutput() {
|
|
13511
14025
|
return this.output;
|
|
13512
14026
|
}
|
|
14027
|
+
/**
|
|
14028
|
+
* Extract output data from RunTriggerResp for fixed time triggers
|
|
14029
|
+
* @param outputData - The RunTriggerResp containing fixed time trigger output
|
|
14030
|
+
* @returns Plain JavaScript object with fixed time trigger data
|
|
14031
|
+
*/
|
|
14032
|
+
static fromOutputData(outputData) {
|
|
14033
|
+
const fixedTimeOutput = outputData.getFixedTimeTrigger();
|
|
14034
|
+
return fixedTimeOutput?.toObject() || null;
|
|
14035
|
+
}
|
|
13513
14036
|
};
|
|
13514
14037
|
var fixedTime_default = FixedTimeTrigger2;
|
|
13515
14038
|
|
|
@@ -13527,23 +14050,109 @@ var ManualTrigger = class _ManualTrigger extends interface_default {
|
|
|
13527
14050
|
trigger.setManual(true);
|
|
13528
14051
|
return trigger;
|
|
13529
14052
|
}
|
|
13530
|
-
static fromResponse(raw) {
|
|
13531
|
-
const obj = raw.toObject();
|
|
13532
|
-
return new _ManualTrigger({
|
|
13533
|
-
...obj,
|
|
13534
|
-
type: TriggerType5.Manual,
|
|
13535
|
-
data: null
|
|
13536
|
-
// Manual triggers don't have data in the protobuf response
|
|
14053
|
+
static fromResponse(raw) {
|
|
14054
|
+
const obj = raw.toObject();
|
|
14055
|
+
return new _ManualTrigger({
|
|
14056
|
+
...obj,
|
|
14057
|
+
type: TriggerType5.Manual,
|
|
14058
|
+
data: null
|
|
14059
|
+
// Manual triggers don't have data in the protobuf response
|
|
14060
|
+
});
|
|
14061
|
+
}
|
|
14062
|
+
getInputVariables() {
|
|
14063
|
+
return this.data;
|
|
14064
|
+
}
|
|
14065
|
+
/**
|
|
14066
|
+
* Convert raw data from runTrigger response to ManualOutput format
|
|
14067
|
+
* @param rawData - The raw data from the gRPC response
|
|
14068
|
+
* @returns {ManualTriggerOutput | undefined} - The converted data
|
|
14069
|
+
*/
|
|
14070
|
+
getOutput() {
|
|
14071
|
+
return this.output;
|
|
14072
|
+
}
|
|
14073
|
+
/**
|
|
14074
|
+
* Extract output data from RunTriggerResp for manual triggers
|
|
14075
|
+
* @param outputData - The RunTriggerResp containing manual trigger output
|
|
14076
|
+
* @returns Plain JavaScript object with manual trigger data
|
|
14077
|
+
*/
|
|
14078
|
+
static fromOutputData(outputData) {
|
|
14079
|
+
const manualOutput = outputData.getManualTrigger();
|
|
14080
|
+
return manualOutput?.toObject() || null;
|
|
14081
|
+
}
|
|
14082
|
+
};
|
|
14083
|
+
var manual_default = ManualTrigger;
|
|
14084
|
+
|
|
14085
|
+
// src/models/trigger/factory.ts
|
|
14086
|
+
import { TriggerType as TriggerType6 } from "@avaprotocol/types";
|
|
14087
|
+
|
|
14088
|
+
// src/utils.ts
|
|
14089
|
+
import {
|
|
14090
|
+
Value as ProtobufValue,
|
|
14091
|
+
Struct as ProtobufStruct,
|
|
14092
|
+
ListValue as ProtobufListValue
|
|
14093
|
+
} from "google-protobuf/google/protobuf/struct_pb";
|
|
14094
|
+
function convertProtobufValueToJs(value) {
|
|
14095
|
+
if (!value) {
|
|
14096
|
+
return void 0;
|
|
14097
|
+
}
|
|
14098
|
+
switch (value.getKindCase()) {
|
|
14099
|
+
case ProtobufValue.KindCase.NULL_VALUE:
|
|
14100
|
+
return null;
|
|
14101
|
+
case ProtobufValue.KindCase.NUMBER_VALUE:
|
|
14102
|
+
return value.getNumberValue();
|
|
14103
|
+
case ProtobufValue.KindCase.STRING_VALUE:
|
|
14104
|
+
return value.getStringValue();
|
|
14105
|
+
case ProtobufValue.KindCase.BOOL_VALUE:
|
|
14106
|
+
return value.getBoolValue();
|
|
14107
|
+
case ProtobufValue.KindCase.STRUCT_VALUE: {
|
|
14108
|
+
const struct = value.getStructValue();
|
|
14109
|
+
if (!struct) return {};
|
|
14110
|
+
const jsObj = {};
|
|
14111
|
+
const fields = struct.getFieldsMap();
|
|
14112
|
+
fields.forEach((val, key) => {
|
|
14113
|
+
jsObj[key] = convertProtobufValueToJs(val);
|
|
14114
|
+
});
|
|
14115
|
+
return jsObj;
|
|
14116
|
+
}
|
|
14117
|
+
case ProtobufValue.KindCase.LIST_VALUE: {
|
|
14118
|
+
const list = value.getListValue();
|
|
14119
|
+
if (!list) return [];
|
|
14120
|
+
return list.getValuesList().map((item) => convertProtobufValueToJs(item));
|
|
14121
|
+
}
|
|
14122
|
+
case ProtobufValue.KindCase.KIND_NOT_SET:
|
|
14123
|
+
default:
|
|
14124
|
+
return void 0;
|
|
14125
|
+
}
|
|
14126
|
+
}
|
|
14127
|
+
function convertJSValueToProtobuf(value) {
|
|
14128
|
+
const protobufValue = new ProtobufValue();
|
|
14129
|
+
if (value === null || value === void 0) {
|
|
14130
|
+
protobufValue.setNullValue(0);
|
|
14131
|
+
} else if (typeof value === "number") {
|
|
14132
|
+
protobufValue.setNumberValue(value);
|
|
14133
|
+
} else if (typeof value === "string") {
|
|
14134
|
+
protobufValue.setStringValue(value);
|
|
14135
|
+
} else if (typeof value === "boolean") {
|
|
14136
|
+
protobufValue.setBoolValue(value);
|
|
14137
|
+
} else if (Array.isArray(value)) {
|
|
14138
|
+
const listValue = new ProtobufListValue();
|
|
14139
|
+
const convertedValues = value.map((item) => convertJSValueToProtobuf(item));
|
|
14140
|
+
listValue.setValuesList(convertedValues);
|
|
14141
|
+
protobufValue.setListValue(listValue);
|
|
14142
|
+
} else if (typeof value === "object") {
|
|
14143
|
+
const structValue = new ProtobufStruct();
|
|
14144
|
+
const fieldsMap = structValue.getFieldsMap();
|
|
14145
|
+
Object.entries(value).forEach(([key, val]) => {
|
|
14146
|
+
fieldsMap.set(key, convertJSValueToProtobuf(val));
|
|
13537
14147
|
});
|
|
14148
|
+
protobufValue.setStructValue(structValue);
|
|
14149
|
+
} else {
|
|
14150
|
+
protobufValue.setStringValue(String(value));
|
|
13538
14151
|
}
|
|
13539
|
-
|
|
13540
|
-
|
|
13541
|
-
}
|
|
13542
|
-
};
|
|
13543
|
-
var manual_default = ManualTrigger;
|
|
14152
|
+
return protobufValue;
|
|
14153
|
+
}
|
|
13544
14154
|
|
|
13545
14155
|
// src/models/trigger/factory.ts
|
|
13546
|
-
import { TriggerType as TriggerType6 } from "@avaprotocol/types";
|
|
13547
14156
|
var TriggerFactory = class {
|
|
13548
14157
|
/**
|
|
13549
14158
|
* Static factory method to create Trigger instances
|
|
@@ -13586,14 +14195,51 @@ var TriggerFactory = class {
|
|
|
13586
14195
|
throw new Error("Unknown trigger type");
|
|
13587
14196
|
}
|
|
13588
14197
|
}
|
|
14198
|
+
static fromOutputData(outputData) {
|
|
14199
|
+
let triggerOutput = null;
|
|
14200
|
+
let rawData = null;
|
|
14201
|
+
switch (outputData.getOutputDataCase()) {
|
|
14202
|
+
case avs_pb7.RunTriggerResp.OutputDataCase.BLOCK_TRIGGER:
|
|
14203
|
+
triggerOutput = outputData.getBlockTrigger();
|
|
14204
|
+
break;
|
|
14205
|
+
case avs_pb7.RunTriggerResp.OutputDataCase.FIXED_TIME_TRIGGER:
|
|
14206
|
+
triggerOutput = outputData.getFixedTimeTrigger();
|
|
14207
|
+
break;
|
|
14208
|
+
case avs_pb7.RunTriggerResp.OutputDataCase.CRON_TRIGGER:
|
|
14209
|
+
triggerOutput = outputData.getCronTrigger();
|
|
14210
|
+
break;
|
|
14211
|
+
case avs_pb7.RunTriggerResp.OutputDataCase.EVENT_TRIGGER:
|
|
14212
|
+
triggerOutput = outputData.getEventTrigger();
|
|
14213
|
+
break;
|
|
14214
|
+
case avs_pb7.RunTriggerResp.OutputDataCase.MANUAL_TRIGGER:
|
|
14215
|
+
triggerOutput = outputData.getManualTrigger();
|
|
14216
|
+
break;
|
|
14217
|
+
case avs_pb7.RunTriggerResp.OutputDataCase.OUTPUT_DATA_NOT_SET:
|
|
14218
|
+
default:
|
|
14219
|
+
throw new Error(
|
|
14220
|
+
`Unsupported output data case: ${outputData.getOutputDataCase()}`
|
|
14221
|
+
);
|
|
14222
|
+
}
|
|
14223
|
+
if (!triggerOutput) {
|
|
14224
|
+
return null;
|
|
14225
|
+
}
|
|
14226
|
+
if (typeof triggerOutput.getData === "function") {
|
|
14227
|
+
rawData = triggerOutput.getData();
|
|
14228
|
+
if (rawData) {
|
|
14229
|
+
return convertProtobufValueToJs(rawData);
|
|
14230
|
+
}
|
|
14231
|
+
}
|
|
14232
|
+
return triggerOutput.toObject();
|
|
14233
|
+
}
|
|
13589
14234
|
};
|
|
13590
14235
|
var factory_default = TriggerFactory;
|
|
13591
14236
|
|
|
13592
14237
|
// src/models/node/factory.ts
|
|
14238
|
+
var avs_pb18 = __toESM(require_avs_pb());
|
|
13593
14239
|
import _3 from "lodash";
|
|
13594
14240
|
|
|
13595
14241
|
// src/models/node/interface.ts
|
|
13596
|
-
var
|
|
14242
|
+
var avs_pb8 = __toESM(require_avs_pb());
|
|
13597
14243
|
import { NodeType, NodeTypeGoConverter } from "@avaprotocol/types";
|
|
13598
14244
|
import _2 from "lodash";
|
|
13599
14245
|
var Node = class {
|
|
@@ -13604,9 +14250,9 @@ var Node = class {
|
|
|
13604
14250
|
this.data = props.data;
|
|
13605
14251
|
}
|
|
13606
14252
|
toRequest() {
|
|
13607
|
-
const request = new
|
|
14253
|
+
const request = new avs_pb8.TaskNode();
|
|
13608
14254
|
const raw = request.serializeBinary();
|
|
13609
|
-
const parsed =
|
|
14255
|
+
const parsed = avs_pb8.TaskNode.deserializeBinary(raw);
|
|
13610
14256
|
if (!_2.isEqual(request, parsed)) {
|
|
13611
14257
|
throw new Error("Invalid request object");
|
|
13612
14258
|
}
|
|
@@ -13616,7 +14262,7 @@ var Node = class {
|
|
|
13616
14262
|
var interface_default2 = Node;
|
|
13617
14263
|
|
|
13618
14264
|
// src/models/node/contractWrite.ts
|
|
13619
|
-
var
|
|
14265
|
+
var avs_pb9 = __toESM(require_avs_pb());
|
|
13620
14266
|
import { NodeType as NodeType2 } from "@avaprotocol/types";
|
|
13621
14267
|
var ContractWriteNode2 = class _ContractWriteNode extends interface_default2 {
|
|
13622
14268
|
constructor(props) {
|
|
@@ -13631,11 +14277,11 @@ var ContractWriteNode2 = class _ContractWriteNode extends interface_default2 {
|
|
|
13631
14277
|
});
|
|
13632
14278
|
}
|
|
13633
14279
|
toRequest() {
|
|
13634
|
-
const request = new
|
|
14280
|
+
const request = new avs_pb9.TaskNode();
|
|
13635
14281
|
request.setId(this.id);
|
|
13636
14282
|
request.setName(this.name);
|
|
13637
|
-
const nodeData = new
|
|
13638
|
-
const config = new
|
|
14283
|
+
const nodeData = new avs_pb9.ContractWriteNode();
|
|
14284
|
+
const config = new avs_pb9.ContractWriteNode.Config();
|
|
13639
14285
|
config.setContractAddress(this.data.contractAddress);
|
|
13640
14286
|
config.setCallData(this.data.callData);
|
|
13641
14287
|
config.setContractAbi(this.data.contractAbi);
|
|
@@ -13643,11 +14289,15 @@ var ContractWriteNode2 = class _ContractWriteNode extends interface_default2 {
|
|
|
13643
14289
|
request.setContractWrite(nodeData);
|
|
13644
14290
|
return request;
|
|
13645
14291
|
}
|
|
14292
|
+
static fromOutputData(outputData) {
|
|
14293
|
+
const contractWriteOutput = outputData.getContractWrite();
|
|
14294
|
+
return contractWriteOutput?.toObject() || null;
|
|
14295
|
+
}
|
|
13646
14296
|
};
|
|
13647
14297
|
var contractWrite_default = ContractWriteNode2;
|
|
13648
14298
|
|
|
13649
14299
|
// src/models/node/customCode.ts
|
|
13650
|
-
var
|
|
14300
|
+
var avs_pb10 = __toESM(require_avs_pb());
|
|
13651
14301
|
import { NodeType as NodeType3 } from "@avaprotocol/types";
|
|
13652
14302
|
var CustomCodeNode2 = class _CustomCodeNode extends interface_default2 {
|
|
13653
14303
|
constructor(props) {
|
|
@@ -13662,22 +14312,29 @@ var CustomCodeNode2 = class _CustomCodeNode extends interface_default2 {
|
|
|
13662
14312
|
});
|
|
13663
14313
|
}
|
|
13664
14314
|
toRequest() {
|
|
13665
|
-
const request = new
|
|
14315
|
+
const request = new avs_pb10.TaskNode();
|
|
13666
14316
|
request.setId(this.id);
|
|
13667
14317
|
request.setName(this.name);
|
|
13668
|
-
const nodeData = new
|
|
13669
|
-
const config = new
|
|
14318
|
+
const nodeData = new avs_pb10.CustomCodeNode();
|
|
14319
|
+
const config = new avs_pb10.CustomCodeNode.Config();
|
|
13670
14320
|
config.setLang(this.data.lang);
|
|
13671
14321
|
config.setSource(this.data.source);
|
|
13672
14322
|
nodeData.setConfig(config);
|
|
13673
14323
|
request.setCustomCode(nodeData);
|
|
13674
14324
|
return request;
|
|
13675
14325
|
}
|
|
14326
|
+
static fromOutputData(outputData) {
|
|
14327
|
+
const customCodeOutput = outputData.getCustomCode();
|
|
14328
|
+
if (customCodeOutput?.getData()) {
|
|
14329
|
+
return convertProtobufValueToJs(customCodeOutput.getData());
|
|
14330
|
+
}
|
|
14331
|
+
return null;
|
|
14332
|
+
}
|
|
13676
14333
|
};
|
|
13677
14334
|
var customCode_default = CustomCodeNode2;
|
|
13678
14335
|
|
|
13679
14336
|
// src/models/node/graphqlQuery.ts
|
|
13680
|
-
var
|
|
14337
|
+
var avs_pb11 = __toESM(require_avs_pb());
|
|
13681
14338
|
import { NodeType as NodeType4 } from "@avaprotocol/types";
|
|
13682
14339
|
var GraphQLQueryNode2 = class _GraphQLQueryNode extends interface_default2 {
|
|
13683
14340
|
constructor(props) {
|
|
@@ -13696,11 +14353,11 @@ var GraphQLQueryNode2 = class _GraphQLQueryNode extends interface_default2 {
|
|
|
13696
14353
|
});
|
|
13697
14354
|
}
|
|
13698
14355
|
toRequest() {
|
|
13699
|
-
const request = new
|
|
14356
|
+
const request = new avs_pb11.TaskNode();
|
|
13700
14357
|
request.setId(this.id);
|
|
13701
14358
|
request.setName(this.name);
|
|
13702
|
-
const nodeData = new
|
|
13703
|
-
const config = new
|
|
14359
|
+
const nodeData = new avs_pb11.GraphQLQueryNode();
|
|
14360
|
+
const config = new avs_pb11.GraphQLQueryNode.Config();
|
|
13704
14361
|
config.setUrl(this.data.url);
|
|
13705
14362
|
config.setQuery(this.data.query);
|
|
13706
14363
|
if (this.data.variablesMap && this.data.variablesMap.length > 0) {
|
|
@@ -13713,12 +14370,18 @@ var GraphQLQueryNode2 = class _GraphQLQueryNode extends interface_default2 {
|
|
|
13713
14370
|
request.setGraphqlQuery(nodeData);
|
|
13714
14371
|
return request;
|
|
13715
14372
|
}
|
|
14373
|
+
static fromOutputData(outputData) {
|
|
14374
|
+
const graphqlOutput = outputData.getGraphql();
|
|
14375
|
+
return graphqlOutput?.toObject() || null;
|
|
14376
|
+
}
|
|
13716
14377
|
};
|
|
13717
14378
|
var graphqlQuery_default = GraphQLQueryNode2;
|
|
13718
14379
|
|
|
13719
14380
|
// src/models/node/restApi.ts
|
|
13720
|
-
var
|
|
13721
|
-
import {
|
|
14381
|
+
var avs_pb12 = __toESM(require_avs_pb());
|
|
14382
|
+
import {
|
|
14383
|
+
NodeType as NodeType5
|
|
14384
|
+
} from "@avaprotocol/types";
|
|
13722
14385
|
var RestAPINode2 = class _RestAPINode extends interface_default2 {
|
|
13723
14386
|
constructor(props) {
|
|
13724
14387
|
super({ ...props, type: NodeType5.RestAPI, data: props.data });
|
|
@@ -13732,29 +14395,43 @@ var RestAPINode2 = class _RestAPINode extends interface_default2 {
|
|
|
13732
14395
|
});
|
|
13733
14396
|
}
|
|
13734
14397
|
toRequest() {
|
|
13735
|
-
const request = new
|
|
14398
|
+
const request = new avs_pb12.TaskNode();
|
|
13736
14399
|
request.setId(this.id);
|
|
13737
14400
|
request.setName(this.name);
|
|
13738
|
-
const nodeData = new
|
|
13739
|
-
const config = new
|
|
14401
|
+
const nodeData = new avs_pb12.RestAPINode();
|
|
14402
|
+
const config = new avs_pb12.RestAPINode.Config();
|
|
13740
14403
|
config.setUrl(this.data.url);
|
|
13741
14404
|
config.setMethod(this.data.method);
|
|
13742
14405
|
config.setBody(this.data.body || "");
|
|
13743
14406
|
if (this.data.headersMap && this.data.headersMap.length > 0) {
|
|
13744
14407
|
const headersMap = config.getHeadersMap();
|
|
13745
|
-
this.data.headersMap.forEach(
|
|
13746
|
-
|
|
13747
|
-
|
|
14408
|
+
this.data.headersMap.forEach(
|
|
14409
|
+
([key, value]) => {
|
|
14410
|
+
headersMap.set(key, value);
|
|
14411
|
+
}
|
|
14412
|
+
);
|
|
13748
14413
|
}
|
|
13749
14414
|
nodeData.setConfig(config);
|
|
13750
14415
|
request.setRestApi(nodeData);
|
|
13751
14416
|
return request;
|
|
13752
14417
|
}
|
|
14418
|
+
static fromOutputData(outputData) {
|
|
14419
|
+
const restApiOutput = outputData.getRestApi();
|
|
14420
|
+
if (!restApiOutput) {
|
|
14421
|
+
console.log("Debug RestAPI: No restApiOutput found");
|
|
14422
|
+
return null;
|
|
14423
|
+
}
|
|
14424
|
+
const rawData = restApiOutput.getData();
|
|
14425
|
+
if (rawData) {
|
|
14426
|
+
return convertProtobufValueToJs(rawData);
|
|
14427
|
+
}
|
|
14428
|
+
return restApiOutput.toObject();
|
|
14429
|
+
}
|
|
13753
14430
|
};
|
|
13754
14431
|
var restApi_default = RestAPINode2;
|
|
13755
14432
|
|
|
13756
14433
|
// src/models/node/contractRead.ts
|
|
13757
|
-
var
|
|
14434
|
+
var avs_pb13 = __toESM(require_avs_pb());
|
|
13758
14435
|
import { NodeType as NodeType6 } from "@avaprotocol/types";
|
|
13759
14436
|
var ContractReadNode2 = class _ContractReadNode extends interface_default2 {
|
|
13760
14437
|
constructor(props) {
|
|
@@ -13769,11 +14446,11 @@ var ContractReadNode2 = class _ContractReadNode extends interface_default2 {
|
|
|
13769
14446
|
});
|
|
13770
14447
|
}
|
|
13771
14448
|
toRequest() {
|
|
13772
|
-
const request = new
|
|
14449
|
+
const request = new avs_pb13.TaskNode();
|
|
13773
14450
|
request.setId(this.id);
|
|
13774
14451
|
request.setName(this.name);
|
|
13775
|
-
const nodeData = new
|
|
13776
|
-
const config = new
|
|
14452
|
+
const nodeData = new avs_pb13.ContractReadNode();
|
|
14453
|
+
const config = new avs_pb13.ContractReadNode.Config();
|
|
13777
14454
|
config.setContractAddress(this.data.contractAddress);
|
|
13778
14455
|
config.setCallData(this.data.callData);
|
|
13779
14456
|
config.setContractAbi(this.data.contractAbi);
|
|
@@ -13781,11 +14458,21 @@ var ContractReadNode2 = class _ContractReadNode extends interface_default2 {
|
|
|
13781
14458
|
request.setContractRead(nodeData);
|
|
13782
14459
|
return request;
|
|
13783
14460
|
}
|
|
14461
|
+
static fromOutputData(outputData) {
|
|
14462
|
+
const contractReadOutput = outputData.getContractRead();
|
|
14463
|
+
if (contractReadOutput && contractReadOutput.getDataList()) {
|
|
14464
|
+
const dataList = contractReadOutput.getDataList();
|
|
14465
|
+
return {
|
|
14466
|
+
dataList: dataList.map((value) => convertProtobufValueToJs(value))
|
|
14467
|
+
};
|
|
14468
|
+
}
|
|
14469
|
+
return null;
|
|
14470
|
+
}
|
|
13784
14471
|
};
|
|
13785
14472
|
var contractRead_default = ContractReadNode2;
|
|
13786
14473
|
|
|
13787
14474
|
// src/models/node/ethTransfer.ts
|
|
13788
|
-
var
|
|
14475
|
+
var avs_pb14 = __toESM(require_avs_pb());
|
|
13789
14476
|
import { NodeType as NodeType7 } from "@avaprotocol/types";
|
|
13790
14477
|
var ETHTransferNode2 = class _ETHTransferNode extends interface_default2 {
|
|
13791
14478
|
constructor(props) {
|
|
@@ -13800,23 +14487,27 @@ var ETHTransferNode2 = class _ETHTransferNode extends interface_default2 {
|
|
|
13800
14487
|
});
|
|
13801
14488
|
}
|
|
13802
14489
|
toRequest() {
|
|
13803
|
-
const request = new
|
|
14490
|
+
const request = new avs_pb14.TaskNode();
|
|
13804
14491
|
request.setId(this.id);
|
|
13805
14492
|
request.setName(this.name);
|
|
13806
|
-
const nodeData = new
|
|
13807
|
-
const config = new
|
|
14493
|
+
const nodeData = new avs_pb14.ETHTransferNode();
|
|
14494
|
+
const config = new avs_pb14.ETHTransferNode.Config();
|
|
13808
14495
|
config.setDestination(this.data.destination);
|
|
13809
14496
|
config.setAmount(this.data.amount);
|
|
13810
14497
|
nodeData.setConfig(config);
|
|
13811
14498
|
request.setEthTransfer(nodeData);
|
|
13812
14499
|
return request;
|
|
13813
14500
|
}
|
|
14501
|
+
static fromOutputData(outputData) {
|
|
14502
|
+
const ethTransferOutput = outputData.getEthTransfer();
|
|
14503
|
+
return ethTransferOutput?.toObject() || null;
|
|
14504
|
+
}
|
|
13814
14505
|
};
|
|
13815
14506
|
var ethTransfer_default = ETHTransferNode2;
|
|
13816
14507
|
|
|
13817
14508
|
// src/models/node/branch.ts
|
|
13818
14509
|
import { NodeType as NodeType8 } from "@avaprotocol/types";
|
|
13819
|
-
var
|
|
14510
|
+
var avs_pb15 = __toESM(require_avs_pb());
|
|
13820
14511
|
var BranchNode2 = class _BranchNode extends interface_default2 {
|
|
13821
14512
|
constructor(props) {
|
|
13822
14513
|
super({ ...props, type: NodeType8.Branch, data: props.data });
|
|
@@ -13830,15 +14521,15 @@ var BranchNode2 = class _BranchNode extends interface_default2 {
|
|
|
13830
14521
|
});
|
|
13831
14522
|
}
|
|
13832
14523
|
toRequest() {
|
|
13833
|
-
const request = new
|
|
14524
|
+
const request = new avs_pb15.TaskNode();
|
|
13834
14525
|
request.setId(this.id);
|
|
13835
14526
|
request.setName(this.name);
|
|
13836
|
-
const nodeData = new
|
|
13837
|
-
const config = new
|
|
14527
|
+
const nodeData = new avs_pb15.BranchNode();
|
|
14528
|
+
const config = new avs_pb15.BranchNode.Config();
|
|
13838
14529
|
if (this.data.conditionsList && this.data.conditionsList.length > 0) {
|
|
13839
14530
|
const conditionsList = this.data.conditionsList.map(
|
|
13840
14531
|
(condition) => {
|
|
13841
|
-
const conditionObj = new
|
|
14532
|
+
const conditionObj = new avs_pb15.BranchNode.Condition();
|
|
13842
14533
|
conditionObj.setId(condition.id);
|
|
13843
14534
|
conditionObj.setType(condition.type);
|
|
13844
14535
|
conditionObj.setExpression(condition.expression);
|
|
@@ -13851,12 +14542,16 @@ var BranchNode2 = class _BranchNode extends interface_default2 {
|
|
|
13851
14542
|
request.setBranch(nodeData);
|
|
13852
14543
|
return request;
|
|
13853
14544
|
}
|
|
14545
|
+
static fromOutputData(outputData) {
|
|
14546
|
+
const branchOutput = outputData.getBranch();
|
|
14547
|
+
return branchOutput?.toObject() || null;
|
|
14548
|
+
}
|
|
13854
14549
|
// TODO: do we need a getConditionId() to avoid exporting BranchNodeData?
|
|
13855
14550
|
};
|
|
13856
14551
|
var branch_default = BranchNode2;
|
|
13857
14552
|
|
|
13858
14553
|
// src/models/node/filter.ts
|
|
13859
|
-
var
|
|
14554
|
+
var avs_pb16 = __toESM(require_avs_pb());
|
|
13860
14555
|
import { NodeType as NodeType9 } from "@avaprotocol/types";
|
|
13861
14556
|
var FilterNode2 = class _FilterNode extends interface_default2 {
|
|
13862
14557
|
constructor(props) {
|
|
@@ -13871,22 +14566,26 @@ var FilterNode2 = class _FilterNode extends interface_default2 {
|
|
|
13871
14566
|
});
|
|
13872
14567
|
}
|
|
13873
14568
|
toRequest() {
|
|
13874
|
-
const request = new
|
|
14569
|
+
const request = new avs_pb16.TaskNode();
|
|
13875
14570
|
request.setId(this.id);
|
|
13876
14571
|
request.setName(this.name);
|
|
13877
|
-
const nodeData = new
|
|
13878
|
-
const config = new
|
|
14572
|
+
const nodeData = new avs_pb16.FilterNode();
|
|
14573
|
+
const config = new avs_pb16.FilterNode.Config();
|
|
13879
14574
|
config.setExpression(this.data.expression);
|
|
13880
14575
|
config.setSourceId(this.data.sourceId || "");
|
|
13881
14576
|
nodeData.setConfig(config);
|
|
13882
14577
|
request.setFilter(nodeData);
|
|
13883
14578
|
return request;
|
|
13884
14579
|
}
|
|
14580
|
+
static fromOutputData(outputData) {
|
|
14581
|
+
const filterOutput = outputData.getFilter();
|
|
14582
|
+
return filterOutput?.toObject() || null;
|
|
14583
|
+
}
|
|
13885
14584
|
};
|
|
13886
14585
|
var filter_default = FilterNode2;
|
|
13887
14586
|
|
|
13888
14587
|
// src/models/node/loop.ts
|
|
13889
|
-
var
|
|
14588
|
+
var avs_pb17 = __toESM(require_avs_pb());
|
|
13890
14589
|
import { NodeType as NodeType10 } from "@avaprotocol/types";
|
|
13891
14590
|
var LoopNode2 = class _LoopNode extends interface_default2 {
|
|
13892
14591
|
constructor(props) {
|
|
@@ -13917,29 +14616,29 @@ var LoopNode2 = class _LoopNode extends interface_default2 {
|
|
|
13917
14616
|
});
|
|
13918
14617
|
}
|
|
13919
14618
|
toRequest() {
|
|
13920
|
-
const node = new
|
|
13921
|
-
const loopNode = new
|
|
14619
|
+
const node = new avs_pb17.TaskNode();
|
|
14620
|
+
const loopNode = new avs_pb17.LoopNode();
|
|
13922
14621
|
node.setId(this.id);
|
|
13923
14622
|
node.setName(this.name);
|
|
13924
14623
|
const data = this.data;
|
|
13925
|
-
const config = new
|
|
14624
|
+
const config = new avs_pb17.LoopNode.Config();
|
|
13926
14625
|
config.setSourceId(data.sourceId || "");
|
|
13927
14626
|
config.setIterVal(data.iterVal || "");
|
|
13928
14627
|
config.setIterKey(data.iterKey || "");
|
|
13929
14628
|
loopNode.setConfig(config);
|
|
13930
14629
|
if (data.ethTransfer) {
|
|
13931
|
-
const ethTransfer = new
|
|
14630
|
+
const ethTransfer = new avs_pb17.ETHTransferNode();
|
|
13932
14631
|
if (data.ethTransfer.config) {
|
|
13933
|
-
const config2 = new
|
|
14632
|
+
const config2 = new avs_pb17.ETHTransferNode.Config();
|
|
13934
14633
|
config2.setDestination(data.ethTransfer.config.destination);
|
|
13935
14634
|
config2.setAmount(data.ethTransfer.config.amount);
|
|
13936
14635
|
ethTransfer.setConfig(config2);
|
|
13937
14636
|
}
|
|
13938
14637
|
loopNode.setEthTransfer(ethTransfer);
|
|
13939
14638
|
} else if (data.contractWrite) {
|
|
13940
|
-
const contractWrite = new
|
|
14639
|
+
const contractWrite = new avs_pb17.ContractWriteNode();
|
|
13941
14640
|
if (data.contractWrite.config) {
|
|
13942
|
-
const config2 = new
|
|
14641
|
+
const config2 = new avs_pb17.ContractWriteNode.Config();
|
|
13943
14642
|
config2.setContractAddress(data.contractWrite.config.contractAddress);
|
|
13944
14643
|
config2.setCallData(data.contractWrite.config.callData);
|
|
13945
14644
|
config2.setContractAbi(data.contractWrite.config.contractAbi);
|
|
@@ -13947,9 +14646,9 @@ var LoopNode2 = class _LoopNode extends interface_default2 {
|
|
|
13947
14646
|
}
|
|
13948
14647
|
loopNode.setContractWrite(contractWrite);
|
|
13949
14648
|
} else if (data.contractRead) {
|
|
13950
|
-
const contractRead = new
|
|
14649
|
+
const contractRead = new avs_pb17.ContractReadNode();
|
|
13951
14650
|
if (data.contractRead.config) {
|
|
13952
|
-
const config2 = new
|
|
14651
|
+
const config2 = new avs_pb17.ContractReadNode.Config();
|
|
13953
14652
|
config2.setContractAddress(data.contractRead.config.contractAddress);
|
|
13954
14653
|
config2.setCallData(data.contractRead.config.callData);
|
|
13955
14654
|
config2.setContractAbi(data.contractRead.config.contractAbi);
|
|
@@ -13957,9 +14656,9 @@ var LoopNode2 = class _LoopNode extends interface_default2 {
|
|
|
13957
14656
|
}
|
|
13958
14657
|
loopNode.setContractRead(contractRead);
|
|
13959
14658
|
} else if (data.graphqlDataQuery) {
|
|
13960
|
-
const graphqlQuery = new
|
|
14659
|
+
const graphqlQuery = new avs_pb17.GraphQLQueryNode();
|
|
13961
14660
|
if (data.graphqlDataQuery.config) {
|
|
13962
|
-
const config2 = new
|
|
14661
|
+
const config2 = new avs_pb17.GraphQLQueryNode.Config();
|
|
13963
14662
|
config2.setUrl(data.graphqlDataQuery.config.url);
|
|
13964
14663
|
config2.setQuery(data.graphqlDataQuery.config.query);
|
|
13965
14664
|
if (data.graphqlDataQuery.config.variablesMap && data.graphqlDataQuery.config.variablesMap.length > 0) {
|
|
@@ -13971,9 +14670,9 @@ var LoopNode2 = class _LoopNode extends interface_default2 {
|
|
|
13971
14670
|
}
|
|
13972
14671
|
loopNode.setGraphqlDataQuery(graphqlQuery);
|
|
13973
14672
|
} else if (data.restApi) {
|
|
13974
|
-
const restApi = new
|
|
14673
|
+
const restApi = new avs_pb17.RestAPINode();
|
|
13975
14674
|
if (data.restApi.config) {
|
|
13976
|
-
const config2 = new
|
|
14675
|
+
const config2 = new avs_pb17.RestAPINode.Config();
|
|
13977
14676
|
config2.setUrl(data.restApi.config.url);
|
|
13978
14677
|
config2.setMethod(data.restApi.config.method);
|
|
13979
14678
|
config2.setBody(data.restApi.config.body || "");
|
|
@@ -13986,9 +14685,9 @@ var LoopNode2 = class _LoopNode extends interface_default2 {
|
|
|
13986
14685
|
}
|
|
13987
14686
|
loopNode.setRestApi(restApi);
|
|
13988
14687
|
} else if (data.customCode) {
|
|
13989
|
-
const customCode = new
|
|
14688
|
+
const customCode = new avs_pb17.CustomCodeNode();
|
|
13990
14689
|
if (data.customCode.config) {
|
|
13991
|
-
const config2 = new
|
|
14690
|
+
const config2 = new avs_pb17.CustomCodeNode.Config();
|
|
13992
14691
|
config2.setLang(data.customCode.config.lang);
|
|
13993
14692
|
config2.setSource(data.customCode.config.source);
|
|
13994
14693
|
customCode.setConfig(config2);
|
|
@@ -13998,6 +14697,10 @@ var LoopNode2 = class _LoopNode extends interface_default2 {
|
|
|
13998
14697
|
node.setLoop(loopNode);
|
|
13999
14698
|
return node;
|
|
14000
14699
|
}
|
|
14700
|
+
static fromOutputData(outputData) {
|
|
14701
|
+
const loopOutput = outputData.getLoop();
|
|
14702
|
+
return loopOutput?.toObject() || null;
|
|
14703
|
+
}
|
|
14001
14704
|
};
|
|
14002
14705
|
var loop_default = LoopNode2;
|
|
14003
14706
|
|
|
@@ -14060,6 +14763,52 @@ var NodeFactory = class {
|
|
|
14060
14763
|
throw new Error(`Unsupported node type: ${raw.getName()}`);
|
|
14061
14764
|
}
|
|
14062
14765
|
}
|
|
14766
|
+
static fromOutputData(outputData) {
|
|
14767
|
+
let nodeOutput = null;
|
|
14768
|
+
let rawData = null;
|
|
14769
|
+
switch (outputData.getOutputDataCase()) {
|
|
14770
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.REST_API:
|
|
14771
|
+
nodeOutput = outputData.getRestApi();
|
|
14772
|
+
break;
|
|
14773
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.CUSTOM_CODE:
|
|
14774
|
+
nodeOutput = outputData.getCustomCode();
|
|
14775
|
+
break;
|
|
14776
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.CONTRACT_READ:
|
|
14777
|
+
nodeOutput = outputData.getContractRead();
|
|
14778
|
+
break;
|
|
14779
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.CONTRACT_WRITE:
|
|
14780
|
+
nodeOutput = outputData.getContractWrite();
|
|
14781
|
+
break;
|
|
14782
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.ETH_TRANSFER:
|
|
14783
|
+
nodeOutput = outputData.getEthTransfer();
|
|
14784
|
+
break;
|
|
14785
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.GRAPHQL:
|
|
14786
|
+
nodeOutput = outputData.getGraphql();
|
|
14787
|
+
break;
|
|
14788
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.BRANCH:
|
|
14789
|
+
nodeOutput = outputData.getBranch();
|
|
14790
|
+
break;
|
|
14791
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.FILTER:
|
|
14792
|
+
nodeOutput = outputData.getFilter();
|
|
14793
|
+
break;
|
|
14794
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.LOOP:
|
|
14795
|
+
nodeOutput = outputData.getLoop();
|
|
14796
|
+
break;
|
|
14797
|
+
case avs_pb18.RunNodeWithInputsResp.OutputDataCase.OUTPUT_DATA_NOT_SET:
|
|
14798
|
+
default:
|
|
14799
|
+
throw new Error(`Unsupported output data case: ${outputData.getOutputDataCase()}`);
|
|
14800
|
+
}
|
|
14801
|
+
if (!nodeOutput) {
|
|
14802
|
+
return null;
|
|
14803
|
+
}
|
|
14804
|
+
if (typeof nodeOutput.getData === "function") {
|
|
14805
|
+
rawData = nodeOutput.getData();
|
|
14806
|
+
if (rawData) {
|
|
14807
|
+
return convertProtobufValueToJs(rawData);
|
|
14808
|
+
}
|
|
14809
|
+
}
|
|
14810
|
+
return nodeOutput.toObject();
|
|
14811
|
+
}
|
|
14063
14812
|
};
|
|
14064
14813
|
var factory_default2 = NodeFactory;
|
|
14065
14814
|
|
|
@@ -14067,11 +14816,11 @@ var factory_default2 = NodeFactory;
|
|
|
14067
14816
|
import { WorkflowStatus } from "@avaprotocol/types";
|
|
14068
14817
|
function convertStatusToString(status) {
|
|
14069
14818
|
const conversionMap = {
|
|
14070
|
-
[
|
|
14071
|
-
[
|
|
14072
|
-
[
|
|
14073
|
-
[
|
|
14074
|
-
[
|
|
14819
|
+
[avs_pb19.TaskStatus.ACTIVE]: WorkflowStatus.Active,
|
|
14820
|
+
[avs_pb19.TaskStatus.COMPLETED]: WorkflowStatus.Completed,
|
|
14821
|
+
[avs_pb19.TaskStatus.FAILED]: WorkflowStatus.Failed,
|
|
14822
|
+
[avs_pb19.TaskStatus.CANCELED]: WorkflowStatus.Canceled,
|
|
14823
|
+
[avs_pb19.TaskStatus.EXECUTING]: WorkflowStatus.Executing
|
|
14075
14824
|
};
|
|
14076
14825
|
return conversionMap[status];
|
|
14077
14826
|
}
|
|
@@ -14159,7 +14908,7 @@ var Workflow = class _Workflow {
|
|
|
14159
14908
|
});
|
|
14160
14909
|
}
|
|
14161
14910
|
toRequest() {
|
|
14162
|
-
const request = new
|
|
14911
|
+
const request = new avs_pb19.CreateTaskReq();
|
|
14163
14912
|
request.setSmartWalletAddress(this.smartWalletAddress);
|
|
14164
14913
|
request.setTrigger(this.trigger.toRequest());
|
|
14165
14914
|
_4.map(this.nodes, (node) => request.addNodes(node.toRequest()));
|
|
@@ -14176,19 +14925,19 @@ var Workflow = class _Workflow {
|
|
|
14176
14925
|
var workflow_default = Workflow;
|
|
14177
14926
|
|
|
14178
14927
|
// src/models/execution.ts
|
|
14179
|
-
var
|
|
14928
|
+
var avs_pb22 = __toESM(require_avs_pb());
|
|
14180
14929
|
|
|
14181
14930
|
// src/models/trigger/reason.ts
|
|
14182
|
-
var
|
|
14931
|
+
var avs_pb20 = __toESM(require_avs_pb());
|
|
14183
14932
|
import { TriggerType as TriggerType8 } from "@avaprotocol/types";
|
|
14184
14933
|
var convertTriggerType = (grpcType) => {
|
|
14185
14934
|
const conversionMap = {
|
|
14186
|
-
[
|
|
14187
|
-
[
|
|
14188
|
-
[
|
|
14189
|
-
[
|
|
14190
|
-
[
|
|
14191
|
-
[
|
|
14935
|
+
[avs_pb20.TriggerType.TRIGGER_TYPE_FIXED_TIME]: TriggerType8.FixedTime,
|
|
14936
|
+
[avs_pb20.TriggerType.TRIGGER_TYPE_CRON]: TriggerType8.Cron,
|
|
14937
|
+
[avs_pb20.TriggerType.TRIGGER_TYPE_BLOCK]: TriggerType8.Block,
|
|
14938
|
+
[avs_pb20.TriggerType.TRIGGER_TYPE_EVENT]: TriggerType8.Event,
|
|
14939
|
+
[avs_pb20.TriggerType.TRIGGER_TYPE_MANUAL]: TriggerType8.Manual,
|
|
14940
|
+
[avs_pb20.TriggerType.TRIGGER_TYPE_UNSPECIFIED]: TriggerType8.Unspecified
|
|
14192
14941
|
};
|
|
14193
14942
|
return conversionMap[grpcType];
|
|
14194
14943
|
};
|
|
@@ -14228,28 +14977,28 @@ var TriggerReason2 = class _TriggerReason {
|
|
|
14228
14977
|
});
|
|
14229
14978
|
}
|
|
14230
14979
|
toRequest() {
|
|
14231
|
-
const request = new
|
|
14980
|
+
const request = new avs_pb20.TriggerReason();
|
|
14232
14981
|
switch (this.type) {
|
|
14233
14982
|
case TriggerType8.FixedTime:
|
|
14234
|
-
request.setType(
|
|
14983
|
+
request.setType(avs_pb20.TriggerType.TRIGGER_TYPE_FIXED_TIME);
|
|
14235
14984
|
if (this.epoch) {
|
|
14236
14985
|
request.setEpoch(this.epoch);
|
|
14237
14986
|
}
|
|
14238
14987
|
break;
|
|
14239
14988
|
case TriggerType8.Cron:
|
|
14240
|
-
request.setType(
|
|
14989
|
+
request.setType(avs_pb20.TriggerType.TRIGGER_TYPE_CRON);
|
|
14241
14990
|
if (this.epoch) {
|
|
14242
14991
|
request.setEpoch(this.epoch);
|
|
14243
14992
|
}
|
|
14244
14993
|
break;
|
|
14245
14994
|
case TriggerType8.Block:
|
|
14246
|
-
request.setType(
|
|
14995
|
+
request.setType(avs_pb20.TriggerType.TRIGGER_TYPE_BLOCK);
|
|
14247
14996
|
if (this.blockNumber) {
|
|
14248
14997
|
request.setBlockNumber(this.blockNumber);
|
|
14249
14998
|
}
|
|
14250
14999
|
break;
|
|
14251
15000
|
case TriggerType8.Event:
|
|
14252
|
-
request.setType(
|
|
15001
|
+
request.setType(avs_pb20.TriggerType.TRIGGER_TYPE_EVENT);
|
|
14253
15002
|
if (this.blockNumber) {
|
|
14254
15003
|
request.setBlockNumber(this.blockNumber);
|
|
14255
15004
|
}
|
|
@@ -14261,10 +15010,10 @@ var TriggerReason2 = class _TriggerReason {
|
|
|
14261
15010
|
}
|
|
14262
15011
|
break;
|
|
14263
15012
|
case TriggerType8.Manual:
|
|
14264
|
-
request.setType(
|
|
15013
|
+
request.setType(avs_pb20.TriggerType.TRIGGER_TYPE_MANUAL);
|
|
14265
15014
|
break;
|
|
14266
15015
|
case TriggerType8.Unspecified:
|
|
14267
|
-
request.setType(
|
|
15016
|
+
request.setType(avs_pb20.TriggerType.TRIGGER_TYPE_UNSPECIFIED);
|
|
14268
15017
|
break;
|
|
14269
15018
|
default:
|
|
14270
15019
|
throw new Error("Unsupported trigger type");
|
|
@@ -14275,45 +15024,7 @@ var TriggerReason2 = class _TriggerReason {
|
|
|
14275
15024
|
var reason_default = TriggerReason2;
|
|
14276
15025
|
|
|
14277
15026
|
// src/models/step.ts
|
|
14278
|
-
var
|
|
14279
|
-
|
|
14280
|
-
// src/utils.ts
|
|
14281
|
-
import { Value as ProtobufValue } from "google-protobuf/google/protobuf/struct_pb";
|
|
14282
|
-
function convertProtobufValueToJs(value) {
|
|
14283
|
-
if (!value) {
|
|
14284
|
-
return void 0;
|
|
14285
|
-
}
|
|
14286
|
-
switch (value.getKindCase()) {
|
|
14287
|
-
case ProtobufValue.KindCase.NULL_VALUE:
|
|
14288
|
-
return null;
|
|
14289
|
-
case ProtobufValue.KindCase.NUMBER_VALUE:
|
|
14290
|
-
return value.getNumberValue();
|
|
14291
|
-
case ProtobufValue.KindCase.STRING_VALUE:
|
|
14292
|
-
return value.getStringValue();
|
|
14293
|
-
case ProtobufValue.KindCase.BOOL_VALUE:
|
|
14294
|
-
return value.getBoolValue();
|
|
14295
|
-
case ProtobufValue.KindCase.STRUCT_VALUE: {
|
|
14296
|
-
const struct = value.getStructValue();
|
|
14297
|
-
if (!struct) return {};
|
|
14298
|
-
const jsObj = {};
|
|
14299
|
-
const fields = struct.getFieldsMap();
|
|
14300
|
-
fields.forEach((val, key) => {
|
|
14301
|
-
jsObj[key] = convertProtobufValueToJs(val);
|
|
14302
|
-
});
|
|
14303
|
-
return jsObj;
|
|
14304
|
-
}
|
|
14305
|
-
case ProtobufValue.KindCase.LIST_VALUE: {
|
|
14306
|
-
const list = value.getListValue();
|
|
14307
|
-
if (!list) return [];
|
|
14308
|
-
return list.getValuesList().map((item) => convertProtobufValueToJs(item));
|
|
14309
|
-
}
|
|
14310
|
-
case ProtobufValue.KindCase.KIND_NOT_SET:
|
|
14311
|
-
default:
|
|
14312
|
-
return void 0;
|
|
14313
|
-
}
|
|
14314
|
-
}
|
|
14315
|
-
|
|
14316
|
-
// src/models/step.ts
|
|
15027
|
+
var avs_pb21 = __toESM(require_avs_pb());
|
|
14317
15028
|
var Step = class _Step {
|
|
14318
15029
|
// Changed to any
|
|
14319
15030
|
constructor(props) {
|
|
@@ -14330,37 +15041,37 @@ var Step = class _Step {
|
|
|
14330
15041
|
const outputDataType = step.getOutputDataCase();
|
|
14331
15042
|
let nodeOutputMessage;
|
|
14332
15043
|
switch (outputDataType) {
|
|
14333
|
-
case
|
|
15044
|
+
case avs_pb21.Execution.Step.OutputDataCase.OUTPUT_DATA_NOT_SET:
|
|
14334
15045
|
return null;
|
|
14335
|
-
case
|
|
15046
|
+
case avs_pb21.Execution.Step.OutputDataCase.ETH_TRANSFER:
|
|
14336
15047
|
return step.getEthTransfer()?.toObject();
|
|
14337
15048
|
// Specific structure, not google.protobuf.Value
|
|
14338
|
-
case
|
|
15049
|
+
case avs_pb21.Execution.Step.OutputDataCase.GRAPHQL:
|
|
14339
15050
|
nodeOutputMessage = step.getGraphql();
|
|
14340
15051
|
return nodeOutputMessage && nodeOutputMessage.hasData() ? nodeOutputMessage.getData() : void 0;
|
|
14341
|
-
case
|
|
15052
|
+
case avs_pb21.Execution.Step.OutputDataCase.CONTRACT_READ:
|
|
14342
15053
|
nodeOutputMessage = step.getContractRead();
|
|
14343
15054
|
if (nodeOutputMessage) {
|
|
14344
15055
|
return nodeOutputMessage.getDataList().map((val) => convertProtobufValueToJs(val));
|
|
14345
15056
|
}
|
|
14346
15057
|
return [];
|
|
14347
15058
|
// Default to empty array if no data
|
|
14348
|
-
case
|
|
15059
|
+
case avs_pb21.Execution.Step.OutputDataCase.CONTRACT_WRITE:
|
|
14349
15060
|
return step.getContractWrite()?.toObject();
|
|
14350
15061
|
// Specific structure
|
|
14351
|
-
case
|
|
15062
|
+
case avs_pb21.Execution.Step.OutputDataCase.CUSTOM_CODE:
|
|
14352
15063
|
nodeOutputMessage = step.getCustomCode();
|
|
14353
15064
|
return nodeOutputMessage && nodeOutputMessage.hasData() ? convertProtobufValueToJs(nodeOutputMessage.getData()) : void 0;
|
|
14354
|
-
case
|
|
15065
|
+
case avs_pb21.Execution.Step.OutputDataCase.REST_API:
|
|
14355
15066
|
nodeOutputMessage = step.getRestApi();
|
|
14356
15067
|
return nodeOutputMessage && nodeOutputMessage.hasData() ? nodeOutputMessage.getData() : void 0;
|
|
14357
|
-
case
|
|
15068
|
+
case avs_pb21.Execution.Step.OutputDataCase.BRANCH:
|
|
14358
15069
|
return step.getBranch()?.toObject();
|
|
14359
15070
|
// Specific structure
|
|
14360
|
-
case
|
|
15071
|
+
case avs_pb21.Execution.Step.OutputDataCase.FILTER:
|
|
14361
15072
|
nodeOutputMessage = step.getFilter();
|
|
14362
15073
|
return nodeOutputMessage && nodeOutputMessage.hasData() ? nodeOutputMessage.getData() : void 0;
|
|
14363
|
-
case
|
|
15074
|
+
case avs_pb21.Execution.Step.OutputDataCase.LOOP:
|
|
14364
15075
|
return step.getLoop()?.getData();
|
|
14365
15076
|
default:
|
|
14366
15077
|
console.warn(
|
|
@@ -14402,19 +15113,19 @@ var Execution3 = class _Execution {
|
|
|
14402
15113
|
const triggerOutputDataType = execution.getOutputDataCase();
|
|
14403
15114
|
let triggerOutputData;
|
|
14404
15115
|
switch (triggerOutputDataType) {
|
|
14405
|
-
case
|
|
15116
|
+
case avs_pb22.Execution.OutputDataCase.BLOCK_TRIGGER:
|
|
14406
15117
|
const blockOutput = execution.getBlockTrigger()?.toObject();
|
|
14407
15118
|
triggerOutputData = blockOutput ? { blockNumber: blockOutput.blockNumber } : void 0;
|
|
14408
15119
|
break;
|
|
14409
|
-
case
|
|
15120
|
+
case avs_pb22.Execution.OutputDataCase.FIXED_TIME_TRIGGER:
|
|
14410
15121
|
const fixedTimeOutput = execution.getFixedTimeTrigger()?.toObject();
|
|
14411
15122
|
triggerOutputData = fixedTimeOutput ? { epoch: fixedTimeOutput.epoch } : void 0;
|
|
14412
15123
|
break;
|
|
14413
|
-
case
|
|
15124
|
+
case avs_pb22.Execution.OutputDataCase.CRON_TRIGGER:
|
|
14414
15125
|
const cronOutput = execution.getCronTrigger()?.toObject();
|
|
14415
15126
|
triggerOutputData = cronOutput ? { epoch: cronOutput.epoch, scheduleMatched: cronOutput.scheduleMatched } : void 0;
|
|
14416
15127
|
break;
|
|
14417
|
-
case
|
|
15128
|
+
case avs_pb22.Execution.OutputDataCase.EVENT_TRIGGER:
|
|
14418
15129
|
const eventTrigger = execution.getEventTrigger();
|
|
14419
15130
|
if (eventTrigger) {
|
|
14420
15131
|
if (eventTrigger.hasEvmLog()) {
|
|
@@ -14424,7 +15135,7 @@ var Execution3 = class _Execution {
|
|
|
14424
15135
|
}
|
|
14425
15136
|
}
|
|
14426
15137
|
break;
|
|
14427
|
-
case
|
|
15138
|
+
case avs_pb22.Execution.OutputDataCase.OUTPUT_DATA_NOT_SET:
|
|
14428
15139
|
triggerOutputData = void 0;
|
|
14429
15140
|
break;
|
|
14430
15141
|
}
|
|
@@ -14445,7 +15156,7 @@ var Execution3 = class _Execution {
|
|
|
14445
15156
|
var execution_default = Execution3;
|
|
14446
15157
|
|
|
14447
15158
|
// src/models/secret.ts
|
|
14448
|
-
var
|
|
15159
|
+
var avs_pb23 = __toESM(require_avs_pb());
|
|
14449
15160
|
var Secret = class {
|
|
14450
15161
|
constructor(props) {
|
|
14451
15162
|
this.name = props.name;
|
|
@@ -14458,7 +15169,7 @@ var Secret = class {
|
|
|
14458
15169
|
this.description = props.description;
|
|
14459
15170
|
}
|
|
14460
15171
|
toRequest() {
|
|
14461
|
-
const request = new
|
|
15172
|
+
const request = new avs_pb23.CreateOrUpdateSecretReq();
|
|
14462
15173
|
request.setName(this.name);
|
|
14463
15174
|
if (this.secret) {
|
|
14464
15175
|
request.setSecret(this.secret);
|
|
@@ -14475,7 +15186,11 @@ var Secret = class {
|
|
|
14475
15186
|
var secret_default = Secret;
|
|
14476
15187
|
|
|
14477
15188
|
// src/index.ts
|
|
14478
|
-
import {
|
|
15189
|
+
import {
|
|
15190
|
+
TriggerType as TriggerType9,
|
|
15191
|
+
NodeTypeGoConverter as NodeTypeGoConverter2,
|
|
15192
|
+
TriggerTypeGoConverter
|
|
15193
|
+
} from "@avaprotocol/types";
|
|
14479
15194
|
import { AUTH_KEY_HEADER, DEFAULT_LIMIT } from "@avaprotocol/types";
|
|
14480
15195
|
var BaseClient = class {
|
|
14481
15196
|
constructor(opts) {
|
|
@@ -14509,7 +15224,7 @@ var BaseClient = class {
|
|
|
14509
15224
|
* @returns {Promise<GetSignatureFormatResponse>} - The response containing the signature format
|
|
14510
15225
|
*/
|
|
14511
15226
|
async getSignatureFormat(wallet) {
|
|
14512
|
-
const request = new
|
|
15227
|
+
const request = new avs_pb24.GetSignatureFormatReq();
|
|
14513
15228
|
request.setWallet(wallet);
|
|
14514
15229
|
const result = await this.sendGrpcRequest("getSignatureFormat", request);
|
|
14515
15230
|
return { message: result.getMessage() };
|
|
@@ -14524,7 +15239,7 @@ var BaseClient = class {
|
|
|
14524
15239
|
message,
|
|
14525
15240
|
apiKey
|
|
14526
15241
|
}) {
|
|
14527
|
-
const request = new
|
|
15242
|
+
const request = new avs_pb24.GetKeyReq();
|
|
14528
15243
|
request.setMessage(message);
|
|
14529
15244
|
request.setSignature(apiKey);
|
|
14530
15245
|
const result = await this.sendGrpcRequest("getKey", request);
|
|
@@ -14540,7 +15255,7 @@ var BaseClient = class {
|
|
|
14540
15255
|
message,
|
|
14541
15256
|
signature
|
|
14542
15257
|
}) {
|
|
14543
|
-
const request = new
|
|
15258
|
+
const request = new avs_pb24.GetKeyReq();
|
|
14544
15259
|
request.setMessage(message);
|
|
14545
15260
|
request.setSignature(signature);
|
|
14546
15261
|
const result = await this.sendGrpcRequest(
|
|
@@ -14579,112 +15294,32 @@ var BaseClient = class {
|
|
|
14579
15294
|
return this.factoryAddress;
|
|
14580
15295
|
}
|
|
14581
15296
|
/**
|
|
14582
|
-
* Send a gRPC request with
|
|
14583
|
-
* @param method - The method name
|
|
14584
|
-
* @param request - The request
|
|
14585
|
-
* @param options -
|
|
14586
|
-
* @returns {Promise<TResponse>} - The response from the
|
|
15297
|
+
* Send a gRPC request with authentication and error handling
|
|
15298
|
+
* @param method - The method name to call
|
|
15299
|
+
* @param request - The request object
|
|
15300
|
+
* @param options - Request options
|
|
15301
|
+
* @returns {Promise<TResponse>} - The response from the server
|
|
14587
15302
|
*/
|
|
14588
15303
|
sendGrpcRequest(method, request, options) {
|
|
14589
|
-
const metadata = _5.cloneDeep(this.metadata);
|
|
14590
|
-
if (options?.authKey) {
|
|
14591
|
-
metadata.set(AUTH_KEY_HEADER, options.authKey);
|
|
14592
|
-
} else if (this.authKey) {
|
|
14593
|
-
metadata.set(AUTH_KEY_HEADER, this.authKey);
|
|
14594
|
-
}
|
|
14595
15304
|
return new Promise((resolve, reject) => {
|
|
14596
|
-
|
|
15305
|
+
const metadata = new Metadata();
|
|
15306
|
+
const authKey = options?.authKey || this.authKey;
|
|
15307
|
+
if (authKey) {
|
|
15308
|
+
metadata.set(AUTH_KEY_HEADER, authKey);
|
|
15309
|
+
}
|
|
15310
|
+
this.rpcClient[method](
|
|
14597
15311
|
request,
|
|
14598
15312
|
metadata,
|
|
14599
15313
|
(error, response) => {
|
|
14600
|
-
if (error)
|
|
14601
|
-
|
|
15314
|
+
if (error) {
|
|
15315
|
+
reject(error);
|
|
15316
|
+
} else {
|
|
15317
|
+
resolve(response);
|
|
15318
|
+
}
|
|
14602
15319
|
}
|
|
14603
15320
|
);
|
|
14604
15321
|
});
|
|
14605
15322
|
}
|
|
14606
|
-
/**
|
|
14607
|
-
* Convert a protobuf Value to a JavaScript value
|
|
14608
|
-
* @param value - The protobuf Value object
|
|
14609
|
-
* @returns {any} - The converted JavaScript value
|
|
14610
|
-
*/
|
|
14611
|
-
convertProtobufValueToJS(value) {
|
|
14612
|
-
if (!value) return null;
|
|
14613
|
-
if (value.hasNullValue && value.hasNullValue()) {
|
|
14614
|
-
return null;
|
|
14615
|
-
}
|
|
14616
|
-
if (value.hasNumberValue && value.hasNumberValue()) {
|
|
14617
|
-
return value.getNumberValue();
|
|
14618
|
-
}
|
|
14619
|
-
if (value.hasStringValue && value.hasStringValue()) {
|
|
14620
|
-
return value.getStringValue();
|
|
14621
|
-
}
|
|
14622
|
-
if (value.hasBoolValue && value.hasBoolValue()) {
|
|
14623
|
-
return value.getBoolValue();
|
|
14624
|
-
}
|
|
14625
|
-
if (value.hasStructValue && value.hasStructValue()) {
|
|
14626
|
-
const struct = value.getStructValue();
|
|
14627
|
-
const result = {};
|
|
14628
|
-
if (struct && struct.getFieldsMap) {
|
|
14629
|
-
const fieldsMap = struct.getFieldsMap();
|
|
14630
|
-
fieldsMap.forEach((fieldValue, key) => {
|
|
14631
|
-
result[key] = this.convertProtobufValueToJS(fieldValue);
|
|
14632
|
-
});
|
|
14633
|
-
}
|
|
14634
|
-
return result;
|
|
14635
|
-
}
|
|
14636
|
-
if (value.hasListValue && value.hasListValue()) {
|
|
14637
|
-
const list = value.getListValue();
|
|
14638
|
-
if (list && list.getValuesList) {
|
|
14639
|
-
return list.getValuesList().map((item) => this.convertProtobufValueToJS(item));
|
|
14640
|
-
}
|
|
14641
|
-
return [];
|
|
14642
|
-
}
|
|
14643
|
-
if (typeof value.getNumberValue === "function") {
|
|
14644
|
-
return value.getNumberValue();
|
|
14645
|
-
}
|
|
14646
|
-
if (typeof value.getStringValue === "function") {
|
|
14647
|
-
return value.getStringValue();
|
|
14648
|
-
}
|
|
14649
|
-
if (typeof value.getBoolValue === "function") {
|
|
14650
|
-
return value.getBoolValue();
|
|
14651
|
-
}
|
|
14652
|
-
return value;
|
|
14653
|
-
}
|
|
14654
|
-
/**
|
|
14655
|
-
* Convert a JavaScript value to a protobuf Value
|
|
14656
|
-
* @param value - The JavaScript value to convert
|
|
14657
|
-
* @returns {any} - The protobuf Value object
|
|
14658
|
-
*/
|
|
14659
|
-
convertJSValueToProtobuf(value) {
|
|
14660
|
-
const protobufValue = new (__require("google-protobuf/google/protobuf/struct_pb")).Value();
|
|
14661
|
-
if (value === null || value === void 0) {
|
|
14662
|
-
protobufValue.setNullValue(0);
|
|
14663
|
-
} else if (typeof value === "number") {
|
|
14664
|
-
protobufValue.setNumberValue(value);
|
|
14665
|
-
} else if (typeof value === "string") {
|
|
14666
|
-
protobufValue.setStringValue(value);
|
|
14667
|
-
} else if (typeof value === "boolean") {
|
|
14668
|
-
protobufValue.setBoolValue(value);
|
|
14669
|
-
} else if (Array.isArray(value)) {
|
|
14670
|
-
const listValue = new (__require("google-protobuf/google/protobuf/struct_pb")).ListValue();
|
|
14671
|
-
const convertedValues = value.map(
|
|
14672
|
-
(item) => this.convertJSValueToProtobuf(item)
|
|
14673
|
-
);
|
|
14674
|
-
listValue.setValuesList(convertedValues);
|
|
14675
|
-
protobufValue.setListValue(listValue);
|
|
14676
|
-
} else if (typeof value === "object") {
|
|
14677
|
-
const structValue = new (__require("google-protobuf/google/protobuf/struct_pb")).Struct();
|
|
14678
|
-
const fieldsMap = structValue.getFieldsMap();
|
|
14679
|
-
Object.entries(value).forEach(([key, val]) => {
|
|
14680
|
-
fieldsMap.set(key, this.convertJSValueToProtobuf(val));
|
|
14681
|
-
});
|
|
14682
|
-
protobufValue.setStructValue(structValue);
|
|
14683
|
-
} else {
|
|
14684
|
-
protobufValue.setStringValue(String(value));
|
|
14685
|
-
}
|
|
14686
|
-
return protobufValue;
|
|
14687
|
-
}
|
|
14688
15323
|
};
|
|
14689
15324
|
var Client = class extends BaseClient {
|
|
14690
15325
|
constructor(config) {
|
|
@@ -14696,7 +15331,7 @@ var Client = class extends BaseClient {
|
|
|
14696
15331
|
* @returns {Promise<SmartWallet[]>} - The list of SmartWallet objects
|
|
14697
15332
|
*/
|
|
14698
15333
|
async getWallets(options) {
|
|
14699
|
-
const request = new
|
|
15334
|
+
const request = new avs_pb24.ListWalletReq();
|
|
14700
15335
|
const result = await this.sendGrpcRequest("listWallets", request, options);
|
|
14701
15336
|
return result.getItemsList().map((item) => item.toObject());
|
|
14702
15337
|
}
|
|
@@ -14708,7 +15343,7 @@ var Client = class extends BaseClient {
|
|
|
14708
15343
|
* @returns {Promise<SmartWallet>} - The added SmartWallet object
|
|
14709
15344
|
*/
|
|
14710
15345
|
async getWallet({ salt, factoryAddress }, options) {
|
|
14711
|
-
const request = new
|
|
15346
|
+
const request = new avs_pb24.GetWalletReq();
|
|
14712
15347
|
request.setSalt(salt);
|
|
14713
15348
|
if (factoryAddress) {
|
|
14714
15349
|
request.setFactoryAddress(factoryAddress);
|
|
@@ -14737,7 +15372,7 @@ var Client = class extends BaseClient {
|
|
|
14737
15372
|
* @returns {Promise<SmartWallet>} - The updated SmartWallet object
|
|
14738
15373
|
*/
|
|
14739
15374
|
async setWallet({ salt, factoryAddress }, { isHidden }, requestOptions) {
|
|
14740
|
-
const request = new
|
|
15375
|
+
const request = new avs_pb24.SetWalletReq();
|
|
14741
15376
|
request.setSalt(salt);
|
|
14742
15377
|
if (factoryAddress) {
|
|
14743
15378
|
request.setFactoryAddress(factoryAddress);
|
|
@@ -14785,7 +15420,7 @@ var Client = class extends BaseClient {
|
|
|
14785
15420
|
* @returns {Promise<{ items: Workflow[]; pageInfo: PageInfo }>} - The list of Workflow objects with nested pagination metadata
|
|
14786
15421
|
*/
|
|
14787
15422
|
async getWorkflows(addresses, options) {
|
|
14788
|
-
const request = new
|
|
15423
|
+
const request = new avs_pb24.ListTasksReq();
|
|
14789
15424
|
for (const a of addresses) {
|
|
14790
15425
|
request.addSmartWalletAddress(a);
|
|
14791
15426
|
}
|
|
@@ -14824,7 +15459,7 @@ var Client = class extends BaseClient {
|
|
|
14824
15459
|
* @returns {Promise<number>} - The count of workflows
|
|
14825
15460
|
*/
|
|
14826
15461
|
async getWorkflowCount(addresses, options) {
|
|
14827
|
-
const request = new
|
|
15462
|
+
const request = new avs_pb24.GetWorkflowCountReq();
|
|
14828
15463
|
request.setAddressesList(addresses);
|
|
14829
15464
|
const result = await this.sendGrpcRequest("getWorkflowCount", request, options);
|
|
14830
15465
|
return result.getTotal();
|
|
@@ -14840,7 +15475,7 @@ var Client = class extends BaseClient {
|
|
|
14840
15475
|
* @returns {Promise<{ items: Execution[]; pageInfo: PageInfo }>} - The list of Execution objects with nested pagination metadata
|
|
14841
15476
|
*/
|
|
14842
15477
|
async getExecutions(workflows, options) {
|
|
14843
|
-
const request = new
|
|
15478
|
+
const request = new avs_pb24.ListExecutionsReq();
|
|
14844
15479
|
for (const w of workflows) {
|
|
14845
15480
|
request.addTaskIds(w);
|
|
14846
15481
|
}
|
|
@@ -14874,7 +15509,7 @@ var Client = class extends BaseClient {
|
|
|
14874
15509
|
* @returns {Promise<Execution>} - The Execution object
|
|
14875
15510
|
*/
|
|
14876
15511
|
async getExecution(workflowId, executionId, options) {
|
|
14877
|
-
const request = new
|
|
15512
|
+
const request = new avs_pb24.ExecutionReq();
|
|
14878
15513
|
request.setTaskId(workflowId);
|
|
14879
15514
|
request.setExecutionId(executionId);
|
|
14880
15515
|
const result = await this.sendGrpcRequest("getExecution", request, options);
|
|
@@ -14887,7 +15522,7 @@ var Client = class extends BaseClient {
|
|
|
14887
15522
|
* @returns {Promise<number>} - The count of executions
|
|
14888
15523
|
*/
|
|
14889
15524
|
async getExecutionCount(workflows, options) {
|
|
14890
|
-
const request = new
|
|
15525
|
+
const request = new avs_pb24.GetExecutionCountReq();
|
|
14891
15526
|
request.setWorkflowIdsList(workflows);
|
|
14892
15527
|
const result = await this.sendGrpcRequest("getExecutionCount", request, options);
|
|
14893
15528
|
return result.getTotal();
|
|
@@ -14900,7 +15535,7 @@ var Client = class extends BaseClient {
|
|
|
14900
15535
|
* @returns {Promise<ExecutionStatus>} - The status of the execution
|
|
14901
15536
|
*/
|
|
14902
15537
|
async getExecutionStatus(workflowId, executionId, options) {
|
|
14903
|
-
const request = new
|
|
15538
|
+
const request = new avs_pb24.ExecutionReq();
|
|
14904
15539
|
request.setTaskId(workflowId);
|
|
14905
15540
|
request.setExecutionId(executionId);
|
|
14906
15541
|
const result = await this.sendGrpcRequest("getExecutionStatus", request, options);
|
|
@@ -14913,7 +15548,7 @@ var Client = class extends BaseClient {
|
|
|
14913
15548
|
* @returns {Promise<Workflow>} - The Workflow object
|
|
14914
15549
|
*/
|
|
14915
15550
|
async getWorkflow(id, options) {
|
|
14916
|
-
const request = new
|
|
15551
|
+
const request = new avs_pb24.IdReq();
|
|
14917
15552
|
request.setId(id);
|
|
14918
15553
|
const result = await this.sendGrpcRequest(
|
|
14919
15554
|
"getTask",
|
|
@@ -14936,7 +15571,7 @@ var Client = class extends BaseClient {
|
|
|
14936
15571
|
reason,
|
|
14937
15572
|
isBlocking = false
|
|
14938
15573
|
}, options) {
|
|
14939
|
-
const request = new
|
|
15574
|
+
const request = new avs_pb24.UserTriggerTaskReq();
|
|
14940
15575
|
request.setTaskId(id);
|
|
14941
15576
|
request.setReason(new reason_default(reason).toRequest());
|
|
14942
15577
|
request.setIsBlocking(isBlocking);
|
|
@@ -14950,7 +15585,7 @@ var Client = class extends BaseClient {
|
|
|
14950
15585
|
* @returns {Promise<boolean>} - Whether the workflow was successfully canceled
|
|
14951
15586
|
*/
|
|
14952
15587
|
async cancelWorkflow(id, options) {
|
|
14953
|
-
const request = new
|
|
15588
|
+
const request = new avs_pb24.IdReq();
|
|
14954
15589
|
request.setId(id);
|
|
14955
15590
|
const result = await this.sendGrpcRequest(
|
|
14956
15591
|
"cancelTask",
|
|
@@ -14966,7 +15601,7 @@ var Client = class extends BaseClient {
|
|
|
14966
15601
|
* @returns {Promise<boolean>} - Whether the workflow was successfully deleted
|
|
14967
15602
|
*/
|
|
14968
15603
|
async deleteWorkflow(id, options) {
|
|
14969
|
-
const request = new
|
|
15604
|
+
const request = new avs_pb24.IdReq();
|
|
14970
15605
|
request.setId(id);
|
|
14971
15606
|
const result = await this.sendGrpcRequest(
|
|
14972
15607
|
"deleteTask",
|
|
@@ -14986,7 +15621,7 @@ var Client = class extends BaseClient {
|
|
|
14986
15621
|
* @returns {Promise<boolean>} - True if the secret was created successfully
|
|
14987
15622
|
*/
|
|
14988
15623
|
async createSecret(name, value, options) {
|
|
14989
|
-
const request = new
|
|
15624
|
+
const request = new avs_pb24.CreateOrUpdateSecretReq();
|
|
14990
15625
|
request.setName(name);
|
|
14991
15626
|
request.setSecret(value);
|
|
14992
15627
|
if (options?.workflowId) {
|
|
@@ -15009,7 +15644,7 @@ var Client = class extends BaseClient {
|
|
|
15009
15644
|
* @returns {Promise<boolean>} - True if the secret was updated successfully
|
|
15010
15645
|
*/
|
|
15011
15646
|
async updateSecret(name, value, options) {
|
|
15012
|
-
const request = new
|
|
15647
|
+
const request = new avs_pb24.CreateOrUpdateSecretReq();
|
|
15013
15648
|
request.setName(name);
|
|
15014
15649
|
request.setSecret(value);
|
|
15015
15650
|
if (options?.workflowId) {
|
|
@@ -15036,7 +15671,7 @@ var Client = class extends BaseClient {
|
|
|
15036
15671
|
* @returns {Promise<{ items: SecretProps[]; pageInfo: PageInfo }>} - The list of Secret objects with nested pagination metadata
|
|
15037
15672
|
*/
|
|
15038
15673
|
async getSecrets(options) {
|
|
15039
|
-
const request = new
|
|
15674
|
+
const request = new avs_pb24.ListSecretsReq();
|
|
15040
15675
|
if (options?.workflowId) {
|
|
15041
15676
|
request.setWorkflowId(options.workflowId);
|
|
15042
15677
|
}
|
|
@@ -15091,7 +15726,7 @@ var Client = class extends BaseClient {
|
|
|
15091
15726
|
* @returns {Promise<boolean>} - True if the secret was deleted successfully
|
|
15092
15727
|
*/
|
|
15093
15728
|
async deleteSecret(name, options) {
|
|
15094
|
-
const request = new
|
|
15729
|
+
const request = new avs_pb24.DeleteSecretReq();
|
|
15095
15730
|
request.setName(name);
|
|
15096
15731
|
if (options?.workflowId) {
|
|
15097
15732
|
request.setWorkflowId(options.workflowId);
|
|
@@ -15103,237 +15738,72 @@ var Client = class extends BaseClient {
|
|
|
15103
15738
|
return result.getValue();
|
|
15104
15739
|
}
|
|
15105
15740
|
/**
|
|
15106
|
-
* Run a node with inputs
|
|
15741
|
+
* Run a node with inputs for testing purposes
|
|
15107
15742
|
* @param {RunNodeWithInputsRequest} params - The parameters for running the node
|
|
15108
|
-
* @param {string} params.nodeType - The type of the node
|
|
15743
|
+
* @param {string} params.nodeType - The type of the node (restApi, customCode, etc.)
|
|
15109
15744
|
* @param {Record<string, any>} params.nodeConfig - The configuration for the node
|
|
15110
|
-
* @param {Record<string, any>} params.inputVariables -
|
|
15111
|
-
* @param {string} params.walletAddress - The wallet address to use for the node
|
|
15745
|
+
* @param {Record<string, any>} params.inputVariables - Variables to pass to the node
|
|
15112
15746
|
* @param {RequestOptions} options - Request options
|
|
15113
15747
|
* @returns {Promise<RunNodeWithInputsResponse>} - The response from running the node
|
|
15114
15748
|
*/
|
|
15115
15749
|
async runNodeWithInputs({ nodeType, nodeConfig, inputVariables = {} }, options) {
|
|
15116
|
-
|
|
15117
|
-
|
|
15118
|
-
|
|
15119
|
-
|
|
15120
|
-
|
|
15121
|
-
|
|
15122
|
-
|
|
15123
|
-
|
|
15124
|
-
}
|
|
15125
|
-
const request = new avs_pb22.RunNodeWithInputsReq();
|
|
15126
|
-
let protobufNodeType;
|
|
15127
|
-
switch (nodeType) {
|
|
15128
|
-
// Trigger types - map to CUSTOM_CODE since they're handled specially by the backend
|
|
15129
|
-
case "blockTrigger":
|
|
15130
|
-
case "fixedTimeTrigger":
|
|
15131
|
-
case "cronTrigger":
|
|
15132
|
-
case "eventTrigger":
|
|
15133
|
-
case "manualTrigger":
|
|
15134
|
-
protobufNodeType = avs_pb22.NodeType.NODE_TYPE_CUSTOM_CODE;
|
|
15135
|
-
break;
|
|
15136
|
-
// Regular node types
|
|
15137
|
-
default:
|
|
15138
|
-
protobufNodeType = NodeTypeGoConverter2.fromGoString(nodeType);
|
|
15139
|
-
break;
|
|
15140
|
-
}
|
|
15141
|
-
request.setNodeType(protobufNodeType);
|
|
15142
|
-
const nodeConfigMap = request.getNodeConfigMap();
|
|
15143
|
-
for (const [key, value] of Object.entries(nodeConfig)) {
|
|
15144
|
-
nodeConfigMap.set(key, this.convertJSValueToProtobuf(value));
|
|
15145
|
-
}
|
|
15146
|
-
if (inputVariables && Object.keys(inputVariables).length > 0) {
|
|
15147
|
-
const inputVarsMap = request.getInputVariablesMap();
|
|
15148
|
-
for (const [key, value] of Object.entries(inputVariables)) {
|
|
15149
|
-
inputVarsMap.set(key, this.convertJSValueToProtobuf(value));
|
|
15150
|
-
}
|
|
15151
|
-
}
|
|
15152
|
-
const result = await this.sendGrpcRequest("runNodeWithInputs", request, options);
|
|
15153
|
-
let data;
|
|
15154
|
-
const outputCase = result.getOutputDataCase();
|
|
15155
|
-
if (outputCase !== avs_pb22.RunNodeWithInputsResp.OutputDataCase.OUTPUT_DATA_NOT_SET) {
|
|
15156
|
-
switch (outputCase) {
|
|
15157
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.ETH_TRANSFER:
|
|
15158
|
-
data = result.getEthTransfer()?.toObject();
|
|
15159
|
-
break;
|
|
15160
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.GRAPHQL:
|
|
15161
|
-
data = result.getGraphql()?.toObject();
|
|
15162
|
-
break;
|
|
15163
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.CONTRACT_READ:
|
|
15164
|
-
data = result.getContractRead()?.toObject();
|
|
15165
|
-
break;
|
|
15166
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.CONTRACT_WRITE:
|
|
15167
|
-
data = result.getContractWrite()?.toObject();
|
|
15168
|
-
break;
|
|
15169
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.CUSTOM_CODE:
|
|
15170
|
-
data = result.getCustomCode()?.toObject();
|
|
15171
|
-
break;
|
|
15172
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.REST_API:
|
|
15173
|
-
data = result.getRestApi()?.toObject();
|
|
15174
|
-
break;
|
|
15175
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.BRANCH:
|
|
15176
|
-
data = result.getBranch()?.toObject();
|
|
15177
|
-
break;
|
|
15178
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.FILTER:
|
|
15179
|
-
data = result.getFilter()?.toObject();
|
|
15180
|
-
break;
|
|
15181
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.LOOP:
|
|
15182
|
-
data = result.getLoop()?.toObject();
|
|
15183
|
-
break;
|
|
15184
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.BLOCK_TRIGGER:
|
|
15185
|
-
data = result.getBlockTrigger()?.toObject();
|
|
15186
|
-
break;
|
|
15187
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.FIXED_TIME_TRIGGER:
|
|
15188
|
-
data = result.getFixedTimeTrigger()?.toObject();
|
|
15189
|
-
break;
|
|
15190
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.CRON_TRIGGER:
|
|
15191
|
-
data = result.getCronTrigger()?.toObject();
|
|
15192
|
-
break;
|
|
15193
|
-
case avs_pb22.RunNodeWithInputsResp.OutputDataCase.EVENT_TRIGGER:
|
|
15194
|
-
data = result.getEventTrigger()?.toObject();
|
|
15195
|
-
break;
|
|
15196
|
-
}
|
|
15197
|
-
}
|
|
15198
|
-
return {
|
|
15199
|
-
success: result.getSuccess(),
|
|
15200
|
-
data,
|
|
15201
|
-
error: result.getError(),
|
|
15202
|
-
nodeId: result.getNodeId()
|
|
15203
|
-
};
|
|
15204
|
-
} catch (error) {
|
|
15750
|
+
const triggerTypes = [
|
|
15751
|
+
TriggerType9.Block,
|
|
15752
|
+
TriggerType9.FixedTime,
|
|
15753
|
+
TriggerType9.Cron,
|
|
15754
|
+
TriggerType9.Event,
|
|
15755
|
+
TriggerType9.Manual
|
|
15756
|
+
];
|
|
15757
|
+
if (triggerTypes.includes(nodeType)) {
|
|
15205
15758
|
return {
|
|
15206
15759
|
success: false,
|
|
15207
|
-
error:
|
|
15208
|
-
|
|
15209
|
-
|
|
15210
|
-
|
|
15211
|
-
|
|
15212
|
-
const
|
|
15213
|
-
|
|
15214
|
-
|
|
15215
|
-
|
|
15216
|
-
|
|
15217
|
-
}
|
|
15218
|
-
|
|
15219
|
-
|
|
15220
|
-
|
|
15221
|
-
|
|
15222
|
-
|
|
15223
|
-
|
|
15224
|
-
|
|
15225
|
-
|
|
15226
|
-
|
|
15227
|
-
|
|
15228
|
-
|
|
15229
|
-
|
|
15230
|
-
|
|
15231
|
-
filter: NodeType13.Filter,
|
|
15232
|
-
loop: NodeType13.Loop
|
|
15233
|
-
};
|
|
15234
|
-
return typeMap[nodeType] || null;
|
|
15235
|
-
}
|
|
15236
|
-
createNodeData(nodeType, config) {
|
|
15237
|
-
switch (nodeType) {
|
|
15238
|
-
case "blockTrigger":
|
|
15239
|
-
return {
|
|
15240
|
-
config: {
|
|
15241
|
-
lang: 0,
|
|
15242
|
-
// JavaScript
|
|
15243
|
-
source: "return { blockNumber: Math.floor(Math.random() * 10000000) };"
|
|
15244
|
-
// Simulate block trigger
|
|
15245
|
-
}
|
|
15246
|
-
};
|
|
15247
|
-
case "restApi":
|
|
15248
|
-
return {
|
|
15249
|
-
config: {
|
|
15250
|
-
url: config.url || "",
|
|
15251
|
-
method: config.method || "GET",
|
|
15252
|
-
body: config.body || "",
|
|
15253
|
-
headersMap: Object.entries(config.headers || {})
|
|
15254
|
-
}
|
|
15255
|
-
};
|
|
15256
|
-
case "contractRead":
|
|
15257
|
-
return {
|
|
15258
|
-
config: {
|
|
15259
|
-
contractAddress: config.contractAddress || "",
|
|
15260
|
-
callData: config.callData || "",
|
|
15261
|
-
contractAbi: config.contractAbi || ""
|
|
15262
|
-
}
|
|
15263
|
-
};
|
|
15264
|
-
case "customCode":
|
|
15265
|
-
return {
|
|
15266
|
-
config: {
|
|
15267
|
-
lang: config.lang || 0,
|
|
15268
|
-
// JavaScript
|
|
15269
|
-
source: config.source || 'return { message: "Node executed successfully" };'
|
|
15270
|
-
}
|
|
15271
|
-
};
|
|
15272
|
-
case "loop":
|
|
15273
|
-
return {
|
|
15274
|
-
config: {
|
|
15275
|
-
sourceId: config.sourceId || "",
|
|
15276
|
-
iterVal: config.iterVal || "",
|
|
15277
|
-
iterKey: config.iterKey || ""
|
|
15278
|
-
}
|
|
15279
|
-
};
|
|
15280
|
-
case "branch":
|
|
15281
|
-
return {
|
|
15282
|
-
config: {
|
|
15283
|
-
conditionsList: config.conditions || []
|
|
15284
|
-
}
|
|
15285
|
-
};
|
|
15286
|
-
case "filter":
|
|
15287
|
-
return {
|
|
15288
|
-
config: {
|
|
15289
|
-
expression: config.expression || "",
|
|
15290
|
-
sourceId: config.sourceId || config.input || ""
|
|
15291
|
-
}
|
|
15292
|
-
};
|
|
15293
|
-
default:
|
|
15294
|
-
throw new Error(`Unsupported node type: ${nodeType}`);
|
|
15295
|
-
}
|
|
15296
|
-
}
|
|
15297
|
-
createTempWorkflowForNode(node, triggerId, inputVariables) {
|
|
15298
|
-
if (node.type === NodeType13.CustomCode && inputVariables && Object.keys(inputVariables).length > 0) {
|
|
15299
|
-
const customCodeData = node.data;
|
|
15300
|
-
if (customCodeData.config) {
|
|
15301
|
-
const variableDefinitions = Object.entries(inputVariables).map(([key, value]) => {
|
|
15302
|
-
const valueStr = typeof value === "string" ? `"${value}"` : JSON.stringify(value);
|
|
15303
|
-
return `const ${key} = ${valueStr};`;
|
|
15304
|
-
}).join("\n");
|
|
15305
|
-
customCodeData.config.source = `${variableDefinitions}
|
|
15306
|
-
${customCodeData.config.source}`;
|
|
15307
|
-
}
|
|
15308
|
-
}
|
|
15309
|
-
const trigger = factory_default.create({
|
|
15310
|
-
id: triggerId,
|
|
15311
|
-
name: "manual_trigger",
|
|
15312
|
-
type: TriggerType9.Manual,
|
|
15313
|
-
data: inputVariables
|
|
15314
|
-
// Store input variables in the trigger data
|
|
15315
|
-
});
|
|
15316
|
-
return new workflow_default({
|
|
15317
|
-
smartWalletAddress: "",
|
|
15318
|
-
trigger,
|
|
15319
|
-
nodes: [node],
|
|
15320
|
-
edges: [
|
|
15321
|
-
new edge_default({
|
|
15322
|
-
id: `edge_${Date.now()}`,
|
|
15323
|
-
source: triggerId,
|
|
15324
|
-
target: node.id
|
|
15325
|
-
})
|
|
15326
|
-
],
|
|
15327
|
-
startAt: Date.now(),
|
|
15328
|
-
expiredAt: Date.now() + 36e5,
|
|
15329
|
-
// 1 hour from now
|
|
15330
|
-
maxExecution: 1
|
|
15331
|
-
});
|
|
15760
|
+
error: `Trigger type "${nodeType}" should use the runTrigger() method instead of runNodeWithInputs()`,
|
|
15761
|
+
nodeId: ""
|
|
15762
|
+
};
|
|
15763
|
+
}
|
|
15764
|
+
const request = new avs_pb24.RunNodeWithInputsReq();
|
|
15765
|
+
const protobufNodeType = NodeTypeGoConverter2.fromGoString(nodeType);
|
|
15766
|
+
request.setNodeType(protobufNodeType);
|
|
15767
|
+
const nodeConfigMap = request.getNodeConfigMap();
|
|
15768
|
+
for (const [key, value] of Object.entries(nodeConfig)) {
|
|
15769
|
+
nodeConfigMap.set(key, convertJSValueToProtobuf(value));
|
|
15770
|
+
}
|
|
15771
|
+
if (inputVariables && Object.keys(inputVariables).length > 0) {
|
|
15772
|
+
const inputVarsMap = request.getInputVariablesMap();
|
|
15773
|
+
for (const [key, value] of Object.entries(inputVariables)) {
|
|
15774
|
+
inputVarsMap.set(key, convertJSValueToProtobuf(value));
|
|
15775
|
+
}
|
|
15776
|
+
}
|
|
15777
|
+
const result = await this.sendGrpcRequest("runNodeWithInputs", request, options);
|
|
15778
|
+
return {
|
|
15779
|
+
success: result.getSuccess(),
|
|
15780
|
+
data: factory_default2.fromOutputData(result),
|
|
15781
|
+
error: result.getError(),
|
|
15782
|
+
nodeId: result.getNodeId()
|
|
15783
|
+
};
|
|
15332
15784
|
}
|
|
15333
|
-
|
|
15785
|
+
/**
|
|
15786
|
+
* Run a trigger for testing purposes
|
|
15787
|
+
* @param {RunTriggerRequest} params - The parameters for running the trigger
|
|
15788
|
+
* @param {string} params.triggerType - The type of the trigger (blockTrigger, cronTrigger, etc.)
|
|
15789
|
+
* @param {Record<string, any>} params.triggerConfig - The configuration for the trigger
|
|
15790
|
+
* @param {RequestOptions} options - Request options
|
|
15791
|
+
* @returns {Promise<RunTriggerResponse>} - The response from running the trigger
|
|
15792
|
+
*/
|
|
15793
|
+
async runTrigger({ triggerType, triggerConfig }, options) {
|
|
15794
|
+
const request = new avs_pb24.RunTriggerReq();
|
|
15795
|
+
const protobufTriggerType = TriggerTypeGoConverter.fromGoString(triggerType);
|
|
15796
|
+
request.setTriggerType(protobufTriggerType);
|
|
15797
|
+
const triggerConfigMap = request.getTriggerConfigMap();
|
|
15798
|
+
for (const [key, value] of Object.entries(triggerConfig)) {
|
|
15799
|
+
triggerConfigMap.set(key, convertJSValueToProtobuf(value));
|
|
15800
|
+
}
|
|
15801
|
+
const result = await this.sendGrpcRequest("runTrigger", request, options);
|
|
15334
15802
|
return {
|
|
15335
|
-
|
|
15336
|
-
|
|
15803
|
+
success: result.getSuccess(),
|
|
15804
|
+
data: factory_default.fromOutputData(result),
|
|
15805
|
+
error: result.getError(),
|
|
15806
|
+
triggerId: result.getTriggerId()
|
|
15337
15807
|
};
|
|
15338
15808
|
}
|
|
15339
15809
|
};
|